summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgui.py9
-rw-r--r--iw/examine_gui.py2
-rw-r--r--iw/lilo_gui.py29
-rw-r--r--text.py23
-rw-r--r--todo.py14
5 files changed, 71 insertions, 6 deletions
diff --git a/gui.py b/gui.py
index f0535c15d..1af539da3 100755
--- a/gui.py
+++ b/gui.py
@@ -235,6 +235,12 @@ class MessageWindow:
if self.mutex:
self.mutex.set ()
+ def questionquit (self, button):
+ self.rc = button
+
+ if self.mutex:
+ self.mutex.set ()
+
def getrc (self):
return self.rc
@@ -247,6 +253,9 @@ class MessageWindow:
self.window.connect ("close", self.quit)
if type == "okcancel":
self.window = GnomeOkCancelDialog (_(text), self.okcancelquit)
+ if type == "yesno":
+ self.window = GnomeQuestionDialog (_(text), self.questionquit)
+
# this is the pixmap + the label
hbox = self.window.vbox.children ()[0]
label = hbox.children ()[1]
diff --git a/iw/examine_gui.py b/iw/examine_gui.py
index b1ec022d3..62eabace0 100644
--- a/iw/examine_gui.py
+++ b/iw/examine_gui.py
@@ -18,7 +18,7 @@ class UpgradeExamineWindow (InstallWindow):
threads_leave ()
self.todo.upgradeFindPackages (self.root)
threads_enter ()
-
+
if self.individualPackages.get_active ():
# XXX fix me
from package_gui import IndividualPackageSelectionWindow
diff --git a/iw/lilo_gui.py b/iw/lilo_gui.py
index 640af3ab7..9a705c516 100644
--- a/iw/lilo_gui.py
+++ b/iw/lilo_gui.py
@@ -7,6 +7,8 @@ from xpms_gui import CHECKBOX_ON_XPM
from xpms_gui import CHECKBOX_OFF_XPM
import GdkImlib
import iutil
+import gui
+
if iutil.getArch() == 'i386':
import edd
@@ -39,6 +41,29 @@ class LiloWindow (InstallWindow):
# to skip this screen
self.bootdisk = None
+ # if doing an upgrade, offer choice of aborting upgrade.
+ # we can't allow them to go back in install, since we've
+ # started swap and mounted the systems filesystems
+ # if we've already started an upgrade, cannot back out
+ if self.todo.upgrade:
+ threads_leave()
+ rc = self.todo.intf.messageWindow(_("Proceed with upgrade?"),
+ _("The filesystems of the Linux installation "
+ "you have chosen to upgrade have already been "
+ "mounted. You cannot go back past this point. "
+ "\n\n") +
+ _( "Would you like to continue with the upgrade?"),
+ type = "yesno").getrc()
+
+ threads_enter()
+
+ if not rc:
+ raise gui.StayOnScreen
+ else:
+ import sys
+ print _("Aborting upgrade")
+ sys.exit(0)
+
def getNext (self):
if not self.bootdisk: return None
@@ -228,6 +253,10 @@ class LiloWindow (InstallWindow):
self.todo.bootdisk = 1
return None
+# cant go back past this screen in upgrades
+# if self.todo.upgrade:
+# self.ics.setPrevEnabled (0)
+
# comment these two lines to get lilo screen in test mode
# if not self.todo.fstab.setupFilesystems:
# return None
diff --git a/text.py b/text.py
index 8c9b413b9..82c0411f5 100644
--- a/text.py
+++ b/text.py
@@ -336,6 +336,23 @@ class InstallPathWindow:
class UpgradeExamineWindow:
def __call__ (self, dir, screen, todo):
if dir == -1:
+ # msf dont go back!
+ rc = ButtonChoiceWindow(screen, _("Proceed with upgrade?"),
+ _("The filesystems of the Linux installation "
+ "you have chosen to upgrade have already been "
+ "mounted. You cannot go back past this point. "
+ "\n\n") +
+ _("If you would like to exit the upgrade select "
+ "Exit, or choose Ok to continue with the "
+ "upgrade."),
+ [ _("Ok"), _("Exit") ], width = 50)
+
+ if rc == 'ok':
+ return INSTALL_OK
+ else:
+ import sys
+ sys.exit(0)
+
# Hack to let backing out of upgrades work properly
from fstab import NewtFstab
if todo.fstab:
@@ -384,6 +401,12 @@ class UpgradeExamineWindow:
root = parts[choice]
else:
root = parts[0]
+ (drive, fs) = root
+ rc = ButtonChoiceWindow (screen, _("Upgrade Partition"),
+ _("Going to upgrade partition /dev/") + drive,
+ buttons = [ _("Ok"), _("Back") ])
+ if rc == string.lower (_("Back")):
+ return INSTALL_BACK
todo.upgradeFindPackages (root)
diff --git a/todo.py b/todo.py
index f2ab01f1a..d16ce6501 100644
--- a/todo.py
+++ b/todo.py
@@ -765,11 +765,15 @@ class ToDo:
for n in packages:
self.selectPackage(n)
- if self.x.server and not self.x.server == "XFree86":
- try:
- self.selectPackage ('XFree86-' + self.x.server[5:])
- except ValueError, message:
- log ("Error selecting XFree86 server package: %s", message)
+
+ if self.hdList.packages.has_key('XFree86') and self.hdList.packages['XFree86'].selected:
+ log ("X is being installed, need to enable server if set")
+ if self.x.server and not self.x.server == "XFree86":
+ log("enabling server %s" % self.x.server)
+ try:
+ self.selectPackage ('XFree86-' + self.x.server[5:])
+ except ValueError, message:
+ log ("Error selecting XFree86 server package: %s", message)
def selectPackage(self, package):
if not self.hdList.packages.has_key(package):