[gnome-control-center] user-accounts: Make controls insensitive when a user is not selected



commit 04eca6d9515ea1eb6827f334d6c57c26b0e58718
Author: Michael Terry <michael terry canonical com>
Date:   Tue Apr 10 09:19:03 2012 -0400

    user-accounts: Make controls insensitive when a user is not selected
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671484l

 panels/user-accounts/data/user-accounts-dialog.ui |    1 +
 panels/user-accounts/um-user-panel.c              |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/user-accounts/data/user-accounts-dialog.ui b/panels/user-accounts/data/user-accounts-dialog.ui
index b4a5cc8..abce554 100644
--- a/panels/user-accounts/data/user-accounts-dialog.ui
+++ b/panels/user-accounts/data/user-accounts-dialog.ui
@@ -126,6 +126,7 @@
                 <child>
                   <object class="GtkVBox" id="main-user-vbox">
                     <property name="visible">True</property>
+                    <property name="sensitive">False</property>
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index d9c62cd..b17e717 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -622,7 +622,10 @@ selected_user_changed (GtkTreeSelection *selection, UmUserPanelPrivate *d)
                 gtk_tree_model_get (model, &iter, USER_COL, &user, -1);
                 show_user (user, d);
                 on_permission_changed (d->permission, NULL, d);
+                gtk_widget_set_sensitive (get_widget (d, "main-user-vbox"), TRUE);
                 g_object_unref (user);
+        } else {                
+                gtk_widget_set_sensitive (get_widget (d, "main-user-vbox"), FALSE);
         }
 }
 



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