summaryrefslogtreecommitdiffstats
path: root/textw/installpath_text.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-06-20 02:00:44 +0000
committerErik Troan <ewt@redhat.com>2001-06-20 02:00:44 +0000
commit1a0247090d0d3629a9cd150d63597f94c4f27fad (patch)
tree1508f8237c8e7fb62f187706bfc5173df8819236 /textw/installpath_text.py
parentdbb4861e176cadfb14c48313fd9922d3dbfcefed (diff)
downloadanaconda-1a0247090d0d3629a9cd150d63597f94c4f27fad.tar.gz
anaconda-1a0247090d0d3629a9cd150d63597f94c4f27fad.tar.xz
anaconda-1a0247090d0d3629a9cd150d63597f94c4f27fad.zip
merge from (now defunct) anaconda-dispatch branch
Diffstat (limited to 'textw/installpath_text.py')
-rw-r--r--textw/installpath_text.py63
1 files changed, 63 insertions, 0 deletions
diff --git a/textw/installpath_text.py b/textw/installpath_text.py
new file mode 100644
index 000000000..e88a351b8
--- /dev/null
+++ b/textw/installpath_text.py
@@ -0,0 +1,63 @@
+from snack import *
+from constants_text import *
+from translate import _
+from flags import flags
+import installclass
+
+class InstallPathWindow:
+ def __call__ (self, screen, dispatch, id, method, intf):
+ classes = installclass.availableClasses()
+
+ choices = []
+ default = 0
+ i = 0
+ orig = None
+
+ for (name, object, icon) in classes:
+ choices.append(_(name))
+
+ if isinstance(id.instClass, object):
+ orig = i
+ elif object.default:
+ default = i
+
+ i = i + 1
+
+ if orig != None:
+ default = orig
+
+ if len(choices) < 3:
+ raise KeyError
+
+ (button, choice) = ListboxChoiceWindow(screen, _("Installation Type"),
+ _("What type of system would you like to install?"),
+ choices, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON],
+ width = 40, default = default, help = "installpath")
+
+ if button == TEXT_BACK_CHECK:
+ return INSTALL_BACK
+
+ needNewDruid = 0
+
+ if needNewDruid:
+ # The last 0 on here means we don't know if it's an upgrade or
+ # not.
+ id.fstab = NewtFstab(flags.setupFilesystems(),
+ flags.serial(), 0, 0,
+ intf.waitWindow,
+ intf.messageWindow,
+ intf.progressWindow,
+ not flags.expert,
+ method.protectedPartitions(),
+ flags.expert, 0)
+
+
+ if (choice != orig):
+ (name, objectClass, logo) = classes[choice]
+ c = objectClass(flags.expert)
+ c.setSteps(dispatch)
+ c.setInstallData(id)
+ needNewDruid = 1
+
+ return INSTALL_OK
+