[gnome-control-center] online-accounts: Disable the remove button for locked accounts



commit b24bfa819742019506d3bda1c3ba09789c8d5298
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Sep 30 16:52:09 2014 +0200

    online-accounts: Disable the remove button for locked accounts
    
    Bump required GOA version for the IsLocked property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737665

 configure.ac                                      |    2 +-
 panels/online-accounts/cc-online-accounts-panel.c |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9f944b0..acaad9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,7 @@ GNOME_DESKTOP_REQUIRED_VERSION=3.11.3
 SCHEMAS_REQUIRED_VERSION=3.15.4
 LIBWACOM_REQUIRED_VERSION=0.7
 CLUTTER_REQUIRED_VERSION=1.11.3
-GOA_REQUIRED_VERSION=3.9.90
+GOA_REQUIRED_VERSION=3.15.1
 ACCOUNTSSERVICE_REQUIRED_VERSION=0.6.39
 COLORD_REQUIRED_VERSION=0.1.34
 COLORD_GTK_REQUIRED_VERSION=0.1.24
diff --git a/panels/online-accounts/cc-online-accounts-panel.c 
b/panels/online-accounts/cc-online-accounts-panel.c
index e43e867..356301a 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -577,11 +577,17 @@ on_tree_view_selection_changed (GtkTreeSelection *selection,
   if (gtk_tree_selection_get_selected (selection, NULL, &iter))
     {
       GoaObject *object;
+      gboolean is_locked;
+
       gtk_tree_model_get (GTK_TREE_MODEL (panel->accounts_model),
                           &iter,
                           GOA_PANEL_ACCOUNTS_MODEL_COLUMN_OBJECT, &object,
                           -1);
       show_page_account (panel, object);
+
+      is_locked = goa_account_get_is_locked (goa_object_peek_account (object));
+      gtk_widget_set_sensitive (panel->toolbar_remove_button, !is_locked);
+
       g_object_unref (object);
     }
   else


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