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 641662 - Update for libfolks API changes to IndividualAggregator.add_persona_from_details
Update for libfolks API changes to IndividualAggregator.add_persona_from_details
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Meta Contacts
2.91.x
Other Linux
: Normal minor
: ---
Assigned To: empathy-maint
Depends on: 629078
Blocks:
 
 
Reported: 2011-02-06 12:14 UTC by Philip Withnall
Modified: 2011-02-18 00:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update for libfolks API changes to IndividualAggregator.add_persona_from_details (2.54 KB, patch)
2011-02-06 12:16 UTC, Philip Withnall
reviewed Details | Review
Update for libfolks API changes to IndividualAggregator.add_persona_from_details, BackendStore.enabled_backends and BackendStore.get_backend_by_name (3.17 KB, patch)
2011-02-14 21:47 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2011-02-06 12:14:10 UTC
+++ This bug was initially created as a clone of Bug #629078 +++

The only thing that stands out to me now (beyond what's covered in bug #639933
and bug #640092) is this function:

IndividualAggregator.add_persona_from_details (Folks.Individual? parent, string
persona_store_type, string persona_store_id, GLib.HashTable<string,GLib.Value?>
details);

I think we should replace the persona_store_type and persona_store_id arguments
with a PersonaStore argument. Clients can find the PersonaStore on their own
via BackendStore.get_backend_by_name(); Backend.persona_stores; and have
tighter control over the selection process (which is otherwise too opaque, I
think).
Comment 1 Philip Withnall 2011-02-06 12:16:40 UTC
Created attachment 180228 [details] [review]
Update for libfolks API changes to IndividualAggregator.add_persona_from_details

This should be applied to Empathy as soon as a libfolks is released containing attachment #180227 [details] from bug #629078.

http://git.collabora.co.uk/?p=user/pwith/empathy;a=shortlog;h=refs/heads/641662-add-persona-from-details
Comment 2 Guillaume Desmottes 2011-02-07 09:07:04 UTC
Review of attachment 180228 [details] [review]:

::: libempathy/empathy-individual-manager.c
@@ +409,3 @@
+  backend_store = folks_backend_store_dup ();
+  backend =
+      folks_backend_store_get_backend_by_name (backend_store, "telepathy");

I think that this function should be named folks_backend_store_dup_backend_by_name() instead. We have this convention in tp-glib and it's very handy to know if you have to free/release the result or not.
Comment 3 Philip Withnall 2011-02-07 22:29:20 UTC
(In reply to comment #2)
> I think that this function should be named
> folks_backend_store_dup_backend_by_name() instead. We have this convention in
> tp-glib and it's very handy to know if you have to free/release the result or
> not.

https://bugzilla.gnome.org/show_bug.cgi?id=629078#c29

I'll post an updated patch for Empathy once the folks patch is committed (once the Vala bug is fixed).
Comment 4 Philip Withnall 2011-02-14 21:47:14 UTC
Created attachment 180856 [details] [review]
Update for libfolks API changes to IndividualAggregator.add_persona_from_details, BackendStore.enabled_backends and BackendStore.get_backend_by_name

http://git.collabora.co.uk/?p=user/pwith/empathy;a=shortlog;h=refs/heads/641662-add-persona-from-details-rebase1

Updated patch with the rest of the API changes.
Comment 5 Guillaume Desmottes 2011-02-15 08:38:42 UTC
Review of attachment 180856 [details] [review]:

Looks good. 2.34 and master please.
Comment 6 Philip Withnall 2011-02-18 00:17:53 UTC
Pushed to master:

commit d008f215bc41f4e69ff01879047ec946a4370148
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Sun Feb 6 12:14:28 2011 +0000

    Bug 641662 — Update for libfolks API changes to IndividualAggregator
    
    Update EmpathyIndividualManager re. changes to
    IndividualAggregator.add_persona_from_details, BackendStore.enabled_backends
    and BackendStore.get_backend_by_name in libfolks. Closes: bgo#641662

 libempathy/empathy-individual-manager.c |   33 +++++++++++++++++++++++++++++-
 libempathy/empathy-utils.c              |    2 +-
 2 files changed, 32 insertions(+), 3 deletions(-)

Pushed to gnome-2-34:

commit 6103b13b462a07a8b508ee2223ef1e5acfc8dd47
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Sun Feb 6 12:14:28 2011 +0000

    Bug 641662 — Update for libfolks API changes to IndividualAggregator
    
    Update EmpathyIndividualManager re. changes to
    IndividualAggregator.add_persona_from_details, BackendStore.enabled_backends
    and BackendStore.get_backend_by_name in libfolks. Closes: bgo#641662

 libempathy/empathy-individual-manager.c |   33 +++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 2 deletions(-)