[PATCH 2/2] Don't allow the advanced user dialog to be saved with errors

David Shea dshea at redhat.com
Tue Jan 7 15:32:29 UTC 2014


Make the "save" button insensitive if the input check fails.
---
 pyanaconda/ui/gui/spokes/user.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index aeb5a7a..07d9012 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -47,10 +47,13 @@ class AdvancedUserDialog(GUIObject, GUIInputCheckHandler):
 
     def set_status(self, inputcheck):
         # Set or clear the groups error label based on the check status
+        # Make the save button insensitive if the check fails
         if inputcheck.check_status == InputCheck.CHECK_OK:
             self._groupsError.set_text('')
+            self._saveButton.set_sensitive(True)
         else:
             self._groupsError.set_text(inputcheck.check_status)
+            self._saveButton.set_sensitive(False)
 
     def _validateGroups(self, inputcheck):
         groups_list = self.get_input(inputcheck.input_obj).split(",")
-- 
1.8.5.2



More information about the anaconda-patches mailing list