[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH rhel6-branch] Remove 'Change device' button from bootloader screen on EFI systems (#582143)



EFI systems don't need to mess with 'BIOS Drive Order' and they can really
only install the bootloader in one place (the EFI System Partition), so
this button is useless during EFI installs. Remove it to avoid confusion.

Resolves: rhbz#582143
---
 iw/bootloader_main_gui.py |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/iw/bootloader_main_gui.py b/iw/bootloader_main_gui.py
index fa5d554..a616a76 100644
--- a/iw/bootloader_main_gui.py
+++ b/iw/bootloader_main_gui.py
@@ -22,6 +22,7 @@
 import gtk
 import gobject
 import gui
+import iutil
 from iw_gui import *
 from constants import *
 
@@ -73,7 +74,8 @@ class MainBootloaderWindow(InstallWindow):
         active = self.grubCB.get_active()
 
         for widget in [ self.oslist.getWidget(), self.blpass.getWidget(), self.deviceButton ]:
-            widget.set_sensitive(active)
+            if widget:
+                widget.set_sensitive(active)
 
 
     def _deviceChange(self, b, anaconda, *args):
@@ -226,9 +228,13 @@ class MainBootloaderWindow(InstallWindow):
         self.grubCB.connect("toggled", self.bootloaderChanged)
         hb.pack_start(self.grubCB, False)
 
-        self.deviceButton = gtk.Button(_("_Change device"))
-        self.deviceButton.connect("clicked", self._deviceChange, anaconda)
-        hb.pack_start(self.deviceButton, False)
+        # no "Change device" button on EFI systems, since there should only
+        # be one EFI System Partition available/usable
+        self.deviceButton = None
+        if not iutil.isEfi():
+            self.deviceButton = gtk.Button(_("_Change device"))
+            self.deviceButton.connect("clicked", self._deviceChange, anaconda)
+            hb.pack_start(self.deviceButton, False)
 
         thebox.pack_start(hb, False)
 
-- 
1.7.3.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]