[gnome-control-center/wip/gbsneto/new-goa-panel: 19/25] online-accounts: hide remove button when account is locked



commit c3124832c349f2c633aa1704c37efb1354b6e1fd
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Nov 10 13:34:56 2016 -0200

    online-accounts: hide remove button when account is locked
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774222

 panels/online-accounts/cc-online-accounts-panel.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/online-accounts/cc-online-accounts-panel.c 
b/panels/online-accounts/cc-online-accounts-panel.c
index cd4d54e..d3960f8 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -52,6 +52,7 @@ struct _CcGoaPanel
   GtkWidget *notification_label;
   GtkWidget *notification_revealer;
   GtkWidget *providers_listbox;
+  GtkWidget *remove_account_button;
   GtkWidget *stack;
   GtkWidget *accounts_vbox;
 
@@ -449,6 +450,7 @@ cc_goa_panel_class_init (CcGoaPanelClass *klass)
   gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, notification_label);
   gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, notification_revealer);
   gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, providers_listbox);
+  gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, remove_account_button);
   gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, stack);
 
   gtk_widget_class_bind_template_callback (widget_class, on_dialog_response);
@@ -555,6 +557,8 @@ on_listbox_row_activated (GtkListBox    *listbox,
   object = g_object_get_data (G_OBJECT (activated_row), "goa-object");
   is_locked = goa_account_get_is_locked (goa_object_peek_account (object));
 
+  gtk_widget_set_visible (self->remove_account_button, !is_locked);
+
   show_page_account (self, object);
 }
 


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