[gnome-contacts] Ensure contacts-new-contact is always unset on persona
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Ensure contacts-new-contact is always unset on persona
- Date: Fri, 9 Sep 2011 12:19:02 +0000 (UTC)
commit a157fa41e0a67109171e67e069cc8a545bcb145b
Author: Alexander Larsson <alexl redhat com>
Date: Fri Sep 9 11:40:38 2011 +0200
Ensure contacts-new-contact is always unset on persona
Without this we can get leftovers from an old unlink operation
src/contacts-linking.vala | 2 ++
src/contacts-store.vala | 1 -
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-linking.vala b/src/contacts-linking.vala
index b98d627..f00fa92 100644
--- a/src/contacts-linking.vala
+++ b/src/contacts-linking.vala
@@ -555,5 +555,7 @@ namespace Contacts {
}
// Last we do the removals on the persona_to_unlink
yield persona_apply_attributes (persona_to_unlink, null, persona_to_unlink_removals);
+
+ persona_to_unlink.set_data ("contacts-new-contact", false);
}
}
diff --git a/src/contacts-store.vala b/src/contacts-store.vala
index c8fc616..2ab77d2 100644
--- a/src/contacts-store.vala
+++ b/src/contacts-store.vala
@@ -94,7 +94,6 @@ public class Contacts.Store : GLib.Object {
bool new_contact = false;
foreach (var p in i.personas) {
if (p.get_data<bool> ("contacts-new-contact")) {
- p.set_data ("contacts-new-contact", false);
new_contact = true;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]