[PATCH 2/2] The reset button should only be sensitive if there's something to reset.
Chris Lumens
clumens at redhat.com
Thu Mar 13 20:08:00 UTC 2014
---
pyanaconda/ui/gui/spokes/custom.glade | 1 +
pyanaconda/ui/gui/spokes/custom.py | 2 ++
2 files changed, 3 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
index 21fc241..1cbc8d3 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -1858,6 +1858,7 @@ until you click on the main menu's 'Begin Installation' button.</property>
<object class="GtkButton" id="resetButton">
<property name="label" translatable="yes" context="GUI|Custom Partitioning">_Reset All</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 7cc1a48..0a9173b 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -756,6 +756,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._applyButton = self.builder.get_object("applyButton")
self._configButton = self.builder.get_object("configureButton")
self._removeButton = self.builder.get_object("removeButton")
+ self._resetButton = self.builder.get_object("resetButton")
# Detailed configuration stuff
self._encryptCheckbox = self.builder.get_object("encryptCheckbox")
@@ -1067,6 +1068,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._show_mountpoint(page=firstPage, mountpoint=mountpointToShow)
self._applyButton.set_sensitive(False)
+ self._resetButton.set_sensitive(len(self.__storage.devicetree.findActions()) > 0)
###
### RIGHT HAND SIDE METHODS
--
1.8.3.1
More information about the anaconda-patches
mailing list