[gnome-contacts] ContactPane: Handle set_edit_mode to the current state silently
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] ContactPane: Handle set_edit_mode to the current state silently
- Date: Wed, 12 Jun 2013 09:16:10 +0000 (UTC)
commit 0c70540bea80ec23e7bb62132e21b03d1458dfbc
Author: Alexander Larsson <alexl redhat com>
Date: Wed Jun 12 11:13:23 2013 +0200
ContactPane: Handle set_edit_mode to the current state silently
When deleting a contect we're currently calling set_edit_mode(false)
twice. This was causing a warning when looking if the name changed
(since the name_entry was destroyed).
src/contacts-contact-pane.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 137ecd0..645c8e1 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -516,6 +516,9 @@ public class Contacts.ContactPane : Notebook {
}
public void set_edit_mode (bool on_edit) {
+ if (on_edit == on_edit_mode)
+ return;
+
if (on_edit) {
if (contact == null) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]