]> git.0d.be Git - empathy.git/commitdiff
ContactWidget: support IRC server and host info
authorWill Thompson <will.thompson@collabora.co.uk>
Tue, 10 May 2011 16:40:25 +0000 (17:40 +0100)
committerWill Thompson <will.thompson@collabora.co.uk>
Mon, 16 May 2011 12:31:04 +0000 (13:31 +0100)
libempathy-gtk/empathy-contact-widget.c

index 1b2570de24f2fcd3e354e29281db540542bbc1c2..39bac969c18e783fbf0fbfbf2a19f52f4d2b00fd 100644 (file)
@@ -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 }
 };