Merge lp:~evfool/software-center/lp844768 into lp:software-center/5.2

Proposed by Robert Roth
Status: Merged
Merged at revision: 3011
Proposed branch: lp:~evfool/software-center/lp844768
Merge into: lp:software-center/5.2
Diff against target: 33 lines (+6/-1)
1 file modified
softwarecenter/ui/gtk3/models/pendingstore.py (+6/-1)
To merge this branch: bzr merge lp:~evfool/software-center/lp844768
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+105549@code.launchpad.net

Description of the change

Switch to indeterminate progressbar (as the one shown while purchasing) while transactions are in waiting state (e.g. waiting to close synaptic, or waiting for user input) as requested in bug #844768.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks, this looks great. I changed the "-1", "+1" for the pulse to symbolic constants during the merge
to make it slightly easier to read. But thats just a minor detail :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/models/pendingstore.py'
2--- softwarecenter/ui/gtk3/models/pendingstore.py 2012-03-15 01:32:28 +0000
3+++ softwarecenter/ui/gtk3/models/pendingstore.py 2012-05-12 05:33:19 +0000
4@@ -127,14 +127,17 @@
5 else:
6 icon = get_icon_from_theme(self.icons, iconname=iconname,
7 iconsize=self.ICON_SIZE)
8+ pulse = -1
9+ # if transaction is waiting, switch to indeterminate progress
10 if trans.is_waiting():
11 status = trans.status_details
12+ pulse = 1
13 else:
14 status = trans.get_status_description()
15 status_text = self._render_status_text(appname, status)
16 cancel_icon = self._get_cancel_icon(trans.cancellable)
17 self.append([trans.tid, icon, appname, status_text,
18- float(trans.progress), -1, cancel_icon])
19+ float(trans.progress), pulse, cancel_icon])
20
21 def _on_cancellable_changed(self, trans, cancellable):
22 #print "_on_allow_cancel: ", trans, allow_cancel
23@@ -185,8 +188,10 @@
24 name = row[self.COL_NAME]
25 if trans.is_waiting():
26 st = trans.status_details
27+ row[self.COL_PULSE] = 1
28 else:
29 st = trans.get_status_description(status)
30+ row[self.COL_PULSE] = -1
31 row[self.COL_STATUS] = self._render_status_text(name, st)
32
33 def _render_status_text(self, name, status):

Subscribers

People subscribed via source and target branches