[gnome-system-tools] Fix password-less checkbox sensitivity depending on authorizations



commit 8e054781c950ed991ef7cafc8017e13fb813c870
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Tue Aug 18 21:30:05 2009 +0200

    Fix password-less checkbox sensitivity depending on authorizations
    
    Use gst_dialog_try_set_sensitive() instead of gtk_widget_set_sensitive() to take into account authorizations. Add that widget to the policy_widgets list since org.freedesktop.systemtoolsbackends.self.set does not allow changing it (involves changin group membership).

 src/users/main.c          |    1 +
 src/users/user-settings.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/users/main.c b/src/users/main.c
index 9ee802e..c54cc76 100644
--- a/src/users/main.c
+++ b/src/users/main.c
@@ -72,6 +72,7 @@ static const gchar *policy_widgets [] = {
 	"profile_settings",
 	"user_settings_name",
 	"user_settings_profile_menu",
+	"user_passwd_no_check",
 	"user_privileges",
 	"user_settings_home",
 	"user_settings_shell",
diff --git a/src/users/user-settings.c b/src/users/user-settings.c
index 77c7b91..2a72cee 100644
--- a/src/users/user-settings.c
+++ b/src/users/user-settings.c
@@ -457,7 +457,7 @@ user_settings_dialog_new (OobsUser *user)
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
 	}
 	else {
-		gtk_widget_set_sensitive (widget, TRUE);
+		gst_dialog_try_set_sensitive (tool->main_dialog, widget, TRUE);
 		if (is_user_in_group (user, no_passwd_login_group))
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 		else



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