diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-03-29 16:26:29 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-03-29 16:26:29 +0800 |
commit | 8588d5b00a1a831e3b310377686e23883b8fbec8 (patch) | |
tree | 82cf8698544558932815b1c4255f27ef6e131562 | |
parent | 586cea17140fa4072faf9dcaddc9d9a2dcd693f9 (diff) | |
download | gsoc2013-empathy-8588d5b00a1a831e3b310377686e23883b8fbec8.tar gsoc2013-empathy-8588d5b00a1a831e3b310377686e23883b8fbec8.tar.gz gsoc2013-empathy-8588d5b00a1a831e3b310377686e23883b8fbec8.tar.bz2 gsoc2013-empathy-8588d5b00a1a831e3b310377686e23883b8fbec8.tar.lz gsoc2013-empathy-8588d5b00a1a831e3b310377686e23883b8fbec8.tar.xz gsoc2013-empathy-8588d5b00a1a831e3b310377686e23883b8fbec8.tar.zst gsoc2013-empathy-8588d5b00a1a831e3b310377686e23883b8fbec8.zip |
Use empathy_contact_call_when_ready instead of _run_ API. Fixes bug #561247 and
From: Xavier Claessens <xclaesse@gmail.com>
svn path=/branches/gnome-2-26/; revision=2749
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 07058e4bc..f8ff36731 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -42,6 +42,9 @@ #include "empathy-avatar-image.h" #include "empathy-ui-utils.h" +#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT +#include <libempathy/empathy-debug.h> + /* Delay before updating the widget when the id entry changed (seconds) */ #define ID_CHANGED_TIMEOUT 1 @@ -688,6 +691,19 @@ contact_widget_contact_update (EmpathyContactWidget *information) } static void +contact_widget_change_contact_cb (EmpathyContact *contact, + const GError *error, + gpointer information, + GObject *weak_object) +{ + if (error) + DEBUG ("Error: %s", error->message); + else + contact_widget_set_contact (information, contact); + g_object_unref (contact); +} + +static void contact_widget_change_contact (EmpathyContactWidget *information) { EmpathyContact *contact; @@ -717,12 +733,13 @@ contact_widget_change_contact (EmpathyContactWidget *information) if (contact) { - empathy_contact_run_until_ready (contact, + /* Give the contact ref to the callback */ + empathy_contact_call_when_ready (contact, EMPATHY_CONTACT_READY_HANDLE | EMPATHY_CONTACT_READY_ID, - NULL); - contact_widget_set_contact (information, contact); - g_object_unref (contact); + contact_widget_change_contact_cb, + information, NULL, + G_OBJECT (information->vbox_contact_widget)); } } |