aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-16 22:04:46 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-21 21:28:40 +0800
commitf85fa9491bb42a9d01acda493d000cad1a2d1c80 (patch)
tree33293ac8d1e43969b1fb79771ca49569bcb9a876
parenta5da0a70113dd6bd0abe0df3c353fbaf41a25fae (diff)
downloadgsoc2013-empathy-f85fa9491bb42a9d01acda493d000cad1a2d1c80.tar
gsoc2013-empathy-f85fa9491bb42a9d01acda493d000cad1a2d1c80.tar.gz
gsoc2013-empathy-f85fa9491bb42a9d01acda493d000cad1a2d1c80.tar.bz2
gsoc2013-empathy-f85fa9491bb42a9d01acda493d000cad1a2d1c80.tar.lz
gsoc2013-empathy-f85fa9491bb42a9d01acda493d000cad1a2d1c80.tar.xz
gsoc2013-empathy-f85fa9491bb42a9d01acda493d000cad1a2d1c80.tar.zst
gsoc2013-empathy-f85fa9491bb42a9d01acda493d000cad1a2d1c80.zip
accounts-dialog: hide the switch in butterfly accounts
MC should migrate butterfly accounts. If it fails (typically because Haze isn't installed) then it disables the account. There is no point allowing user to re-enable it as it won't work properly with Empathy any way. https://bugzilla.gnome.org/show_bug.cgi?id=663829
-rw-r--r--src/empathy-accounts-dialog.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index b2b57dec1..1f07dc8b9 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -278,6 +278,7 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
gboolean account_enabled;
gboolean creating_account;
TpStorageRestrictionFlags storage_restrictions = 0;
+ gboolean display_switch = TRUE;
view = GTK_TREE_VIEW (priv->treeview);
selection = gtk_tree_view_get_selection (view);
@@ -314,6 +315,13 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
presence = TP_CONNECTION_PRESENCE_TYPE_OFFLINE;
storage_restrictions = tp_account_get_storage_restrictions (account);
+ if (storage_restrictions & TP_STORAGE_RESTRICTION_FLAG_CANNOT_SET_ENABLED)
+ display_switch = FALSE;
+
+ /* Butterfly accounts shouldn't be used any more */
+ if (!tp_strdiff (tp_account_get_connection_manager (account),
+ "butterfly"))
+ display_switch = FALSE;
}
else
{
@@ -335,8 +343,7 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
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));
+ gtk_widget_set_visible (priv->enabled_switch, display_switch);
if (account_enabled)
{