summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-05-04 19:58:53 +0000
committerChris Lumens <clumens@redhat.com>2006-05-04 19:58:53 +0000
commit9e1a444c46abcfc29c2e44ffd102fcc1eda6289e (patch)
treefc10e993fe6c8292fbd0cb57fb6ad4135b0a8fad
parent2d90bc12dcc682a7f0ff68e599cbb81a34a0b4a3 (diff)
downloadanaconda-9e1a444c46abcfc29c2e44ffd102fcc1eda6289e.tar.gz
anaconda-9e1a444c46abcfc29c2e44ffd102fcc1eda6289e.tar.xz
anaconda-9e1a444c46abcfc29c2e44ffd102fcc1eda6289e.zip
Make all UI steps use anaconda class. Add system-config-keyboard shim.
-rw-r--r--autopart.py10
-rw-r--r--dispatch.py53
-rw-r--r--iw/account_gui.py14
-rw-r--r--iw/autopart_type.py28
-rw-r--r--iw/blpasswidget.py8
-rw-r--r--iw/bootloader_advanced_gui.py11
-rw-r--r--iw/bootloader_main_gui.py21
-rw-r--r--iw/bootlocwidget.py14
-rw-r--r--iw/confirm_gui.py61
-rw-r--r--iw/congrats_gui.py4
-rw-r--r--iw/examine_gui.py59
-rw-r--r--iw/iscsi_gui.py6
-rw-r--r--iw/kbd_gui.py29
-rw-r--r--iw/language_gui.py8
-rw-r--r--iw/network_gui.py8
-rw-r--r--iw/osbootwidget.py10
-rw-r--r--iw/package_gui.py6
-rw-r--r--iw/partition_gui.py12
-rw-r--r--iw/progress_gui.py22
-rw-r--r--iw/task_gui.py10
-rw-r--r--iw/timezone_gui.py10
-rw-r--r--iw/upgrade_bootloader_gui.py13
-rw-r--r--iw/upgrade_migratefs_gui.py6
-rw-r--r--iw/upgrade_swap_gui.py21
-rw-r--r--iw/welcome_gui.py2
-rw-r--r--iw/zfcp_gui.py14
-rw-r--r--iw/zipl_gui.py24
-rw-r--r--partIntfHelpers.py8
-rw-r--r--textw/bootloader_text.py106
-rw-r--r--textw/complete_text.py6
-rw-r--r--textw/confirm_text.py16
-rw-r--r--textw/grpselect_text.py10
-rw-r--r--textw/iscsi_text.py4
-rw-r--r--textw/keyboard_text.py16
-rw-r--r--textw/language_text.py24
-rw-r--r--textw/network_text.py44
-rw-r--r--textw/partition_text.py47
-rw-r--r--textw/progress_text.py16
-rw-r--r--textw/task_text.py16
-rw-r--r--textw/timezone_text.py10
-rw-r--r--textw/upgrade_bootloader_text.py12
-rw-r--r--textw/upgrade_text.py65
-rw-r--r--textw/userauth_text.py12
-rw-r--r--textw/welcome_text.py2
-rw-r--r--textw/zfcp_text.py15
-rw-r--r--textw/zipl_text.py20
46 files changed, 424 insertions, 509 deletions
diff --git a/autopart.py b/autopart.py
index 3f9a1fe75..2adf3e488 100644
--- a/autopart.py
+++ b/autopart.py
@@ -1652,9 +1652,9 @@ def getAutopartitionBoot():
else:
return [ ("/boot", None, 100, None, 0, 1, 0) ]
-def queryAutoPartitionOK(intf, diskset, partitions):
- type = partitions.autoClearPartType
- drives = partitions.autoClearPartDrives
+def queryAutoPartitionOK(anaconda):
+ type = anaconda.id.partitions.autoClearPartType
+ drives = anaconda.id.partitions.autoClearPartDrives
if type == CLEARPART_TYPE_LINUX:
msg = CLEARPART_TYPE_LINUX_WARNING_MSG
@@ -1667,7 +1667,7 @@ def queryAutoPartitionOK(intf, diskset, partitions):
drvstr = "\n\n"
if drives == None:
- drives = diskset.disks.keys()
+ drives = anaconda.id.diskset.disks.keys()
drives.sort()
width = 44
@@ -1686,7 +1686,7 @@ def queryAutoPartitionOK(intf, diskset, partitions):
str = "%-*s" % (maxlen, "/dev/"+drive)
drvstr = drvstr + str + "\n"
- rc = intf.messageWindow(_("Warning"), _(msg) % drvstr, type="yesno", default="no", custom_icon ="warning")
+ rc = anaconda.intf.messageWindow(_("Warning"), _(msg) % drvstr, type="yesno", default="no", custom_icon ="warning")
return rc
diff --git a/dispatch.py b/dispatch.py
index ce278c059..1d7c94845 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -56,44 +56,41 @@ log = logging.getLogger("anaconda")
# in the second case, the function is called directly from the dispatcher
installSteps = [
- ("welcome", ()),
+ ("welcome", ("anaconda",)),
("betanag", betaNagScreen, ("anaconda",)),
- ("language", ("intf", "id.instLanguage")),
- ("keyboard", ("id.instLanguage.getDefaultKeyboard()", "id.keyboard")),
+ ("language", ("anaconda",)),
+ ("keyboard", ("anaconda",)),
("findrootparts", findRootParts, ("anaconda",)),
- ("findinstall", ("dispatch", "intf", "id", "instPath")),
- ("installtype", ("dispatch", "id", "method", "intf")),
- ("iscsi", ("id.iscsi", "intf")),
- ("zfcpconfig", ("id.zfcp", "id.diskset", "intf")),
+ ("findinstall", ("anaconda",)),
+ ("iscsi", ("anaconda",)),
+ ("zfcpconfig", ("anaconda",)),
("partitionobjinit", partitionObjectsInitialize, ("anaconda",)),
- ("parttype", ("id.diskset", "id.partitions", "intf", "dispatch")),
+ ("parttype", ("anaconda",)),
("autopartitionexecute", doAutoPartition, ("anaconda",)),
- ("partition", ("id.fsset", "id.diskset", "id.partitions", "intf")),
+ ("partition", ("anaconda",)),
("upgrademount", upgradeMountFilesystems, ("anaconda",)),
("upgradecontinue", queryUpgradeContinue, ("anaconda",)),
("upgradeswapsuggestion", upgradeSwapSuggestion, ("anaconda",)),
- ("addswap", ("intf", "id.fsset", "instPath",
- "id.upgradeSwapInfo", "dispatch")),
+ ("addswap", ("anaconda",)),
("partitiondone", partitioningComplete, ("anaconda",)),
("upgrademigfind", upgradeMigrateFind, ("anaconda",)),
- ("upgrademigratefs", ("id.fsset",)),
- ("upgbootloader", ("dispatch", "id.bootloader")),
+ ("upgrademigratefs", ("anaconda",)),
+ ("upgbootloader", ("anaconda",)),
("bootloadersetup", bootloaderSetupChoices, ("anaconda",)),
- ("bootloader", ("dispatch", "id.bootloader", "id.fsset", "id.diskset")),
- ("bootloaderadvanced", ("dispatch", "id.bootloader", "id.fsset",
- "id.diskset")),
+ ("bootloader", ("anaconda",)),
+ ("bootloaderadvanced", ("anaconda",)),
("networkdevicecheck", networkDeviceCheck, ("anaconda",)),
- ("network", ("id.network", "dir", "intf", "id")),
- ("timezone", ("id.instLanguage", "id.timezone")),
- ("accounts", ("intf", "id.rootPassword")),
+ ("network", ("anaconda",)),
+ ("timezone", ("anaconda",)),
+ ("accounts", ("anaconda",)),
("reposetup", doRepoSetup, ("anaconda",)),
("basepkgsel", doBasePackageSelect, ("anaconda",)),
- ("tasksel", ("intf", "backend", "dispatch", "id.instClass")),
- ("group-selection", ("backend", "intf")),
+ ("tasksel", ("anaconda",)),
+ ("group-selection", ("anaconda",)),
("postselection", doPostSelection, ("anaconda",)),
- ("confirminstall", ("intf", "id",)),
- ("confirmupgrade", ("intf", "id",)),
- ("install", ("dir", "intf", "id")),
+ ("confirminstall", ("anaconda",)),
+ ("confirmupgrade", ("anaconda",)),
+ ("install", ("anaconda",)),
("enablefilesystems", turnOnFilesystems, ("anaconda",)),
("migratefilesystems", doMigrateFilesystems, ("anaconda",)),
("setuptime", setupTimezone, ("anaconda",)),
@@ -109,7 +106,7 @@ installSteps = [
("copylogs", copyAnacondaLogs, ("anaconda",)),
("dopostaction", doPostAction, ("anaconda",)),
("methodcomplete", doMethodComplete, ("anaconda",)),
- ("complete", ()),
+ ("complete", ("anaconda",)),
]
class Dispatcher:
@@ -244,13 +241,7 @@ class Dispatcher:
self.step = None
self.skipSteps = {}
- self.id = anaconda.id
- self.flags = flags
- self.intf = anaconda.intf
self.method = anaconda.method
- self.dispatch = self
- self.instPath = anaconda.rootPath
- self.backend = anaconda.backend
self.firstStep = 0
def _getDir(self):
diff --git a/iw/account_gui.py b/iw/account_gui.py
index 9a84a9099..152b5236a 100644
--- a/iw/account_gui.py
+++ b/iw/account_gui.py
@@ -69,16 +69,16 @@ class AccountWindow (InstallWindow):
custom_icon="error")
passwordError()
- self.rootPw["password"] = self.pw.get_text()
+ self.rootPassword["password"] = self.pw.get_text()
return None
def setFocus (self, area, data):
self.pw.grab_focus ()
# AccountWindow tag="accts"
- def getScreen (self, intf, rootPw):
- self.rootPw = rootPw
- self.intf = intf
+ def getScreen (self, anaconda):
+ self.rootPassword = anaconda.id.rootPassword
+ self.intf = anaconda.intf
self.passwords = {}
@@ -136,8 +136,8 @@ class AccountWindow (InstallWindow):
wrapper.pack_start (self.rootStatus)
box.pack_start (wrapper, False)
- if not self.rootPw["isCrypted"]:
- self.pw.set_text(self.rootPw["password"])
- self.confirm.set_text(self.rootPw["password"])
+ if not self.rootPassword["isCrypted"]:
+ self.pw.set_text(self.rootPassword["password"])
+ self.confirm.set_text(self.rootPassword["password"])
return box
diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index 44e6a2863..52b0d6110 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -3,7 +3,7 @@
#
# Jeremy Katz <katzj@redhat.com>
#
-# Copyright 2005 Red Hat, Inc.
+# Copyright 2005-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# general public license.
@@ -59,8 +59,7 @@ class PartitionTypeWindow(InstallWindow):
self.partitions.autoClearPartDrives = allowdrives
- if not autopart.queryAutoPartitionOK(self.intf, self.diskset,
- self.partitions):
+ if not autopart.queryAutoPartitionOK(self.anaconda):
raise gui.StayOnScreen
if self.xml.get_widget("reviewButton").get_active():
@@ -94,11 +93,12 @@ class PartitionTypeWindow(InstallWindow):
self.xml.get_widget("reviewButton").set_sensitive(True)
- def getScreen(self, diskset, partitions, intf, dispatch):
- self.diskset = diskset
- self.partitions = partitions
- self.intf = intf
- self.dispatch = dispatch
+ def getScreen(self, anaconda):
+ self.anaconda = anaconda
+ self.diskset = anaconda.id.diskset
+ self.partitions = anaconda.id.partitions
+ self.intf = anaconda.intf
+ self.dispatch = anaconda.dispatch
(self.xml, vbox) = gui.getGladeWidget("autopart.glade", "parttypeBox")
@@ -118,26 +118,24 @@ class PartitionTypeWindow(InstallWindow):
for (txt, val) in opts:
iter = store.append(None)
store[iter] = (txt, val)
- if val == partitions.autoClearPartType:
+ if val == self.partitions.autoClearPartType:
self.combo.set_active_iter(iter)
if ((self.combo.get_active() == -1) or
- dispatch.stepInSkipList("autopartitionexecute")):
+ self.dispatch.stepInSkipList("autopartitionexecute")):
self.combo.set_active(len(opts) - 1) # yeah, it's a hack
- self.drivelist = createAllowedDrivesList(diskset.disks,
- partitions.autoClearPartDrives)
+ self.drivelist = createAllowedDrivesList(self.diskset.disks,
+ self.partitions.autoClearPartDrives)
self.drivelist.set_size_request(375, 80)
self.xml.get_widget("driveScroll").add(self.drivelist)
self.prevrev = None
- self.review = not dispatch.stepInSkipList("partition")
+ self.review = not self.dispatch.stepInSkipList("partition")
self.xml.get_widget("reviewButton").set_active(self.review)
sigs = { "on_partitionTypeCombo_changed": self.comboChanged }
self.xml.signal_autoconnect(sigs)
return vbox
-
-
diff --git a/iw/blpasswidget.py b/iw/blpasswidget.py
index a1b823982..1e49cfbc8 100644
--- a/iw/blpasswidget.py
+++ b/iw/blpasswidget.py
@@ -21,13 +21,13 @@ from rhpl.translate import _, N_
class BootloaderPasswordWidget:
- def __init__(self, bl, parent, intf):
+ def __init__(self, anaconda, parent):
self.parent = parent
- self.intf = intf
+ self.intf = anaconda.intf
- if bl.getPassword():
+ if anaconda.id.bootloader.getPassword():
usePass = 1
- self.password = bl.getPassword()
+ self.password = anaconda.id.bootloader.getPassword()
else:
usePass = 0
self.password = None
diff --git a/iw/bootloader_advanced_gui.py b/iw/bootloader_advanced_gui.py
index e32c38db3..2b81b1396 100644
--- a/iw/bootloader_advanced_gui.py
+++ b/iw/bootloader_advanced_gui.py
@@ -91,16 +91,15 @@ class AdvancedBootloaderWindow(InstallWindow):
self.options_vbox.pack_start(al, False)
- def getScreen(self, dispatch, bl, fsset, diskset):
- self.dispatch = dispatch
- self.bl = bl
- self.intf = dispatch.intf
+ def getScreen(self, anaconda):
+ self.dispatch = anaconda.dispatch
+ self.bl = anaconda.id.bootloader
+ self.intf = anaconda.intf
thebox = gtk.VBox (False, 10)
# boot loader location bits (mbr vs boot, drive order)
- self.blloc = BootloaderLocationWidget(bl, fsset, diskset,
- self.parent, self.intf)
+ self.blloc = BootloaderLocationWidget(anaconda, self.parent)
thebox.pack_start(self.blloc.getWidget(), False)
thebox.pack_start (gtk.HSeparator(), False)
diff --git a/iw/bootloader_main_gui.py b/iw/bootloader_main_gui.py
index ee0e6e188..c6b37b73d 100644
--- a/iw/bootloader_main_gui.py
+++ b/iw/bootloader_main_gui.py
@@ -79,10 +79,10 @@ class MainBootloaderWindow(InstallWindow):
widget.set_sensitive(active)
- def getScreen(self, dispatch, bl, fsset, diskSet):
- self.dispatch = dispatch
- self.bl = bl
- self.intf = dispatch.intf
+ def getScreen(self, anaconda):
+ self.dispatch = anaconda.dispatch
+ self.bl = anaconda.id.bootloader
+ self.intf = anaconda.intf
if self.bl.getPassword():
self.usePass = 1
@@ -103,12 +103,12 @@ class MainBootloaderWindow(InstallWindow):
self.blname = None
# make sure we get a valid device to say we're installing to
- if bl.getDevice() is not None:
- self.bldev = bl.getDevice()
+ if self.bl.getDevice() is not None:
+ self.bldev = self.bl.getDevice()
else:
# we don't know what it is yet... if mbr is possible, we want
# it, else we want the boot dev
- choices = fsset.bootloaderChoices(diskSet, self.bl)
+ choices = anaconda.id.fsset.bootloaderChoices(anaconda.id.diskset, self.bl)
if choices.has_key('mbr'):
self.bldev = choices['mbr'][0]
else:
@@ -138,14 +138,13 @@ class MainBootloaderWindow(InstallWindow):
thebox.pack_start(spacer, False)
# configure the systems available to boot from the boot loader
- self.oslist = OSBootWidget(bl, fsset, diskSet, self.parent,
- self.intf, self.blname)
+ self.oslist = OSBootWidget(anaconda, self.parent, self.blname)
thebox.pack_start(self.oslist.getWidget(), False)
thebox.pack_start (gtk.HSeparator(), False)
# control whether or not there's a boot loader password and what it is
- self.blpass = BootloaderPasswordWidget(bl, self.parent, self.intf)
+ self.blpass = BootloaderPasswordWidget(anaconda, self.parent)
thebox.pack_start(self.blpass.getWidget(), False)
thebox.pack_start (gtk.HSeparator(), False)
@@ -153,7 +152,7 @@ class MainBootloaderWindow(InstallWindow):
# check box to control showing the advanced screen
self.advanced = gtk.CheckButton(_("Configure advanced boot loader "
"_options"))
- if dispatch.stepInSkipList("bootloaderadvanced"):
+ if self.dispatch.stepInSkipList("bootloaderadvanced"):
self.advanced.set_active(False)
else:
self.advanced.set_active(True)
diff --git a/iw/bootlocwidget.py b/iw/bootlocwidget.py
index f87d97041..3bfe97c99 100644
--- a/iw/bootlocwidget.py
+++ b/iw/bootlocwidget.py
@@ -24,13 +24,13 @@ from driveorderwidget import DriveOrderWidget
class BootloaderLocationWidget:
"""Widget to set where to install the boot loader to"""
- def __init__(self, bl, fsset, diskset, parent, intf):
- self.bl = bl
- self.fsset = fsset
- self.diskset = diskset
+ def __init__(self, anaconda, parent):
+ self.bl = anaconda.id.bootloader
+ self.fsset = anaconda.id.fsset
+ self.diskset = anaconda.id.diskset
self.parent = parent
- self.intf = intf
- self.driveOrder = bl.drivelist
+ self.intf = anaconda.intf
+ self.driveOrder = self.bl.drivelist
self.usingGrub = self.bl.useGrub()
locationBox = gtk.VBox (False, 2)
@@ -44,7 +44,7 @@ class BootloaderLocationWidget:
spacer.set_size_request(10, 1)
locationBox.pack_start(spacer, False)
- choices = fsset.bootloaderChoices(diskset, self.bl)
+ choices = self.fsset.bootloaderChoices(self.diskset, self.bl)
self.bootDevices = {}
if choices:
diff --git a/iw/confirm_gui.py b/iw/confirm_gui.py
index d128f8386..db1d0d29d 100644
--- a/iw/confirm_gui.py
+++ b/iw/confirm_gui.py
@@ -22,6 +22,23 @@ import sys
class ConfirmWindow (InstallWindow):
+ def getNext(self):
+ if self.anaconda.methodstr.startswith("cdrom://") and not self.anaconda.isKickstart:
+ rc = presentRequiredMediaMessage(self.anaconda.intf, self.anaconda.id.grpset)
+ if rc == 0:
+ rc2 = self.anaconda.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
+ elif rc == 1: # they asked to go back
+ self.anaconda.intf.icw.prevClicked()
+ raise gui.StayOnScreen
+ return DISPATCH_BACK
+
# ConfirmWindow tag="aboutupgrade" or "aboutinstall"
def getScreen (self, labelText, longText):
hbox = gtk.HBox (True, 5)
@@ -57,27 +74,9 @@ class InstallConfirmWindow (ConfirmWindow):
windowTitle = N_("About to Install")
htmlTag = "aboutinstall"
- 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
- elif rc == 1: # they asked to go back
- self.intf.icw.prevClicked()
- raise gui.StayOnScreen
- return DISPATCH_BACK
+ def getScreen(self, anaconda):
+ self.anaconda = anaconda
- 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 "
@@ -90,27 +89,9 @@ class UpgradeConfirmWindow (ConfirmWindow):
windowTitle = N_("About to Upgrade")
htmlTag = "aboutupgrade"
- 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
- elif rc == 1: # they asked to go back
- self.intf.icw.prevClicked()
- raise gui.StayOnScreen
- return DISPATCH_BACK
+ def getScreen(self, anaconda):
+ self.anaconda = anaconda
- 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 "
diff --git a/iw/congrats_gui.py b/iw/congrats_gui.py
index 3c79bddfb..70265f085 100644
--- a/iw/congrats_gui.py
+++ b/iw/congrats_gui.py
@@ -1,7 +1,7 @@
#
# congrats_gui.py: install/upgrade complete screen.
#
-# Copyright 2000-2002 Red Hat, Inc.
+# Copyright 2000-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -44,7 +44,7 @@ class CongratulationWindow (InstallWindow):
gui.copyScreenshots()
# CongratulationWindow tag=NA
- def getScreen (self):
+ def getScreen (self, anaconda):
self.ics.setHelpEnabled (False)
hbox = gtk.HBox (False, 5)
diff --git a/iw/examine_gui.py b/iw/examine_gui.py
index 65cc7a91f..82df5add6 100644
--- a/iw/examine_gui.py
+++ b/iw/examine_gui.py
@@ -1,8 +1,7 @@
#
# examine_gui.py: dialog to allow selection of a RHL installation to upgrade
-# and if the user wishes to select individual packages.
#
-# Copyright 2000-2003 Red Hat, Inc.
+# Copyright 2000-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -36,22 +35,18 @@ class UpgradeExamineWindow (InstallWindow):
if self.doupgrade:
# set the install class to be an upgrade
c = UpgradeClass(flags.expert)
- c.setSteps(self.dispatch)
- c.setInstallData(self.id)
+ c.setSteps(self.anaconda.dispatch)
+ c.setInstallData(self.anaconda)
rootfs = self.parts[self.upgradecombo.get_active()]
- self.id.upgradeRoot = [(rootfs[0], rootfs[1])]
- self.id.rootParts = self.parts
-
- if self.individualPackages is not None and self.individualPackages.get_active():
- self.dispatch.skipStep("indivpackage", skip = 0)
- else:
- self.dispatch.skipStep("indivpackage")
- self.dispatch.skipStep("installtype", skip = 1)
- self.id.upgrade = True
+ self.anaconda.id.upgradeRoot = [(rootfs[0], rootfs[1])]
+ self.anaconda.id.rootParts = self.parts
+
+ self.anaconda.dispatch.skipStep("installtype", skip = 1)
+ self.anaconda.id.upgrade = True
else:
- self.dispatch.skipStep("installtype", skip = 0)
- self.id.upgrade = False
+ self.anaconda.dispatch.skipStep("installtype", skip = 0)
+ self.anaconda.id.upgrade = False
return None
@@ -76,8 +71,6 @@ class UpgradeExamineWindow (InstallWindow):
def upgradeOptionsSetSensitivity(self, state):
self.uplabel.set_sensitive(state)
self.upgradecombo.set_sensitive(state)
- if self.individualPackages is not None:
- self.individualPackages.set_sensitive(state)
def optionToggled(self, widget, name):
if name == UPGRADE_STR:
@@ -85,19 +78,16 @@ class UpgradeExamineWindow (InstallWindow):
self.doupgrade = widget.get_active()
#UpgradeExamineWindow tag = "upgrade"
- def getScreen (self, dispatch, intf, id, chroot):
- self.dispatch = dispatch
- self.intf = intf
- self.id = id
- self.chroot = chroot
+ def getScreen (self, anaconda):
+ self.anaconda = anaconda
- if self.id.upgrade == None:
+ if self.anaconda.id.upgrade == None:
# this is the first time we've entered this screen
- self.doupgrade = dispatch.stepInSkipList("installtype")
+ self.doupgrade = self.anaconda.dispatch.stepInSkipList("installtype")
else:
- self.doupgrade = self.id.upgrade
+ self.doupgrade = self.anaconda.id.upgrade
- self.parts = self.id.rootParts
+ self.parts = self.anaconda.id.rootParts
vbox = gtk.VBox (False, 10)
vbox.set_border_width (8)
@@ -116,21 +106,6 @@ class UpgradeExamineWindow (InstallWindow):
vbox.pack_start (box, False)
self.root = self.parts[0]
-#
-# lets remove this seemingly useless option - clutters display
-#
-# self.individualPackages = gtk.CheckButton (_("_Customize packages to be "
-# "upgraded"))
-# self.individualPackages.set_active (not dispatch.stepInSkipList("indivpackage"))
-# ipbox = gtk.HBox(False)
-# crackhbox = gtk.HBox(False)
-# crackhbox.set_size_request(70, -1)
-# ipbox.pack_start(crackhbox, False, False)
-# ipbox.pack_start(self.individualPackages, True, True)
-# r.packWidgetInEntry(UPGRADE_STR, ipbox)
- self.individualPackages = None
-
-
# hack hack hackity hack
upboxtmp = gtk.VBox(False, 5)
uplabelstr = _("The following installed system will be upgraded:")
@@ -175,7 +150,7 @@ class UpgradeExamineWindow (InstallWindow):
# set default
idx = 0
for p in self.parts:
- if self.id.upgradeRoot[0][0] == p[0]:
+ if self.anaconda.id.upgradeRoot[0][0] == p[0]:
self.upgradecombo.set_active(idx)
break
idx = idx + 1
diff --git a/iw/iscsi_gui.py b/iw/iscsi_gui.py
index 0839d1ce2..ee2e54e4e 100644
--- a/iw/iscsi_gui.py
+++ b/iw/iscsi_gui.py
@@ -43,9 +43,9 @@ class iscsiWindow(InstallWindow):
return None
- def getScreen(self, iscsi, intf):
- self.intf = intf
- self.iscsi = iscsi
+ def getScreen(self, anaconda):
+ self.intf = anaconda.intf
+ self.iscsi = anaconda.id.iscsi
(self.xml, widget) = gui.getGladeWidget("iscsi-config.glade", "iscsiRows")
self.ip_table = self.xml.get_widget("iscsiTable")
diff --git a/iw/kbd_gui.py b/iw/kbd_gui.py
new file mode 100644
index 000000000..e57a04a04
--- /dev/null
+++ b/iw/kbd_gui.py
@@ -0,0 +1,29 @@
+#
+# keyboard_gui.py: Shim around system-config-keyboard
+# Brrrraaaaaiiiinnnns...
+#
+# Copyright 2006 Red Hat, Inc.
+#
+# This software may be freely redistributed under the terms of the GNU
+# library public license.
+#
+# You should have received a copy of the GNU Library Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+from iw_gui import *
+import sys
+
+sys.path.append("/usr/share/system-config-keyboard")
+
+from keyboard_gui import KeyboardWindow as installKeyboardWindow
+
+class KeyboardWindow(InstallWindow, installKeyboardWindow):
+ def __init__(self, ics):
+ InstallWindow.__init__(self, ics)
+ installKeyboardWindow.__init__(self, ics)
+
+ def getScreen(self, anaconda):
+ return installKeyboardWindow.getScreen(self, anaconda.id.instLanguage.getDefaultKeyboard(),
+ anaconda.id.keyboard)
diff --git a/iw/language_gui.py b/iw/language_gui.py
index 28bb18ad4..33f541a10 100644
--- a/iw/language_gui.py
+++ b/iw/language_gui.py
@@ -51,7 +51,7 @@ class LanguageWindow (InstallWindow):
self.listView.set_cursor(path, col, False)
# LanguageWindow tag="lang"
- def getScreen (self, intf, instLang):
+ def getScreen (self, anaconda):
self.running = 0
mainBox = gtk.VBox (False, 10)
@@ -68,13 +68,13 @@ class LanguageWindow (InstallWindow):
label.set_size_request(350, -1)
hbox.pack_start(label, False)
- self.instLang = instLang
+ self.instLang = anaconda.id.instLanguage
self.listStore = gtk.ListStore(gobject.TYPE_STRING,
gobject.TYPE_STRING,
gobject.TYPE_STRING)
- for locale in instLang.available():
+ for locale in self.instLang.available():
iter = self.listStore.append()
nick = self.instLang.getNickByName(locale)
lang = '%s (<span lang="%s">%s</span>)' % (
@@ -91,7 +91,7 @@ class LanguageWindow (InstallWindow):
self.listView.append_column(col)
self.listView.set_property("headers-visible", False)
- current = instLang.getLangNameByNick(instLang.getCurrent())
+ current = self.instLang.getLangNameByNick(self.instLang.getCurrent())
iter = self.listStore.get_iter_first()
while iter:
if self.listStore.get_value(iter, 1) == current:
diff --git a/iw/network_gui.py b/iw/network_gui.py
index 7cea2a543..e2ae6711e 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -498,12 +498,12 @@ class NetworkWindow(InstallWindow):
self.hostnameEntry.grab_focus()
# NetworkWindow tag="netconf"
- def getScreen(self, network, dir, intf, id):
- self.intf = intf
- self.id = id
+ def getScreen(self, anaconda):
+ self.intf = anaconda.intf
+ self.id = anaconda.id
box = gtk.VBox(False)
box.set_spacing(6)
- self.network = network
+ self.network = anaconda.id.network
self.devices = self.network.available()
diff --git a/iw/osbootwidget.py b/iw/osbootwidget.py
index 2a0b0108d..02d33503f 100644
--- a/iw/osbootwidget.py
+++ b/iw/osbootwidget.py
@@ -26,12 +26,12 @@ from constants import *
class OSBootWidget:
"""Widget to display OSes to boot and allow adding new ones."""
- def __init__(self, bl, fsset, diskset, parent, intf, blname):
- self.bl = bl
- self.fsset = fsset
- self.diskset = diskset
+ def __init__(self, anaconda, parent, blname):
+ self.bl = anaconda.id.bootloader
+ self.fsset = anaconda.id.fsset
+ self.diskset = anaconda.id.diskset
self.parent = parent
- self.intf = intf
+ self.intf = anaconda.intf
if blname is not None:
self.blname = blname
else:
diff --git a/iw/package_gui.py b/iw/package_gui.py
index c6b4064cd..59bdbb899 100644
--- a/iw/package_gui.py
+++ b/iw/package_gui.py
@@ -21,9 +21,9 @@ from iw_gui import *
from rhpl.translate import _, N_
class GroupSelectionWindow (InstallWindow):
- def getScreen(self, backend, intf):
- self.backend = backend
- self.intf = intf
+ def getScreen(self, anaconda):
+ self.backend = anaconda.backend
+ self.intf = anaconda.intf
self.grpsel = GroupSelector(self.backend.ayum, gui.findGladeFile,
gui.addFrame)
self.grpsel.doRefresh()
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 8a6f91030..24f54cc66 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1331,17 +1331,17 @@ class PartitionWindow(InstallWindow):
self.tree.clear()
self.populate()
- def getScreen(self, fsset, diskset, partitions, intf):
- self.fsset = fsset
- self.diskset = diskset
- self.intf = intf
+ def getScreen(self, anaconda):
+ self.fsset = anaconda.id.fsset
+ self.diskset = anaconda.id.diskset
+ self.intf = anaconda.intf
self.diskset.openDevices()
- self.partitions = partitions
+ self.partitions = anaconda.id.partitions
self.show_uneditable = 1
- checkForSwapNoMatch(self.intf, self.diskset, self.partitions)
+ checkForSwapNoMatch(anaconda)
# XXX PartitionRequests() should already exist and
# if upgrade or going back, have info filled in
diff --git a/iw/progress_gui.py b/iw/progress_gui.py
index dc0199557..261e86c4d 100644
--- a/iw/progress_gui.py
+++ b/iw/progress_gui.py
@@ -49,7 +49,7 @@ def size_string (size):
else:
return _("%s Bytes") %(number_format(size),)
-class InstallProgressWindow_NEW (InstallWindow):
+class InstallProgressWindow (InstallWindow):
windowTitle = N_("Installing Packages")
htmlTag = "installing"
@@ -251,13 +251,13 @@ class InstallProgressWindow_NEW (InstallWindow):
width = widget.get_allocation ()[2] - 50
# InstallProgressWindow tag="installing"
- def getScreen (self, dir, intf, id):
+ def getScreen (self, anaconda):
import glob
- self.intf = intf
+ self.intf = anaconda.intf
- if dir == DISPATCH_BACK:
- intf.icw.prevClicked()
+ if anaconda.dir == DISPATCH_BACK:
+ self.intf.icw.prevClicked()
return
@@ -292,7 +292,7 @@ class InstallProgressWindow_NEW (InstallWindow):
files = ["progress_first.png"]
#--Need to merge with if statement above...don't show ads in lowres
- if intf.runres != '800x600':
+ if self.intf.runres != '800x600':
files = ["progress_first-lowres.png"]
# sort the list of filenames
@@ -367,10 +367,8 @@ class InstallProgressWindow_NEW (InstallWindow):
# some sort of table for status
statusflag = 0
- for m in ['http://', 'ftp://']:
- if id.methodstr.startswith(m):
- statusflag = 1
- break
+ if anaconda.methodstr.startswith("http://") or anaconda.methodstr.startswith("ftp://"):
+ statusflag = 1
if statusflag:
statusTable = gtk.Table (2, 2, False)
@@ -382,8 +380,8 @@ class InstallProgressWindow_NEW (InstallWindow):
self.pkgstatus = None
# All done with creating components of UI
- intf.setPackageProgressWindow (self)
- id.setInstallProgressClass(self)
+ self.intf.setPackageProgressWindow (self)
+ anaconda.id.setInstallProgressClass(self)
vbox.set_border_width (5)
diff --git a/iw/task_gui.py b/iw/task_gui.py
index c98acb022..ad4117c75 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -51,12 +51,12 @@ class TaskWindow(InstallWindow):
return False
return True
- def getScreen (self, intf, backend, dispatch, instClass):
- self.intf = intf
- self.dispatch = dispatch
- self.backend = backend
+ def getScreen (self, anaconda):
+ self.intf = anaconda.intf
+ self.dispatch = anaconda.dispatch
+ self.backend = anaconda.backend
- self.tasks = instClass.tasks
+ self.tasks = anaconda.id.instClass.tasks
self.taskcbs = {}
(self.xml, vbox) = gui.getGladeWidget("tasksel.glade", "taskBox")
diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py
index 3cf1c23ca..75528be49 100644
--- a/iw/timezone_gui.py
+++ b/iw/timezone_gui.py
@@ -1,7 +1,7 @@
#
# timezone_gui.py: gui timezone selection.
#
-# Copyright 2000-2002 Red Hat, Inc.
+# Copyright 2000-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -90,12 +90,12 @@ class TimezoneWindow(InstallWindow):
return None
# TimezoneWindow tag="timezone"
- def getScreen(self, instLang, timezone):
- self.timezone = timezone
+ def getScreen(self, anaconda):
+ self.timezone = anaconda.id.timezone
(self.default, asUTC, asArc) = self.timezone.getTimezoneInfo()
if not self.default:
- self.default = instLang.getDefaultTimeZone()
+ self.default = anaconda.id.instLanguage.getDefaultTimeZone()
asUTC = 0
if (string.find(self.default, "UTC") != -1):
@@ -107,7 +107,7 @@ class TimezoneWindow(InstallWindow):
# As long as we don't find a Windows partition, check the UTC box.
foundWindows = False
- for (k,v) in self.getICS().cw.id.bootloader.images.getImages().iteritems():
+ for (k,v) in anaconda.id.bootloader.images.getImages().iteritems():
if v[0].lower() == 'other' and v[2] in dosFilesystems:
foundWindows = True
break
diff --git a/iw/upgrade_bootloader_gui.py b/iw/upgrade_bootloader_gui.py
index 051a90112..328905330 100644
--- a/iw/upgrade_bootloader_gui.py
+++ b/iw/upgrade_bootloader_gui.py
@@ -56,13 +56,12 @@ class UpgradeBootloaderWindow (InstallWindow):
self.bl.setDevice(self.bootDev)
- def getScreen(self, dispatch, bl):
- self.dispatch = dispatch
- self.bl = bl
- self.intf = dispatch.intf
+ def getScreen(self, anaconda):
+ self.dispatch = anaconda.dispatch
+ self.bl = anaconda.id.bootloader
(self.type, self.bootDev) = \
- checkbootloader.getBootloaderTypeAndBoot(dispatch.instPath)
+ checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath)
self.update_radio = gtk.RadioButton(None, _("_Update boot loader configuration"))
@@ -117,9 +116,9 @@ class UpgradeBootloaderWindow (InstallWindow):
default = self.nobl_radio
- if not dispatch.stepInSkipList("bootloader"):
+ if not self.dispatch.stepInSkipList("bootloader"):
self.newbl_radio.set_active(True)
- elif dispatch.stepInSkipList("instbootloader"):
+ elif self.dispatch.stepInSkipList("instbootloader"):
self.nobl_radio.set_active(True)
else:
default.set_active(True)
diff --git a/iw/upgrade_migratefs_gui.py b/iw/upgrade_migratefs_gui.py
index 41b60378e..d39fd1173 100644
--- a/iw/upgrade_migratefs_gui.py
+++ b/iw/upgrade_migratefs_gui.py
@@ -42,10 +42,10 @@ class UpgradeMigrateFSWindow (InstallWindow):
return None
- def getScreen (self, fsset):
+ def getScreen (self, anaconda):
- self.migent = fsset.getMigratableEntries()
- self.fsset = fsset
+ self.fsset = anaconda.id.fsset
+ self.migent = self.fsset.getMigratableEntries()
box = gtk.VBox (False, 5)
box.set_border_width (5)
diff --git a/iw/upgrade_swap_gui.py b/iw/upgrade_swap_gui.py
index 87dc71ac0..6ae86e04e 100644
--- a/iw/upgrade_swap_gui.py
+++ b/iw/upgrade_swap_gui.py
@@ -73,23 +73,14 @@ class UpgradeSwapWindow (InstallWindow):
def clist_cb(self, clist, row, col, data):
self.row = row
- def getScreen (self, intf, fsset, instPath, swapInfo, dispatch):
-
-#
-# use to test function
-#
-# fslist = [('/', 'hda1', 1000)]
-# fslist.append(('/var', 'hda2', 100))
-# fslist.append(('/opt', 'hda3', 500))
-# swapInfo = (fslist, 1000, '/var')
-
+ def getScreen (self, anaconda):
self.neededSwap = 0
- self.fsset = fsset
- self.instPath = instPath
- self.intf = intf
- self.dispatch = dispatch
+ self.fsset = anaconda.id.fsset
+ self.instPath = anaconda.rootPath
+ self.intf = anaconda.intf
+ self.dispatch = anaconda.dispatch
- rc = swapInfo
+ rc = anaconda.id.upgradeSwapInfo
self.neededSwap = 1
self.row = 0
diff --git a/iw/welcome_gui.py b/iw/welcome_gui.py
index f989d2a83..019c7744b 100644
--- a/iw/welcome_gui.py
+++ b/iw/welcome_gui.py
@@ -26,7 +26,7 @@ class WelcomeWindow (InstallWindow):
ics.setGrabNext (1)
# WelcomeWindow tag="wel"
- def getScreen (self):
+ def getScreen (self, anaconda):
pix = gui.readImageFromFile("splash.png", dither=False)
box = gtk.EventBox ()
box.add (pix)
diff --git a/iw/zfcp_gui.py b/iw/zfcp_gui.py
index dfa48721c..15d81c499 100644
--- a/iw/zfcp_gui.py
+++ b/iw/zfcp_gui.py
@@ -3,7 +3,7 @@
#
# Karsten Hopp <karsten@redhat.com>
#
-# Copyright 2000-2004 Red Hat, Inc.
+# Copyright 2000-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -70,15 +70,15 @@ class ZFCPWindow(InstallWindow):
# ZFCPWindow tag="zfcpconf"
- def getScreen(self, fcp, diskset, intf):
- self.diskset = diskset
- self.intf = intf
- self.options = fcp.options
+ def getScreen(self, anaconda):
+ self.diskset = anaconda.id.diskset
+ self.intf = anaconda.intf
+ self.options = anaconda.id.zfcp.options
box = gtk.VBox(False)
box.set_border_width(6)
fcp.cleanFcpSysfs(fcp.fcpdevices)
- self.fcp = fcp
- self.fcpdevices = copy.copy(fcp.fcpdevices)
+ self.fcp = ancaonda.id.zfcp
+ self.fcpdevices = copy.copy(self.fcp.fcpdevices)
devvbox = gtk.VBox(False)
diff --git a/iw/zipl_gui.py b/iw/zipl_gui.py
index 5e2336c23..90f46baef 100644
--- a/iw/zipl_gui.py
+++ b/iw/zipl_gui.py
@@ -1,7 +1,5 @@
#
-# bootloader_gui.py: gui bootloader configuration dialog
-#
-# Copyright 2001-2002 Red Hat, Inc.
+# Copyright 2001-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -40,13 +38,13 @@ class ZiplWindow (InstallWindow):
# ZiplWindow tag="zipl"
- def getScreen(self, dispatch, bl, fsset, diskSet):
- self.dispatch = dispatch
- self.bl = bl
- self.intf = dispatch.intf
+ def getScreen(self, anaconda):
+ self.dispatch = anaconda.dispatch
+ self.bl = anaconda.id.bootloader
+ self.intf = anaconda.intf
- imageList = bl.images.getImages()
- defaultDevice = bl.images.getDefault()
+ imageList = self.bl.images.getImages()
+ defaultDevice = self.bl.images.getDefault()
self.ignoreSignals = 0
box = gtk.VBox(False, 5)
@@ -91,8 +89,8 @@ class ZiplWindow (InstallWindow):
clabel2.set_alignment(0.0, 0.5)
self.chandeventry2 = gtk.Entry()
- if bl.args and bl.args.get():
- kernelparms = bl.args.get()
+ if self.bl.args and self.bl.args.get():
+ kernelparms = self.bl.args.get()
else:
kernelparms = ""
if isys.getDasdPorts() and (kernelparms.find("dasd=") == -1):
@@ -102,8 +100,8 @@ class ZiplWindow (InstallWindow):
kernelparms = "dasd=%s" %(isys.getDasdPorts(),)
self.kernelEntry.set_text(kernelparms)
- if bl.args and bl.args.chandevget():
- cdevs = bl.args.chandevget()
+ if self.bl.args and self.bl.args.chandevget():
+ cdevs = self.bl.args.chandevget()
self.chandeventry1.set_text('')
self.chandeventry2.set_text('')
if len(cdevs) > 0:
diff --git a/partIntfHelpers.py b/partIntfHelpers.py
index 10c97f578..5d7f9338f 100644
--- a/partIntfHelpers.py
+++ b/partIntfHelpers.py
@@ -365,19 +365,19 @@ def doEditPartitionByRequest(intf, requestlist, part):
% (partedUtils.get_partition_name(part)))
-def checkForSwapNoMatch(intf, diskset, partitions):
+def checkForSwapNoMatch(anaconda):
"""Check for any partitions of type 0x82 which don't have a swap fs."""
- for request in partitions.requests:
+ for request in anaconda.id.partitions.requests:
if not request.device or not request.fstype:
continue
- part = partedUtils.get_partition_by_name(diskset.disks,
+ part = partedUtils.get_partition_by_name(anaconda.id.diskset.disks,
request.device)
if (part and (not part.type & parted.PARTITION_FREESPACE)
and (part.native_type == 0x82)
and (request.fstype and request.fstype.getName() != "swap")
and (not request.format)):
- rc = intf.messageWindow(_("Format as Swap?"),
+ rc = anaconda.intf.messageWindow(_("Format as Swap?"),
_("/dev/%s has a partition type of 0x82 "
"(Linux swap) but does not appear to "
"be formatted as a Linux swap "
diff --git a/textw/bootloader_text.py b/textw/bootloader_text.py
index dc3f938be..7cd537b42 100644
--- a/textw/bootloader_text.py
+++ b/textw/bootloader_text.py
@@ -22,12 +22,12 @@ import bootloader
class BootloaderChoiceWindow:
- def __call__(self, screen, dispatch, bl, fsset, diskSet):
+ def __call__(self, screen, anaconda):
# XXX need more text here
t = TextboxReflowed(53,
_("Which boot loader would you like to use?"))
- if dispatch.stepInSkipList("instbootloader"):
+ if anaconda.dispatch.stepInSkipList("instbootloader"):
useGrub = 0
noBl = 1
else:
@@ -70,15 +70,15 @@ class BootloaderChoiceWindow:
width = 50)
if rc == "no":
continue
- dispatch.skipStep("instbootloader", skip = (rc == "yes"))
- dispatch.skipStep("bootloaderadvanced", skip = (rc == "yes"))
+ anaconda.dispatch.skipStep("instbootloader", skip = (rc == "yes"))
+ anaconda.dispatch.skipStep("bootloaderadvanced", skip = (rc == "yes"))
# kind of a hack...
- bl.defaultDevice = None
+ anaconda.id.bootloader.defaultDevice = None
else:
- bl.setUseGrub(1)
- dispatch.skipStep("instbootloader", 0)
- dispatch.skipStep("bootloaderadvanced", 0)
+ anaconda.id.bootloader.setUseGrub(1)
+ anaconda.dispatch.skipStep("instbootloader", 0)
+ anaconda.dispatch.skipStep("bootloaderadvanced", 0)
screen.popWindow()
return INSTALL_OK
@@ -86,8 +86,8 @@ class BootloaderChoiceWindow:
class BootloaderAppendWindow:
- def __call__(self, screen, dispatch, bl, fsset, diskSet):
- if dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
+ def __call__(self, screen, anaconda):
+ if anaconda.dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
t = TextboxReflowed(53,
_("A few systems will need to pass special options "
@@ -97,10 +97,10 @@ class BootloaderAppendWindow:
"aren't sure, leave this blank."))
entry = Entry(48, scroll = 1, returnExit = 1)
- entry.set(bl.args.get())
+ entry.set(anaconda.id.bootloader.args.get())
cb = Checkbox(_("Force use of LBA32 (not normally required)"))
- if bl.forceLBA32:
+ if anaconda.id.bootloader.forceLBA32:
cb.setValue("*")
buttons = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON ] )
@@ -120,8 +120,8 @@ class BootloaderAppendWindow:
screen.popWindow()
return INSTALL_BACK
- if cb.selected() and not bl.forceLBA32:
- rc = dispatch.intf.messageWindow(_("Warning"),
+ if cb.selected() and not anaconda.id.bootloader.forceLBA32:
+ rc = anaconda.intf.messageWindow(_("Warning"),
_("Forcing the use of LBA32 for your bootloader when "
"not supported by the BIOS can cause your machine "
"to be unable to boot.\n\n"
@@ -131,19 +131,19 @@ class BootloaderAppendWindow:
if rc != 1:
continue
- bl.args.set(entry.value())
- bl.setForceLBA(cb.selected())
+ anaconda.id.bootloader.args.set(entry.value())
+ anaconda.id.bootloader.setForceLBA(cb.selected())
screen.popWindow()
return INSTALL_OK
class BootloaderLocationWindow:
- def __call__(self, screen, dispatch, bl, fsset, diskSet):
- if dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
+ def __call__(self, screen, anaconda):
+ if anaconda.id.dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
- choices = fsset.bootloaderChoices(diskSet, bl)
+ choices = anaconda.id.fsset.bootloaderChoices(anaconda.id.diskset, anaconda.id.bootloader)
if len(choices.keys()) == 1:
- bl.setDevice(choices[choices.keys()[0]][0])
+ anaconda.id.bootloader.setDevice(choices[choices.keys()[0]][0])
return INSTALL_NOOP
if len(choices.keys()) == 0:
return INSTALL_NOOP
@@ -157,7 +157,7 @@ class BootloaderLocationWindow:
keys.reverse()
for key in keys:
(device, desc) = choices[key]
- if device == bl.getDevice():
+ if device == anaconda.id.bootloader.getDevice():
default = len(locations)
locations.append (format % (device, _(desc)))
devices.append(device)
@@ -171,7 +171,7 @@ class BootloaderLocationWindow:
if rc == TEXT_BACK_CHECK:
return INSTALL_BACK
- bl.setDevice(devices[sel])
+ anaconda.id.bootloader.setDevice(devices[sel])
return INSTALL_OK
@@ -247,19 +247,14 @@ class BootloaderImagesWindow:
return " %-4s %-25s %-25s" % ( default, label, "/dev/" + device)
- def __call__(self, screen, dispatch, bl, fsset, diskSet):
- if dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
+ def __call__(self, screen, anaconda):
+ if anaconda.dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
+
+ self.bl = anaconda.id.bootloader
images = bl.images.getImages()
default = bl.images.getDefault()
- # XXX debug crap
-## images = { 'hda2': ('linux', 'Red Hat Linux', 1),
-## 'hda1': ('windows', 'Windows', 0) }
-## default = 'hda1'
-
- self.bl = bl
-
listboxLabel = Label( "%-7s %-25s %-12s" %
( _("Default"), _("Boot label"), _("Device")))
listbox = Listbox(5, scroll = 1, returnExit = 1)
@@ -269,7 +264,7 @@ class BootloaderImagesWindow:
for dev in sortedKeys:
(label, longlabel, isRoot) = images[dev]
- if not bl.useGrub():
+ if not self.bl.useGrub():
listbox.append(self.formatDevice(label, dev, default), dev)
else:
listbox.append(self.formatDevice(longlabel, dev, default), dev)
@@ -293,14 +288,9 @@ class BootloaderImagesWindow:
g.add(buttons, 0, 3, growx = 1)
g.addHotKey("F2")
g.addHotKey("F4")
-# g.addHotKey(" ")
- screen.pushHelpLine(_(" <Space> selects button | <F2> select default boot entry | <F12> next screen>"))
- # FIXME: uncomment this after FC4
-# screen.pushHelpLine(_(" <Space> select | <F2> select default | <F4> delete | <F12> next screen>"))
+ screen.pushHelpLine(_(" <Space> select | <F2> select default | <F4> delete | <F12> next screen>"))
-
- rootdev = fsset.getEntryByMountPoint("/").device.getDevice()
-# rootdev = "hda2"
+ rootdev = anaconda.id.fsset.getEntryByMountPoint("/").device.getDevice()
result = None
while (result != TEXT_OK_CHECK and result != TEXT_BACK_CHECK and result != TEXT_F12_CHECK):
@@ -311,7 +301,7 @@ class BootloaderImagesWindow:
if (result == "edit" or result == listbox):
item = listbox.current()
(label, longlabel, type) = images[item]
- if bl.useGrub():
+ if self.bl.useGrub():
label = longlabel
if label == None:
label = ""
@@ -323,16 +313,15 @@ class BootloaderImagesWindow:
listbox.replace(self.formatDevice(label, item, default), item)
listbox.setCurrent(item)
elif result == "F2":
-# elif result == " ":
item = listbox.current()
(label, longlabel, isRoot) = images[item]
- if bl.useGrub():
+ if self.bl.useGrub():
label = longlabel
if (label):
if (default):
(oldLabel, oldLong, oldIsRoot) = images[default]
- if bl.useGrub():
+ if self.bl.useGrub():
oldLabel = oldLong
listbox.replace(self.formatDevice(oldLabel, default,
""), default)
@@ -350,7 +339,7 @@ class BootloaderImagesWindow:
if default == item:
default = ""
else:
- dispatch.intf.messageWindow(_("Cannot Delete"),
+ anaconda.intf.messageWindow(_("Cannot Delete"),
_("This boot target cannot be "
"deleted because it is for "
"the %s system you are about "
@@ -368,10 +357,10 @@ class BootloaderImagesWindow:
default = rootdev
# copy our version over
- bl.images.images = {}
+ self.bl.images.images = {}
for (dev, (label, longlabel, isRoot)) in images.items():
- bl.images.images[dev] = (label, longlabel, isRoot)
- bl.images.setDefault(default)
+ self.bl.images.images[dev] = (label, longlabel, isRoot)
+ self.bl.images.setDefault(default)
return INSTALL_OK
@@ -383,13 +372,14 @@ class BootloaderPasswordWindow:
self.entry1.setFlags(FLAG_DISABLED, flag)
self.entry2.setFlags(FLAG_DISABLED, flag)
- def __call__(self, screen, dispatch, bl, fsset, diskSet):
- if dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
- if not bl.useGrub():
- return INSTALL_NOOP
+ def __call__(self, screen, anaconda):
+ if anaconda.dispatch.stepInSkipList("instbootloader"): return INSTALL_NOOP
+
+ intf = anaconda.intf
+ self.bl = anaconda.id.bootloader
- intf = dispatch.intf
- self.bl = bl
+ if not self.bl.useGrub():
+ return INSTALL_NOOP
buttons = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON])
@@ -438,7 +428,7 @@ class BootloaderPasswordWindow:
return INSTALL_BACK
if not self.checkbox.selected():
- bl.setPassword(None)
+ self.bl.setPassword(None)
screen.popWindow()
return INSTALL_OK
@@ -446,17 +436,17 @@ class BootloaderPasswordWindow:
confirm = self.entry2.value()
if pw != confirm:
- intf.messageWindow(_("Passwords Do Not Match"),
+ anaconda.intf.messageWindow(_("Passwords Do Not Match"),
_("Passwords do not match"))
continue
if len(pw) < 1:
- intf.messageWindow(_("Password Too Short"),
+ anaconda.intf.messageWindow(_("Password Too Short"),
_("Boot loader password is too short"))
continue
if len(pw) < 6:
- rc = intf.messageWindow(_("Warning"),
+ rc = anaconda.intf.messageWindow(_("Warning"),
_("Your boot loader password is less than "
"six characters. We recommend a longer "
"boot loader password."
@@ -467,7 +457,7 @@ class BootloaderPasswordWindow:
if rc == 0:
continue
- bl.setPassword(pw, isCrypted = 0)
+ self.bl.setPassword(pw, isCrypted = 0)
screen.popWindow()
return INSTALL_OK
diff --git a/textw/complete_text.py b/textw/complete_text.py
index b5fbce2d1..643baaa4d 100644
--- a/textw/complete_text.py
+++ b/textw/complete_text.py
@@ -1,7 +1,7 @@
#
# complete_text.py: text mode congratulations windows
#
-# Copyright 2001-2002 Red Hat, Inc.
+# Copyright 2001-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -20,7 +20,7 @@ import iutil
class FinishedWindow:
- def __call__ (self, screen):
+ def __call__ (self, screen, anaconda):
bootstr = ""
if iutil.getArch() == "s390":
@@ -47,5 +47,3 @@ class FinishedWindow:
[ _("Reboot") ], help = "finished", width=60)
return INSTALL_OK
-
-
diff --git a/textw/confirm_text.py b/textw/confirm_text.py
index 20378b789..b28597915 100644
--- a/textw/confirm_text.py
+++ b/textw/confirm_text.py
@@ -18,7 +18,7 @@ from rhpl.translate import _
from image import presentRequiredMediaMessage
class BeginInstallWindow:
- def __call__ (self, screen, intf, id):
+ def __call__ (self, screen, anaconda):
rc = ButtonChoiceWindow (screen, _("Installation to begin"),
_("A complete log of your installation will be in "
"%s after rebooting your system. You "
@@ -28,11 +28,11 @@ class BeginInstallWindow:
if rc == string.lower (_("Back")):
return INSTALL_BACK
- if id.methodstr.startswith("cdrom://") and (id.instClass.name and id.instClass.name != "kickstart"):
- rc = presentRequiredMediaMessage(intf, id.grpset)
+ if anaconda.methodstr.startswith("cdrom://") and not anaconda.isKickstart:
+ rc = presentRequiredMediaMessage(anaconda.intf, anaconda.id.grpset)
if rc == 0:
- rc2 = intf.messageWindow(_("Reboot?"),
+ rc2 = anaconda.intf.messageWindow(_("Reboot?"),
_("The system will be rebooted now."),
type="custom", custom_icon="warning",
custom_buttons=[_("_Back"), _("_Reboot")])
@@ -46,7 +46,7 @@ class BeginInstallWindow:
return INSTALL_OK
class BeginUpgradeWindow:
- def __call__ (self, screen, intf, id) :
+ def __call__ (self, screen, anaconda):
rc = ButtonChoiceWindow (screen, _("Upgrade to begin"),
_("A complete log of your upgrade will be in "
"%s after rebooting your system. You "
@@ -56,11 +56,11 @@ class BeginUpgradeWindow:
if rc == string.lower (_("Back")):
return INSTALL_BACK
- if id.methodstr.startswith("cdrom://") and (id.instClass.name and id.instClass.name != "kickstart"):
- rc = presentRequiredMediaMessage(intf, id.grpset)
+ if anaconda.methodstr.startswith("cdrom://") and not anaconda.isKickstart:
+ rc = presentRequiredMediaMessage(anaconda.intf, anaconda.id.grpset)
if rc == 0:
- rc2 = intf.messageWindow(_("Reboot?"),
+ rc2 = anaconda.intf.messageWindow(_("Reboot?"),
_("The system will be rebooted now."),
type="custom", custom_icon="warning",
custom_buttons=[_("_Back"), _("_Reboot")])
diff --git a/textw/grpselect_text.py b/textw/grpselect_text.py
index fb4b43f7d..3c071f124 100644
--- a/textw/grpselect_text.py
+++ b/textw/grpselect_text.py
@@ -74,8 +74,8 @@ class GroupSelectionWindow:
else:
map(lambda x: x.groups.append(grpid), txmbrs)
- def __call__(self, screen, backend, intf):
- self.ayum = backend.ayum
+ def __call__(self, screen, anaconda):
+ self.ayum = anaconda.backend.ayum
g = GridFormHelp(screen, "Package Group Selection",
"packagetree", 1, 5)
@@ -86,7 +86,7 @@ class GroupSelectionWindow:
# FIXME: this is very yum backend specific...
groups = filter(lambda x: x.user_visible,
- backend.ayum.comps.groups)
+ anaconda.backend.ayum.comps.groups)
groups.sort(_ui_comps_sort)
ct = CheckboxTree(height = 6, scroll = (len(groups) > 6))
for grp in groups:
@@ -155,8 +155,8 @@ class GroupSelectionWindow:
sel = ct.getSelection()
for g in groups:
if g in sel and not g.selected:
- backend.selectGroup(g.groupid)
+ anaconda.backend.selectGroup(g.groupid)
elif g not in sel and g.selected:
- backend.deselectGroup(g.groupid)
+ anaconda.backend.deselectGroup(g.groupid)
return INSTALL_OK
diff --git a/textw/iscsi_text.py b/textw/iscsi_text.py
index 83df71252..260dd04ae 100644
--- a/textw/iscsi_text.py
+++ b/textw/iscsi_text.py
@@ -19,8 +19,8 @@ from constants_text import *
from rhpl.translate import _
class iscsiWindow:
- def __call__(self, screen, iscsi, intf):
- self.iscsi = iscsi
+ def __call__(self, screen, anaconda):
+ self.iscsi = anaconda.id.iscsi
# We have 3 values of interest: target IP address, port and
# initiator name.
diff --git a/textw/keyboard_text.py b/textw/keyboard_text.py
index eaad3d262..128f92cd6 100644
--- a/textw/keyboard_text.py
+++ b/textw/keyboard_text.py
@@ -23,16 +23,16 @@ import logging
log = logging.getLogger("anaconda")
class KeyboardWindow:
- def __call__(self, screen, defaultByLang, kbd):
+ def __call__(self, screen, anaconda):
if flags.serial or flags.virtpconsole:
return INSTALL_NOOP
- keyboards = kbd.modelDict.keys()
+ keyboards = anaconda.id.keyboard.modelDict.keys()
keyboards.sort ()
- if kbd.beenset:
- default = kbd.get ()
+ if anaconda.id.keyboard.beenset:
+ default = anaconda.id.keyboard.get ()
else:
- default = defaultByLang
+ default = anaconda.id.instLanguage.getDefaultKeyboard()
(button, choice) = \
ListboxChoiceWindow(screen, _("Keyboard Selection"),
@@ -43,10 +43,10 @@ class KeyboardWindow:
if button == TEXT_BACK_CHECK:
return INSTALL_BACK
- kbd.set (keyboards[choice])
- kbd.beenset = 1
+ anaconda.id.keyboard.set (keyboards[choice])
+ anaconda.id.keyboard.beenset = 1
- kbd.activate()
+ anaconda.id.keyboard.activate()
# FIXME: eventually, kbd.activate will do this
try:
diff --git a/textw/language_text.py b/textw/language_text.py
index 60fcde872..a4e18ed57 100644
--- a/textw/language_text.py
+++ b/textw/language_text.py
@@ -25,18 +25,18 @@ import logging
log = logging.getLogger("anaconda")
class LanguageWindow:
- def __call__(self, screen, textInterface, instLanguage):
- languages = instLanguage.available ()
+ def __call__(self, screen, anaconda):
+ languages = anaconda.id.instLanguage.available ()
languages.sort()
- current = instLanguage.getCurrent()
+ current = anaconda.id.instLanguage.getCurrent()
height = min((8, len(languages)))
buttons = [TEXT_OK_BUTTON, TEXT_BACK_BUTTON]
translated = []
for lang in languages:
- translated.append ((_(lang), instLanguage.getNickByName(lang)))
+ translated.append ((_(lang), anaconda.id.instLanguage.getNickByName(lang)))
(button, choice) = \
ListboxChoiceWindow(screen, _("Language Selection"),
_("What language would you like to use during the "
@@ -47,28 +47,28 @@ class LanguageWindow:
if button == TEXT_BACK_CHECK:
return INSTALL_BACK
- if ((instLanguage.getFontFile(choice) == "none")):
+ if ((anaconda.id.instLanguage.getFontFile(choice) == "none")):
ButtonChoiceWindow(screen, "Language Unavailable",
"%s display is unavailable in text mode. The "
"installation will continue in English." % (choice,),
buttons=[TEXT_OK_BUTTON])
- instLanguage.setRuntimeDefaults(choice)
+ anaconda.id.instLanguage.setRuntimeDefaults(choice)
return INSTALL_OK
if (flags.setupFilesystems and
- instLanguage.getFontFile(choice) == "none"
- and textInterface.isRealConsole()):
+ anaconda.id.instLanguage.getFontFile(choice) == "none"
+ and anaconda.intf.isRealConsole()):
ButtonChoiceWindow(screen, "Language Unavailable",
"%s display is unavailable in text mode. "
"The installation will continue in "
"English." % (choice,),
buttons=[TEXT_OK_BUTTON])
- instLanguage.setRuntimeDefaults(choice)
+ anaconda.id.instLanguage.setRuntimeDefaults(choice)
return INSTALL_OK
- instLanguage.setRuntimeLanguage(choice)
- instLanguage.setDefault(choice)
+ anaconda.id.instLanguage.setRuntimeLanguage(choice)
+ anaconda.id.instLanguage.setDefault(choice)
- textInterface.drawFrame()
+ anaconda.intf.drawFrame()
return INSTALL_OK
diff --git a/textw/network_text.py b/textw/network_text.py
index c1202a901..945569788 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -197,22 +197,22 @@ class NetworkDeviceWindow:
return INSTALL_OK
- def __call__(self, screen, network, dir, intf, id, showonboot=1):
+ def __call__(self, screen, anaconda, showonboot=1):
- self.devices = network.available()
+ self.devices = anaconda.id.network.available()
if not self.devices:
return INSTALL_NOOP
list = self.devices.keys()
list.sort(cmp=isys.compareNetDevices)
devLen = len(list)
- if dir == 1:
+ if anaconda.dir == DISPATCH_FORWARD:
currentDev = 0
else:
currentDev = devLen - 1
while currentDev < devLen and currentDev >= 0:
- rc = self.runScreen(screen, network,
+ rc = self.runScreen(screen, anaconda.id.network,
self.devices[list[currentDev]],
showonboot)
if rc == INSTALL_BACK:
@@ -243,8 +243,8 @@ class NetworkGlobalWindow:
return isys.inet_calcGateway(bcast)
return ""
- def __call__(self, screen, network, dir, intf, id):
- devices = network.available()
+ def __call__(self, screen, anaconda):
+ devices = anaconda.id.network.available()
if not devices:
return INSTALL_NOOP
@@ -259,8 +259,8 @@ class NetworkGlobalWindow:
gwEntry = Entry(16)
# if it's set already, use that... otherwise, get the first
# non-dhcp and active device and use it to guess the gateway
- if network.gateway:
- gwEntry.set(network.gateway)
+ if anaconda.id.network.gateway:
+ gwEntry.set(anaconda.id.network.gateway)
else:
gwEntry.set(self.getFirstGatewayGuess(devices))
thegrid.setField(gwEntry, 1, 0, padding = (1, 0, 0, 0))
@@ -299,25 +299,25 @@ class NetworkGlobalWindow:
if val and sanityCheckIPString(val) is None:
badIPDisplay(screen, val)
continue
- network.gateway = val
+ anaconda.id.network.gateway = val
val = ns1Entry.value()
if val and sanityCheckIPString(val) is None:
badIPDisplay(screen, val)
continue
- network.primaryNS = val
+ anaconda.id.network.primaryNS = val
val = ns2Entry.value()
if val and sanityCheckIPString(val) is None:
badIPDisplay(screen, val)
continue
- network.secondaryNS = val
+ anaconda.id.network.secondaryNS = val
val = ns3Entry.value()
if val and sanityCheckIPString(val) is None:
badIPDisplay(screen, val)
continue
- network.ternaryNS = val
+ anaconda.id.network.ternaryNS = val
break
screen.popWindow()
@@ -333,15 +333,15 @@ class HostnameWindow:
hostEntry.setFlags(FLAG_DISABLED, sense)
- def __call__(self, screen, network, dir, intf, id):
- devices = network.available ()
+ def __call__(self, screen, anaconda):
+ devices = anaconda.id.network.available ()
if not devices:
return INSTALL_NOOP
# figure out if the hostname is currently manually set
if anyUsingDHCP(devices):
- if (network.hostname != "localhost.localdomain" and
- network.overrideDHCPhostname):
+ if (anaconda.id.network.hostname != "localhost.localdomain" and
+ anaconda.id.network.overrideDHCPhostname):
manual = 1
else:
manual = 0
@@ -357,8 +357,8 @@ class HostnameWindow:
manualCb = radio.add(_("manually"), "manual", manual)
thegrid.setField(manualCb, 0, 1, anchorLeft = 1)
hostEntry = Entry(24)
- if network.hostname != "localhost.localdomain":
- hostEntry.set(network.hostname)
+ if anaconda.id.network.hostname != "localhost.localdomain":
+ hostEntry.set(anaconda.id.network.hostname)
thegrid.setField(hostEntry, 1, 1, padding = (1, 0, 0, 0),
anchorLeft = 1)
@@ -397,8 +397,8 @@ class HostnameWindow:
return INSTALL_BACK
if radio.getSelection() != "manual":
- network.overrideDHCPhostname = 0
- network.hostname = "localhost.localdomain"
+ anaconda.id.network.overrideDHCPhostname = 0
+ anaconda.id.network.hostname = "localhost.localdomain"
else:
hname = string.strip(hostEntry.value())
if len(hname) == 0:
@@ -415,8 +415,8 @@ class HostnameWindow:
buttons = [ _("OK") ])
continue
- network.overrideDHCPhostname = 1
- network.hostname = hname
+ anaconda.id.network.overrideDHCPhostname = 1
+ anaconda.id.network.hostname = hname
break
screen.popWindow()
diff --git a/textw/partition_text.py b/textw/partition_text.py
index 526709197..a75a0f3a2 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -1417,17 +1417,16 @@ class PartitionWindow:
def shutdownMainUI(self):
self.lb.clear()
-
- def __call__(self, screen, fsset, diskset, partitions, intf):
+ def __call__(self, screen, anaconda):
self.screen = screen
- self.fsset = fsset
- self.diskset = diskset
- self.intf = intf
+ self.fsset = anaconda.id.fsset
+ self.diskset = anaconda.id.diskset
+ self.intf = anaconda.intf
self.diskset.openDevices()
- self.partitions = partitions
+ self.partitions = anaconda.id.partitions
- checkForSwapNoMatch(self.intf, self.diskset, self.partitions)
+ checkForSwapNoMatch(anaconda)
self.g = GridFormHelp(screen, _("Partitioning"), "partition", 1, 5)
@@ -1513,7 +1512,7 @@ class PartitionTypeWindow:
self.drivelist.key2item = {}
self.drivelist.item2key = {}
- def __call__(self, screen, diskset, partitions, intf, dispatch):
+ def __call__(self, screen, anaconda):
g = GridFormHelp(screen, _("Partitioning Type"), "autopart", 1, 6)
txt = TextboxReflowed(65, _("Installation requires partitioning "
@@ -1532,10 +1531,10 @@ class PartitionTypeWindow:
for (txt, val) in opts:
typebox.append(txt, val)
- if dispatch.stepInSkipList("autopartitionexecute"):
+ if anaconda.dispatch.stepInSkipList("autopartitionexecute"):
typebox.setCurrent(-1)
else:
- typebox.setCurrent(partitions.autoClearPartType)
+ typebox.setCurrent(anaconda.id.partitions.autoClearPartType)
g.add(typebox, 0, 1, (0, 1, 0, 0))
@@ -1544,8 +1543,8 @@ class PartitionTypeWindow:
subgrid.setField(TextboxReflowed(55, _("Which drive(s) do you want to "
"use for this installation?")),
0, 0)
- cleardrives = partitions.autoClearPartDrives
- disks = diskset.disks.keys()
+ cleardrives = anaconda.id.partitions.autoClearPartDrives
+ disks = anaconda.id.diskset.disks.keys()
disks.sort()
drivelist = CheckboxTree(height=2, scroll=1)
if not cleardrives or len(cleardrives) < 1:
@@ -1582,37 +1581,35 @@ class PartitionTypeWindow:
return INSTALL_BACK
if len(self.drivelist.getSelection()) < 1:
- mustHaveSelectedDrive(intf)
+ mustHaveSelectedDrive(anaconda.intf)
continue
cur = typebox.current()
if cur == -1:
- dispatch.skipStep("autopartitionexecute", skip = 1)
+ anaconda.dispatch.skipStep("autopartitionexecute", skip = 1)
break
else:
- dispatch.skipStep("autopartitionexecute", skip = 0)
+ anaconda.dispatch.skipStep("autopartitionexecute", skip = 0)
- partitions.autoClearPartType = cur
- partitions.autoClearPartDrives = self.drivelist.getSelection()
+ anaconda.id.partitions.autoClearPartType = cur
+ anaconda.id.partitions.autoClearPartDrives = self.drivelist.getSelection()
- if queryAutoPartitionOK(intf, diskset, partitions):
+ if queryAutoPartitionOK(anaconda):
break
# ask to review autopartition layout
- reviewLayout = dispatch.intf.messageWindow(_("Review Partition Layout"),
+ reviewLayout = anaconda.intf.messageWindow(_("Review Partition Layout"),
_("Review and modify partitioning layout?"),
type = "yesno")
if reviewLayout == 1:
- dispatch.skipStep("partition", skip = 0)
- dispatch.skipStep("bootloader", skip = 0)
+ anaconda.dispatch.skipStep("partition", skip = 0)
+ anaconda.dispatch.skipStep("bootloader", skip = 0)
else:
- dispatch.skipStep("partition", skip = 1)
- dispatch.skipStep("bootloader", skip = 1)
+ anaconda.dispatch.skipStep("partition", skip = 1)
+ anaconda.dispatch.skipStep("bootloader", skip = 1)
self.shutdownUI()
screen.popWindow()
return INSTALL_OK
-
-
diff --git a/textw/progress_text.py b/textw/progress_text.py
index d7d76a4b5..dc6f44d0e 100644
--- a/textw/progress_text.py
+++ b/textw/progress_text.py
@@ -204,18 +204,16 @@ class InstallProgressWindow:
class setupForInstall:
- def __call__(self, screen, dir, intf, id):
- if dir == DISPATCH_BACK:
- id.setInstallProgressClass(None)
+ def __call__(self, screen, anaconda):
+ if anaconda.dir == DISPATCH_BACK:
+ anaconda.id.setInstallProgressClass(None)
return INSTALL_BACK
else:
flag = 0
- for m in ['http://', 'ftp://']:
- if id.methodstr.startswith(m):
- flag = 1
- break
+ if anaconda.methodstr.startswith("http://") or anaconda.methodstr.startswith("ftp://"):
+ flag = 1
- log.info("id.methodstr = %s %s", id.methodstr, flag)
- id.setInstallProgressClass(InstallProgressWindow(screen, showdownload=flag))
+ log.info("anaconda.methodstr = %s %s", anaconda.methodstr, flag)
+ anaconda.id.setInstallProgressClass(InstallProgressWindow(screen, showdownload=flag))
return INSTALL_OK
diff --git a/textw/task_text.py b/textw/task_text.py
index b4c6c20f2..d4ada6815 100644
--- a/textw/task_text.py
+++ b/textw/task_text.py
@@ -33,9 +33,9 @@ class TaskWindow:
return False
return True
- def __call__(self, screen, intf, backend, dispatch, instClass):
- self.backend = backend
- tasks = instClass.tasks
+ def __call__(self, screen, anaconda):
+ self.backend = anaconda.backend
+ tasks = anaconda.id.instClass.tasks
bb = ButtonBar (screen, (TEXT_OK_BUTTON, TEXT_BACK_BUTTON))
@@ -56,7 +56,7 @@ class TaskWindow:
ct.append(_(txt), txt, False)
toplevel.add (ct, 0, 2, (0,0,0,1))
- custom = not dispatch.stepInSkipList("group-selection")
+ custom = not anaconda.dispatch.stepInSkipList("group-selection")
customize = Checkbox (_("Customize software selection"), custom)
toplevel.add (customize, 0, 3, (0, 0, 0, 1))
toplevel.add (bb, 0, 4, (0, 0, 0, 0), growx = 1)
@@ -68,16 +68,16 @@ class TaskWindow:
return INSTALL_BACK
if customize.selected():
- dispatch.skipStep("group-selection", skip = 0)
+ anaconda.dispatch.skipStep("group-selection", skip = 0)
else:
- dispatch.skipStep("group-selection")
+ anaconda.dispatch.skipStep("group-selection")
sel = ct.getSelection()
for (txt, grps) in tasks:
if txt in sel:
- map(backend.selectGroup, grps)
+ map(self.backend.selectGroup, grps)
else:
- map(backend.deselectGroup, grps)
+ map(self.backend.deselectGroup, grps)
screen.popWindow()
return INSTALL_OK
diff --git a/textw/timezone_text.py b/textw/timezone_text.py
index ba11e0e1a..ee6f10cc0 100644
--- a/textw/timezone_text.py
+++ b/textw/timezone_text.py
@@ -1,7 +1,7 @@
#
# timezone_text.py: text mode timezone selection dialog
#
-# Copyright 2000-2002 Red Hat, Inc.
+# Copyright 2000-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -61,11 +61,11 @@ class TimezoneWindow:
def currentTime(self):
return "Current time: " + strftime("%X %Z", localtime(time()))
- def __call__(self, screen, instLang, timezone):
+ def __call__(self, screen, anaconda):
timezones = self.getTimezoneList()
- (default, asUtc, asArc) = timezone.getTimezoneInfo()
+ (default, asUtc, asArc) = anaconda.id.timezone.getTimezoneInfo()
if not default:
- default = instLang.getDefaultTimeZone()
+ default = anaconda.id.instLanguage.getDefaultTimeZone()
bb = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON])
t = TextboxReflowed(30,
@@ -119,7 +119,7 @@ class TimezoneWindow:
break
screen.popWindow()
- timezone.setTimezoneInfo(self.l.current(), asUtc = self.c.selected())
+ anaconda.id.timezone.setTimezoneInfo(self.l.current(), asUtc = self.c.selected())
return INSTALL_OK
diff --git a/textw/upgrade_bootloader_text.py b/textw/upgrade_bootloader_text.py
index a332c8d1c..53f4c88ff 100644
--- a/textw/upgrade_bootloader_text.py
+++ b/textw/upgrade_bootloader_text.py
@@ -24,19 +24,19 @@ import checkbootloader
class UpgradeBootloaderWindow:
- def __call__(self, screen, dispatch, bl):
- self.dispatch = dispatch
- self.bl = bl
+ def __call__(self, screen, anaconda):
+ self.dispatch = anaconda.dispatch
+ self.bl = anaconda.id.bootloader
(self.type, self.bootDev) = \
- checkbootloader.getBootloaderTypeAndBoot(dispatch.instPath)
+ checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath)
blradio = RadioGroup()
(update, newbl, nobl) = (0, 0, 0)
- if not dispatch.stepInSkipList("bootloader"):
+ if not self.dispatch.stepInSkipList("bootloader"):
newbl = 1
- elif dispatch.stepInSkipList("instbootloader"):
+ elif self.dispatch.stepInSkipList("instbootloader"):
nobl = 1
else:
if self.type is not None and self.bootDev is not None:
diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py
index 1deb8655f..9d07e812e 100644
--- a/textw/upgrade_text.py
+++ b/textw/upgrade_text.py
@@ -26,9 +26,9 @@ UpgradeClass = upgradeclass.InstallClass
from rhpl.translate import _
class UpgradeMigrateFSWindow:
- def __call__ (self, screen, thefsset):
+ def __call__ (self, screen, anaconda):
- migent = thefsset.getMigratableEntries()
+ migent = anaconda.id.fsset.getMigratableEntries()
g = GridFormHelp(screen, _("Migrate File Systems"), "upmigfs", 1, 4)
@@ -83,10 +83,8 @@ class UpgradeMigrateFSWindow:
return INSTALL_OK
class UpgradeSwapWindow:
- def __call__ (self, screen, intf, fsset, instPath, swapInfo, dispatch):
- rc = swapInfo
-
- (fsList, suggSize, suggMntPoint) = rc
+ def __call__ (self, screen, anaconda):
+ (fsList, suggSize, suggMntPoint) = anaconda.id.upgradeSwapInfo
ramDetected = iutil.memInstalled()/1024
@@ -161,33 +159,33 @@ class UpgradeSwapWindow:
try:
val = int(val)
except ValueError:
- intf.messageWindow(_("Error"),
+ anaconda.intf.messageWindow(_("Error"),
_("The value you entered is not a "
"valid number."))
if type(val) == type(1):
(mnt, part, size) = fsList[listbox.current()]
if size < (val + 16):
- intf.messageWindow(_("Error"),
+ anaconda.intf.messageWindow(_("Error"),
_("There is not enough space on the "
"device you selected for the swap "
"partition."))
elif val > 2000 or val < 1:
- intf.messageWindow(_("Warning"),
+ anaconda.intf.messageWindow(_("Warning"),
_("The swap file must be between 1 "
"and 2000 MB in size."))
else:
screen.popWindow()
if flags.setupFilesystems:
- upgrade.createSwapFile(instPath, fsset, mnt, val)
- dispatch.skipStep("addswap", 1)
+ upgrade.createSwapFile(anaconda.rootPath, anaconda.id.fsset, mnt, val)
+ anaconda.dispatch.skipStep("addswap", 1)
return INSTALL_OK
raise ValueError
class UpgradeExamineWindow:
- def __call__ (self, screen, dispatch, intf, id, chroot):
- parts = id.rootParts
+ def __call__ (self, screen, anaconda):
+ parts = anaconda.id.rootParts
height = min(len(parts), 11) + 1
if height == 12:
@@ -226,41 +224,14 @@ class UpgradeExamineWindow:
if root is not None:
c = UpgradeClass(flags.expert)
- c.setSteps(dispatch)
- c.setInstallData(id)
-
- id.upgradeRoot = [(root[0], root[1])]
- id.rootParts = parts
- dispatch.skipStep("installtype", skip = 1)
- else:
- dispatch.skipStep("installtype", skip = 0)
- id.upgradeRoot = None
-
- return INSTALL_OK
-
-class CustomizeUpgradeWindow:
- def __call__ (self, screen, dispatch, intf, id, chroot):
- if id.upgradeRoot is None:
- return INSTALL_NOOP
- rc = ButtonChoiceWindow (screen, _("Customize Packages to Upgrade"),
- _("The packages you have installed, "
- "and any other packages which are "
- "needed to satisfy their "
- "dependencies, have been selected "
- "for installation. Would you like "
- "to customize the set of packages "
- "that will be upgraded?"),
- buttons = [ _("Yes"), _("No"),
- TEXT_BACK_BUTTON],
- help = "custupgrade")
-
- if rc == TEXT_BACK_CHECK:
- return INSTALL_BACK
+ c.setSteps(anaconda.dispatch)
+ c.setInstallData(anaconda)
- if rc == string.lower (_("No")):
- dispatch.skipStep("indivpackage")
+ anaconda.id.upgradeRoot = [(root[0], root[1])]
+ anaconda.id.rootParts = parts
+ anaconda.dispatch.skipStep("installtype", skip = 1)
else:
- dispatch.skipStep("indivpackage", skip = 0)
+ anaconda.dispatch.skipStep("installtype", skip = 0)
+ anaconda.id.upgradeRoot = None
return INSTALL_OK
-
diff --git a/textw/userauth_text.py b/textw/userauth_text.py
index f2266680a..c29b44a1e 100644
--- a/textw/userauth_text.py
+++ b/textw/userauth_text.py
@@ -23,7 +23,7 @@ def has_bad_chars(pw):
return 0
class RootPasswordWindow:
- def __call__ (self, screen, intf, rootPw):
+ def __call__ (self, screen, anaconda):
toplevel = GridFormHelp (screen, _("Root Password"), "rootpw", 1, 3)
toplevel.add (TextboxReflowed(37, _("Pick a root password. You must "
@@ -33,11 +33,11 @@ class RootPasswordWindow:
"root password is a critical part "
"of system security!")), 0, 0, (0, 0, 0, 1))
- if rootPw["isCrypted"]:
- rootPw["password"] = ""
+ if anaconda.id.rootPassword["isCrypted"]:
+ anaconda.id.rootPassword["password"] = ""
- entry1 = Entry (24, password = 1, text = rootPw["password"])
- entry2 = Entry (24, password = 1, text = rootPw["password"])
+ entry1 = Entry (24, password = 1, text = anaconda.id.rootPassword["password"])
+ entry2 = Entry (24, password = 1, text = anaconda.id.rootPassword["password"])
passgrid = Grid (2, 2)
passgrid.setField (Label (_("Password:")), 0, 0, (0, 0, 1, 0), anchorLeft = 1)
passgrid.setField (Label (_("Password (confirm):")), 0, 1, (0, 0, 1, 0), anchorLeft = 1)
@@ -77,5 +77,5 @@ class RootPasswordWindow:
entry2.set ("")
screen.popWindow()
- rootPw["password"] = entry1.value()
+ anaconda.id.rootPassword["password"] = entry1.value()
return INSTALL_OK
diff --git a/textw/welcome_text.py b/textw/welcome_text.py
index feaec7ac0..6d1a2e3c1 100644
--- a/textw/welcome_text.py
+++ b/textw/welcome_text.py
@@ -18,7 +18,7 @@ from constants import *
import os
class WelcomeWindow:
- def __call__(self, screen):
+ def __call__(self, screen, anaconda):
rc = ButtonChoiceWindow(screen, _("%s") % (productName,),
_("Welcome to %s!\n\n")
% (productName, ),
diff --git a/textw/zfcp_text.py b/textw/zfcp_text.py
index f6189c68b..a940d8f5d 100644
--- a/textw/zfcp_text.py
+++ b/textw/zfcp_text.py
@@ -3,7 +3,7 @@
#
# Jeremy Katz <katzj@redhat.com>
#
-# Copyright 2004 Red Hat, Inc.
+# Copyright 2004-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# general public license.
@@ -90,12 +90,12 @@ class ZFCPWindow:
if dev != None:
listbox.append(self.formatDevice(dev[0], dev[2], dev[4]), dev[0])
- def __call__(self, screen, fcp, diskset, intf):
- fcp.cleanFcpSysfs(fcp.fcpdevices)
+ def __call__(self, screen, anaconda):
+ anaconda.id.zfcp.cleanFcpSysfs(anaconda.id.zfcp.fcpdevices)
- fcpdevs = copy.copy(fcp.fcpdevices)
+ fcpdevs = copy.copy(anaconda.id.zfcp.fcpdevices)
- self.options = fcp.options
+ self.options = anaconda.id.zfcp.options
listboxLabel = Label( "%-10s %-25s %-15s" %
( _("Device #"), _("WWPN"), _("FCP LUN")))
@@ -168,9 +168,10 @@ class ZFCPWindow:
if (result == TEXT_BACK_CHECK):
return INSTALL_BACK
- fcp.fcpdevices = fcpdevs
+ anaconda.id.zfcp.fcpdevices = fcpdevs
- fcp.updateConfig(fcp.fcpdevices, diskset, intf)
+ anaconda.id.zfcp.updateConfig(anaconda.id.zfcp.fcpdevices,
+ anaconda.id.diskset, anadonda.intf)
return INSTALL_OK
diff --git a/textw/zipl_text.py b/textw/zipl_text.py
index c5932adcf..e0b038ef9 100644
--- a/textw/zipl_text.py
+++ b/textw/zipl_text.py
@@ -1,7 +1,7 @@
#
# zipl_text.py: text mode z/IPL setup dialog
#
-# Copyright 2001-2002 Red Hat, Inc.
+# Copyright 2001-2006 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -19,7 +19,9 @@ from constants_text import *
from rhpl.translate import _
class ZiplWindow:
- def __call__(self, screen, dispatch, bl, fsset, diskSet):
+ def __call__(self, screen, anaconda):
+ self.bl = anaconda.id.bootloader
+
t = TextboxReflowed(53,
_("The z/IPL Boot Loader will be installed "
"on your system after installation is complete. "
@@ -32,8 +34,8 @@ class ZiplWindow:
chandeventry1 = Entry(48, scroll = 1, returnExit = 1)
chandeventry2 = Entry(48, scroll = 1, returnExit = 1)
- if bl.args and bl.args.get():
- kernelparms = bl.args.get()
+ if self.bl.args and self.bl.args.get():
+ kernelparms = self.bl.args.get()
if isys.getDasdPorts() and (kernelparms.find("dasd=") == -1):
if len(kernelparms) > 0:
kernelparms = "%s dasd=%s" %(kernelparms, isys.getDasdPorts())
@@ -41,8 +43,8 @@ class ZiplWindow:
kernelparms = "dasd=%s" %(isys.getDasdPorts(),)
kernelentry.set(kernelparms)
- if bl.args and bl.args.chandevget():
- cdevs = bl.args.chandevget()
+ if self.bl.args and self.bl.args.chandevget():
+ cdevs = self.bl.args.chandevget()
chandeventry1.set('')
chandeventry2.set('')
if len(cdevs) > 0:
@@ -77,14 +79,14 @@ class ZiplWindow:
return INSTALL_BACK
if kernelentry.value():
- bl.args.set(string.strip(kernelentry.value()))
+ self.bl.args.set(string.strip(kernelentry.value()))
else:
- bl.args.set("")
+ self.bl.args.set("")
cdevs = []
if chandeventry1.value():
cdevs.append(string.strip(chandeventry1.value()))
if chandeventry2.value():
cdevs.append(string.strip(chandeventry2.value()))
- bl.args.chandevset(cdevs)
+ self.bl.args.chandevset(cdevs)
return INSTALL_OK