]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-contactinfo-utils.c
include telepathy-glib.h
[empathy.git] / libempathy-gtk / empathy-contactinfo-utils.c
index 695d1ee3c8a2ccf057ef18aeed422ecbbfc530c4..5e4fad7877c07121a3a8c4e36834574766cc24e7 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <glib/gi18n-lib.h>
 
-#include <telepathy-glib/util.h>
-
 #include <libempathy/empathy-time.h>
 #include <libempathy/empathy-request-util.h>
 
@@ -213,19 +211,23 @@ build_parameters_string (GStrv parameters)
 
 char *
 empathy_contact_info_field_label (const char *field_name,
-    GStrv parameters)
+    GStrv parameters,
+    gboolean show_parameters)
 {
   char *ret;
   const char *title;
-  char *join = build_parameters_string (parameters);
+  char *join = NULL;
 
   if (!empathy_contact_info_lookup_field (field_name, &title, NULL))
     return NULL;
 
+  if (show_parameters)
+    join = build_parameters_string (parameters);
+
   if (join != NULL)
-    ret = g_strdup_printf ("%s (%s):", title, join);
+    ret = g_strdup_printf ("%s (%s)", title, join);
   else
-    ret = g_strdup_printf ("%s:", title);
+    ret = g_strdup_printf ("%s", title);
 
   g_free (join);
 
@@ -314,7 +316,7 @@ empathy_contact_info_create_channel_list_label (TpAccount *account,
         g_string_append (label_markup, ", ");
 
       g_string_append_printf (label_markup, "<a href='%s'>%s</a>",
-          escaped, channel_name);
+          escaped, escaped);
       g_free (escaped);
     }