diff options
-rw-r--r-- | installclass.py | 3 | ||||
-rw-r--r-- | iw/installpath_gui.py | 8 | ||||
-rw-r--r-- | text.py | 6 |
3 files changed, 15 insertions, 2 deletions
diff --git a/installclass.py b/installclass.py index acd474951..ffede2fe0 100644 --- a/installclass.py +++ b/installclass.py @@ -19,6 +19,9 @@ class BaseInstallClass: # default to not being hidden hidden = 0 + # don't select this class by default + default = 0 + # look in mouse.py for a list of valid mouse names -- use the LONG names def setMouseType(self, name, device = None, emulateThreeButtons = 0): self.mouse = (name, device, emulateThreeButtons) diff --git a/iw/installpath_gui.py b/iw/installpath_gui.py index 10faa78c7..035e7e693 100644 --- a/iw/installpath_gui.py +++ b/iw/installpath_gui.py @@ -199,6 +199,8 @@ class InstallPathWindow (InstallWindow): self.installClasses = [] self.orig = self.todo.getClass() + haveSetDefault = 0 + defaultGroup = None for (name, object, pixmap) in self.installTypes: group = self.pixRadioButton (group, _(name), pixmap) @@ -206,6 +208,12 @@ class InstallPathWindow (InstallWindow): self.installClasses.append ((group, object)) if isinstance(self.orig, object): group.set_active (1) + haveSetDefault = 1 + if object.default: + defaultGroup = group + + if not haveSetDefault and defaultGroup: + defaultGroup.set_active(1) spacer = GtkLabel("") spacer.set_usize(60, 1) @@ -197,17 +197,19 @@ class InstallPathWindow: else: instClass = todo.getClass() orig = None + default = 0 i = 0 for (name, object, icon) in classes: if isinstance(instClass, object): orig = i break + elif object.default: + default = i + i = i + 1 if (orig): default = orig - else: - default = 0 (button, choice) = ListboxChoiceWindow(screen, _("Installation Type"), _("What type of system would you like to install?"), |