[folks] Add internal TpfPersona._set_is_favourite
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Add internal TpfPersona._set_is_favourite
- Date: Fri, 13 Apr 2012 14:40:26 +0000 (UTC)
commit e7fe2e607a7fdeeeaa76de9a4ead872951b1611d
Author: Xavier Claessens <xavier claessens collabora co uk>
Date: Tue Apr 10 15:15:07 2012 +0200
Add internal TpfPersona._set_is_favourite
https://bugzilla.gnome.org/show_bug.cgi?id=630822
backends/telepathy/lib/tpf-persona-store.vala | 7 ++++---
backends/telepathy/lib/tpf-persona.vala | 6 ++++++
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index 8ab697b..296d615 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -554,14 +554,14 @@ public class Tpf.PersonaStore : Folks.PersonaStore
this._favourite_ids.add (id);
Persona ?p = this._lookup_persona_by_id (id);
if (p != null)
- p.is_favourite = true;
+ p._set_is_favourite (true);
}
foreach (var id in removed)
{
this._favourite_ids.remove (id);
Persona ?p = this._lookup_persona_by_id (id);
if (p != null)
- p.is_favourite = false;
+ p._set_is_favourite (false);
}
}
@@ -896,7 +896,8 @@ public class Tpf.PersonaStore : Folks.PersonaStore
this._contact_persona_map[contact] = persona;
contact.weak_ref (this._contact_weak_notify_cb);
- persona.is_favourite = this._favourite_ids.contains (contact.get_identifier ());
+ var is_favourite = this._favourite_ids.contains (contact.get_identifier ());
+ persona._set_is_favourite (is_favourite);
return persona;
}
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index ea28e54..9fcf8e6 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -343,6 +343,12 @@ public class Tpf.Persona : Folks.Persona,
this.notify_property ("is-favourite");
}
+ internal void _set_is_favourite (bool is_favourite)
+ {
+ this._is_favourite = is_favourite;
+ this.notify_property ("is-favourite");
+ }
+
private HashSet<EmailFieldDetails> _email_addresses =
new HashSet<EmailFieldDetails> (
(GLib.HashFunc) EmailFieldDetails.hash,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]