Rev 813: Restore the progress bar, and show the progress message in http://bazaar.launchpad.net/~jameinel/qbzr/progress

John Arbash Meinel john at arbash-meinel.com
Thu Jul 9 23:06:05 BST 2009


At http://bazaar.launchpad.net/~jameinel/qbzr/progress

------------------------------------------------------------
revno: 813
revision-id: john at arbash-meinel.com-20090709220343-9swd8hyxk4gxwdj3
parent: bialix at ukr.net-20090709044608-i4w1h3udr9tcvvba
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: progress
timestamp: Thu 2009-07-09 17:03:43 -0500
message:
  Restore the progress bar, and show the progress message
-------------- next part --------------
=== modified file 'lib/uifactory.py'
--- a/lib/uifactory.py	2009-06-21 12:33:36 +0000
+++ b/lib/uifactory.py	2009-07-09 22:03:43 +0000
@@ -69,6 +69,15 @@
             return current_widget.throbber
         return None
     
+    def _progress_updated(self, task):
+        throbber = self.throbber()
+        if not throbber:
+            return
+        throbber.progress.show()
+        throbber.progress.setMaximum(task.total_cnt)
+        throbber.progress.setValue(task.current_cnt)
+        throbber.message.setText(task.msg)
+
     def report_transport_activity(self, transport, byte_count, direction):
         """Called by transports as they do IO.
         

=== modified file 'lib/util.py'
--- a/lib/util.py	2009-06-15 15:21:33 +0000
+++ b/lib/util.py	2009-07-09 22:03:43 +0000
@@ -414,7 +414,7 @@
         layout = QtGui.QHBoxLayout(self)
         layout.setContentsMargins(0, 0, 0, 0)
         
-        self.spinner = QtGui.QLabel("", self)    
+        self.spinner = QtGui.QLabel("", self)
         global throber_movie
         if not throber_movie:
             throber_movie = QtGui.QMovie(":/16x16/process-working.gif")
@@ -422,14 +422,14 @@
         self.spinner.setMovie(throber_movie)
         
         self.message = QtGui.QLabel(gettext("Loading..."), self)
-        #self.progress = QtGui.QProgressBar(self)
-        #self.progress.setTextVisible (False)
-        #self.progress.hide()
-        #self.progress.setMaximum(sys.maxint)
+        self.progress = QtGui.QProgressBar(self)
+        self.progress.setTextVisible(False)
+        self.progress.hide()
+        self.progress.setMaximum(sys.maxint)
         self.transport = QtGui.QLabel("", self)
         
         layout.addWidget(self.spinner)
-        #layout.addWidget(self.progress)
+        layout.addWidget(self.progress)
         layout.addWidget(self.message, 1)
         layout.addWidget(self.transport)
 



More information about the bazaar-commits mailing list