[PATCH 3/3] Disable the configure button for pre-existing devices (#888296).

Chris Lumens clumens at redhat.com
Fri Jan 4 15:49:17 UTC 2013


---
 pyanaconda/ui/gui/spokes/custom.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index e7b47e5..b71e9e2 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2201,7 +2201,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         selector.set_chosen(True)
         self._current_selector = selector
 
-        self._configButton.set_sensitive(not selector._device.protected and
+        self._configButton.set_sensitive(not selector._device.exists and
+                                         not selector._device.protected and
                                          getDeviceType(selector._device) != DEVICE_TYPE_LVM)
         self._removeButton.set_sensitive(not selector._device.protected)
         return True
@@ -2419,7 +2420,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
             raid_level = "raid0"
 
         # lvm uses the RHS to set disk set. no foolish minds here.
-        self._configButton.set_sensitive(new_type != DEVICE_TYPE_LVM)
+        exists = self._current_selector and self._current_selector._device.exists
+        self._configButton.set_sensitive(not exists and new_type != DEVICE_TYPE_LVM)
 
         size = self.builder.get_object("sizeSpinner").get_value()
         self._populate_raid(raid_level, size)
-- 
1.7.11.2



More information about the anaconda-patches mailing list