aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-log-window.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-22 00:53:28 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-05 00:50:21 +0800
commit5e782bf815c2bd9fb2ae05812c1cd946260c8a1b (patch)
tree65b85dc6a52b4d6734f8052912eff95e9dd4eeaa /libempathy-gtk/empathy-log-window.c
parent858a4d27abd2f040d44eaeda17f618a1a63b1631 (diff)
downloadgsoc2013-empathy-5e782bf815c2bd9fb2ae05812c1cd946260c8a1b.tar
gsoc2013-empathy-5e782bf815c2bd9fb2ae05812c1cd946260c8a1b.tar.gz
gsoc2013-empathy-5e782bf815c2bd9fb2ae05812c1cd946260c8a1b.tar.bz2
gsoc2013-empathy-5e782bf815c2bd9fb2ae05812c1cd946260c8a1b.tar.lz
gsoc2013-empathy-5e782bf815c2bd9fb2ae05812c1cd946260c8a1b.tar.xz
gsoc2013-empathy-5e782bf815c2bd9fb2ae05812c1cd946260c8a1b.tar.zst
gsoc2013-empathy-5e782bf815c2bd9fb2ae05812c1cd946260c8a1b.zip
LogWindow: really show the users' alias in the Who pane
https://bugzilla.gnome.org/show_bug.cgi?id=653116
Diffstat (limited to 'libempathy-gtk/empathy-log-window.c')
-rw-r--r--libempathy-gtk/empathy-log-window.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 5c7ad904a..761016069 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -1649,18 +1649,24 @@ populate_entities_from_search_hits (void)
if (!has_element)
{
TplEntityType type = tpl_entity_get_entity_type (hit->target);
+ EmpathyContact *contact;
gboolean room = type == TPL_ENTITY_ROOM;
+ contact = empathy_contact_from_tpl_contact (hit->account,
+ hit->target);
+
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
COL_WHO_TYPE, COL_TYPE_NORMAL,
COL_WHO_ICON, room ? EMPATHY_IMAGE_GROUP_MESSAGE
: EMPATHY_IMAGE_AVATAR_DEFAULT,
- COL_WHO_NAME, tpl_entity_get_alias (hit->target),
+ COL_WHO_NAME, empathy_contact_get_alias (contact),
COL_WHO_ID, tpl_entity_get_identifier (hit->target),
COL_WHO_ACCOUNT, hit->account,
COL_WHO_TARGET, hit->target,
-1);
+
+ g_object_unref (contact);
}
}
@@ -1980,19 +1986,24 @@ log_manager_got_entities_cb (GObject *manager,
{
TplEntity *entity = TPL_ENTITY (l->data);
TplEntityType type = tpl_entity_get_entity_type (entity);
+ EmpathyContact *contact;
gboolean room = type == TPL_ENTITY_ROOM;
+ contact = empathy_contact_from_tpl_contact (ctx->account, entity);
+
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
COL_WHO_TYPE, COL_TYPE_NORMAL,
COL_WHO_ICON, room ? EMPATHY_IMAGE_GROUP_MESSAGE
: EMPATHY_IMAGE_AVATAR_DEFAULT,
- COL_WHO_NAME, tpl_entity_get_alias (entity),
+ COL_WHO_NAME, empathy_contact_get_alias (contact),
COL_WHO_ID, tpl_entity_get_identifier (entity),
COL_WHO_ACCOUNT, ctx->account,
COL_WHO_TARGET, entity,
-1);
+ g_object_unref (contact);
+
if (ctx->self->priv->selected_account != NULL &&
!tp_strdiff (tp_proxy_get_object_path (ctx->account),
tp_proxy_get_object_path (ctx->self->priv->selected_account)))