aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-20 20:21:08 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-21 16:41:33 +0800
commitaab7e0e7a78708663fd75baddfd7bd2b06251257 (patch)
tree994e122388709901f3f71c3be950b5a106487bf3 /src/empathy-accounts-dialog.c
parent9de3622a5e8e94005b2d2c782486822459690e2c (diff)
downloadgsoc2013-empathy-aab7e0e7a78708663fd75baddfd7bd2b06251257.tar
gsoc2013-empathy-aab7e0e7a78708663fd75baddfd7bd2b06251257.tar.gz
gsoc2013-empathy-aab7e0e7a78708663fd75baddfd7bd2b06251257.tar.bz2
gsoc2013-empathy-aab7e0e7a78708663fd75baddfd7bd2b06251257.tar.lz
gsoc2013-empathy-aab7e0e7a78708663fd75baddfd7bd2b06251257.tar.xz
gsoc2013-empathy-aab7e0e7a78708663fd75baddfd7bd2b06251257.tar.zst
gsoc2013-empathy-aab7e0e7a78708663fd75baddfd7bd2b06251257.zip
don't display the enable switch if account is restricted
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 8ad619bf7..734809f80 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -275,6 +275,7 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
TpAccount *selected_account;
gboolean account_enabled;
gboolean creating_account;
+ TpStorageRestrictionFlags storage_restrictions = 0;
view = GTK_TREE_VIEW (priv->treeview);
selection = gtk_tree_view_get_selection (view);
@@ -309,6 +310,8 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
* (else no icon is shown in infobar)*/
if (!account_enabled)
presence = TP_CONNECTION_PRESENCE_TYPE_OFFLINE;
+
+ storage_restrictions = tp_account_get_storage_restrictions (account);
}
else
{
@@ -329,6 +332,10 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
g_signal_handlers_unblock_by_func (priv->enabled_switch,
accounts_dialog_enable_switch_active_cb, dialog);
+ /* Display the Enable switch if account supports it */
+ gtk_widget_set_visible (priv->enabled_switch,
+ !(storage_restrictions & TP_STORAGE_RESTRICTION_FLAG_CANNOT_SET_ENABLED));
+
if (account_enabled)
{
switch (status)