[folks] Let the IndividualAggregator designate one PersonaStore as its writeable store
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Let the IndividualAggregator designate one PersonaStore as its writeable store
- Date: Mon, 9 Aug 2010 17:44:39 +0000 (UTC)
commit e40ce9fc94c6a30670e586cfb68db09de934a829
Author: Philip Withnall <philip withnall collabora co uk>
Date: Fri Aug 6 11:20:59 2010 +0100
Let the IndividualAggregator designate one PersonaStore as its writeable store
folks/individual-aggregator.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index ccc5a9b..63145e9 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -47,6 +47,7 @@ public class Folks.IndividualAggregator : Object
{
private BackendStore backend_store;
private HashMap<string, PersonaStore> stores;
+ private unowned PersonaStore writeable_store;
private HashSet<Backend> backends;
private HashTable<string, Individual> link_map;
@@ -157,6 +158,7 @@ public class Folks.IndividualAggregator : Object
if (store.type_id == "key-file")
{
store.trust_level = PersonaStoreTrust.FULL;
+ this.writeable_store = store;
}
this.stores.set (store_id, store);
@@ -183,10 +185,12 @@ public class Folks.IndividualAggregator : Object
store.personas_changed.disconnect (this.personas_changed_cb);
store.notify["trust-level"].disconnect (this.trust_level_changed_cb);
- /* no need to remove this stores' personas from all the individuals, since
+ /* no need to remove this store's personas from all the individuals, since
* they'll do that themselves (and emit their own 'removed' signal if
* necessary) */
+ if (this.writeable_store == store)
+ this.writeable_store = null;
this.stores.unset (this.get_store_full_id (store.type_id, store.id));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]