aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-24 21:53:34 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-27 19:44:30 +0800
commit3b00a09f5d1cdee956c847c664dfde21a20f952b (patch)
treefacfab2d18f353ddf1462968917c4422c4c28183
parenta6d4518c76cf1c78bd954bb2488d6f01868dd337 (diff)
downloadgsoc2013-empathy-3b00a09f5d1cdee956c847c664dfde21a20f952b.tar
gsoc2013-empathy-3b00a09f5d1cdee956c847c664dfde21a20f952b.tar.gz
gsoc2013-empathy-3b00a09f5d1cdee956c847c664dfde21a20f952b.tar.bz2
gsoc2013-empathy-3b00a09f5d1cdee956c847c664dfde21a20f952b.tar.lz
gsoc2013-empathy-3b00a09f5d1cdee956c847c664dfde21a20f952b.tar.xz
gsoc2013-empathy-3b00a09f5d1cdee956c847c664dfde21a20f952b.tar.zst
gsoc2013-empathy-3b00a09f5d1cdee956c847c664dfde21a20f952b.zip
refilter if the TpConnection of a TpAccount is changed
https://bugzilla.gnome.org/show_bug.cgi?id=662609
-rw-r--r--libempathy-gtk/empathy-account-chooser.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index c0df6a6a6..f743db99e 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -248,6 +248,14 @@ account_cmp (GtkTreeModel *model,
}
static void
+account_connection_notify_cb (TpAccount *account,
+ GParamSpec *spec,
+ EmpathyAccountChooser *self)
+{
+ update_account (self, account);
+}
+
+static void
account_manager_prepared_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
@@ -275,6 +283,14 @@ account_manager_prepared_cb (GObject *source_object,
tp_g_signal_connect_object (account, "status-changed",
G_CALLBACK (account_chooser_status_changed_cb),
self, 0);
+
+ /* We generally use the TpConnection from the account to filter it so,
+ * just relying on the account status is not enough. In some case we the
+ * status change can be notified while the TpConnection is still
+ * preparing. */
+ tp_g_signal_connect_object (account, "notify::connection",
+ G_CALLBACK (account_connection_notify_cb),
+ self, 0);
}
g_list_free (accounts);