diff options
author | pnfisher <pnfisher> | 1999-09-03 18:28:05 +0000 |
---|---|---|
committer | pnfisher <pnfisher> | 1999-09-03 18:28:05 +0000 |
commit | 4588c5f9030f6c898749fa6bb11e5565ab185c6f (patch) | |
tree | 378e0874d3e90ae6084feb8dae305c21aa35c7f4 | |
parent | 0d9cd0db6174a590917beb27a58a545990ba28e4 (diff) | |
download | anaconda-4588c5f9030f6c898749fa6bb11e5565ab185c6f.tar.gz anaconda-4588c5f9030f6c898749fa6bb11e5565ab185c6f.tar.xz anaconda-4588c5f9030f6c898749fa6bb11e5565ab185c6f.zip |
Add total progress bar.
-rw-r--r-- | iw/progress.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/iw/progress.py b/iw/progress.py index f2e12d866..24b65e416 100644 --- a/iw/progress.py +++ b/iw/progress.py @@ -68,6 +68,7 @@ class InstallProgressWindow (InstallWindow): remainingTime = finishTime - elapsedTime apply (self.clist.set_text, self.status["remaining"]["time"] + ("%s" % formatTime(remainingTime),)) + self.totalProgress.update (float (self.sizeComplete) / self.totalSize) threads_leave () return @@ -83,11 +84,14 @@ class InstallProgressWindow (InstallWindow): def setPackage(self, header): threads_enter () - self.curPackage["package"].set_text (header[rpm.RPMTAG_NAME]) + self.curPackage["package"].set_text ("%s-%s-%s" % (header[rpm.RPMTAG_NAME], + header[rpm.RPMTAG_VERSION], + header[rpm.RPMTAG_RELEASE])) self.curPackage["size"].set_text ("%.1f KBytes" % (header[rpm.RPMTAG_SIZE] / 1024.0)) - self.curPackage["summary"].set_text (header[rpm.RPMTAG_SUMMARY]) - print "foobar" - print header[rpm.RPMTAG_SUMMARY] + summary = header[rpm.RPMTAG_SUMMARY] + if (summary == None): + summary = "(none)" + self.curPackage["summary"].set_text (summary) threads_leave () def setSizes (self, total, totalSize): @@ -125,7 +129,8 @@ class InstallProgressWindow (InstallWindow): vbox = GtkVBox (FALSE, 10) vbox.pack_start (table, FALSE) - self.progress = GtkProgressBar() + self.progress = GtkProgressBar () + self.totalProgress = GtkProgressBar () vbox.pack_start (self.progress, FALSE) self.status = { @@ -155,9 +160,13 @@ class InstallProgressWindow (InstallWindow): clist.set_selectable (x, FALSE) clist['can_focus'] = FALSE self.clist = clist +# align = GtkAlignment (0.5, 0.5) +# align.add (clist) +# vbox.pack_start (align, FALSE) hbox = GtkHBox (FALSE, 5) hbox.pack_start (clist, TRUE) vbox.pack_start (hbox, FALSE) + vbox.pack_start (self.totalProgress, FALSE) self.ics.getInstallInterface ().setPackageProgressWindow (self) ii = self.ics.getInstallInterface () |