[empathy] factor out update_account()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] factor out update_account()
- Date: Thu, 27 Oct 2011 11:46:01 +0000 (UTC)
commit a6d4518c76cf1c78bd954bb2488d6f01868dd337
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Oct 24 15:51:23 2011 +0200
factor out update_account()
https://bugzilla.gnome.org/show_bug.cgi?id=662609
libempathy-gtk/empathy-account-chooser.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index e7f2bd5..c0df6a6 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -152,6 +152,8 @@ static gboolean account_chooser_set_account_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
SetAccountData *data);
+static void update_account (EmpathyAccountChooser *self,
+ TpAccount *account);
enum {
PROP_0,
@@ -852,6 +854,16 @@ account_chooser_update_iter (EmpathyAccountChooser *self,
}
static void
+update_account (EmpathyAccountChooser *self,
+ TpAccount *account)
+{
+ GtkTreeIter iter;
+
+ if (account_chooser_find_account (self, account, &iter))
+ account_chooser_update_iter (self, &iter);
+}
+
+static void
account_chooser_status_changed_cb (TpAccount *account,
guint old_status,
guint new_status,
@@ -861,10 +873,8 @@ account_chooser_status_changed_cb (TpAccount *account,
gpointer user_data)
{
EmpathyAccountChooser *self = user_data;
- GtkTreeIter iter;
- if (account_chooser_find_account (self, account, &iter))
- account_chooser_update_iter (self, &iter);
+ update_account (self, account);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]