From 3aa7b124a09f8bce3d3e1b3ce34113c448fa3800 Mon Sep 17 00:00:00 2001 From: guinux Date: Sat, 2 Mar 2013 15:27:52 +0100 Subject: [PATCH] some esthetic improvements --- gui/manager.glade | 1 + pamac-daemon | 12 +++++------- pamac/main.py | 5 +++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gui/manager.glade b/gui/manager.glade index 80accb0..cca81c2 100644 --- a/gui/manager.glade +++ b/gui/manager.glade @@ -633,6 +633,7 @@ /usr/share/pamac/icons/22x22/status/setup.png dialog False + ManagerWindow False diff --git a/pamac-daemon b/pamac-daemon index 0fa9710..f19dc75 100755 --- a/pamac-daemon +++ b/pamac-daemon @@ -92,13 +92,14 @@ class PamacDBusService(dbus.service.Object): elif ID is 26: self.action = 'Configuring...' self.icon = '/usr/share/pamac/icons/24x24/status/setup.png' + self.EmitPercent(str(2)) print('Configuring a package') elif ID is 27: print('Downloading a file') else : self.action = '' - self.EmitTarget('') - self.EmitPercent(str(0)) + #self.EmitTarget('') + #self.EmitPercent(str(0)) self.EmitAction(self.action) self.EmitIcon(self.icon) print(ID,event) @@ -139,15 +140,12 @@ class PamacDBusService(dbus.service.Object): self.already_transferred += size self.action = 'Downloading '+common.format_size(self.total_size) 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' else: self.action = 'Refreshing...' self.target = _target - self.percent = 0 + self.percent = 2 self.icon = '/usr/share/pamac/icons/24x24/status/refresh-cache.png' self.EmitAction(self.action) self.EmitIcon(self.icon) diff --git a/pamac/main.py b/pamac/main.py index 6dae44b..068eaaf 100644 --- a/pamac/main.py +++ b/pamac/main.py @@ -47,7 +47,8 @@ update_listore = interface.get_object('update_list') update_label = interface.get_object('update_label') def action_signal_handler(action): - progress_label.set_text(action) + if action: + progress_label.set_text(action) #if 'Downloading' in action: # print('cancel enabled') # ProgressCancelButton.set_visible(True) @@ -62,7 +63,7 @@ def target_signal_handler(target): progress_bar.set_text(target) def percent_signal_handler(percent): - if percent == '0': + if float(percent) > 1: progress_bar.pulse() else: progress_bar.set_fraction(float(percent))