[gnome-control-center] user-accounts: Show ‘Add User’ button when panel is locked
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Show ‘Add User’ button when panel is locked
- Date: Fri, 11 Dec 2020 17:22:03 +0000 (UTC)
commit 2809316fd125819f4e48b26d8fb9087314cd23bf
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Dec 8 18:36:36 2020 +0000
user-accounts: Show ‘Add User’ button when panel is locked
Rather than hiding the ‘Add User’ button when the panel is locked, show
it in an insensitive state. This gives the user a hint that in order to
add a new user, they will need to unlock the panel.
See: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/26#note_705945
Signed-off-by: Philip Withnall <pwithnall endlessos org>
panels/user-accounts/cc-user-panel.c | 2 +-
panels/user-accounts/cc-user-panel.ui | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index f096c088d..a0c16c5e6 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -1366,7 +1366,7 @@ on_permission_changed (CcUserPanel *self)
is_authorized = g_permission_get_allowed (G_PERMISSION (self->permission));
- gtk_widget_set_visible (GTK_WIDGET (self->add_user_button), is_authorized);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->add_user_button), is_authorized);
user = get_selected_user (self);
if (!user) {
diff --git a/panels/user-accounts/cc-user-panel.ui b/panels/user-accounts/cc-user-panel.ui
index b96528037..32a5c8185 100644
--- a/panels/user-accounts/cc-user-panel.ui
+++ b/panels/user-accounts/cc-user-panel.ui
@@ -1,6 +1,7 @@
<interface>
<object class="GtkButton" id="add_user_button">
- <property name="visible">False</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Add User…</property>
<property name="use_underline">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]