rework on icons display
@ -125,7 +125,7 @@ Categories=System;
|
|||||||
Exec=pamac-install %F
|
Exec=pamac-install %F
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Icon=/usr/share/pamac/icons/32x32/apps/pamac.png
|
Icon=system-software-install
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
NoDisplay=true
|
NoDisplay=true
|
||||||
MimeType=application/x-xz-compressed-tar;
|
MimeType=application/x-xz-compressed-tar;
|
||||||
|
@ -130,7 +130,7 @@ Comment[vi]=Thêm hoặc gỡ phần mềm cài đặt trên hệ thống
|
|||||||
Comment[zh_CN]=添加或删除系统中安装的软件
|
Comment[zh_CN]=添加或删除系统中安装的软件
|
||||||
Comment[zh_HK]=加入或移除系統上安裝的軟件
|
Comment[zh_HK]=加入或移除系統上安裝的軟件
|
||||||
Comment[zh_TW]=加入或移除系統上安裝的軟體
|
Comment[zh_TW]=加入或移除系統上安裝的軟體
|
||||||
Icon=/usr/share/pamac/icons/32x32/apps/pamac.png
|
Icon=system-software-install
|
||||||
Exec=pamac-manager
|
Exec=pamac-manager
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
@ -126,7 +126,7 @@ Comment[vi]=Cập nhật phần mềm đã cài đặt trên hệ thống
|
|||||||
Comment[zh_CN]=更新本系统中安装的软件
|
Comment[zh_CN]=更新本系统中安装的软件
|
||||||
Comment[zh_HK]=更新系統中已安裝的軟件
|
Comment[zh_HK]=更新系統中已安裝的軟件
|
||||||
Comment[zh_TW]=更新系統中已安裝的軟體
|
Comment[zh_TW]=更新系統中已安裝的軟體
|
||||||
Icon=/usr/share/pamac/icons/32x32/apps/pamac-updater.png
|
Icon=system-software-update
|
||||||
Exec=pamac-updater
|
Exec=pamac-updater
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
Before Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 793 B |
Before Width: | Height: | Size: 748 B After Width: | Height: | Size: 748 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
BIN
data/icons/24x24/status/pamac-tray-update.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.2 KiB |
BIN
data/icons/32x32/apps/system-software-install.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
@ -281,6 +281,7 @@
|
|||||||
<property name="window_position">center</property>
|
<property name="window_position">center</property>
|
||||||
<property name="default_width">300</property>
|
<property name="default_width">300</property>
|
||||||
<property name="default_height">250</property>
|
<property name="default_height">250</property>
|
||||||
|
<property name="icon_name">system-software-install</property>
|
||||||
<signal name="delete-event" handler="on_PreferencesWindow_delete_event" swapped="no"/>
|
<signal name="delete-event" handler="on_PreferencesWindow_delete_event" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="box1">
|
<object class="GtkBox" id="box1">
|
||||||
|
@ -161,7 +161,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
if event == 'ALPM_EVENT_CHECKDEPS_START':
|
if event == 'ALPM_EVENT_CHECKDEPS_START':
|
||||||
action = _('Checking dependencies')+'...'
|
action = _('Checking dependencies')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
elif event == 'ALPM_EVENT_CHECKDEPS_DONE':
|
elif event == 'ALPM_EVENT_CHECKDEPS_DONE':
|
||||||
if self.warning:
|
if self.warning:
|
||||||
self.EmitLogWarning(self.warning)
|
self.EmitLogWarning(self.warning)
|
||||||
@ -169,13 +169,13 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
elif event == 'ALPM_EVENT_FILECONFLICTS_START':
|
elif event == 'ALPM_EVENT_FILECONFLICTS_START':
|
||||||
action = _('Checking file conflicts')+'...'
|
action = _('Checking file conflicts')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
elif event == 'ALPM_EVENT_FILECONFLICTS_DONE':
|
elif event == 'ALPM_EVENT_FILECONFLICTS_DONE':
|
||||||
pass
|
pass
|
||||||
elif event == 'ALPM_EVENT_RESOLVEDEPS_START':
|
elif event == 'ALPM_EVENT_RESOLVEDEPS_START':
|
||||||
action = _('Resolving dependencies')+'...'
|
action = _('Resolving dependencies')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-setup.png'
|
icon = 'pamac-setup'
|
||||||
elif event == 'ALPM_EVENT_RESOLVEDEPS_DONE':
|
elif event == 'ALPM_EVENT_RESOLVEDEPS_DONE':
|
||||||
if self.warning:
|
if self.warning:
|
||||||
self.EmitLogWarning(self.warning)
|
self.EmitLogWarning(self.warning)
|
||||||
@ -183,7 +183,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
elif event == 'ALPM_EVENT_INTERCONFLICTS_START':
|
elif event == 'ALPM_EVENT_INTERCONFLICTS_START':
|
||||||
action = _('Checking inter conflicts')+'...'
|
action = _('Checking inter conflicts')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
elif event == 'ALPM_EVENT_INTERCONFLICTS_DONE':
|
elif event == 'ALPM_EVENT_INTERCONFLICTS_DONE':
|
||||||
if self.warning:
|
if self.warning:
|
||||||
self.EmitLogWarning(self.warning)
|
self.EmitLogWarning(self.warning)
|
||||||
@ -192,7 +192,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
string = _('Installing {pkgname}').format(pkgname = tupel[0].name)
|
string = _('Installing {pkgname}').format(pkgname = tupel[0].name)
|
||||||
action = string+'...'
|
action = string+'...'
|
||||||
action_long = '{} ({})...\n'.format(string, tupel[0].version)
|
action_long = '{} ({})...\n'.format(string, tupel[0].version)
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-add.png'
|
icon = 'pamac-add'
|
||||||
elif event == 'ALPM_EVENT_ADD_DONE':
|
elif event == 'ALPM_EVENT_ADD_DONE':
|
||||||
formatted_event = 'Installed {pkgname} ({pkgversion})'.format(pkgname = tupel[0].name, pkgversion = tupel[0].version)
|
formatted_event = 'Installed {pkgname} ({pkgversion})'.format(pkgname = tupel[0].name, pkgversion = tupel[0].version)
|
||||||
common.write_log_file(formatted_event)
|
common.write_log_file(formatted_event)
|
||||||
@ -200,7 +200,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
string = _('Removing {pkgname}').format(pkgname = tupel[0].name)
|
string = _('Removing {pkgname}').format(pkgname = tupel[0].name)
|
||||||
action = string+'...'
|
action = string+'...'
|
||||||
action_long = '{} ({})...\n'.format(string, tupel[0].version)
|
action_long = '{} ({})...\n'.format(string, tupel[0].version)
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-delete.png'
|
icon = 'pamac-delete'
|
||||||
elif event == 'ALPM_EVENT_REMOVE_DONE':
|
elif event == 'ALPM_EVENT_REMOVE_DONE':
|
||||||
formatted_event = 'Removed {pkgname} ({pkgversion})'.format(pkgname = tupel[0].name, pkgversion = tupel[0].version)
|
formatted_event = 'Removed {pkgname} ({pkgversion})'.format(pkgname = tupel[0].name, pkgversion = tupel[0].version)
|
||||||
common.write_log_file(formatted_event)
|
common.write_log_file(formatted_event)
|
||||||
@ -208,7 +208,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
string = _('Upgrading {pkgname}').format(pkgname = tupel[1].name)
|
string = _('Upgrading {pkgname}').format(pkgname = tupel[1].name)
|
||||||
action = string+'...'
|
action = string+'...'
|
||||||
action_long = '{} ({} => {})...\n'.format(string, tupel[1].version, tupel[0].version)
|
action_long = '{} ({} => {})...\n'.format(string, tupel[1].version, tupel[0].version)
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-update.png'
|
icon = 'pamac-update'
|
||||||
elif event == 'ALPM_EVENT_UPGRADE_DONE':
|
elif event == 'ALPM_EVENT_UPGRADE_DONE':
|
||||||
formatted_event = 'Upgraded {pkgname} ({oldversion} -> {newversion})'.format(pkgname = tupel[1].name, oldversion = tupel[1].version, newversion = tupel[0].version)
|
formatted_event = 'Upgraded {pkgname} ({oldversion} -> {newversion})'.format(pkgname = tupel[1].name, oldversion = tupel[1].version, newversion = tupel[0].version)
|
||||||
common.write_log_file(formatted_event)
|
common.write_log_file(formatted_event)
|
||||||
@ -216,7 +216,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
string = _('Downgrading {pkgname}').format(pkgname = tupel[1].name)
|
string = _('Downgrading {pkgname}').format(pkgname = tupel[1].name)
|
||||||
action = string+'...'
|
action = string+'...'
|
||||||
action_long = '{} ({} => {})...\n'.format(string, tupel[1].version, tupel[0].version)
|
action_long = '{} ({} => {})...\n'.format(string, tupel[1].version, tupel[0].version)
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-add.png'
|
icon = 'pamac-add'
|
||||||
elif event == 'ALPM_EVENT_DOWNGRADE_DONE':
|
elif event == 'ALPM_EVENT_DOWNGRADE_DONE':
|
||||||
formatted_event = 'Downgraded {pkgname} ({oldversion} -> {newversion})'.format(pkgname = tupel[1].name, oldversion = tupel[1].version, newversion = tupel[0].version)
|
formatted_event = 'Downgraded {pkgname} ({oldversion} -> {newversion})'.format(pkgname = tupel[1].name, oldversion = tupel[1].version, newversion = tupel[0].version)
|
||||||
common.write_log_file(formatted_event)
|
common.write_log_file(formatted_event)
|
||||||
@ -224,39 +224,39 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
string = _('Reinstalling {pkgname}').format(pkgname = tupel[0].name)
|
string = _('Reinstalling {pkgname}').format(pkgname = tupel[0].name)
|
||||||
action = string+'...'
|
action = string+'...'
|
||||||
action_long = '{} ({})...\n'.format(string, tupel[0].version)
|
action_long = '{} ({})...\n'.format(string, tupel[0].version)
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-add.png'
|
icon = 'pamac-add'
|
||||||
elif event == 'ALPM_EVENT_REINSTALL_DONE':
|
elif event == 'ALPM_EVENT_REINSTALL_DONE':
|
||||||
formatted_event = 'Reinstalled {pkgname} ({pkgversion})'.format(pkgname = tupel[0].name, pkgversion = tupel[0].version)
|
formatted_event = 'Reinstalled {pkgname} ({pkgversion})'.format(pkgname = tupel[0].name, pkgversion = tupel[0].version)
|
||||||
common.write_log_file(formatted_event)
|
common.write_log_file(formatted_event)
|
||||||
elif event == 'ALPM_EVENT_INTEGRITY_START':
|
elif event == 'ALPM_EVENT_INTEGRITY_START':
|
||||||
action = _('Checking integrity')+'...'
|
action = _('Checking integrity')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
self.already_transferred = 0
|
self.already_transferred = 0
|
||||||
elif event == 'ALPM_EVENT_INTEGRITY_DONE':
|
elif event == 'ALPM_EVENT_INTEGRITY_DONE':
|
||||||
pass
|
pass
|
||||||
elif event == 'ALPM_EVENT_LOAD_START':
|
elif event == 'ALPM_EVENT_LOAD_START':
|
||||||
action = _('Loading packages files')+'...'
|
action = _('Loading packages files')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
elif event == 'ALPM_EVENT_LOAD_DONE':
|
elif event == 'ALPM_EVENT_LOAD_DONE':
|
||||||
pass
|
pass
|
||||||
elif event == 'ALPM_EVENT_DELTA_INTEGRITY_START':
|
elif event == 'ALPM_EVENT_DELTA_INTEGRITY_START':
|
||||||
action = _('Checking delta integrity')+'...'
|
action = _('Checking delta integrity')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
elif event == 'ALPM_EVENT_DELTA_INTEGRITY_DONE':
|
elif event == 'ALPM_EVENT_DELTA_INTEGRITY_DONE':
|
||||||
pass
|
pass
|
||||||
elif event == 'ALPM_EVENT_DELTA_PATCHES_START':
|
elif event == 'ALPM_EVENT_DELTA_PATCHES_START':
|
||||||
action = _('Applying deltas')+'...'
|
action = _('Applying deltas')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-setup.png'
|
icon = 'pamac-setup'
|
||||||
elif event == 'ALPM_EVENT_DELTA_PATCHES_DONE':
|
elif event == 'ALPM_EVENT_DELTA_PATCHES_DONE':
|
||||||
pass
|
pass
|
||||||
elif event == 'ALPM_EVENT_DELTA_PATCH_START':
|
elif event == 'ALPM_EVENT_DELTA_PATCH_START':
|
||||||
action = _('Generating {} with {}').format(tupel[0], tupel[1])+'...'
|
action = _('Generating {} with {}').format(tupel[0], tupel[1])+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-setup.png'
|
icon = 'pamac-setup'
|
||||||
elif event == 'ALPM_EVENT_DELTA_PATCH_DONE':
|
elif event == 'ALPM_EVENT_DELTA_PATCH_DONE':
|
||||||
action = _('Generation succeeded!')
|
action = _('Generation succeeded!')
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
@ -266,16 +266,16 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
elif event == 'ALPM_EVENT_SCRIPTLET_INFO':
|
elif event == 'ALPM_EVENT_SCRIPTLET_INFO':
|
||||||
action =_('Configuring {pkgname}').format(pkgname = self.previous_target)+'...'
|
action =_('Configuring {pkgname}').format(pkgname = self.previous_target)+'...'
|
||||||
action_long = tupel[0]
|
action_long = tupel[0]
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-setup.png'
|
icon = 'pamac-setup'
|
||||||
self.EmitNeedDetails(True)
|
self.EmitNeedDetails(True)
|
||||||
elif event == 'ALPM_EVENT_RETRIEVE_START':
|
elif event == 'ALPM_EVENT_RETRIEVE_START':
|
||||||
action = _('Downloading')+'...'
|
action = _('Downloading')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-download.png'
|
icon = 'pamac-download'
|
||||||
elif event == 'ALPM_EVENT_DISKSPACE_START':
|
elif event == 'ALPM_EVENT_DISKSPACE_START':
|
||||||
action = _('Checking available disk space')+'...'
|
action = _('Checking available disk space')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
elif event == 'ALPM_EVENT_OPTDEP_REQUIRED':
|
elif event == 'ALPM_EVENT_OPTDEP_REQUIRED':
|
||||||
print('Optionnal deps exist')
|
print('Optionnal deps exist')
|
||||||
elif event == 'ALPM_EVENT_DATABASE_MISSING':
|
elif event == 'ALPM_EVENT_DATABASE_MISSING':
|
||||||
@ -285,7 +285,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
elif event == 'ALPM_EVENT_KEYRING_START':
|
elif event == 'ALPM_EVENT_KEYRING_START':
|
||||||
action = _('Checking keyring')+'...'
|
action = _('Checking keyring')+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-search.png'
|
icon = 'pamac-search'
|
||||||
elif event == 'ALPM_EVENT_KEYRING_DONE':
|
elif event == 'ALPM_EVENT_KEYRING_DONE':
|
||||||
pass
|
pass
|
||||||
elif event == 'ALPM_EVENT_KEY_DOWNLOAD_START':
|
elif event == 'ALPM_EVENT_KEY_DOWNLOAD_START':
|
||||||
@ -358,11 +358,11 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
if _target.endswith('.db'):
|
if _target.endswith('.db'):
|
||||||
action = _('Refreshing {repo}').format(repo = _target.replace('.db', ''))+'...'
|
action = _('Refreshing {repo}').format(repo = _target.replace('.db', ''))+'...'
|
||||||
action_long = ''
|
action_long = ''
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/refresh-cache.png'
|
icon = 'pamac-refresh'
|
||||||
else:
|
else:
|
||||||
action = _('Downloading {pkgname}').format(pkgname = _target.replace('.pkg.tar.xz', ''))+'...'
|
action = _('Downloading {pkgname}').format(pkgname = _target.replace('.pkg.tar.xz', ''))+'...'
|
||||||
action_long = action+'\n'
|
action_long = action+'\n'
|
||||||
icon = '/usr/share/pamac/icons/24x24/status/package-download.png'
|
icon = 'pamac-download'
|
||||||
if self.total_size > 0:
|
if self.total_size > 0:
|
||||||
percent = round((_transferred+self.already_transferred)/self.total_size, 2)
|
percent = round((_transferred+self.already_transferred)/self.total_size, 2)
|
||||||
if _transferred+self.already_transferred <= self.total_size:
|
if _transferred+self.already_transferred <= self.total_size:
|
||||||
@ -549,7 +549,7 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
error = ''
|
error = ''
|
||||||
try:
|
try:
|
||||||
for db in self.syncdbs:
|
for db in self.syncdbs:
|
||||||
pkg = db.get_pkg(pkgname)
|
pkg = pyalpm.find_satisfier(db.pkgcache, pkgname)
|
||||||
if pkg:
|
if pkg:
|
||||||
self.t.add_pkg(pkg)
|
self.t.add_pkg(pkg)
|
||||||
break
|
break
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
version = '0.9.7'
|
version = '0.9.7'
|
||||||
|
|
||||||
from gi.repository import Gtk, Gdk
|
from gi.repository import Gtk, Gdk
|
||||||
from gi.repository.GdkPixbuf import Pixbuf
|
|
||||||
import pyalpm
|
import pyalpm
|
||||||
import dbus
|
import dbus
|
||||||
from time import strftime, localtime
|
from time import strftime, localtime
|
||||||
@ -93,12 +92,12 @@ repos_dict = {}
|
|||||||
current_filter = (None, None)
|
current_filter = (None, None)
|
||||||
right_click_menu = Gtk.Menu()
|
right_click_menu = Gtk.Menu()
|
||||||
|
|
||||||
installed_icon = Pixbuf.new_from_file('/usr/share/pamac/icons/16x16/actions/package-installed-updated.png')
|
installed_icon = Gtk.IconTheme.get_default().load_icon('package-installed-updated', 16, 0)
|
||||||
uninstalled_icon = Pixbuf.new_from_file('/usr/share/pamac/icons/16x16/actions/package-available.png')
|
uninstalled_icon = Gtk.IconTheme.get_default().load_icon('package-available', 16, 0)
|
||||||
to_install_icon = Pixbuf.new_from_file('/usr/share/pamac/icons/16x16/actions/package-install.png')
|
to_install_icon = Gtk.IconTheme.get_default().load_icon('package-install', 16, 0)
|
||||||
to_reinstall_icon = Pixbuf.new_from_file('/usr/share/pamac/icons/16x16/actions/package-reinstall.png')
|
to_reinstall_icon = Gtk.IconTheme.get_default().load_icon('package-reinstall', 16, 0)
|
||||||
to_remove_icon = Pixbuf.new_from_file('/usr/share/pamac/icons/16x16/actions/package-remove.png')
|
to_remove_icon = Gtk.IconTheme.get_default().load_icon('package-remove', 16, 0)
|
||||||
locked_icon = Pixbuf.new_from_file('/usr/share/pamac/icons/16x16/actions/package-installed-locked.png')
|
locked_icon = Gtk.IconTheme.get_default().load_icon('package-installed-locked', 16, 0)
|
||||||
|
|
||||||
def state_column_display_func(column, cell, treemodel, treeiter, data):
|
def state_column_display_func(column, cell, treemodel, treeiter, data):
|
||||||
if treemodel[treeiter][0] == _('No package found'):
|
if treemodel[treeiter][0] == _('No package found'):
|
||||||
@ -639,20 +638,17 @@ def on_list_treeview_button_press_event(treeview, event):
|
|||||||
if liststore[treeiter][0].name in transaction.to_add | transaction.to_remove or liststore[treeiter][0] in transaction.to_build:
|
if liststore[treeiter][0].name in transaction.to_add | transaction.to_remove or liststore[treeiter][0] in transaction.to_build:
|
||||||
item = Gtk.ImageMenuItem(_('Deselect'))
|
item = Gtk.ImageMenuItem(_('Deselect'))
|
||||||
item.set_image(Gtk.Image.new_from_stock('gtk-undo', Gtk.IconSize.MENU))
|
item.set_image(Gtk.Image.new_from_stock('gtk-undo', Gtk.IconSize.MENU))
|
||||||
item.set_always_show_image(True)
|
|
||||||
item.connect('activate', mark_to_deselect, liststore[treeiter][0])
|
item.connect('activate', mark_to_deselect, liststore[treeiter][0])
|
||||||
right_click_menu.append(item)
|
right_click_menu.append(item)
|
||||||
elif liststore[treeiter][0].db.name == 'local':
|
elif liststore[treeiter][0].db.name == 'local':
|
||||||
item = Gtk.ImageMenuItem(_('Remove'))
|
item = Gtk.ImageMenuItem(_('Remove'))
|
||||||
item.set_image(Gtk.Image.new_from_pixbuf(to_remove_icon))
|
item.set_image(Gtk.Image.new_from_pixbuf(to_remove_icon))
|
||||||
item.set_always_show_image(True)
|
|
||||||
item.connect('activate', mark_to_remove, liststore[treeiter][0])
|
item.connect('activate', mark_to_remove, liststore[treeiter][0])
|
||||||
right_click_menu.append(item)
|
right_click_menu.append(item)
|
||||||
if transaction.get_syncpkg(liststore[treeiter][0].name):
|
if transaction.get_syncpkg(liststore[treeiter][0].name):
|
||||||
if not pyalpm.sync_newversion(liststore[treeiter][0], transaction.syncdbs):
|
if not pyalpm.sync_newversion(liststore[treeiter][0], transaction.syncdbs):
|
||||||
item = Gtk.ImageMenuItem(_('Reinstall'))
|
item = Gtk.ImageMenuItem(_('Reinstall'))
|
||||||
item.set_image(Gtk.Image.new_from_pixbuf(to_reinstall_icon))
|
item.set_image(Gtk.Image.new_from_pixbuf(to_reinstall_icon))
|
||||||
item.set_always_show_image(True)
|
|
||||||
item.connect('activate', mark_to_reinstall, liststore[treeiter][0])
|
item.connect('activate', mark_to_reinstall, liststore[treeiter][0])
|
||||||
right_click_menu.append(item)
|
right_click_menu.append(item)
|
||||||
optdeps_strings = liststore[treeiter][0].optdepends
|
optdeps_strings = liststore[treeiter][0].optdepends
|
||||||
@ -664,7 +660,6 @@ def on_list_treeview_button_press_event(treeview, event):
|
|||||||
if available_optdeps:
|
if available_optdeps:
|
||||||
item = Gtk.ImageMenuItem(_('Install optional deps'))
|
item = Gtk.ImageMenuItem(_('Install optional deps'))
|
||||||
item.set_image(Gtk.Image.new_from_pixbuf(to_install_icon))
|
item.set_image(Gtk.Image.new_from_pixbuf(to_install_icon))
|
||||||
item.set_always_show_image(True)
|
|
||||||
item.connect('activate', select_optdeps, liststore[treeiter][0], available_optdeps)
|
item.connect('activate', select_optdeps, liststore[treeiter][0], available_optdeps)
|
||||||
right_click_menu.append(item)
|
right_click_menu.append(item)
|
||||||
if liststore[treeiter][0].reason == pyalpm.PKG_REASON_DEPEND:
|
if liststore[treeiter][0].reason == pyalpm.PKG_REASON_DEPEND:
|
||||||
@ -674,7 +669,6 @@ def on_list_treeview_button_press_event(treeview, event):
|
|||||||
else:
|
else:
|
||||||
item = Gtk.ImageMenuItem(_('Install'))
|
item = Gtk.ImageMenuItem(_('Install'))
|
||||||
item.set_image(Gtk.Image.new_from_pixbuf(to_install_icon))
|
item.set_image(Gtk.Image.new_from_pixbuf(to_install_icon))
|
||||||
item.set_always_show_image(True)
|
|
||||||
item.connect('activate', mark_to_install, liststore[treeiter][0])
|
item.connect('activate', mark_to_install, liststore[treeiter][0])
|
||||||
right_click_menu.append(item)
|
right_click_menu.append(item)
|
||||||
optdeps_strings = liststore[treeiter][0].optdepends
|
optdeps_strings = liststore[treeiter][0].optdepends
|
||||||
@ -686,7 +680,6 @@ def on_list_treeview_button_press_event(treeview, event):
|
|||||||
if available_optdeps:
|
if available_optdeps:
|
||||||
item = Gtk.ImageMenuItem(_('Install with optional deps'))
|
item = Gtk.ImageMenuItem(_('Install with optional deps'))
|
||||||
item.set_image(Gtk.Image.new_from_pixbuf(to_install_icon))
|
item.set_image(Gtk.Image.new_from_pixbuf(to_install_icon))
|
||||||
item.set_always_show_image(True)
|
|
||||||
item.connect('activate', install_with_optdeps, liststore[treeiter][0], available_optdeps)
|
item.connect('activate', install_with_optdeps, liststore[treeiter][0], available_optdeps)
|
||||||
right_click_menu.append(item)
|
right_click_menu.append(item)
|
||||||
treeview.grab_focus()
|
treeview.grab_focus()
|
||||||
|
@ -33,10 +33,10 @@ gettext.bindtextdomain('pamac', '/usr/share/locale')
|
|||||||
gettext.textdomain('pamac')
|
gettext.textdomain('pamac')
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
update_icon = '/usr/share/pamac/icons/24x24/status/pamac-update.png'
|
update_icon = 'pamac-tray-update'
|
||||||
update_info = _('{number} available updates')
|
update_info = _('{number} available updates')
|
||||||
one_update_info = _('1 available update')
|
one_update_info = _('1 available update')
|
||||||
noupdate_icon = '/usr/share/pamac/icons/24x24/status/pamac-tray.png'
|
noupdate_icon = 'pamac-tray-no-update'
|
||||||
noupdate_info = _('Your system is up-to-date')
|
noupdate_info = _('Your system is up-to-date')
|
||||||
icon = noupdate_icon
|
icon = noupdate_icon
|
||||||
info = noupdate_info
|
info = noupdate_info
|
||||||
@ -48,15 +48,15 @@ class Tray:
|
|||||||
|
|
||||||
self.menu = Gtk.Menu()
|
self.menu = Gtk.Menu()
|
||||||
self.menuItem = Gtk.ImageMenuItem(_('Update Manager'))
|
self.menuItem = Gtk.ImageMenuItem(_('Update Manager'))
|
||||||
self.menuItem.set_image(Gtk.Image.new_from_file('/usr/share/pamac/icons/16x16/apps/pamac-updater.png'))
|
self.menuItem.set_image(Gtk.Image.new_from_icon_name('system-software-update', Gtk.IconSize.MENU))
|
||||||
self.menuItem.connect('activate', self.execute_update, self.statusIcon)
|
self.menuItem.connect('activate', self.execute_update, self.statusIcon)
|
||||||
self.menu.append(self.menuItem)
|
self.menu.append(self.menuItem)
|
||||||
self.menuItem = Gtk.ImageMenuItem(_('Package Manager'))
|
self.menuItem = Gtk.ImageMenuItem(_('Package Manager'))
|
||||||
self.menuItem.set_image(Gtk.Image.new_from_file('/usr/share/pamac/icons/16x16/apps/pamac.png'))
|
self.menuItem.set_image(Gtk.Image.new_from_icon_name('system-software-install', Gtk.IconSize.MENU))
|
||||||
self.menuItem.connect('activate', self.execute_manager, self.statusIcon)
|
self.menuItem.connect('activate', self.execute_manager, self.statusIcon)
|
||||||
self.menu.append(self.menuItem)
|
self.menu.append(self.menuItem)
|
||||||
self.menuItem = Gtk.ImageMenuItem(_('Quit'))
|
self.menuItem = Gtk.ImageMenuItem(_('Quit'))
|
||||||
self.menuItem.set_image(Gtk.Image.new_from_file('/usr/share/pamac/icons/16x16/apps/exit.png'))
|
self.menuItem.set_image(Gtk.Image.new_from_icon_name('application-exit', Gtk.IconSize.MENU))
|
||||||
self.menuItem.connect('activate', self.quit_tray, self.statusIcon)
|
self.menuItem.connect('activate', self.quit_tray, self.statusIcon)
|
||||||
self.menu.append(self.menuItem)
|
self.menu.append(self.menuItem)
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class Tray:
|
|||||||
Thread(target = call, args = (['/usr/bin/pamac-updater'],)).start()
|
Thread(target = call, args = (['/usr/bin/pamac-updater'],)).start()
|
||||||
|
|
||||||
def update_icon(self, icon, info):
|
def update_icon(self, icon, info):
|
||||||
self.statusIcon.set_from_file(icon)
|
self.statusIcon.set_from_icon_name(icon)
|
||||||
self.statusIcon.set_tooltip_markup(info)
|
self.statusIcon.set_tooltip_markup(info)
|
||||||
|
|
||||||
def set_visible(self, boolean):
|
def set_visible(self, boolean):
|
||||||
@ -123,7 +123,7 @@ def set_icon(update_data):
|
|||||||
else:
|
else:
|
||||||
info = update_info.format(number = len(updates))
|
info = update_info.format(number = len(updates))
|
||||||
if not common.pid_file_exists():
|
if not common.pid_file_exists():
|
||||||
Notify.Notification.new(_('Update Manager'), info, '/usr/share/pamac/icons/32x32/apps/pamac-updater.png').show()
|
Notify.Notification.new(_('Update Manager'), info, 'system-software-update').show()
|
||||||
else:
|
else:
|
||||||
icon = noupdate_icon
|
icon = noupdate_icon
|
||||||
info = noupdate_info
|
info = noupdate_info
|
||||||
|
@ -156,7 +156,7 @@ def need_details_handler(need):
|
|||||||
progress_expander.set_expanded(need)
|
progress_expander.set_expanded(need)
|
||||||
|
|
||||||
def icon_handler(icon):
|
def icon_handler(icon):
|
||||||
action_icon.set_from_file(icon)
|
action_icon.set_from_icon_name(icon, Gtk.IconSize.BUTTON)
|
||||||
|
|
||||||
def target_handler(target):
|
def target_handler(target):
|
||||||
progress_bar.set_text(target)
|
progress_bar.set_text(target)
|
||||||
@ -255,7 +255,7 @@ def refresh(force_update = False):
|
|||||||
while Gtk.events_pending():
|
while Gtk.events_pending():
|
||||||
Gtk.main_iteration()
|
Gtk.main_iteration()
|
||||||
action_handler(_('Refreshing')+'...')
|
action_handler(_('Refreshing')+'...')
|
||||||
icon_handler('/usr/share/pamac/icons/24x24/status/refresh-cache.png')
|
icon_handler('pamac-refresh')
|
||||||
target_handler('')
|
target_handler('')
|
||||||
percent_handler(0)
|
percent_handler(0)
|
||||||
ProgressCancelButton.set_visible(True)
|
ProgressCancelButton.set_visible(True)
|
||||||
@ -404,7 +404,7 @@ def run(cascade = True, recurse = False):
|
|||||||
if to_add or to_remove or to_load or to_build:
|
if to_add or to_remove or to_load or to_build:
|
||||||
global progress_buffer
|
global progress_buffer
|
||||||
action_handler(_('Preparing')+'...')
|
action_handler(_('Preparing')+'...')
|
||||||
icon_handler('/usr/share/pamac/icons/24x24/status/package-setup.png')
|
icon_handler('pamac-setup')
|
||||||
target_handler('')
|
target_handler('')
|
||||||
percent_handler(0)
|
percent_handler(0)
|
||||||
progress_buffer.delete(progress_buffer.get_start_iter(), progress_buffer.get_end_iter())
|
progress_buffer.delete(progress_buffer.get_start_iter(), progress_buffer.get_end_iter())
|
||||||
@ -585,7 +585,7 @@ def download(url_list, path):
|
|||||||
ftp = None
|
ftp = None
|
||||||
total_size = 0
|
total_size = 0
|
||||||
transferred = 0
|
transferred = 0
|
||||||
icon_handler('/usr/share/pamac/icons/24x24/status/package-download.png')
|
icon_handler('pamac-download')
|
||||||
ProgressCancelButton.set_visible(True)
|
ProgressCancelButton.set_visible(True)
|
||||||
ProgressCloseButton.set_visible(False)
|
ProgressCloseButton.set_visible(False)
|
||||||
parsed_urls = []
|
parsed_urls = []
|
||||||
@ -644,7 +644,7 @@ def build_next():
|
|||||||
action = _('Building {pkgname}').format(pkgname = pkg.name)+'...'
|
action = _('Building {pkgname}').format(pkgname = pkg.name)+'...'
|
||||||
action_handler(action)
|
action_handler(action)
|
||||||
action_long_handler(action+'\n')
|
action_long_handler(action+'\n')
|
||||||
icon_handler('/usr/share/pamac/icons/24x24/status/package-setup.png')
|
icon_handler('pamac-setup')
|
||||||
target_handler('')
|
target_handler('')
|
||||||
percent_handler(0)
|
percent_handler(0)
|
||||||
ProgressCancelButton.set_visible(True)
|
ProgressCancelButton.set_visible(True)
|
||||||
@ -683,7 +683,7 @@ def get_updates():
|
|||||||
while Gtk.events_pending():
|
while Gtk.events_pending():
|
||||||
Gtk.main_iteration()
|
Gtk.main_iteration()
|
||||||
action_handler(_('Checking for updates')+'...')
|
action_handler(_('Checking for updates')+'...')
|
||||||
icon_handler('/usr/share/pamac/icons/24x24/status/package-search.png')
|
icon_handler('pamac-search')
|
||||||
target_handler('')
|
target_handler('')
|
||||||
percent_handler(0)
|
percent_handler(0)
|
||||||
ProgressCancelButton.set_visible(False)
|
ProgressCancelButton.set_visible(False)
|
||||||
@ -797,7 +797,7 @@ def sysupgrade(show_updates = True):
|
|||||||
to_add.clear()
|
to_add.clear()
|
||||||
to_remove.clear()
|
to_remove.clear()
|
||||||
action_handler(_('Preparing')+'...')
|
action_handler(_('Preparing')+'...')
|
||||||
icon_handler('/usr/share/pamac/icons/24x24/status/package-setup.png')
|
icon_handler('pamac-setup')
|
||||||
target_handler('')
|
target_handler('')
|
||||||
percent_handler(0)
|
percent_handler(0)
|
||||||
progress_buffer.delete(progress_buffer.get_start_iter(), progress_buffer.get_end_iter())
|
progress_buffer.delete(progress_buffer.get_start_iter(), progress_buffer.get_end_iter())
|
||||||
|