[gnome-contacts] misc: move ::change_avatar to ContactEditor source



commit 17abc28ba1d6a3b36cfd887a80203aaa31f2b73c
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Sat Aug 9 17:53:31 2014 -0400

    misc: move ::change_avatar to ContactEditor source
    
    This was previously misplaced, now, with the cleaning you can tell easily.

 src/contacts-contact-editor.vala |   21 +++++++++++++++++++++
 src/contacts-contact-pane.vala   |   21 ---------------------
 2 files changed, 21 insertions(+), 21 deletions(-)
---
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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]