aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-20 22:10:01 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-20 23:10:53 +0800
commita63a58b777180d1b5c9eee39faab5edd891ac80d (patch)
treedb3bc233082fca34752442dfad73df8c199521b9 /libempathy-gtk
parent4c7d5bbab4325fbfae01a0d2ef58756403c18fb7 (diff)
downloadgsoc2013-empathy-a63a58b777180d1b5c9eee39faab5edd891ac80d.tar
gsoc2013-empathy-a63a58b777180d1b5c9eee39faab5edd891ac80d.tar.gz
gsoc2013-empathy-a63a58b777180d1b5c9eee39faab5edd891ac80d.tar.bz2
gsoc2013-empathy-a63a58b777180d1b5c9eee39faab5edd891ac80d.tar.lz
gsoc2013-empathy-a63a58b777180d1b5c9eee39faab5edd891ac80d.tar.xz
gsoc2013-empathy-a63a58b777180d1b5c9eee39faab5edd891ac80d.tar.zst
gsoc2013-empathy-a63a58b777180d1b5c9eee39faab5edd891ac80d.zip
Add an "account" column to EmpathyPersonaStore
This stores the display name of the PersonaStore for each Persona.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-persona-store.c9
-rw-r--r--libempathy-gtk/empathy-persona-store.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-persona-store.c b/libempathy-gtk/empathy-persona-store.c
index beb71c743..7997150bc 100644
--- a/libempathy-gtk/empathy-persona-store.c
+++ b/libempathy-gtk/empathy-persona-store.c
@@ -279,6 +279,7 @@ add_persona (EmpathyPersonaStore *self,
EmpathyPersonaStorePriv *priv;
GtkTreeIter iter;
GtkTreePath *path;
+ FolksPersonaStore *store;
EmpathyContact *contact;
const gchar *alias;
@@ -293,9 +294,12 @@ add_persona (EmpathyPersonaStore *self,
contact = empathy_contact_dup_from_tp_contact (tpf_persona_get_contact (
TPF_PERSONA (persona)));
+ store = folks_persona_get_store (persona);
gtk_list_store_insert_with_values (GTK_LIST_STORE (self), &iter, 0,
EMPATHY_PERSONA_STORE_COL_NAME, alias,
+ EMPATHY_PERSONA_STORE_COL_ACCOUNT_NAME,
+ folks_persona_store_get_display_name (store),
EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
folks_persona_get_display_id (persona),
EMPATHY_PERSONA_STORE_COL_PERSONA, persona,
@@ -419,6 +423,7 @@ update_persona (EmpathyPersonaStore *self,
}
else
{
+ FolksPersonaStore *store;
EmpathyContact *contact;
GtkTreeIter iter;
GdkPixbuf *pixbuf_avatar;
@@ -462,6 +467,7 @@ update_persona (EmpathyPersonaStore *self,
/* We still need to use EmpathyContact for the capabilities stuff */
contact = empathy_contact_dup_from_tp_contact (tpf_persona_get_contact (
TPF_PERSONA (persona)));
+ store = folks_persona_get_store (persona);
pixbuf_avatar = empathy_pixbuf_avatar_from_contact_scaled (contact,
32, 32);
@@ -472,6 +478,8 @@ update_persona (EmpathyPersonaStore *self,
EMPATHY_PERSONA_STORE_COL_PIXBUF_AVATAR, pixbuf_avatar,
EMPATHY_PERSONA_STORE_COL_PIXBUF_AVATAR_VISIBLE, priv->show_avatars,
EMPATHY_PERSONA_STORE_COL_NAME, alias,
+ EMPATHY_PERSONA_STORE_COL_ACCOUNT_NAME,
+ folks_persona_store_get_display_name (store),
EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
folks_persona_get_display_id (persona),
EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE,
@@ -734,6 +742,7 @@ set_up (EmpathyPersonaStore *self)
GDK_TYPE_PIXBUF, /* Avatar pixbuf */
G_TYPE_BOOLEAN, /* Avatar pixbuf visible */
G_TYPE_STRING, /* Name */
+ G_TYPE_STRING, /* Account name */
G_TYPE_STRING, /* Display ID */
G_TYPE_UINT, /* Presence type */
G_TYPE_STRING, /* Status string */
diff --git a/libempathy-gtk/empathy-persona-store.h b/libempathy-gtk/empathy-persona-store.h
index 8c3759985..892f8fa72 100644
--- a/libempathy-gtk/empathy-persona-store.h
+++ b/libempathy-gtk/empathy-persona-store.h
@@ -58,6 +58,7 @@ typedef enum
EMPATHY_PERSONA_STORE_COL_PIXBUF_AVATAR,
EMPATHY_PERSONA_STORE_COL_PIXBUF_AVATAR_VISIBLE,
EMPATHY_PERSONA_STORE_COL_NAME,
+ EMPATHY_PERSONA_STORE_COL_ACCOUNT_NAME,
EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE,
EMPATHY_PERSONA_STORE_COL_STATUS,