[empathy] factor out enable_and_connect_account()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] factor out enable_and_connect_account()
- Date: Fri, 30 Mar 2012 12:39:21 +0000 (UTC)
commit 073f8a015a1222455d2d55451c2f246e1dbafcc0
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Mar 30 13:59:50 2012 +0200
factor out enable_and_connect_account()
https://bugzilla.gnome.org/show_bug.cgi?id=673162
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 b0bb518..23eb292 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]