summaryrefslogtreecommitdiff
path: root/src/contacts-contact-pane.vala
diff options
context:
space:
mode:
authorErick Pérez Castellanos <erick.red@gmail.com>2014-08-10 18:14:17 -0400
committerErick Pérez Castellanos <erick.red@gmail.com>2014-08-11 08:55:35 -0400
commita76f8ee95364a77cb95dad6e6e94cdebe7cbbb20 (patch)
tree7abccd2e060b2449061be8160c1ef5e10baa41f8 /src/contacts-contact-pane.vala
parent919dfcabe37e90b4e9fb0e2c8444b362d37b466d (diff)
downloadgnome-contacts-a76f8ee95364a77cb95dad6e6e94cdebe7cbbb20.tar.gz
ContactPane: commit avatar changes when editing or creating
With this commit ends the work on inline contact creation Fixed: https://bugzilla.gnome.org/show_bug.cgi?id=699324
Diffstat (limited to 'src/contacts-contact-pane.vala')
-rw-r--r--src/contacts-contact-pane.vala17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 022fa01..fad313c 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -387,6 +387,18 @@ public class Contacts.ContactPane : Notebook {
}
});
}
+ if (editor.avatar_changed ()) {
+ var v = editor.get_avatar_value ();
+ Contact.set_individual_property.begin (contact,
+ "avatar", v,
+ (obj, result) => {
+ try {
+ Contact.set_individual_property.end (result);
+ } catch (GLib.Error e) {
+ App.app.show_message (e.message);
+ }
+ });
+ }
}
editor.clear ();
@@ -424,6 +436,11 @@ public class Contacts.ContactPane : Notebook {
details.set ("full-name", v);
}
+ if (editor.avatar_changed ()) {
+ var v = editor.get_avatar_value ();
+ details.set ("avatar", v);
+ }
+
foreach (var prop in editor.properties_changed ().entries) {
details.set (prop.key, prop.value.value);
}