diff options
author | Mike Fulbright <msf@redhat.com> | 2003-09-12 21:20:41 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2003-09-12 21:20:41 +0000 |
commit | 114ca03be7dab9ce579531a318be02ea7562fb84 (patch) | |
tree | 4bbc019a347c37bffb43ad7f4f86c802b4acb405 /iw/confirm_gui.py | |
parent | 3670d962a6f7da0f8b9d6f5cb22e7c2a001a48c5 (diff) | |
download | anaconda-114ca03be7dab9ce579531a318be02ea7562fb84.tar.gz anaconda-114ca03be7dab9ce579531a318be02ea7562fb84.tar.xz anaconda-114ca03be7dab9ce579531a318be02ea7562fb84.zip |
add notification right before install/upgrade starts on how many CDs will be required so user can abort if they didnt burn them all
Diffstat (limited to 'iw/confirm_gui.py')
-rw-r--r-- | iw/confirm_gui.py | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/iw/confirm_gui.py b/iw/confirm_gui.py index bddeddeb3..e5beb32a5 100644 --- a/iw/confirm_gui.py +++ b/iw/confirm_gui.py @@ -1,7 +1,7 @@ # # confirm_gui.py: install/upgrade point of no return screen. # -# Copyright 2000-2002 Red Hat, Inc. +# Copyright 2000-2003 Red Hat, Inc. # # This software may be freely redistributed under the terms of the GNU # library public license. @@ -16,7 +16,9 @@ from iw_gui import * from rhpl.translate import _, N_ from constants import * from package_gui import queryUpgradeContinue +from image import presentRequiredMediaMessage import gui +import sys class ConfirmWindow (InstallWindow): @@ -55,7 +57,24 @@ class InstallConfirmWindow (ConfirmWindow): windowTitle = N_("About to Install") htmlTag = "aboutinstall" - def getScreen(self): + def getNext(self): + if self.id.methodstr.startswith("cdrom://") and (self.id.instClass.name and self.id.instClass.name != "kickstart"): + rc = presentRequiredMediaMessage(self.intf, self.id.grpset) + + if rc == 0: + rc2 = self.intf.messageWindow(_("Reboot?"), + _("The system will be rebooted now."), + type="custom", custom_icon="warning", + custom_buttons=[_("_Back"), _("_Reboot")]) + if rc2 == 1: + sys.exit(0) + else: + raise gui.StayOnScreen + + def getScreen(self, intf, id): + self.intf = intf + self.id = id + return ConfirmWindow.getScreen(self, _("Click next to begin installation of %s.") % (productName,), _("A complete log of the installation can be found in " @@ -68,7 +87,23 @@ class UpgradeConfirmWindow (ConfirmWindow): windowTitle = N_("About to Upgrade") htmlTag = "aboutupgrade" - def getScreen(self): + def getNext(self): + if self.id.methodstr.startswith("cdrom://") and (self.id.instClass.name and self.id.instClass.name != "kickstart"): + rc = presentRequiredMediaMessage(self.intf, self.id.grpset) + + if rc == 0: + rc2 = self.intf.messageWindow(_("Reboot?"), + _("The system will be rebooted now."), + type="custom", custom_icon="warning", + custom_buttons=[_("_Back"), _("_Reboot")]) + if rc2 == 1: + sys.exit(0) + else: + raise gui.StayOnScreen + + def getScreen(self, intf, id): + self.intf = intf + self.id = id return ConfirmWindow.getScreen(self, _("Click next to begin upgrade of %s.") % (productName,), _("A complete log of the upgrade can be found in " |