* Danielle Madeley <danielle.madeley@collabora.co.uk>
*/
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
+#include "config.h"
#include <glib/gi18n-lib.h>
-#include <telepathy-glib/util.h>
-
-#include <libempathy/empathy-time.h>
-#include <libempathy/empathy-request-util.h>
+#include "libempathy/empathy-time.h"
+#include "libempathy/empathy-request-util.h"
#include "empathy-contactinfo-utils.h"
#include "empathy-string-parser.h"
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);