diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-03-30 19:59:50 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-03-30 20:00:39 +0800 |
commit | 073f8a015a1222455d2d55451c2f246e1dbafcc0 (patch) | |
tree | 9318a3665f1cba1b368628a34e29386a5efb4685 /src | |
parent | 02453f3777fb24c7f20ef4d839845c8c16e2e3c1 (diff) | |
download | gsoc2013-empathy-073f8a015a1222455d2d55451c2f246e1dbafcc0.tar gsoc2013-empathy-073f8a015a1222455d2d55451c2f246e1dbafcc0.tar.gz gsoc2013-empathy-073f8a015a1222455d2d55451c2f246e1dbafcc0.tar.bz2 gsoc2013-empathy-073f8a015a1222455d2d55451c2f246e1dbafcc0.tar.lz gsoc2013-empathy-073f8a015a1222455d2d55451c2f246e1dbafcc0.tar.xz gsoc2013-empathy-073f8a015a1222455d2d55451c2f246e1dbafcc0.tar.zst gsoc2013-empathy-073f8a015a1222455d2d55451c2f246e1dbafcc0.zip |
factor out enable_and_connect_account()
https://bugzilla.gnome.org/show_bug.cgi?id=673162
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-accounts-dialog.c | 11 |
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 |