aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-widget.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-05-11 00:44:03 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2011-05-16 20:31:04 +0800
commitaf9646511992294411549884521130056f34f455 (patch)
tree835197b2f447126b5c11b15bf9e4e43dba2ad665 /libempathy-gtk/empathy-contact-widget.c
parentd5ddca2ac157b52b04b418d51530505d378b3dd5 (diff)
downloadgsoc2013-empathy-af9646511992294411549884521130056f34f455.tar
gsoc2013-empathy-af9646511992294411549884521130056f34f455.tar.gz
gsoc2013-empathy-af9646511992294411549884521130056f34f455.tar.bz2
gsoc2013-empathy-af9646511992294411549884521130056f34f455.tar.lz
gsoc2013-empathy-af9646511992294411549884521130056f34f455.tar.xz
gsoc2013-empathy-af9646511992294411549884521130056f34f455.tar.zst
gsoc2013-empathy-af9646511992294411549884521130056f34f455.zip
ContactWidget: expose IRC presence information
This is basically just a temporary hack until Idle implements SimplePresence.
Diffstat (limited to 'libempathy-gtk/empathy-contact-widget.c')
-rw-r--r--libempathy-gtk/empathy-contact-widget.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 39bac969c..14042bf61 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -322,6 +322,15 @@ format_server (GStrv values)
return g_markup_printf_escaped ("%s (%s)", values[0], values[1]);
}
+static gchar *
+presence_hack (GStrv values)
+{
+ if (tp_str_empty (values[0]))
+ return NULL;
+
+ return g_markup_escape_text (values[0], -1);
+}
+
static InfoFieldData info_field_datas[] =
{
{ "fn", N_("Full name:"), NULL },
@@ -338,6 +347,11 @@ static InfoFieldData info_field_datas[] =
{ "x-irc-server", N_("Server:"), format_server },
{ "x-host", N_("Connected from:"), format_server },
+ /* FIXME: once Idle implements SimplePresence using this information, we can
+ * and should bin this.
+ */
+ { "x-presence-status-message", N_("Away message:"), presence_hack },
+
{ NULL, NULL }
};