GNOME Bugzilla – Bug 678309
EDS account-mgmt API fixes
Last modified: 2012-06-22 11:31:15 UTC
Branch/Patch coming with some fixes for warnings and bad casts which I’ve encountered while using the new account-mgmt stuff in folks.
Created attachment 216670 [details] [review] EDS API and casting fixes https://www.gitorious.org/folks/folks/trees/678309-eds-api-changes Jeremy, how does this look? I’m a bit wary about the find_extension()/get_extension() stuff, but I can’t see how it was meant to work before.
Note that this depends on http://git.gnome.org/browse/evolution-data-server/commit/?id=121bc62f08d071493ecd889c5cd4f53f50189300, which hasn’t yet been released.
Rebased on Jeremy’s commit 09ab10a3068e52b5f4d7f55375dd67fa3c98fa29 which fixed this already. My commits now just tidy a few things up. commit 392ece02e7bb0e564f9b8fdd6472ab95d6b78361 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Mon Jun 18 12:11:39 2012 +0100 core: Change default EDS PersonaStore ID to ‘system-address-book’ The new version of EDS uses that instead of ‘system’. This shouldn’t pose upgrade problems (e.g. if a user has ‘system’ stored in GSettings), since in that case the ‘system’ persona store wouldn’t be found, and the fallback would be to use the persona store marked as the system-set default — which is the ‘system-address-book’ persona store, as required. folks/individual-aggregator.vala | 2 +- folks/org.freedesktop.folks.gschema.xml.in | 2 +- tests/eds/change-primary-store.vala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 79b83aeb6d97f6ce5b489e64e4cd13e5b2be06df Author: Philip Withnall <philip@tecnocode.co.uk> Date: Mon Jun 18 12:09:58 2012 +0100 eds: Fix invalid cast in Edsf.PersonaStore E.SourceRegistry.find_extension() always returns an E.Source — we must then call get_extension() on that E.Source to get the relevant extension. This commit fixes an invalid cast here and factors out code to check for backend name matches for things like the ‘google’ and ‘ldap’ address book backends. Note that this depends on a new GIR annotation in EDataServer. backends/eds/lib/edsf-persona-store.vala | 41 ++++++++++++++---------------- 1 files changed, 19 insertions(+), 22 deletions(-) commit c7939400effd108163eb2413c5027222d2508dc8 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Mon Jun 18 12:09:08 2012 +0100 eds: Handle the possibility of E.SourceRegistry being null Several functions can be called before E.SourceRegistry is set in prepare(), so they must cope with it potentially being null. backends/eds/lib/edsf-persona-store.vala | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)