aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:25 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:25 +0800
commitd7a93aa6fd67383c1aff9a1e8ead5cb20bcde388 (patch)
tree43c13f26b34fee888ea375c371aeedde52f3ac0e
parent584b98b1c352383f80d41713104d1a2fe5953e8b (diff)
downloadgsoc2013-empathy-d7a93aa6fd67383c1aff9a1e8ead5cb20bcde388.tar
gsoc2013-empathy-d7a93aa6fd67383c1aff9a1e8ead5cb20bcde388.tar.gz
gsoc2013-empathy-d7a93aa6fd67383c1aff9a1e8ead5cb20bcde388.tar.bz2
gsoc2013-empathy-d7a93aa6fd67383c1aff9a1e8ead5cb20bcde388.tar.lz
gsoc2013-empathy-d7a93aa6fd67383c1aff9a1e8ead5cb20bcde388.tar.xz
gsoc2013-empathy-d7a93aa6fd67383c1aff9a1e8ead5cb20bcde388.tar.zst
gsoc2013-empathy-d7a93aa6fd67383c1aff9a1e8ead5cb20bcde388.zip
simplify empathy_call_with_contact_id using empathy_contact_run_until_ready
svn path=/trunk/; revision=750
-rw-r--r--libempathy/empathy-utils.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 2bc107455..f54f4193f 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -465,22 +465,6 @@ empathy_call_with_contact (EmpathyContact *contact)
#endif
}
-#ifdef HAVE_VOIP
-static void
-got_handle_cb (EmpathyContact *contact,
- GParamSpec *property,
- EmpathyContactFactory *factory)
-{
- g_signal_handlers_disconnect_by_func (contact,
- got_handle_cb,
- factory);
-
- empathy_call_with_contact (contact);
- g_object_unref (factory);
- g_object_unref (contact);
-}
-#endif
-
void
empathy_call_with_contact_id (McAccount *account, const gchar *contact_id)
{
@@ -490,16 +474,12 @@ empathy_call_with_contact_id (McAccount *account, const gchar *contact_id)
factory = empathy_contact_factory_new ();
contact = empathy_contact_factory_get_from_id (factory, account, contact_id);
+ empathy_contact_run_until_ready (contact, EMPATHY_CONTACT_READY_HANDLE, NULL);
- if (empathy_contact_get_handle (contact) != 0) {
- empathy_call_with_contact (contact);
- g_object_unref (contact);
- g_object_unref (factory);
- } else {
- g_signal_connect (contact, "notify::handle",
- G_CALLBACK (got_handle_cb),
- factory);
- }
+ empathy_call_with_contact (contact);
+
+ g_object_unref (contact);
+ g_object_unref (factory);
#endif
}