[gnome-contacts] ContactPane: commit avatar changes when editing or creating
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] ContactPane: commit avatar changes when editing or creating
- Date: Mon, 11 Aug 2014 12:58:30 +0000 (UTC)
commit a76f8ee95364a77cb95dad6e6e94cdebe7cbbb20
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Sun Aug 10 18:14:17 2014 -0400
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
src/contacts-contact-pane.vala | 17 +++++++++++++++++
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]