aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-09 23:07:56 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-09 23:16:48 +0800
commit52d15a1d9e54d6311012ffad54d7e7881ab48f55 (patch)
treea82ed1d1a315ea4bf1c959e004f99d34663d7310 /libempathy-gtk
parentde12575fb9f2e1b4945798ad44c225faa78d333d (diff)
downloadgsoc2013-empathy-52d15a1d9e54d6311012ffad54d7e7881ab48f55.tar
gsoc2013-empathy-52d15a1d9e54d6311012ffad54d7e7881ab48f55.tar.gz
gsoc2013-empathy-52d15a1d9e54d6311012ffad54d7e7881ab48f55.tar.bz2
gsoc2013-empathy-52d15a1d9e54d6311012ffad54d7e7881ab48f55.tar.lz
gsoc2013-empathy-52d15a1d9e54d6311012ffad54d7e7881ab48f55.tar.xz
gsoc2013-empathy-52d15a1d9e54d6311012ffad54d7e7881ab48f55.tar.zst
gsoc2013-empathy-52d15a1d9e54d6311012ffad54d7e7881ab48f55.zip
contact-widget: don't allow edit fields having the Overwritten_By_Nickname flag (#644296)
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-widget.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 464364cb7..352476711 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -441,6 +441,7 @@ contact_widget_details_update_edit (EmpathyContactWidget *information)
TpContactInfoField *field = l->data;
InfoFieldData *field_data;
GtkWidget *w;
+ TpContactInfoFieldSpec *spec;
field_data = find_info_field_data (field->field_name);
if (field_data == NULL)
@@ -452,6 +453,18 @@ contact_widget_details_update_edit (EmpathyContactWidget *information)
continue;
}
+ spec = get_spec_from_list (specs, field->field_name);
+ /* We shouldn't have added the field to details_to_set if it's not
+ * supported by the CM */
+ g_assert (spec != NULL);
+
+ if (spec->flags & TP_CONTACT_INFO_FIELD_FLAG_OVERWRITTEN_BY_NICKNAME)
+ {
+ DEBUG ("Ignoring field '%s' due it to having the "
+ "Overwritten_By_Nickname flag", field->field_name);
+ continue;
+ }
+
/* Add Title */
w = gtk_label_new (_(field_data->title));
gtk_table_attach (GTK_TABLE (information->table_details),