diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2014-02-16 14:20:08 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-02-24 16:10:57 +0000 |
commit | 64f9b61cca4757546abcab12195bd2b40c654ea6 (patch) | |
tree | 3ff864f0970e616c4a85830feb5d18e64ac4f565 /src/contacts-contact-editor.vala | |
parent | be6bd192e8bba92afc788de0079dbf079a5d5e12 (diff) | |
download | gnome-contacts-64f9b61cca4757546abcab12195bd2b40c654ea6.tar.gz |
contact-editor: Don’t create empty NoteFieldDetails
It’s explicitly banned by the folks API documentation and results in
warnings from folks.
https://bugzilla.gnome.org/show_bug.cgi?id=701990
Diffstat (limited to 'src/contacts-contact-editor.vala')
-rw-r--r-- | src/contacts-contact-editor.vala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/contacts-contact-editor.vala b/src/contacts-contact-editor.vala index ab59205..ac120c7 100644 --- a/src/contacts-contact-editor.vala +++ b/src/contacts-contact-editor.vala @@ -158,8 +158,10 @@ public class Contacts.ContactEditor : Grid { text.get_buffer ().get_start_iter (out start); text.get_buffer ().get_end_iter (out end); var value = text.get_buffer ().get_text (start, end, true); - var details = new NoteFieldDetails (value, row_entry.value.details.parameters); - new_details.add (details); + if (value != "") { + var details = new NoteFieldDetails (value, row_entry.value.details.parameters); + new_details.add (details); + } } var new_value = Value (new_details.get_type ()); new_value.set_object (new_details); |