diff options
author | Jeremy Katz <katzj@redhat.com> | 2005-12-12 23:38:20 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2005-12-12 23:38:20 +0000 |
commit | e54f4e4c9910dfa3b28abff8e58d9143727cef12 (patch) | |
tree | 999296d173e29f2fa579aa988c596321485119e3 /gui.py | |
parent | 1018015cd32884eb17244e81fc5fe44de5681eb5 (diff) | |
download | anaconda-e54f4e4c9910dfa3b28abff8e58d9143727cef12.tar.gz anaconda-e54f4e4c9910dfa3b28abff8e58d9143727cef12.tar.xz anaconda-e54f4e4c9910dfa3b28abff8e58d9143727cef12.zip |
2005-12-12 Jeremy Katz <katzj@redhat.com>
* yuminstall.py (YumDepSolveProgress.tscheck): Enhance to allow
knowing how many things are going to be added. Put the smarts
about the "nice" update here instead of restartLoop
(YumSorter.tsCheck): Feedback on packages being checked so the
progress bar moves :-)
* gui.py (ProgressWindow.__init__): Allow specifying the
percentage to do updates at so that we can update more often on known
"slow" progress bars
* text.py (ProgressWindow): Matching prototype
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -493,7 +493,7 @@ class WaitWindow: rootPopBusyCursor() class ProgressWindow: - def __init__(self, title, text, total): + def __init__(self, title, text, total, updpct = 0.05): if flags.rootpath: self.window = gtk.Window() self.window.set_decorated(False) @@ -514,6 +514,7 @@ class ProgressWindow: box.pack_start (label, False) self.total = total + self.updpct = updpct self.progress = gtk.ProgressBar () box.pack_start (self.progress, True) self.window.add(box) @@ -530,7 +531,7 @@ class ProgressWindow: curval = self.progress.get_fraction() newval = float (amount) / self.total if newval < 0.998: - if (newval - curval) < 0.05 and newval > curval: + if (newval - curval) < self.updpct and newval > curval: return self.progress.set_fraction (newval) processEvents () @@ -744,8 +745,8 @@ class InstallInterface: def waitWindow (self, title, text): return WaitWindow (title, text) - def progressWindow (self, title, text, total): - return ProgressWindow (title, text, total) + def progressWindow (self, title, text, total, updpct = 0.05): + return ProgressWindow (title, text, total, updpct) def packageProgressWindow (self, total, totalSize): self.ppw.setSizes (total, totalSize) |