Commit 00ada566 authored by Raul Gutierrez Segales's avatar Raul Gutierrez Segales
Browse files

e-d-s: notify when an address book is configured as default

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=657141
parent d797e8e1
......@@ -15,6 +15,7 @@ Bugs fixed:
* Bug 658323 — Deprecate FOLKS_WRITEABLE_STORE in favour of FOLKS_PRIMARY_STORE
* Bug 659095 — Don't distribute typelib file
* Bug 659128 — If a persona store goes away we don't remove its personas
* Bug 657141 — Backend should ask eds for the default backend, not hardcode it
API changes:
* Individual.avatar is now settable using Individual.change_avatar() (not new
......
......@@ -209,6 +209,8 @@ public class Edsf.PersonaStore : Folks.PersonaStore
this._personas = new HashMap<string, Persona> ();
this._personas_ro = this._personas.read_only_view;
this._query_str = "(contains \"x-evolution-any-field\" \"\")";
this._source.changed.connect (this._source_changed_cb);
this._notify_if_default ();
}
~PersonaStore ()
......@@ -1851,4 +1853,23 @@ public class Edsf.PersonaStore : Folks.PersonaStore
else
this.trust_level = PersonaStoreTrust.FULL;
}
private void _source_changed_cb ()
{
this._notify_if_default ();
}
private void _notify_if_default ()
{
bool is_default = false;
if (this._source.get_property ("default") == "true")
{
is_default = true;
}
if (is_default != this.is_user_set_default)
{
this.is_user_set_default = is_default;
}
}
}
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