[merge] further progress bar fixes

John Arbash Meinel john at arbash-meinel.com
Thu Jan 22 19:37:13 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> Now with patch.
> 
> 
> 

+    def _progress_updated(self, task):
+        """Called by the ProgressTask when it changes.
+
+        Should be specialized to draw the progress."""
+        pass

^- I'm pretty sure we normally put the final """ on its own line.

     def update(self, msg, current_cnt=None, total_cnt=None):
         self.msg = msg
         self.current_cnt = current_cnt
         if total_cnt:
             self.total_cnt = total_cnt
- -        self.ui_factory.show_progress(self)
+        self.ui_factory._progress_updated(self)

     def tick(self):
         self.update(self.msg)

     def finished(self):
- -        self.ui_factory.progress_finished(self)
+        self.ui_factory._progress_finished(self)

^- I was a bit surprised you changed this to be calling private
functions. But I suppose no third-party should ever call
"ui_factory.progress_updated()" (it should only be called by a
ProgressTask that was returned *by* the ui_factory itself)

So in the end it seemed like the correct fix.

Anyway, the rest seems fine:

BB:tweak

John
=:->



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl4yukACgkQJdeBCYSNAAMhGwCffSOZsPceu1ygtIlU3Ha7DXCJ
EBMAoKuuh7MVOnGykrWPscNxffQlUyd4
=YCEJ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list