[PATCH 1/3] Refresh the checkboxes on AdvancedUser dialog properly (#924257)

Martin Sivak msivak at redhat.com
Thu Mar 21 14:01:05 UTC 2013


---
 pyanaconda/ui/gui/spokes/user.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index ee627c4..c42035d 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -51,7 +51,7 @@ class AdvancedUserDialog(GUIObject):
     def initialize(self):
         GUIObject.initialize(self)
 
-    def _apply_checkboxes(self, _editable, data = None):
+    def _apply_checkboxes(self, _editable = None, data = None):
         """Update the state of this screen according to the
         checkbox states on the screen. It is called from
         the toggled Gtk event.
@@ -72,6 +72,14 @@ class AdvancedUserDialog(GUIObject):
         elif self._user.name:
             t_home.set_text("/home/%s" % self._user.name)
 
+        c_home = self.builder.get_object("c_home")
+        c_home.set_active(bool(self._user.homedir))
+        c_uid = self.builder.get_object("c_uid")
+        c_uid.set_active(bool(self._user.uid))
+        c_gid = self.builder.get_object("c_gid")
+        c_gid.set_active(bool(self._user.gid))
+        self._apply_checkboxes()
+        
         groups = []
         for group_name in self._user.groups:
             group = self._groupDict[group_name]
-- 
1.7.11.7



More information about the anaconda-patches mailing list