From 054b81009e7f584384c556b0741f7c7760096658 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 8 Oct 2008 15:21:50 -0400 Subject: Change the upgrade progress bar to pulse (#466053). The RPM callback doesn't work like I expected, so we don't have the information to know how many packages are getting cleaned up and which one we're on. So the best we can do is pulse a progress bar in a window instead of a real one. --- yuminstall.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'yuminstall.py') diff --git a/yuminstall.py b/yuminstall.py index d5f388d89..eeaeca052 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -89,9 +89,9 @@ class AnacondaCallback: self.repos = ayum.repos self.ts = ayum.ts self.ayum = ayum - + self.messageWindow = anaconda.intf.messageWindow - self.waitWindow = anaconda.intf.waitWindow + self.pulseWindow = anaconda.intf.progressWindow self.progress = anaconda.id.instProgress self.progressWindowClass = anaconda.intf.progressWindow self.rootPath = anaconda.rootPath @@ -184,6 +184,10 @@ class AnacondaCallback: return self.openfile.fileno() elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE: + if self.initWindow: + self.initWindow.pop() + self.initWindow = None + (hdr, rpmloc) = h fn = self.openfile.name @@ -209,15 +213,14 @@ class AnacondaCallback: self.inProgressPo = None - # FIXME: we should probably integrate this into the progress bar - # and actually show progress on cleanups..... elif what in (rpm.RPMCALLBACK_UNINST_START, rpm.RPMCALLBACK_UNINST_STOP): if self.initWindow is None: - self.initWindow = self.waitWindow(_("Finishing upgrade"), - _("Finishing upgrade process. This may take a little while...")) + self.initWindow = self.pulseWindow(_("Finishing upgrade"), + _("Finishing upgrade process. This may take a little while..."), + 0, pulse=True) else: - self.initWindow.refresh() + self.initWindow.pulse() else: pass -- cgit