diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-03-25 22:57:21 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-03-25 22:57:21 +0200 |
commit | 8569c1277643ea5786810c258e7e811f0971697c (patch) | |
tree | fa69187b438e73eb83d94e5b9748077ade69814e | |
parent | 456ccf698c6b8e76ad1732a5df3e71f3038c2289 (diff) | |
download | gnome-contacts-8569c1277643ea5786810c258e7e811f0971697c.tar.gz |
ContactPane: move some initialization out of the constructor.
-rw-r--r-- | src/contacts-contact-pane.vala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala index f7885dc..484a9f4 100644 --- a/src/contacts-contact-pane.vala +++ b/src/contacts-contact-pane.vala @@ -48,7 +48,7 @@ public class Contacts.ContactPane : Stack { private Box contact_editor_page; private ContactEditor editor; - private SimpleActionGroup edit_contact_actions; + private SimpleActionGroup edit_contact_actions = new SimpleActionGroup (); private const GLib.ActionEntry[] action_entries = { { "add.email-addresses.home", on_add_detail }, { "add.email-addresses.work", on_add_detail }, @@ -63,7 +63,7 @@ public class Contacts.ContactPane : Stack { { "add.notes", on_add_detail }, }; - public bool on_edit_mode; + public bool on_edit_mode = false; private LinkSuggestionGrid? suggestion_grid = null; /* Signals */ @@ -116,11 +116,9 @@ public class Contacts.ContactPane : Stack { this.parent_window = parent_window; this.store = contacts_store; - this.edit_contact_actions = new SimpleActionGroup (); this.edit_contact_actions.add_action_entries (action_entries, this); - /* edit mode widgetry, third page */ - this.on_edit_mode = false; + // Contact editor this.editor = new ContactEditor (this.edit_contact_actions); this.editor.linked_button.clicked.connect (linked_accounts); this.editor.remove_button.clicked.connect (delete_contact); |