some esthetic improvements
This commit is contained in:
parent
e2e90eca22
commit
3aa7b124a0
@ -633,6 +633,7 @@
|
|||||||
<property name="icon">/usr/share/pamac/icons/22x22/status/setup.png</property>
|
<property name="icon">/usr/share/pamac/icons/22x22/status/setup.png</property>
|
||||||
<property name="type_hint">dialog</property>
|
<property name="type_hint">dialog</property>
|
||||||
<property name="deletable">False</property>
|
<property name="deletable">False</property>
|
||||||
|
<property name="transient_for">ManagerWindow</property>
|
||||||
<property name="has_resize_grip">False</property>
|
<property name="has_resize_grip">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="box8">
|
<object class="GtkBox" id="box8">
|
||||||
|
10
pamac-daemon
10
pamac-daemon
@ -92,13 +92,14 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
elif ID is 26:
|
elif ID is 26:
|
||||||
self.action = 'Configuring...'
|
self.action = 'Configuring...'
|
||||||
self.icon = '/usr/share/pamac/icons/24x24/status/setup.png'
|
self.icon = '/usr/share/pamac/icons/24x24/status/setup.png'
|
||||||
|
self.EmitPercent(str(2))
|
||||||
print('Configuring a package')
|
print('Configuring a package')
|
||||||
elif ID is 27:
|
elif ID is 27:
|
||||||
print('Downloading a file')
|
print('Downloading a file')
|
||||||
else :
|
else :
|
||||||
self.action = ''
|
self.action = ''
|
||||||
self.EmitTarget('')
|
#self.EmitTarget('')
|
||||||
self.EmitPercent(str(0))
|
#self.EmitPercent(str(0))
|
||||||
self.EmitAction(self.action)
|
self.EmitAction(self.action)
|
||||||
self.EmitIcon(self.icon)
|
self.EmitIcon(self.icon)
|
||||||
print(ID,event)
|
print(ID,event)
|
||||||
@ -139,15 +140,12 @@ class PamacDBusService(dbus.service.Object):
|
|||||||
self.already_transferred += size
|
self.already_transferred += size
|
||||||
self.action = 'Downloading '+common.format_size(self.total_size)
|
self.action = 'Downloading '+common.format_size(self.total_size)
|
||||||
self.target = _target
|
self.target = _target
|
||||||
if fraction > 1:
|
|
||||||
self.percent = 0
|
|
||||||
else:
|
|
||||||
self.percent = fraction
|
self.percent = fraction
|
||||||
self.icon = '/usr/share/pamac/icons/24x24/status/package-download.png'
|
self.icon = '/usr/share/pamac/icons/24x24/status/package-download.png'
|
||||||
else:
|
else:
|
||||||
self.action = 'Refreshing...'
|
self.action = 'Refreshing...'
|
||||||
self.target = _target
|
self.target = _target
|
||||||
self.percent = 0
|
self.percent = 2
|
||||||
self.icon = '/usr/share/pamac/icons/24x24/status/refresh-cache.png'
|
self.icon = '/usr/share/pamac/icons/24x24/status/refresh-cache.png'
|
||||||
self.EmitAction(self.action)
|
self.EmitAction(self.action)
|
||||||
self.EmitIcon(self.icon)
|
self.EmitIcon(self.icon)
|
||||||
|
@ -47,6 +47,7 @@ update_listore = interface.get_object('update_list')
|
|||||||
update_label = interface.get_object('update_label')
|
update_label = interface.get_object('update_label')
|
||||||
|
|
||||||
def action_signal_handler(action):
|
def action_signal_handler(action):
|
||||||
|
if action:
|
||||||
progress_label.set_text(action)
|
progress_label.set_text(action)
|
||||||
#if 'Downloading' in action:
|
#if 'Downloading' in action:
|
||||||
# print('cancel enabled')
|
# print('cancel enabled')
|
||||||
@ -62,7 +63,7 @@ def target_signal_handler(target):
|
|||||||
progress_bar.set_text(target)
|
progress_bar.set_text(target)
|
||||||
|
|
||||||
def percent_signal_handler(percent):
|
def percent_signal_handler(percent):
|
||||||
if percent == '0':
|
if float(percent) > 1:
|
||||||
progress_bar.pulse()
|
progress_bar.pulse()
|
||||||
else:
|
else:
|
||||||
progress_bar.set_fraction(float(percent))
|
progress_bar.set_fraction(float(percent))
|
||||||
|
Loading…
Reference in New Issue
Block a user