[gnome-contacts] Contact: Find FakePersona for uid
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Contact: Find FakePersona for uid
- Date: Tue, 16 Sep 2014 17:25:02 +0000 (UTC)
commit d87cd20382fbfe2577659eb76c03f4599a82e6dd
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Mon Sep 15 01:41:43 2014 -0400
Contact: Find FakePersona for uid
Fix bug for adding details to contacts with its primary-persona not
belonging to the default addressbook
src/contacts-contact.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index d89718b..b3c14da 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -130,6 +130,8 @@ public class Contacts.Contact : GLib.Object {
uint changed_id;
bool changed_personas;
+ public Persona? fake_persona = null;
+
private Gdk.Pixbuf? _small_avatar;
public Gdk.Pixbuf small_avatar {
get {
@@ -1124,6 +1126,9 @@ public class Contacts.Contact : GLib.Object {
if (p.uid == uid)
return p;
}
+ if (uid == "uid-fake-persona" && this.fake_persona != null)
+ return this.fake_persona;
+
return null;
}
@@ -1527,10 +1532,11 @@ public class Contacts.FakePersona : Persona {
public FakePersona (Contact contact) {
Object (display_id: "display_id",
- uid: "uid",
+ uid: "uid-fake-persona",
iid: "iid",
store: contact.store.aggregator.primary_store ?? FakePersonaStore.the_store(),
is_user: false);
this.contact = contact;
+ this.contact.fake_persona = this;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]