[gnome-contacts] Add quiescent signal/property to store
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Add quiescent signal/property to store
- Date: Mon, 5 Sep 2011 09:54:12 +0000 (UTC)
commit 9f93c36e42eb928b535ce99767573abb99cf5bce
Author: Alexander Larsson <alexl redhat com>
Date: Mon Sep 5 11:41:22 2011 +0200
Add quiescent signal/property to store
src/contacts-store.vala | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-store.vala b/src/contacts-store.vala
index 78c19d8..8c382e4 100644
--- a/src/contacts-store.vala
+++ b/src/contacts-store.vala
@@ -25,6 +25,7 @@ public class Contacts.Store : GLib.Object {
public signal void changed (Contact c);
public signal void added (Contact c);
public signal void removed (Contact c);
+ public signal void quiescent ();
public IndividualAggregator aggregator { get; private set; }
Gee.ArrayList<Contact> contacts;
@@ -37,10 +38,22 @@ public class Contacts.Store : GLib.Object {
}
}
+ public bool is_quiescent
+ {
+ get { return this.aggregator.is_quiescent; }
+ }
+
public Store () {
contacts = new Gee.ArrayList<Contact>();
aggregator = new IndividualAggregator ();
+ aggregator.notify["is-quiescent"].connect ( (obj, pspec) => {
+ // We seem to get this before individuals_changed, so hack around it
+ Idle.add( () => {
+ this.quiescent ();
+ return false;
+ });
+ });
aggregator.individuals_changed.connect ((added, removed, m, a, r) => {
var old_individuals = new HashMap<Persona, Individual>();
var replaced_individuals = new HashSet<Individual>();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]