summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-02-21 15:17:39 -0500
committerJeremy Katz <katzj@redhat.com>2008-02-22 13:14:10 -0500
commit1ab3c1e862648b069457e9e2f6830a32981c152e (patch)
treee6417e5be2832dbd356b80f61caccde46078cea0 /iw
parentc4167235088d4acd87a2f899f328867bb0c7e7e6 (diff)
downloadanaconda-1ab3c1e862648b069457e9e2f6830a32981c152e.tar.gz
anaconda-1ab3c1e862648b069457e9e2f6830a32981c152e.tar.xz
anaconda-1ab3c1e862648b069457e9e2f6830a32981c152e.zip
Switch the grub installation radio to be a checkbutton. Cleanups for grub only
Diffstat (limited to 'iw')
-rw-r--r--iw/bootloader_main_gui.py39
-rw-r--r--iw/osbootwidget.py2
2 files changed, 10 insertions, 31 deletions
diff --git a/iw/bootloader_main_gui.py b/iw/bootloader_main_gui.py
index 2310b31f2..3114330a4 100644
--- a/iw/bootloader_main_gui.py
+++ b/iw/bootloader_main_gui.py
@@ -47,7 +47,7 @@ class MainBootloaderWindow(InstallWindow):
# since that won't change anything
self.bl.setDevice(self.bldev)
- if self.none_radio.get_active():
+ if not self.grubCB.get_active():
# if we're not installing a boot loader, don't show the second
# screen and don't worry about other options
self.dispatch.skipStep("instbootloader", skip = 1)
@@ -58,10 +58,7 @@ class MainBootloaderWindow(InstallWindow):
return
else:
self.dispatch.skipStep("instbootloader", skip = 0)
- if self.blname == "GRUB":
- self.bl.setUseGrub(1)
- else:
- self.bl.setUseGrub(0)
+ self.bl.setUseGrub(1)
# set the password
self.bl.setPassword(self.blpass.getPassword(), isCrypted = 0)
@@ -75,7 +72,7 @@ class MainBootloaderWindow(InstallWindow):
self.dispatch.skipStep("bootloaderadvanced", skip = 1)
def bootloaderChanged(self, *args):
- active = self.grub_radio.get_active()
+ active = self.grubCB.get_active()
for widget in [ self.oslist.getWidget(), self.blpass.getWidget(),
self.advanced ]:
@@ -100,11 +97,6 @@ class MainBootloaderWindow(InstallWindow):
spacer.set_size_request(10, 1)
thebox.pack_start(spacer, False)
- if self.bl.useGrub():
- self.blname = "GRUB"
- else:
- self.blname = None
-
# make sure we get a valid device to say we're installing to
if self.bl.getDevice() is not None:
self.bldev = self.bl.getDevice()
@@ -117,31 +109,18 @@ class MainBootloaderWindow(InstallWindow):
else:
self.bldev = choices['boot'][0]
- vb = gtk.VBox(False, 6)
- self.grub_radio = gtk.RadioButton(None, _("The %s boot loader will be "
- "installed on /dev/%s.") %
- ("GRUB", self.bldev))
- self.grub_radio.set_use_underline(False)
- vb.pack_start(self.grub_radio)
- self.none_radio = gtk.RadioButton(self.grub_radio,
- _("No boot loader will be installed."))
- vb.pack_start(self.none_radio)
- if self.blname is None:
- self.none_radio.set_active(True)
- self.grub_radio.set_active(False)
- else:
- self.grub_radio.set_active(True)
- self.none_radio.set_active(False)
- self.grub_radio.connect("toggled", self.bootloaderChanged)
- self.none_radio.connect("toggled", self.bootloaderChanged)
- thebox.pack_start(vb, False)
+ self.grubCB = gtk.CheckButton(_("_Install bootloader on /dev/%s.") %
+ (self.bldev,))
+ self.grubCB.set_active(not self.dispatch.stepInSkipList("instbootloader"))
+ self.grubCB.connect("toggled", self.bootloaderChanged)
+ thebox.pack_start(self.grubCB, False)
spacer = gtk.Label("")
spacer.set_size_request(10, 1)
thebox.pack_start(spacer, False)
# configure the systems available to boot from the boot loader
- self.oslist = OSBootWidget(anaconda, self.parent, self.blname)
+ self.oslist = OSBootWidget(anaconda, self.parent)
thebox.pack_start(self.oslist.getWidget(), False)
thebox.pack_start (gtk.HSeparator(), False)
diff --git a/iw/osbootwidget.py b/iw/osbootwidget.py
index fbffb84fd..161174f98 100644
--- a/iw/osbootwidget.py
+++ b/iw/osbootwidget.py
@@ -32,7 +32,7 @@ from constants import *
class OSBootWidget:
"""Widget to display OSes to boot and allow adding new ones."""
- def __init__(self, anaconda, parent, blname):
+ def __init__(self, anaconda, parent, blname = None):
self.bl = anaconda.id.bootloader
self.fsset = anaconda.id.fsset
self.diskset = anaconda.id.diskset