aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-14 04:24:34 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-14 04:24:34 +0800
commitebb19163f07b57187f105605a63b079d87929717 (patch)
treeb27cf8b3e040b7649f51d8e7f818c0698a404de7 /libempathy-gtk
parent5b598e3bcc5ce0ae1192fbad01a39f3d51fb40fc (diff)
downloadgsoc2013-empathy-ebb19163f07b57187f105605a63b079d87929717.tar
gsoc2013-empathy-ebb19163f07b57187f105605a63b079d87929717.tar.gz
gsoc2013-empathy-ebb19163f07b57187f105605a63b079d87929717.tar.bz2
gsoc2013-empathy-ebb19163f07b57187f105605a63b079d87929717.tar.lz
gsoc2013-empathy-ebb19163f07b57187f105605a63b079d87929717.tar.xz
gsoc2013-empathy-ebb19163f07b57187f105605a63b079d87929717.tar.zst
gsoc2013-empathy-ebb19163f07b57187f105605a63b079d87929717.zip
If chats have no name, use the channel's ID instead of fallback to "Conversation". Fixes bug #560611.
svn path=/trunk/; revision=1717
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 1dd3908b4..fe289539c 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -118,6 +118,7 @@ chat_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
+ EmpathyChat *chat = EMPATHY_CHAT (object);
EmpathyChatPriv *priv = GET_PRIV (object);
switch (param_id) {
@@ -128,7 +129,7 @@ chat_get_property (GObject *object,
g_value_set_object (value, priv->account);
break;
case PROP_NAME:
- g_value_set_string (value, priv->name);
+ g_value_set_string (value, empathy_chat_get_name (chat));
break;
case PROP_ID:
g_value_set_string (value, priv->id);
@@ -1641,10 +1642,19 @@ const gchar *
empathy_chat_get_name (EmpathyChat *chat)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
+ const gchar *ret;
g_return_val_if_fail (EMPATHY_IS_CHAT (chat), NULL);
- return priv->name;
+ ret = priv->name;
+ if (!ret && priv->remote_contact) {
+ ret = empathy_contact_get_name (priv->remote_contact);
+ }
+
+ if (!ret)
+ ret = priv->id;
+
+ return ret ? ret : _("Conversation");
}
const gchar *