diff --git a/src/contacts-contact-editor.vala b/src/contacts-contact-editor.vala index a6c6896..e50d862 100644 --- a/src/contacts-contact-editor.vala +++ b/src/contacts-contact-editor.vala @@ -20,6 +20,27 @@ using Gtk; using Folks; using Gee; +namespace Contacts { + public static void change_avatar (Contact contact, ContactFrame image_frame) { + var dialog = new AvatarDialog (contact); + dialog.show (); + dialog.set_avatar.connect ( (icon) => { + Value v = Value (icon.get_type ()); + v.set_object (icon); + 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); + image_frame.set_image (contact.individual, contact); + } + }); + }); + } +} + public class Contacts.AddressEditor : Box { public Entry? entries[7]; public PostalAddressFieldDetails details; diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala index 161761c..1e94182 100644 --- a/src/contacts-contact-pane.vala +++ b/src/contacts-contact-pane.vala @@ -22,27 +22,6 @@ using Gee; const int PROFILE_SIZE = 96; -namespace Contacts { - public static void change_avatar (Contact contact, ContactFrame image_frame) { - var dialog = new AvatarDialog (contact); - dialog.show (); - dialog.set_avatar.connect ( (icon) => { - Value v = Value (icon.get_type ()); - v.set_object (icon); - 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); - image_frame.set_image (contact.individual, contact); - } - }); - }); - } -} - public class Contacts.ContactPane : Notebook { private Store _store;