aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-06-19 20:47:54 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-06-19 20:47:54 +0800
commit9f95363af33241508cdaee757b6f08846a575368 (patch)
tree54583c5a1297c65bcf336959fad96e5971e142d5
parent8be8655930e30adab5cedb41c0bb03e6c1305189 (diff)
downloadgsoc2013-empathy-9f95363af33241508cdaee757b6f08846a575368.tar
gsoc2013-empathy-9f95363af33241508cdaee757b6f08846a575368.tar.gz
gsoc2013-empathy-9f95363af33241508cdaee757b6f08846a575368.tar.bz2
gsoc2013-empathy-9f95363af33241508cdaee757b6f08846a575368.tar.lz
gsoc2013-empathy-9f95363af33241508cdaee757b6f08846a575368.tar.xz
gsoc2013-empathy-9f95363af33241508cdaee757b6f08846a575368.tar.zst
gsoc2013-empathy-9f95363af33241508cdaee757b6f08846a575368.zip
Fix the bug "Incoming call from (null)" (Alban Crequy)
The status icon uses empathy_contact_get_name() to print the name of the calling contact. It uses empathy_contact_run_until_ready() to wait the return of GetAliases(). If GetAliases() failed for whatever reason, the name will be NULL and empathy_contact_get_name() will fallback to the id. If GetHandle() has not yet returned, the id is not ready and empathy_contact_run_until_ready() must wait the id to be available. svn path=/trunk/; revision=1179
-rw-r--r--libempathy/empathy-contact.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 48e045425..bfa9966da 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -746,6 +746,15 @@ contact_is_ready_func (GObject *contact,
ready = GPOINTER_TO_UINT (user_data);
+ /* When the name is NULL, empathy_contact_get_name() fallback to the id.
+ * When the caller want to wait the name to be ready, it also want to wait
+ * the id to be ready in case of fallback. */
+ if ((ready | EMPATHY_CONTACT_READY_NAME) &&
+ G_STR_EMPTY (priv->name))
+ {
+ ready |= EMPATHY_CONTACT_READY_ID;
+ }
+
return (priv->ready & ready) == ready;
}