[gnome-control-center/wip/hadess/parental-controls-fixes: 1/3] user-accounts: Hide parental controls row if unavailable




commit 41a77763a7e2776c7eb66256fe947e69a730f761
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Aug 26 16:49:40 2021 +0200

    user-accounts: Hide parental controls row if unavailable
    
    Don't show the parental controls line for administrator accounts.

 panels/user-accounts/cc-user-panel.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index 57cd019db..b73329195 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -921,12 +921,7 @@ show_user (ActUser *user, CcUserPanel *self)
 #ifdef HAVE_MALCONTENT
         /* Parental Controls: Unavailable if user is admin */
         if (act_user_get_account_type (user) == ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR) {
-                GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET 
(self->parental_controls_button_label));
-
-                gtk_widget_hide (GTK_WIDGET (self->parental_control_go_next));
-                /* TRANSLATORS: Status of Parental Controls setup */
-                gtk_label_set_text (self->parental_controls_button_label, _("Unavailable"));
-                gtk_style_context_add_class (context, "dim-label");
+                gtk_widget_hide (GTK_WIDGET (self->parental_controls_row));
         } else {
                 GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET 
(self->parental_controls_button_label));
 


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