diff options
author | Erik Troan <ewt@redhat.com> | 1999-09-22 15:42:05 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-09-22 15:42:05 +0000 |
commit | d3d3b0ed4cecefd4427d7c544c2317c8cd12faf0 (patch) | |
tree | 025075bd6e8025ee29002b5159b6758ed1f92aa6 /text.py | |
parent | f19c3d03efab17f46c2df80bec5f39db9d7b0aec (diff) | |
download | anaconda-d3d3b0ed4cecefd4427d7c544c2317c8cd12faf0.tar.gz anaconda-d3d3b0ed4cecefd4427d7c544c2317c8cd12faf0.tar.xz anaconda-d3d3b0ed4cecefd4427d7c544c2317c8cd12faf0.zip |
set install class properly
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 28 |
1 files changed, 24 insertions, 4 deletions
@@ -170,6 +170,24 @@ class InstallPathWindow: todo.upgrade = 1 return INSTALL_NOOP + if (todo.upgrade): + default = 5 + else: + instClass = todo.getClass() + orig = None + if isinstance(instClass, installclass.GNOMEWorkstation): + orig = 0 + elif isinstance(instClass, installclass.KDEWorkstation): + orig = 1 + elif isinstance(instClass, installclass.Server): + orig = 2 + elif isinstance(instClass, installclass.CustomInstall): + orig = 3 + if (orig): + default = orig + else: + default = 0 + choices = [ _("Install GNOME Workstation"), _("Install KDE Workstation"), _("Install Server System"), @@ -178,7 +196,7 @@ class InstallPathWindow: (button, choice) = ListboxChoiceWindow(screen, _("Installation Type"), _("What type of system would you like to install?"), choices, [(_("OK"), "ok"), (_("Back"), "back")], - width = 40) + width = 40, default = default) if button == "back": return INSTALL_BACK @@ -188,12 +206,14 @@ class InstallPathWindow: else: intf.steps = intf.commonSteps + intf.installSteps todo.upgrade = 0 - if (choice == 0): + if (choice == 0 and orig != 0): todo.setClass(installclass.GNOMEWorkstation()) - elif (choice == 1): + elif (choice == 1 and orig != 1): todo.setClass(installclass.KDEWorkstation()) - elif (choice == 2): + elif (choice == 2 and orig != 2): todo.setClass(installclass.Server()) + elif (choice == 3 and orig != 3): + todo.setClass(installclass.CustomInstall()) return INSTALL_OK class UpgradeExamineWindow: |