diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-05-11 00:40:25 +0800 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-05-16 20:31:04 +0800 |
commit | d5ddca2ac157b52b04b418d51530505d378b3dd5 (patch) | |
tree | 196d8c7e9d990728d143af30d266a7882f0ca897 /libempathy-gtk | |
parent | 5eb74b177084b3cd03e412ea3b7f55b41542a9fe (diff) | |
download | gsoc2013-empathy-d5ddca2ac157b52b04b418d51530505d378b3dd5.tar gsoc2013-empathy-d5ddca2ac157b52b04b418d51530505d378b3dd5.tar.gz gsoc2013-empathy-d5ddca2ac157b52b04b418d51530505d378b3dd5.tar.bz2 gsoc2013-empathy-d5ddca2ac157b52b04b418d51530505d378b3dd5.tar.lz gsoc2013-empathy-d5ddca2ac157b52b04b418d51530505d378b3dd5.tar.xz gsoc2013-empathy-d5ddca2ac157b52b04b418d51530505d378b3dd5.tar.zst gsoc2013-empathy-d5ddca2ac157b52b04b418d51530505d378b3dd5.zip |
ContactWidget: support IRC server and host info
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 1b2570de2..39bac969c 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -311,6 +311,17 @@ format_idle_time (GStrv values) return empathy_duration_to_string (duration); } +static gchar * +format_server (GStrv values) +{ + g_assert (values[0] != NULL); + + if (values[1] == NULL) + return g_markup_escape_text (values[0], -1); + else + return g_markup_printf_escaped ("%s (%s)", values[0], values[1]); +} + static InfoFieldData info_field_datas[] = { { "fn", N_("Full name:"), NULL }, @@ -324,6 +335,9 @@ static InfoFieldData info_field_datas[] = * with their IM client. */ { "x-idle-time", N_("Last seen:"), format_idle_time }, + { "x-irc-server", N_("Server:"), format_server }, + { "x-host", N_("Connected from:"), format_server }, + { NULL, NULL } }; |