aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-24 21:51:23 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-27 19:44:29 +0800
commita6d4518c76cf1c78bd954bb2488d6f01868dd337 (patch)
treecae7fe839fff45118478fbed22f18c0c0512dd15
parent14dba3ce7abd486f9f081a2000b9afe356e98a5f (diff)
downloadgsoc2013-empathy-a6d4518c76cf1c78bd954bb2488d6f01868dd337.tar
gsoc2013-empathy-a6d4518c76cf1c78bd954bb2488d6f01868dd337.tar.gz
gsoc2013-empathy-a6d4518c76cf1c78bd954bb2488d6f01868dd337.tar.bz2
gsoc2013-empathy-a6d4518c76cf1c78bd954bb2488d6f01868dd337.tar.lz
gsoc2013-empathy-a6d4518c76cf1c78bd954bb2488d6f01868dd337.tar.xz
gsoc2013-empathy-a6d4518c76cf1c78bd954bb2488d6f01868dd337.tar.zst
gsoc2013-empathy-a6d4518c76cf1c78bd954bb2488d6f01868dd337.zip
factor out update_account()
https://bugzilla.gnome.org/show_bug.cgi?id=662609
-rw-r--r--libempathy-gtk/empathy-account-chooser.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index e7f2bd5b7..c0df6a6a6 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