[gnome-contacts] Window: fix leave edit-mode behavior
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Window: fix leave edit-mode behavior
- Date: Mon, 11 Aug 2014 12:58:04 +0000 (UTC)
commit 1a94c642c1dde25a2e63d647cc13841e3c218c5a
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Sun Aug 10 16:56:51 2014 -0400
Window: fix leave edit-mode behavior
src/contacts-window.vala | 14 +++++++-------
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]