Commit 2aea61a5 authored by Philip Withnall's avatar Philip Withnall
Browse files

Bug 683452 — gnome-contacts starts up with an empty address book

Edsf.Persona.is_google_personal_group and .is_favourite can both be set by
the _update_groups() method. Groups must be lazily initialised when
accessing these properties, therefore.

Based on a patch by Giovanni Campagna <scampa.giovanni@gmail.com>.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=683452
parent ce26b3e8
......@@ -16,6 +16,7 @@ Bugs fixed:
• Bug 680335 — empathy crashed with SIGSEGV in
_tpf_persona_contact_weak_notify_cb()
• Bug 681726 — empathy crashed with SIGABRT in g_assertion_message()
• Bug 683452 — gnome-contacts starts up with an empty address book
API changes:
• Add PropertyError.UNAVAILABLE
......
......@@ -151,8 +151,6 @@ public class Edsf.Persona : Folks.Persona,
private static HashTable<string, E.ContactField>? _im_eds_map = null;
private bool _is_favourite;
private E.Contact _contact; /* should be set on construct */
/**
......@@ -692,6 +690,8 @@ public class Edsf.Persona : Folks.Persona,
yield ((Edsf.PersonaStore) this.store)._set_roles (this, roles);
}
private bool _is_favourite = false;
/**
* Whether this contact is a user-defined favourite.
*
......@@ -700,7 +700,11 @@ public class Edsf.Persona : Folks.Persona,
[CCode (notify = false)]
public bool is_favourite
{
get { return this._is_favourite; }
get
{
this._update_groups (true); /* also checks for favourites */
return this._is_favourite;
}
set { this.change_is_favourite.begin (value); }
}
......@@ -757,7 +761,11 @@ public class Edsf.Persona : Folks.Persona,
[CCode (notify = false)]
public bool in_google_personal_group
{
get { return this._in_google_personal_group; }
get
{
this._update_groups (true); /* also checks for the personal group */
return this._in_google_personal_group;
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment