aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-17 05:34:48 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-04-08 18:41:30 +0800
commit563630a2afed64a18df0936a5da7aa178ef8e474 (patch)
treedc357ea6f23ae0c4e482d7702b0b66e48e336669 /src
parent0e8272e711be19be93995495a570531f6ecbdf10 (diff)
downloadgsoc2013-empathy-563630a2afed64a18df0936a5da7aa178ef8e474.tar
gsoc2013-empathy-563630a2afed64a18df0936a5da7aa178ef8e474.tar.gz
gsoc2013-empathy-563630a2afed64a18df0936a5da7aa178ef8e474.tar.bz2
gsoc2013-empathy-563630a2afed64a18df0936a5da7aa178ef8e474.tar.lz
gsoc2013-empathy-563630a2afed64a18df0936a5da7aa178ef8e474.tar.xz
gsoc2013-empathy-563630a2afed64a18df0936a5da7aa178ef8e474.tar.zst
gsoc2013-empathy-563630a2afed64a18df0936a5da7aa178ef8e474.zip
Disable all other psyke accounts when one is enabled
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 215102eb1..6619442a8 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -258,6 +258,20 @@ accounts_dialog_enable_switch_flipped (MxGtkLightSwitch *sw,
if (account == NULL)
return;
+ if (state == TRUE &&
+ !tp_strdiff (tp_account_get_connection_manager (account), "psyke"))
+ {
+ /* psyke typically doesn't support more than one simultaneous connection
+ * unless you've compiled it to do so */
+ if (!empathy_accounts_dialog_skype_disable_other_accounts (account,
+ GTK_WINDOW (dialog)))
+ {
+ /* user chose not to proceed */
+ mx_gtk_light_switch_set_active (sw, FALSE);
+ return;
+ }
+ }
+
tp_account_set_enabled_async (account, state,
accounts_dialog_enable_account_cb, NULL);
}