diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2016-11-10 13:34:56 -0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2017-02-13 15:09:26 +0100 |
commit | a6858fff62b114f9b17de3f3e3102ecf3be73da5 (patch) | |
tree | 2c8dc743d5a5a649b7bfee8ff074edf7eeb79990 /panels/online-accounts | |
parent | 5807bb4cc342bb5d7a1b7967c1c52a97481c047b (diff) | |
download | gnome-control-center-a6858fff62b114f9b17de3f3e3102ecf3be73da5.tar.gz |
online-accounts: Hide remove button when account is locked
https://bugzilla.gnome.org/show_bug.cgi?id=774222
Diffstat (limited to 'panels/online-accounts')
-rw-r--r-- | panels/online-accounts/cc-online-accounts-panel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c index 189473591..f1580e9e1 100644 --- a/panels/online-accounts/cc-online-accounts-panel.c +++ b/panels/online-accounts/cc-online-accounts-panel.c @@ -51,6 +51,7 @@ struct _CcGoaPanel GtkWidget *notification_label; GtkWidget *notification_revealer; GtkWidget *providers_listbox; + GtkWidget *remove_account_button; GtkWidget *stack; GtkWidget *accounts_vbox; @@ -425,6 +426,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_edit_account_dialog_delete_event); @@ -450,6 +452,7 @@ show_page_account (CcGoaPanel *panel, GList *l; GoaProvider *provider; GoaAccount *account; + gboolean is_locked; const gchar *provider_name; const gchar *provider_type; gchar *title; @@ -469,6 +472,10 @@ show_page_account (CcGoaPanel *panel, g_list_free (children); account = goa_object_peek_account (object); + + is_locked = goa_account_get_is_locked (account); + gtk_widget_set_visible (panel->remove_account_button, !is_locked); + provider_type = goa_account_get_provider_type (account); provider = goa_provider_get_for_provider_type (provider_type); |