GNOME Bugzilla – Bug 626441
Add persistent linking and unlinking
Last modified: 2010-08-09 17:44:11 UTC
This is the last major bit of API needed to support linking and unlinking in the UI in Empathy. http://git.collabora.co.uk/?p=user/pwith/folks;a=shortlog;h=refs/heads/persistent-linking The linking code has been tested with the Empathy linking UI WIP, and works well. The unlinking code hasn't been tested yet. This requires a small API break (sort of), in that Kf.Persona now takes "im-addresses" as its construction detail, rather than "protocol" and "im-address". The code depends on the late-linking branch (bug #626437).
Created attachment 167431 [details] [review] Squashed patch of the branch These methods allow persistent linking and unlinking of Personas, compared to the transient linking which editing Individual.personas provides. This allows for an interface to preview the properties of a newly linked Individual before committing the changes using IndividualAggregator.link_personas(). --- backends/key-file/kf-persona-store.vala | 33 +++++------ backends/key-file/kf-persona.vala | 15 ++++-- backends/telepathy/tpf-persona.vala | 25 ++++++++- folks/individual-aggregator.vala | 88 ++++++++++++++++++++++++++++++- folks/individual.vala | 6 ++ 5 files changed, 142 insertions(+), 25 deletions(-)
Review of attachment 167431 [details] [review]: Trivial bit to fix in the commit message: "This allows construction of new key file personas which contain multiple e-mail addresses from different protocols." I think you mean "IM addresses", not "e-mail addresses". Otherwise, it looks good. Please rebase and merge once the blocking bug is fixed. (Setting "reviewed" status, since there isn't "accepted-commit_after_blockers_fixed")
Committed with the commit message change. commit b9bb6e2300a529516f51d67523ee4f84533f365d Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Mon Aug 9 14:48:35 2010 +0100 Add IndividualAggregator.link_personas() and .unlink_individual() API These methods allow persistent linking and unlinking of Personas, compared to the transient linking which editing Individual.personas provides. This allows for an interface to preview the properties of a newly linked Individual before committing the changes using IndividualAggregator.link_personas(). folks/individual-aggregator.vala | 82 ++++++++++++++++++++++++++++++++++++++ folks/individual.vala | 6 +++ 2 files changed, 88 insertions(+), 0 deletions(-) commit 5fb93c5290afbc3946308910eec826dc8b3f009c Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Mon Aug 9 12:44:03 2010 +0100 Implement the IMable interface on TpfPersona Use it to expose the Persona's IM address. Do not allow setting the IM address. backends/telepathy/tpf-persona.vala | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) commit aafc38cfcfe923549cedeed9641d939933e03b08 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Mon Aug 9 14:47:36 2010 +0100 Take "im-addresses" as the parameter for a new Kf.Persona This allows construction of new key file personas which contain multiple IM addresses from different protocols. backends/key-file/kf-persona-store.vala | 24 +++++++++--------------- backends/key-file/kf-persona.vala | 15 ++++++++++----- 2 files changed, 19 insertions(+), 20 deletions(-) commit e58ae2c4b34f1bf479c3288c9b02e3d2dd187ba9 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Mon Aug 9 14:46:26 2010 +0100 Use autogenerated numeric IDs for key file groups backends/key-file/kf-persona-store.vala | 9 + commit e40ce9fc94c6a30670e586cfb68db09de934a829 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Fri Aug 6 11:20:59 2010 +0100 Let the IndividualAggregator designate one PersonaStore as its writeable store folks/individual-aggregator.vala | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)