Commit 3832c96e authored by guinux's avatar guinux

new icons, gnome shell search provider and extension

parent 75bd12cc
install_data('pamac-installer.desktop', install_dir: join_paths(get_option('datadir'), 'applications'))
install_data('pamac-manager.desktop', install_dir: join_paths(get_option('datadir'), 'applications'))
install_data('pamac-updater.desktop', install_dir: join_paths(get_option('datadir'), 'applications'))
install_data('pamac-tray.desktop', install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
install_data('org.manjaro.pamac.manager.desktop', install_dir: join_paths(get_option('datadir'), 'applications'))
install_data('pamac-tray.desktop', install_dir: join_paths(get_option('sysconfdir'), 'xdg', 'autostart'))
if get_option('enable-appindicator')
install_data('pamac-tray-appindicator.desktop', install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
install_data('pamac-tray-appindicator.desktop', install_dir: join_paths(get_option('sysconfdir'), 'xdg', 'autostart'))
endif
[Desktop Entry]
Name=Add/Remove Software
Name[af]=Voeg by/verwyder sagteware
Name[ar]=إضافة وإزالة البرمجيات
Name[as]=চালনাজ্ঞান যোগ কৰক/আঁতৰাই দিয়ক
Name[ast]=Amestar/Quitar software
Name[be]=Дадаць/выдаліць апраграмаванне
Name[bg]=Инсталиране/деинсталиране на софтуер
Name[bn]=সফ্টওয়্যার যোগ/অপসারণ
Name[bn_IN]=সফ্টওয়্যার যোগ/অপসারণ করুন
Name[ca]=Afegeix/Suprimeix programari
Name[ca@valencia]=Afig/Suprimeix programari
Name[cs]=Přidat/odebrat software
Name[da]=Tilføj/fjern software
Name[de]=Software hinzufügen/entfernen
Name[el]=Προσθαφαίρεση λογισμικού
Name[en@shaw]=𐑨𐑛/𐑮𐑦𐑥𐑵𐑝 𐑕𐑪𐑓𐑑𐑢𐑺
Name[en_GB]=Add/Remove Software
Name[eo]=Aldoni/forigi instalitan pogramaron
Name[es]=Añadir/Quitar software
Name[et]=Tarkvara lisamine ja eemaldamine
Name[eu]=Gehitu/Kendu softwarea
Name[fa]=افزودن/حذف نرم‌افزار
Name[fi]=Lisää tai poista ohjelmistoja
Name[fr]=Ajouter/supprimer des logiciels
Name[ga]=Cuir Leis/Bain Bogearraí
Name[gl]=Engadir ou eliminar programas
Name[gu]=સોફ્ટવેરને ઉમેરો/દૂર કરો
Name[he]=הוספת/הסרת תכנה
Name[hi]=सॉफ्टवेयर जोड़ें/हटायें
Name[hu]=Szoftver telepítése/eltávolítása
Name[id]=Tambah/Hapus Piranti Lunak
Name[it]=Aggiungi/Rimuovi software
Name[ja]=ソフトウェアの追加と削除
Name[kn]=ತಂತ್ರಾಂಶವನ್ನು ಸೇರಿಸು ಅಥವ ತೆಗೆ
Name[ko]=소프트웨어 추가/제거
Name[lt]=Įdiegti ar šalinti programinę įrangą
Name[lv]=Pievienot/Izņemt programmatūru
Name[mk]=Инсталирај/избриши софтвер
Name[ml]=സോഫ്റ്റ്‌വെയര്‍ ചേര്‍ക്കുക/നീക്കം ചെയ്യുക
Name[mr]=सॉफ्टवेअर जोडा/काढून टाका
Name[ms]=Menambah/Memadam perisian
Name[nb]=Legg til/fjern programvare
Name[nl]=Software installeren/verwijderen
Name[nn]=Legg til/fjern programvare
Name[or]=ସଫ୍ଟୱେର ଯୋଗ/ଅପସାରଣ କରନ୍ତୁ
Name[pa]=ਸਾਫਟਵੇਅਰ ਸ਼ਾਮਲ/ਹਟਾਓ
Name[pl]=Dodanie/usuwanie oprogramowania
Name[pt]=Adicionar/Remover Software
Name[pt_BR]=Adicionar/remover programas
Name[ro]=Adăugare sau ștergere programe
Name[ru]=Установка и удаление программ
Name[sk]=Pridanie alebo odstránenie softvéru
Name[sl]=Upravljanje programske opreme
Name[sr]=Додај-уклони програме
Name[sr@latin]=Dodaj-ukloni programe
Name[sv]=Lägg till/Ta bort programvara
Name[ta]=மென்பொருளை சேர்த்தல்/நீக்குதல்
Name[te]=సాఫ్ట్‍వేర్ జతచేయి/తీసివేయి
Name[th]=เพิ่ม/ลบซอฟต์แวร์
Name[tr]=Yazılım Ekle/Kaldır
Name[ug]=يۇمشاق دېتالنى قوش/ئۆچۈر
Name[uk]=Встановлення та вилучення програм
Name[vi]=Thêm/Gỡ phần mềm
Name[zh_CN]=添加/删除软件
Name[zh_HK]=加入或移除軟件
Name[zh_TW]=加入或移除軟體
Comment=Add or remove software installed on the system
Comment[af]=Voeg by of verwyder sagteware geïnstalleer op die stelsel
Comment[ar]=أضف أو أزل البرمجيات المثبتة على النظام
Comment[as]=ব্যৱস্থাপ্ৰণালীত সংস্থাপিত চালনাজ্ঞান উন্নয়ন কৰক
Comment[ast]=Amestar o quitar software instaláu nel sistema
Comment[be]=Дадаць ці выдаліць апраграмаванне, усталяванае ў сістэме
Comment[bg]=Инсталиране и деинсталиране на софтуер към системата
Comment[bn]=সিস্টেমে সফ্টওয়্যার যোগ করুন অথবা ইনস্টল করা সফ্টওয়্যার অপসারণ
Comment[bn_IN]=সিস্টেমে সফ্টওয়্যার যোগ করুন অথবা ইনস্টল করা সফ্টওয়্যার সরিয়ে ফেলুন
Comment[ca]=Afegeix o suprimeix programari instal·lat en el sistema
Comment[ca@valencia]=Afig o suprimeix programari instal·lat en el sistema
Comment[cs]=Přidat nebo odebrat software instalovaný v systému
Comment[da]=Tilføj eller fjern software installeret på systemet
Comment[de]=Auf dem System installierte Software aktualisieren oder neue Software hinzufügen
Comment[el]=Προσθαφαίρεση λογισμικού στο σύστημα
Comment[en@shaw]=𐑨𐑛 𐑹 𐑮𐑦𐑥𐑵𐑝 𐑕𐑪𐑓𐑑𐑢𐑺 𐑦𐑯𐑕𐑑𐑷𐑤𐑛 𐑪𐑯 𐑞 𐑕𐑦𐑕𐑑𐑩𐑥
Comment[en_GB]=Add or remove software installed on the system
Comment[eo]=Aldoni aŭ forigi instalitan pogramaron sur via sistemo
Comment[es]=Añadir o quitar software instalado en el sistema
Comment[et]=Arvutisse paigaldatud tarkvara lisamine ja eemaldamine
Comment[eu]=Gehitu edo kendu sisteman instalatutako softwarea
Comment[fa]=حذف یا افزودن نرم‌افزارهای نصب شده بر روی این سیستم
Comment[fi]=Lisää tai poista järjestelmään asennettuja ohjelmistoja
Comment[fr]=Ajouter ou supprimer des logiciels installés sur le système
Comment[gl]=Engadir e eliminar o software instalado no sistema
Comment[gu]=સિસ્ટમ પર સ્થાપિત થયેલ સોફ્ટવેરને ઉમેરો અથવા દૂર કરો
Comment[he]=הוספה או הסרה של יישומי המערכת
Comment[hi]=सिस्टम पर संस्थापित सॉफ्टवेयर जोड़ें या हटाएँ
Comment[hu]=Szoftverek rendszerre telepítése vagy eltávolítása
Comment[id]=Tambah atau hapus perangkat lunak yang terpasang pada sistem
Comment[it]=Aggiunge o rimuove software installato sul sistema
Comment[ja]=システムにインストールされたパッケージの追加と削除
Comment[kn]=ಗಣಕಕ್ಕೆ ತಂತ್ರಾಂಶವನ್ನು ಸೇರಿಸು ಅಥವ ಅನುಸ್ಥಾಪಿತಗೊಂಡಿರುವುದನ್ನು ತೆಗೆದು ಹಾಕು
Comment[ko]=시스템에 설치하는 소프트웨어를 추가하거나 제거합니다
Comment[lt]=Įdiegti ar šalinti sistemoje įdiegtą programinę įrangą
Comment[lv]=Pievienot vai izņemt programmatūru sistēmā
Comment[mk]=Инсталирајте или избришете софтвер на системот
Comment[ml]=സിസ്റ്റത്തില്‍ ഇന്‍സ്റ്റോള്‍ ചെയ്തിരിക്കുന്ന സോഫ്റ്റ്‌വെയര്‍ ചേര്‍ക്കുക അല്ലെങ്കില്‍ നീക്കം ചെയ്യുക
Comment[mr]=प्रणालीवर प्रतिष्ठापीत सॉफ्टवेअर समावेष करा किंवा काढूण टाका
Comment[ms]=Menambah atau memadam perisian yang dipasang pada sistem
Comment[nb]=Legg til eller fjern programvare på systemet
Comment[nl]=Software installeren op, of verwijderen van het systeem
Comment[nn]=Legg til eller fjern programvare som er installert på systemet
Comment[or]=ତନ୍ତ୍ରରେ ସ୍ଥାପିତ ସଫ୍ଟୱେରରେ ଯୋଗକରନ୍ତୁ କିମ୍ବା କାଢ଼ି ଦିଅନ୍ତୁ
Comment[pa]=ਸਿਸਟਮ ਉੱਤੇ ਸਾਫਟਵੇਅਰ ਇੰਸਟਾਲ ਕਰੋ ਜਾਂ ਇੰਸਟਾਲ ਕੀਤੇ ਹਟਾਓ
Comment[pl]=Instalowanie lub usuwanie oprogramowania zainstalowanego w systemie
Comment[pt]=Adicionar ou remover software instalado no sistema
Comment[pt_BR]=Adicione ou remova programas instalados no sistema
Comment[ro]=Adăugați sau ștergeți programe instalate pe sistem
Comment[ru]=Установка и удаление программ, установленных в системе
Comment[sk]=Pridáva alebo odstraňuje softvér nainštalovaný v počítači
Comment[sl]=Nameščanje in odstranjevanje programske opreme sistema
Comment[sr]=Додајте или уклоните програме инсталиране на овом систему
Comment[sr@latin]=Dodajte ili uklonite programe instalirane na ovom sistemu
Comment[sv]=Lägg till eller ta bort programvara installerad på systemet
Comment[ta]=கணினியில் நிறுவப்பட்ட மென்பொருளை சேர்க்கவும் அல்லது நீக்கவும்
Comment[te]=ఈ వ్యవస్థ నందు స్థాపించిన సాఫ్ట్‍వేర్‌ను జతచేయి లేదా తీసివేయి
Comment[th]=เพิ่มหรือลบซอฟต์แวร์ที่ติดตั้งในระบบ
Comment[tr]=Sisteminizde yüklü yazılımları ekleyin veya kaldırın
Comment[ug]=سىستېمىڭىزغا ئورنىتىلغان يۇمشاق دېتاللارنى قوشىدۇ ياكى ئۆچۈرىدۇ
Comment[uk]=Встановлення та вилучення програм у системі
Comment[vi]=Thêm hoặc gỡ phần mềm cài đặt trên hệ thống
Comment[zh_CN]=添加或删除系统中安装的软件
Comment[zh_HK]=加入或移除系統上安裝的軟件
Comment[zh_TW]=加入或移除系統上安裝的軟體
Icon=system-software-install
Exec=pamac-manager
Terminal=false
Type=Application
Categories=GNOME;GTK;System;Settings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;
StartupNotify=true
DBusActivatable=true
......@@ -5,4 +5,4 @@ Exec=sh -c "GDK_BACKEND=x11 pamac-tray"
Terminal=false
Type=Application
StartupNotify=false
NotShowIn=KDE;
NotShowIn=KDE;GNOME;
install_data('org.manjaro.pamac.system.service', install_dir: join_paths(get_option('datadir'), 'dbus-1/system-services'))
install_data('org.manjaro.pamac.system.conf', install_dir: join_paths(get_option('sysconfdir'), 'dbus-1/system.d'))
dbusconf = configuration_data()
dbusconf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
configure_file(
input: 'org.manjaro.pamac.manager.service.in',
output: 'org.manjaro.pamac.manager.service',
configuration: dbusconf,
install: true,
install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services'),
)
configure_file(
input: 'org.manjaro.pamac.system.service.in',
output: 'org.manjaro.pamac.system.service',
configuration: dbusconf,
install: true,
install_dir: join_paths(get_option('datadir'), 'dbus-1', 'system-services'),
)
install_data('org.manjaro.pamac.system.conf', install_dir: join_paths(get_option('sysconfdir'), 'dbus-1', 'system.d'))
[D-BUS Service]
Name=org.manjaro.pamac.manager
Exec=@bindir@/pamac-manager --gapplication-service
[D-BUS Service]
Name=org.manjaro.pamac.system
Exec=@bindir@/pamac-system-daemon
User=root
SystemdService=pamac-system.service
install_data('org.manjaro.pamac.manager.search-provider.ini',
install_dir: join_paths(get_option('datadir'), 'gnome-shell', 'search-providers'),
)
install_subdir('pamac-updates@manjaro.org',
install_dir: join_paths(get_option('datadir'), 'gnome-shell', 'extensions'),
)
[Shell Search Provider]
DesktopId=org.manjaro.pamac.manager.desktop
BusName=org.manjaro.pamac.manager
ObjectPath=/org/manjaro/pamac/manager/SearchProvider
Version=2
# pamac-updates
GNOME Shell Updates indicator for Pamac
## Features
- Optional update count display on panel
- Optional notification on new updates
## Credits
This is only a rebranded and customized extension, original extension can be found here
https://github.com/RaphaelRochet/arch-update
Any credit at the original author Raphaël Rochet
Contributor [Matti Hyttinen](https://github.com/Chrysostomus)
This diff is collapsed.
{
"description": "GNOME Shell Updates indicator for Pamac.",
"name": "Pamac Updates Indicator",
"shell-version": [
"3.28",
"3.30"
],
"url": "https://gitlab.manjaro.org/applications/pamac",
"uuid": "pamac-updates@manjaro.org",
"version": 1
}
/*
* pamac-vala
*
* Copyright 2016 Raphaël Rochet
* Copyright (C) 2018 Guillaume Benoit <guillaume@manjaro.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a get of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
.pamac-updates-list {
margin: 10px;
padding-left: 20px;
}
.pamac-updates-menubutton {
/* Meant to be used as an override to display a small system-menu-action */
border-radius: 10px;
padding: 0px 4px;
}
.pamac-updates-menubutton:hover, .pamac-updates-menubutton:focus {
/* 1px borders disapears, need to compensate */
padding: 1px 5px;
}
.pamac-updates-menubutton > StIcon {
icon-size: 16px;
}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1">
<rect fill="#fabd7f" width="16" height="16" x="-16" y="-16" rx=".857" ry=".857" transform="matrix(0,-1,-1,0,0,0)"/>
<path fill="#3f3f3f" d="m7.243 2c-0.2374 0-0.243 0.206-0.243 0.4617v7.5382h-2l3 4.0001 3-4h-2v-7.5382c0-0.2553-0.006-0.4614-0.243-0.4614z"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text { color:#d3dae3; } .ColorScheme-Highlight { color:#5294e2; }
</style>
</defs>
<g>
<path style="fill:currentColor;fill-rule:evenodd" class="ColorScheme-Text" d="M 15,9 16.414,10.4141 11,16 7.5859,12.4141 9,11 11,13.172 Z M 12,4 C 9.8519,5.9698 6.2346,7.7049 5,8 5,13.333 7.625,19.111 12,20 16.375,19.111 19,13.333 19,8 17.765,7.7049 14.148,5.9698 12,4 Z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text { color:#d3dae3; } .ColorScheme-Highlight { color:#5294e2; }
</style>
</defs>
<g>
<path style="fill:currentColor;fill-rule:evenodd" class="ColorScheme-Text" d="m 10,10 3,0 0,5 1,0 0,2 -4,0 0,-2 1,0 0,-3 -1,0 0,-2 z m 1,-3 2,0 0,2 -2,0 0,-2 z M 12,4 C 9.8519,5.9698 6.2346,7.7049 5,8 5,13.333 7.625,19.111 12,20 16.375,19.111 19,13.333 19,8 17.765,7.7049 14.148,5.9698 12,4 Z"/>
<circle style="fill:currentColor" class="ColorScheme-Highlight" cx="19" cy="19" r="2"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" version="1">
<rect fill="#fabd7f" width="28" height="28" x="-30" y="-30" rx="1.5" ry="1.5" transform="matrix(0,-1,-1,0,0,0)"/>
<path fill="#fff" opacity=".1" d="m3.5 2c-0.831 0-1.5 0.669-1.5 1.5v1c0-0.831 0.669-1.5 1.5-1.5h25c0.831 0 1.5 0.669 1.5 1.5v-1c0-0.831-0.669-1.5-1.5-1.5h-25z"/>
<path fill="#3f3f3f" d="m14.572 6c-0.39572 0-0.71484 0.34338-0.71484 0.76953v12.307h-2.8574l5 6.924 5-6.9238h-2.8574v-12.307c0-0.4256-0.32-0.769-0.715-0.769z"/>
<path opacity=".2" d="m2 28.5v1c0 0.831 0.669 1.5 1.5 1.5h25c0.831 0 1.5-0.669 1.5-1.5v-1c0 0.831-0.669 1.5-1.5 1.5h-25c-0.831 0-1.5-0.669-1.5-1.5z"/>
</svg>
subdir('applications')
subdir('config')
subdir('dbus')
subdir('gnome-shell')
subdir('icons')
subdir('mime')
subdir('polkit')
......
......@@ -4,5 +4,5 @@ i18n.merge_file(
type: 'xml',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'polkit-1/actions')
install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions')
)
project('pamac', 'c', 'vala')
project('pamac', 'c', 'vala',
default_options : [
'prefix=/usr',
'sysconfdir=/etc',])
subdir('resources')
subdir('src')
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1">
<path style="fill:#b9b9b9" d="m8 1c-2.216 0-4 1.784-4 4v2h2v-2c0-1.108 0.892-2 2-2s2 0.892 2 2v2h2v-2c0-2.216-1.784-4-4-4z"/>
<rect style="fill:#9b9b9b" width="9" height="12" x="-16" y="-14" rx="1" ry="1" transform="matrix(0,-1,-1,0,0,0)"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<rect style="fill:#e4e4e4" width="16" height="16" x="-16" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="opacity:0.5;fill:#ac6f11" d="M 6.5976562 0 C 6.2666588 0 6 0.34239436 6 0.76757812 L 6 6 L 0.76757812 6 C 0.34239436 6 1.9001242e-17 6.2666588 0 6.5976562 L 0 9.4023438 C 0 9.7333412 0.34239436 10 0.76757812 10 L 6 10 L 6 15.232422 C 6 15.657606 6.2666588 16 6.5976562 16 L 9.4023438 16 C 9.7333412 16 10 15.657606 10 15.232422 L 10 10 L 15.232422 10 C 15.657606 10 16 9.7333412 16 9.4023438 L 16 6.5976562 C 16 6.2666588 15.657606 6 15.232422 6 L 10 6 L 10 0.76757812 C 10 0.34239436 9.7333412 1.9001242e-17 9.4023438 0 L 6.5976562 0 z"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
<rect style="opacity:0.2" width="56" height="56" x="-61" y="-60" rx="3" ry="3" transform="matrix(0,-1,-1,0,0,0)"/>
<rect style="fill:#8bc34a" width="56" height="56" x="-60" y="-60" rx="3" ry="3" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="opacity:0.2" d="m 32,25 c -2.210666,0 -4,1.8 -4,4 v 8 c 0,2.2 1.79,4 4,4 2.21,0 4,-1.8 4,-4 v -8 c 0,-2.2 -1.789334,-4 -4,-4 z m 0,2 c 1.104,0 2,0.8 2,2 0,0.999998 -0.896,2 -2,2 -1.104,0 -2,-1.000002 -2,-2 0,-1.2 0.896,-2 2,-2 z m 0,6 c 1.10457,0 2,0.89543 2,2 v 2 c 0,1.10457 -0.89543,2 -2,2 -1.10457,0 -2,-0.89543 -2,-2 v -2 c 0,-1.10457 0.89543,-2 2,-2 z"/>
<path style="opacity:0.2;fill:#ffffff" d="M 7 4 C 5.338 4 4 5.338 4 7 L 4 8 C 4 6.338 5.338 5 7 5 L 57 5 C 58.662 5 60 6.338 60 8 L 60 7 C 60 5.338 58.662 4 57 4 L 7 4 z"/>
<path style="opacity:0.2" d="m 30,4 v 20 c 0,1.1 0.895,2 2,2 1.105,0 2,-0.9 2,-2 V 4 Z"/>
<path style="opacity:0.2" d="m 32,4 v 1 h 1 V 4 Z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 V 6 Z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 V 8 Z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 z"/>
<path style="fill:#dddddd" d="m 31,4 v 1 h 1 V 4 Z m 0,2 v 1 h 1 V 6 Z m 0,2 v 1 h 1 V 8 Z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z"/>
<path style="opacity:0.2" d="m 31,18 h 1 c 0.04125,-0.367529 0,-1 0,-1 h -1 z m 1,0 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 c -0.1561,1.390912 1,1.390912 1,0 z"/>
<path style="fill:#dddddd" d="m 31,18 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z"/>
<path style="fill:#ffffff" d="m 32,24 c -2.210666,0 -4,1.8 -4,4 v 8 c 0,2.2 1.79,4 4,4 2.21,0 4,-1.8 4,-4 v -8 c 0,-2.2 -1.789334,-4 -4,-4 z m 0,2 c 1.104,0 2,0.8 2,2 0,0.999998 -0.896,2 -2,2 -1.104,0 -2,-1.000002 -2,-2 0,-1.2 0.896,-2 2,-2 z m 0,6 c 1.10457,0 2,0.89543 2,2 v 2 c 0,1.10457 -0.89543,2 -2,2 -1.10457,0 -2,-0.89543 -2,-2 v -2 c 0,-1.10457 0.89543,-2 2,-2 z"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#8fb633" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="m 12.900392,1039.8778 -5.6582045,5.6563 -2.828125,-2.8281 L 3,1044.12 l 2.828125,2.8281 1.4140625,1.4141 1.4140625,-1.4141 5.658203,-5.6562 -1.414061,-1.4141 z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#3f83d6" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="m 5,1041.3622 0,1.9998 -0.5000001,0 c -0.277,0 -0.5,0.223 -0.5,0.5 l 0,5 c 0,0.277 0.223,0.5 0.5,0.5 l 7.0000001,0 c 0.277,0 0.5,-0.223 0.5,-0.5 l 0,-5 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 l -0.5,0 0,-1.9998 c 0,-2 -1,-2 -2,-2 l -2,0 c -1,0 -2,0 -2,2 z m 4,0 0,2 -2,0 0,-2 z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#3f83d6" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="m 12.900392,1039.8778 -5.6582045,5.6563 -2.828125,-2.8281 L 3,1044.12 l 2.828125,2.8281 1.4140625,1.4141 1.4140625,-1.4141 5.658203,-5.6562 -1.414061,-1.4141 z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#8fb633" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="M 3 3 L 3 11 L 3 13 L 5 13 L 7 13 L 7 11 L 5 11 L 5 10.382812 L 5 5 L 11 5 L 11 9 L 9 9 L 10.5 11 L 12 13 L 13.5 11 L 15 9 L 13 9 L 13 3 L 3 3 z" transform="translate(0,1036.3622)"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#ff6b26" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="m 3.0502591,1040.8266 3.5355339,3.5356 -3.5355528,3.5356 1.4142136,1.4142 3.5355528,-3.5356 3.5355334,3.5355 1.4142,-1.4141 -3.535533,-3.5356 3.535552,-3.5356 -1.414212,-1.4142 -3.5355536,3.5356 -3.5355339,-3.5355 -1.4142004,1.4141 z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#835296" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff;fill-rule:evenodd" d="m 7,1049.3622 0,-6 -2,0 3,-4 3,4 -2,0 0,6 z"/>
</g>
</svg>
......@@ -3,15 +3,15 @@
<gresource prefix="/org/manjaro/pamac/manager">
<file preprocess="xml-stripblanks">manager_window.ui</file>
<file preprocess="xml-stripblanks">history_dialog.ui</file>
<file preprocess="to-pixdata">package-available.png</file>
<file preprocess="to-pixdata">package-available-locked.png</file>
<file preprocess="to-pixdata">package-install.png</file>
<file preprocess="to-pixdata">package-installed-locked.png</file>
<file preprocess="to-pixdata">package-installed-updated.png</file>
<file preprocess="to-pixdata">package-reinstall.png</file>
<file preprocess="to-pixdata">package-remove.png</file>
<file preprocess="to-pixdata">package-upgrade.png</file>
<file preprocess="to-pixdata">package-generic.png</file>
<file preprocess="to-pixdata">package-available.svg</file>
<file preprocess="to-pixdata">package-available-locked.svg</file>
<file preprocess="to-pixdata">package-install.svg</file>
<file preprocess="to-pixdata">package-installed-locked.svg</file>
<file preprocess="to-pixdata">package-installed-updated.svg</file>
<file preprocess="to-pixdata">package-reinstall.svg</file>
<file preprocess="to-pixdata">package-remove.svg</file>
<file preprocess="to-pixdata">package-upgrade.svg</file>
<file preprocess="to-pixdata">package-generic.svg</file>
</gresource>
<gresource prefix="/org/manjaro/pamac/preferences">
<file preprocess="xml-stripblanks">preferences_dialog.ui</file>
......
......@@ -355,6 +355,13 @@ namespace Pamac {
var handle = alpm_config.get_handle (false, true);
handle.fetchcb = (Alpm.FetchCallBack) cb_fetch;
cancellable.reset ();
// refresh tmp dbs
unowned Alpm.List<unowned Alpm.DB> syncdbs = handle.syncdbs;
while (syncdbs != null) {
unowned Alpm.DB db = syncdbs.data;
db.update (0);
syncdbs.next ();
}
int success = handle.trans_init (Alpm.TransFlag.DOWNLOADONLY);
// can't add nolock flag with commit so remove unneeded lock
handle.unlock ();
......@@ -369,6 +376,12 @@ namespace Pamac {
}
handle.trans_release ();
}
// remove dbs in tmp
try {
Process.spawn_command_line_sync ("rm -rf %s/dbs-root".printf (tmp_path));
} catch (SpawnError e) {
stderr.printf ("SpawnError: %s\n", e.message);
}
downloading_updates = false;
downloading_updates_finished ();
return success;
......
......@@ -340,6 +340,8 @@ namespace Pamac {
init_database ();
bool error = false;
bool quiet = false;
bool refresh_tmp_files_dbs = false;
bool download_updates = false;
int i = 2;
while (i < args.length) {
unowned string arg = args[i];
......@@ -347,12 +349,16 @@ namespace Pamac {
display_checkupdates_help ();
error = true;
break;
} else if (arg == "--quiet"|| arg == "-q") {
} else if (arg == "--quiet" || arg == "-q") {
quiet = true;
} else if (arg == "--aur"|| arg == "-a") {
} else if (arg == "--refresh-tmp-files-dbs") {
refresh_tmp_files_dbs = true;
} else if (arg == "--download-updates") {
download_updates = true;
} else if (arg == "--aur" || arg == "-a") {
database.config.enable_aur = true;
database.config.check_aur_updates = true;
} else if (arg == "-aq"|| arg == "-qa") {
} else if (arg == "-aq" || arg == "-qa") {
database.config.enable_aur = true;
database.config.check_aur_updates = true;
quiet = true;
......@@ -377,7 +383,7 @@ namespace Pamac {
i++;
}
if (!error) {
checkupdates.begin (quiet, () => {
checkupdates.begin (quiet, refresh_tmp_files_dbs, download_updates, () => {
loop.quit ();
});
loop.run ();
......@@ -1599,7 +1605,7 @@ namespace Pamac {
}
}
async void checkupdates (bool quiet) {
async void checkupdates (bool quiet, bool refresh_tmp_files_dbs, bool download_updates) {
var updates = yield database.get_updates ();
uint updates_nb = updates.repos_updates.length () + updates.aur_updates.length ();
if (updates_nb == 0) {
......@@ -1630,9 +1636,22 @@ namespace Pamac {
} else {
// special status when updates are available
exit_status = 100;
// refresh tmp files dbs
if (refresh_tmp_files_dbs) {
database.refresh_tmp_files_dbs ();
}
// download updates
if (download_updates) {
transaction = new TransactionCli (database);
transaction.downloading_updates_finished.connect (() => {
Idle.add (checkupdates.callback);
});
transaction.start_downloading_updates ();
yield;
}
if (quiet) {
foreach (unowned Package pkg in updates.repos_updates) {
stdout.printf ("%s %s\n", pkg.name,pkg.version);
stdout.printf ("%s %s -> %s\n", pkg.name, pkg.installed_version, pkg.version);
}
foreach (unowned AURPackage pkg in updates.aur_updates) {
// do not show out of date packages
......
......@@ -61,6 +61,16 @@ namespace Pamac {
} else {
locale = "C";
}
// load alpm databases in memory
unowned Alpm.List<unowned Alpm.Package> pkgcache = alpm_handle.localdb.pkgcache;
unowned Alpm.List<unowned Alpm.Group> groupcache = alpm_handle.localdb.groupcache;
unowned Alpm.List<unowned Alpm.DB> syncdbs = alpm_handle.syncdbs;
while (syncdbs != null) {
unowned Alpm.DB db = syncdbs.data;
pkgcache = db.pkgcache;
groupcache = db.groupcache;
syncdbs.next ();
}
}
public void enable_appstream () {
......
......@@ -21,21 +21,72 @@ namespace Pamac {
class Manager : Gtk.Application {
ManagerWindow manager_window;
bool started;
Database database;
SearchProvider search_provider;
uint search_provider_id;
const OptionEntry[] option_entries = {
{ "version", 0, 0, OptionArg.NONE, null, "Display version number", null },
{ "updates", 0, 0, OptionArg.NONE, null, "Display updates", null },
{ null }
};
public Manager () {
application_id = "org.manjaro.pamac.manager";
flags = ApplicationFlags.HANDLES_COMMAND_LINE;
public Manager (Database database) {
Object (application_id: "org.manjaro.pamac.manager", flags: ApplicationFlags.FLAGS_NONE);
this.database = database;
database.enable_appstream ();
add_main_option_entries (option_entries);
search_provider_id = 0;
search_provider = new SearchProvider (database);
search_provider.show_details.connect ((pkgname, timestamp) => {
create_manager_window ();
manager_window.refresh_packages_list ();
manager_window.main_stack.visible_child_name = "details";
manager_window.display_package_properties (pkgname, "", false);
manager_window.present_with_time (timestamp);
});
search_provider.search_full.connect ((terms, timestamp) => {
var str_builder = new StringBuilder ();
foreach (unowned string str in terms) {
if (str_builder.len > 0) {
str_builder.append (" ");
}
str_builder.append (str);
}
create_manager_window ();
manager_window.display_package_queue.clear ();
manager_window.search_button.active = true;
var entry = manager_window.search_comboboxtext.get_child () as Gtk.Entry;
entry.set_text (str_builder.str);
entry.set_position (-1);
manager_window.present_with_time (timestamp);
});
}
public override void startup () {
// i18n
Intl.textdomain ("pamac");
Intl.setlocale (LocaleCategory.ALL, "");
base.startup ();
manager_window = new ManagerWindow (this);
var action = new SimpleAction ("updates", null);
action.activate.connect (() => {
create_manager_window ();
manager_window.display_package_queue.clear ();
manager_window.main_stack.visible_child_name = "browse";
manager_window.filters_stack.visible_child_name = "updates";
manager_window.present ();
});
this.add_action (action);
}
void create_manager_window () {
if (manager_window != null) {
return;
}
manager_window = new ManagerWindow (this, database);
// quit accel
var action = new SimpleAction ("quit", null);
action.activate.connect (() => {this.quit ();});
......@@ -56,51 +107,48 @@ namespace Pamac {
this.set_accels_for_action ("app.search", accels);
}
public override int command_line (ApplicationCommandLine cmd) {
// fix #367
if (manager_window == null) {
return 1;
public override bool dbus_register (DBusConnection connection, string object_path) {