diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-04-14 16:10:31 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-04-14 16:10:31 +0200 |
commit | aec895206f9ee308f75f3ffa4008d7fc1ec853b0 (patch) | |
tree | 1d645d6d4648f9a2a88c6ed4df0a2a59495e5022 /src/contacts-window.vala | |
parent | 1a65ee457b0724d2f4c52830ba4ed9e826a91d08 (diff) | |
download | gnome-contacts-aec895206f9ee308f75f3ffa4008d7fc1ec853b0.tar.gz |
ContactPane: split set_edit_mode in 2 methods.
* A start_editing() method
* A stop_editing() method
Also clean up those methods a bit.
Diffstat (limited to 'src/contacts-window.vala')
-rw-r--r-- | src/contacts-window.vala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/contacts-window.vala b/src/contacts-window.vala index f74a5a7..59c6d8b 100644 --- a/src/contacts-window.vala +++ b/src/contacts-window.vala @@ -231,8 +231,7 @@ public class Contacts.Window : Gtk.ApplicationWindow { var name = this.contact_pane.contact.individual.display_name; this.right_header.title = _("Editing %s").printf (name); - - this.contact_pane.set_edit_mode (true); + this.contact_pane.start_editing (); } [GtkCallback] @@ -249,13 +248,13 @@ public class Contacts.Window : Gtk.ApplicationWindow { if (this.state == UiState.CREATING) { if (drop_changes) { - this.contact_pane.set_edit_mode (false, drop_changes); + this.contact_pane.stop_editing (drop_changes); } else { this.contact_pane.create_contact.begin (); } this.state = UiState.NORMAL; } else { - this.contact_pane.set_edit_mode (false, drop_changes); + this.contact_pane.stop_editing (drop_changes); this.state = UiState.SHOWING; } |