[gnome-contacts] ContactPane: provide API to handle inline contact creation



commit a71d4bb7434a8f2da50d00dd924e3935b6fd1098
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Sun Aug 10 13:50:13 2014 -0400

    ContactPane: provide API to handle inline contact creation
    
    This will be used from Window till we can remove all the logic from ContactPane

 src/contacts-contact-pane.vala |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index c03f030..cd49216 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -396,4 +396,25 @@ public class Contacts.ContactPane : Notebook {
       set_current_page (1);
     }
   }
+
+  public void new_contact () {
+    on_edit_mode = true;
+
+    sheet.clear ();
+
+    if (suggestion_grid != null) {
+      suggestion_grid.destroy ();
+      suggestion_grid = null;
+    }
+
+    editor.set_new_contact ();
+
+    set_current_page (2);
+  }
+
+  public void create_contact () {
+    on_edit_mode = false;
+    set_current_page (1);
+    debug ("called contact creation statement");
+  }
 }


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