summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErick Pérez Castellanos <erick.red@gmail.com>2014-08-10 13:50:13 -0400
committerErick Pérez Castellanos <erick.red@gmail.com>2014-08-11 08:55:33 -0400
commita71d4bb7434a8f2da50d00dd924e3935b6fd1098 (patch)
tree694cfdd0c740efdbc7f9c372c695b0ebf2feed95 /src
parent30a91bda9e25e6fcaa49a640c1a31e4698cc24c0 (diff)
downloadgnome-contacts-a71d4bb7434a8f2da50d00dd924e3935b6fd1098.tar.gz
ContactPane: provide API to handle inline contact creation
This will be used from Window till we can remove all the logic from ContactPane
Diffstat (limited to 'src')
-rw-r--r--src/contacts-contact-pane.vala21
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");
+ }
}