aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 b0bb51822..23eb29236 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -247,6 +247,14 @@ accounts_dialog_enable_account_cb (GObject *object,
}
static void
+enable_and_connect_account (TpAccount *account,
+ gboolean enable)
+{
+ tp_account_set_enabled_async (account, enable,
+ accounts_dialog_enable_account_cb, GUINT_TO_POINTER (enable));
+}
+
+static void
accounts_dialog_enable_switch_active_cb (GtkSwitch *sw,
GParamSpec *spec,
EmpathyAccountsDialog *dialog)
@@ -265,8 +273,7 @@ accounts_dialog_enable_switch_active_cb (GtkSwitch *sw,
enable = gtk_switch_get_active (sw);
- tp_account_set_enabled_async (account, enable,
- accounts_dialog_enable_account_cb, GUINT_TO_POINTER (enable));
+ enable_and_connect_account (account, enable);
}
static void