aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
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)