[issue232] gtk/process.py cleanup

David Farning at Labix Tracker tracker at labix.org
Wed Oct 25 08:49:59 PDT 2006


David Farning <dfarning at gmail.com> added the comment:

for
> > smartpm.  Seems like a good way to get my feet wet without getting
into
> > the dependency solver and backend stuff.
> > 
> > In order to start adding features and fixing bugs, I would like to
> > enhance the readability of the existing codebase.
> 
> Yes, that's a nice idea, and please feel welcome to hack on Smart.
We'll
> be glad to integrate sensible patches you produce.
> 

I understand that it would be sensible for me to submit the correct
patch.  Sorry, I have never used subversion before and botched the
patch.  I was doing an svn revert . instead of svn -R revert . to bring
my working directory back to build 755 after doing some experminating. 

self.progress
> > rather than progressbar or _progress is confusing.
> 
> I don't understand your position here.  The mentioned code is already
> using _progress.
> 
> 

The corrected patch changing the variable from _progress to _progressbar
is attached inline.

Index: smart/interfaces/gtk/progress.py
===================================================================
--- smart/interfaces/gtk/progress.py    (revision 755)
+++ smart/interfaces/gtk/progress.py    (working copy)
@@ -63,10 +63,10 @@
         self._topic.show()
         vbox.pack_start(self._topic, expand=False, fill=False)

-        self._progress = gtk.ProgressBar()
-        self._progress.set_size_request(-1, 25)
-        self._progress.show()
-        vbox.pack_start(self._progress, expand=False, fill=False)
+        self._progressbar = gtk.ProgressBar()
+        self._progressbar.set_size_request(-1, 25)
+        self._progressbar.show()
+        vbox.pack_start(self._progressbar, expand=False, fill=False)

         if hassub:
             self._scrollwin = gtk.ScrolledWindow()
@@ -232,8 +232,8 @@
             self._treemodel.set(iter, 0, subpercent, 1, subtopic)
         else:
             self._topic.set_text(topic)
-            self._progress.set_fraction(percent/100.)
-            self._progress.set_text("%d%%" % percent)
+            self._progressbar.set_fraction(percent/100.)
+            self._progressbar.set_text("%d%%" % percent)
             if self._hassub:
                 self._treeview.queue_draw()

----------
status: resolved -> chatting

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue232>
_______________________________________



More information about the Smart mailing list