After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626441 - Add persistent linking and unlinking
Add persistent linking and unlinking
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: gnome-2.32
Assigned To: folks-maint
folks-maint
Depends on: 626437
Blocks: 626130
 
 
Reported: 2010-08-09 14:17 UTC by Philip Withnall
Modified: 2010-08-09 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Squashed patch of the branch (12.23 KB, patch)
2010-08-09 14:20 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2010-08-09 14:17:23 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).
Comment 1 Philip Withnall 2010-08-09 14:20:47 UTC
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(-)
Comment 2 Travis Reitter 2010-08-09 16:09:15 UTC
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")
Comment 3 Philip Withnall 2010-08-09 17:43:53 UTC
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(-)