aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-21 20:05:50 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-22 19:58:40 +0800
commit61caee80d36af8064a9c0953ce4ee7123bf6115d (patch)
tree6981559aaac611945580555c4783e75a915027f0 /src
parent7ed6676eb0dc2c05718774fbc1939d6a8a5c6445 (diff)
downloadgsoc2013-empathy-61caee80d36af8064a9c0953ce4ee7123bf6115d.tar
gsoc2013-empathy-61caee80d36af8064a9c0953ce4ee7123bf6115d.tar.gz
gsoc2013-empathy-61caee80d36af8064a9c0953ce4ee7123bf6115d.tar.bz2
gsoc2013-empathy-61caee80d36af8064a9c0953ce4ee7123bf6115d.tar.lz
gsoc2013-empathy-61caee80d36af8064a9c0953ce4ee7123bf6115d.tar.xz
gsoc2013-empathy-61caee80d36af8064a9c0953ce4ee7123bf6115d.tar.zst
gsoc2013-empathy-61caee80d36af8064a9c0953ce4ee7123bf6115d.zip
empathy.c: use empathy_connection_managers_call_when_ready
Diffstat (limited to 'src')
-rw-r--r--src/empathy.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/empathy.c b/src/empathy.c
index 63083f609..5647789c8 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -200,26 +200,19 @@ maybe_show_account_assistant (void)
g_object_unref (manager);
}
-static gboolean
-check_connection_managers_ready (EmpathyConnectionManagers *managers)
-{
- if (empathy_connection_managers_is_ready (managers))
- {
- if (!empathy_import_mc4_accounts (managers) && !start_hidden)
- maybe_show_account_assistant ();
-
- g_object_unref (managers);
- return TRUE;
- }
- return FALSE;
-}
-
static void
connection_managers_ready_cb (EmpathyConnectionManagers *managers,
- GParamSpec *spec,
+ const GError *error,
gpointer user_data)
{
- check_connection_managers_ready (managers);
+ if (error != NULL)
+ goto out;
+
+ if (!empathy_import_mc4_accounts (managers) && !start_hidden)
+ maybe_show_account_assistant ();
+
+out:
+ g_object_unref (managers);
}
static void
@@ -495,11 +488,8 @@ account_manager_ready_cb (GObject *source_object,
EmpathyConnectionManagers *managers;
managers = empathy_connection_managers_dup_singleton ();
- if (!check_connection_managers_ready (managers))
- {
- g_signal_connect (managers, "notify::ready",
- G_CALLBACK (connection_managers_ready_cb), NULL);
- }
+ empathy_connection_managers_call_when_ready (managers,
+ connection_managers_ready_cb, NULL);
}
else if (!start_hidden)
{