summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErick Pérez Castellanos <erick.red@gmail.com>2014-08-10 16:56:51 -0400
committerErick Pérez Castellanos <erick.red@gmail.com>2014-08-11 08:55:34 -0400
commit1a94c642c1dde25a2e63d647cc13841e3c218c5a (patch)
tree78bde435d943e088302a8a6cf293de77bb9c8b4c /src
parentd940dbaed73cff3f76ef5b2c5819548b6e7779ec (diff)
downloadgnome-contacts-1a94c642c1dde25a2e63d647cc13841e3c218c5a.tar.gz
Window: fix leave edit-mode behavior
Diffstat (limited to 'src')
-rw-r--r--src/contacts-window.vala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/contacts-window.vala b/src/contacts-window.vala
index 3f52e2a..2b2f96b 100644
--- a/src/contacts-window.vala
+++ b/src/contacts-window.vala
@@ -258,21 +258,21 @@ public class Contacts.Window : Gtk.ApplicationWindow {
public void leave_edit_mode (bool drop_changes = false) {
edit_mode = false;
-
left_toolbar.get_style_context ().remove_class ("selection-mode");
right_toolbar.get_style_context ().remove_class ("selection-mode");
-
if (new_contact_mode) {
done_button.label = _("Done");
- }
- if (drop_changes) {
+ if (drop_changes) {
+ contact_pane.set_edit_mode (false, drop_changes);
+ } else {
+ contact_pane.create_contact ();
+ }
+ new_contact_mode = false;
+ } else {
contact_pane.set_edit_mode (false, drop_changes);
- } else if (new_contact_mode) {
- contact_pane.create_contact ();
}
- new_contact_mode = false;
if (contact_pane.contact != null) {
right_title = contact_pane.contact.display_name;