diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-03-14 17:56:49 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-03-16 17:28:41 +0800 |
commit | ede1523b824fef2f72b8d60f4efdf78a4fc4a768 (patch) | |
tree | 3f547920738d329f81a99b7a3a7a9d429fb1e2b0 /libempathy-gtk | |
parent | ee6ab13d16db6426e81d7eb00e5bb97cf1f89e2c (diff) | |
download | gsoc2013-empathy-ede1523b824fef2f72b8d60f4efdf78a4fc4a768.tar gsoc2013-empathy-ede1523b824fef2f72b8d60f4efdf78a4fc4a768.tar.gz gsoc2013-empathy-ede1523b824fef2f72b8d60f4efdf78a4fc4a768.tar.bz2 gsoc2013-empathy-ede1523b824fef2f72b8d60f4efdf78a4fc4a768.tar.lz gsoc2013-empathy-ede1523b824fef2f72b8d60f4efdf78a4fc4a768.tar.xz gsoc2013-empathy-ede1523b824fef2f72b8d60f4efdf78a4fc4a768.tar.zst gsoc2013-empathy-ede1523b824fef2f72b8d60f4efdf78a4fc4a768.zip |
Don't display parameters if Parameters_Exact is not Set
There is no point cluttering the UI with it as we don't allow user to choose
which param he wants to set.
https://bugzilla.gnome.org/show_bug.cgi?id=671983
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contactinfo-utils.c | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contactinfo-utils.h | 3 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-widget.c | 2 |
4 files changed, 15 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 1b04fb751..edeec31f4 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -409,10 +409,14 @@ contact_widget_details_update_edit (EmpathyContactWidget *information) /* Add Title */ title = empathy_contact_info_field_label (field->field_name, - field->parameters); + field->parameters, + (spec->flags & TP_CONTACT_INFO_FIELD_FLAG_PARAMETERS_EXACT)); w = gtk_label_new (title); g_free (title); + /* TODO: if TP_CONTACT_INFO_FIELD_FLAG_PARAMETERS_EXACT is not set we + * should allow user to tag the vCard fields (bgo#672034) */ + gtk_grid_attach (GTK_GRID (information->grid_details), w, 0, n_rows, 1, 1); @@ -529,7 +533,7 @@ contact_widget_details_update_show (EmpathyContactWidget *information) /* Add Title */ title = empathy_contact_info_field_label (field->field_name, - field->parameters); + field->parameters, TRUE); title_widget = gtk_label_new (title); g_free (title); diff --git a/libempathy-gtk/empathy-contactinfo-utils.c b/libempathy-gtk/empathy-contactinfo-utils.c index b995297b0..270566721 100644 --- a/libempathy-gtk/empathy-contactinfo-utils.c +++ b/libempathy-gtk/empathy-contactinfo-utils.c @@ -213,15 +213,19 @@ 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); else diff --git a/libempathy-gtk/empathy-contactinfo-utils.h b/libempathy-gtk/empathy-contactinfo-utils.h index a49e807aa..b91f419c8 100644 --- a/libempathy-gtk/empathy-contactinfo-utils.h +++ b/libempathy-gtk/empathy-contactinfo-utils.h @@ -34,7 +34,8 @@ const char **empathy_contact_info_get_field_names (guint *nnames); gboolean empathy_contact_info_lookup_field (const gchar *field_name, const gchar **title, EmpathyContactInfoFormatFunc *linkify); char *empathy_contact_info_field_label (const char *field_name, - GStrv parameters); + GStrv parameters, + gboolean show_parameters); gint empathy_contact_info_field_cmp (TpContactInfoField *field1, TpContactInfoField *field2); diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c index 3cbd1d5e3..e103eff6d 100644 --- a/libempathy-gtk/empathy-individual-widget.c +++ b/libempathy-gtk/empathy-individual-widget.c @@ -267,7 +267,7 @@ details_update_show (EmpathyIndividualWidget *self, /* Add Title */ title = empathy_contact_info_field_label (field->field_name, - field->parameters); + field->parameters, TRUE); title_widget = gtk_label_new (title); /* Add Value */ |