[gnome-control-center/gnome-3-8] user-accounts: make sure to check for permissions everywhere
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-8] user-accounts: make sure to check for permissions everywhere
- Date: Fri, 2 Aug 2013 16:40:45 +0000 (UTC)
commit a6b79fd98ecf449b736b8576c31889f17befc901
Author: Jonh Wendell <jonh wendell intel com>
Date: Fri Aug 2 13:31:51 2013 -0300
user-accounts: make sure to check for permissions everywhere
every time we call show_user() we should also verify the permissions.
this fixes the issue where sometimes we may have some controls
enabled on startup, even on 'locked' state.
https://bugzilla.gnome.org/show_bug.cgi?id=705322
panels/user-accounts/um-user-panel.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index b9cfb62..2c02520 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -648,6 +648,8 @@ get_autologin_possible (ActUser *user)
return !(locked || set_password_at_login);
}
+static void on_permission_changed (GPermission *permission, GParamSpec *pspec, gpointer data);
+
static void
show_user (ActUser *user, CcUserPanelPrivate *d)
{
@@ -738,9 +740,10 @@ show_user (ActUser *user, CcUserPanelPrivate *d)
widget = get_widget (d, "last-login-history-button");
gtk_widget_set_visible (widget, show);
gtk_widget_set_sensitive (widget, enable);
-}
-static void on_permission_changed (GPermission *permission, GParamSpec *pspec, gpointer data);
+ if (d->permission != NULL)
+ on_permission_changed (d->permission, NULL, d);
+}
static void
selected_user_changed (GtkTreeSelection *selection, CcUserPanelPrivate *d)
@@ -752,8 +755,6 @@ selected_user_changed (GtkTreeSelection *selection, CcUserPanelPrivate *d)
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (model, &iter, USER_COL, &user, -1);
show_user (user, d);
- if (d->permission != NULL)
- on_permission_changed (d->permission, NULL, d);
gtk_widget_set_sensitive (get_widget (d, "main-user-vbox"), TRUE);
g_object_unref (user);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]