summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-11-20 16:22:18 +0000
committerErik Troan <ewt@redhat.com>2000-11-20 16:22:18 +0000
commit8bc1d2087a7953e2b9fdbf9554c39926fb78059f (patch)
tree3632381879e81894bf13f61a28160fef5345506d
parentbf5981a5ff55a10b8eb80174f467d493572f208a (diff)
downloadanaconda-8bc1d2087a7953e2b9fdbf9554c39926fb78059f.tar.gz
anaconda-8bc1d2087a7953e2b9fdbf9554c39926fb78059f.tar.xz
anaconda-8bc1d2087a7953e2b9fdbf9554c39926fb78059f.zip
let install classes set themselves as default
-rw-r--r--installclass.py3
-rw-r--r--iw/installpath_gui.py8
-rw-r--r--text.py6
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)
diff --git a/text.py b/text.py
index d65017c89..1dab8a1b9 100644
--- a/text.py
+++ b/text.py
@@ -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?"),