summaryrefslogtreecommitdiffstats
path: root/iw/progress_gui.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-04-14 21:46:49 +0000
committerMike Fulbright <msf@redhat.com>2003-04-14 21:46:49 +0000
commit9e0b9e13b5b21e32f2623c76d16754bb9c7def38 (patch)
tree9fd1442877672d1d3fd7a07d34f750fa97a3108c /iw/progress_gui.py
parentedce8f67ad91c4e8ac376a8b69165e1b9a6bdb44 (diff)
downloadanaconda-9e0b9e13b5b21e32f2623c76d16754bb9c7def38.tar.gz
anaconda-9e0b9e13b5b21e32f2623c76d16754bb9c7def38.tar.xz
anaconda-9e0b9e13b5b21e32f2623c76d16754bb9c7def38.zip
add UI for http/ftp download progress
Diffstat (limited to 'iw/progress_gui.py')
-rw-r--r--iw/progress_gui.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/iw/progress_gui.py b/iw/progress_gui.py
index bdc6e96fc..b1684feef 100644
--- a/iw/progress_gui.py
+++ b/iw/progress_gui.py
@@ -44,6 +44,17 @@ class InstallProgressWindow (InstallWindow):
def processEvents(self):
gui.processEvents()
+ def setPackageStatus(self, state, amount):
+ if self.pkgstatus is None:
+ return
+
+ if state == "downloading":
+ msgstr = _("Downloading - %s") % (amount,)
+ else:
+ msgstr = state
+ self.pkgstatus.set_text(msgstr)
+ self.processEvents()
+
def setPackageScale (self, amount, total):
# only update widget if we've changed by 5%, otherwise
# we update widget hundreds of times a seconds because RPM
@@ -246,8 +257,22 @@ class InstallProgressWindow (InstallWindow):
vbox = gtk.VBox (gtk.FALSE, 10)
vbox.pack_start (table, gtk.FALSE, gtk.FALSE)
+ statusflag = 0
+ for m in ['http://', 'ftp://']:
+ if id.methodstr.startswith(m):
+ statusflag = 1
+ break
+
+ if statusflag:
+ statusTable = gtk.Table (2, 2, gtk.FALSE)
+ self.pkgstatus = gtk.Label("")
+ vbox.pack_start(statusTable, gtk.FALSE, gtk.FALSE)
+ statusTable.attach (gtk.Label(_("Status: ")), 0, 1, 0, 1, gtk.SHRINK)
+ statusTable.attach (self.pkgstatus, 1, 2, 0, 1, gtk.FILL, gtk.FILL, ypadding=2)
+
self.progress = gtk.ProgressBar ()
self.totalProgress = gtk.ProgressBar ()
+ vbox.pack_start (statusTable, gtk.FALSE, gtk.FALSE)
progressTable = gtk.Table (2, 2, gtk.FALSE)
label = gtk.Label (_("Package Progress: "))