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 655609 - Implement setter for URLs
Implement setter for URLs
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: e-d-s backend
git master
Other Linux
: Normal normal
: folks-0.6.0
Assigned To: Raul Gutierrez Segales
Raul Gutierrez Segales
Depends on: 653680 655374
Blocks: 655911
 
 
Reported: 2011-07-29 21:32 UTC by Raul Gutierrez Segales
Modified: 2011-08-13 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support to set urls on Edsf.Persona (6.33 KB, patch)
2011-08-02 14:12 UTC, Raul Gutierrez Segales
none Details | Review
Add a test for setting URLs (6.96 KB, patch)
2011-08-02 14:13 UTC, Raul Gutierrez Segales
none Details | Review
Squashed series of patches to add support for URLs (15.58 KB, patch)
2011-08-02 22:38 UTC, Raul Gutierrez Segales
none Details | Review
Squashed series of patches to add support for URLs (15.39 KB, patch)
2011-08-03 08:24 UTC, Raul Gutierrez Segales
none Details | Review

Description Raul Gutierrez Segales 2011-07-29 21:32:48 UTC
22:10:09  pwithnall | rgs_: The urls property isn't settable
22:10:51       rgs_ | pwithnall: thats actually me being a slacker.
22:11:56  pwithnall | :)
22:12:52          * | rgs_ checks how urls are managed in e-contact.h
22:14:22       rgs_ | pwithnall: so we've got: http://www.fpaste.org/ezeq/
22:14:45       rgs_ | pwithnall: I am guessing we care only about the 1st two.. for the time being. Though I am worried there isn't a single multi-purpose list of urls..
22:15:05  pwithnall | rgs_: Add a custom X-URIS vCard attribute for the rest, I guess 
22:15:07       rgs_ | pwithnall: which raises the question: what do we do if we have more urls than space to store
22:15:12       rgs_ | pwithnall: makes sense
22:15:13          * | pwithnall checks what Google Contacts does
22:16:43  pwithnall | rgs_: eds' Google Contacts backend just uses HOMEPAGE_URL and BLOG_URL
Comment 1 Raul Gutierrez Segales 2011-08-01 18:54:16 UTC
First take on this:

http://cgit.collabora.com/git/user/rgs/folks/log/?h=bgo-655609

I'll follow up with a test case.
Comment 2 Raul Gutierrez Segales 2011-08-02 14:12:41 UTC
Created attachment 193075 [details] [review]
Add support to set urls on Edsf.Persona

A couple of corrections here and there.
Comment 3 Raul Gutierrez Segales 2011-08-02 14:13:14 UTC
Created attachment 193076 [details] [review]
Add a test for setting URLs

And a small test case.
Comment 4 Raul Gutierrez Segales 2011-08-02 15:17:39 UTC
I've added a couple of helps to ease up checking if 2 sets of Urls are the same, so the attached patches are deprecated in favour of this branch:

http://cgit.collabora.com/git/user/rgs/folks/log/?h=bgo-655609
Comment 5 Philip Withnall 2011-08-02 18:18:06 UTC
Could you post a squashed patch of the branch please?

From a quick look, the changes you've made to FieldDetails look very likely to collide head-on with Travis' port to AbstractFieldDetails (bug #653680 and friends).

Another thought which comes to mind is that Edsf.Persona.url_properties is quite a good candidate for being moved into UrlDetails. The entries in it are generic enough to label URLs coming from many different backends.
Comment 6 Raul Gutierrez Segales 2011-08-02 22:38:02 UTC
Created attachment 193112 [details] [review]
Squashed series of patches to add support for URLs

I'll actually wait for Travis' changes to land, but I guess the test and the core changes in Edsf.PersonaStore and Edsf.Persona can get some review in the meanwhile.
Comment 7 Raul Gutierrez Segales 2011-08-03 08:24:37 UTC
Created attachment 193134 [details] [review]
Squashed series of patches to add support for URLs

A little refresh while I wait for #653680 to land.
Comment 8 Philip Withnall 2011-08-03 20:34:49 UTC
Review of attachment 193134 [details] [review]:

Here are a few things I spotted on a quick review. My points from comment #5 are still relevant, I think.

::: backends/eds/lib/edsf-persona-store.vala
@@ +215,3 @@
    * - PersonaDetail.detail_key (PersonaDetail.WEB_SERVICE_ADDRESSES)
    * - PersonaStore.detail_key (PersonaDetail.NOTES)
+   * - PersonaStore.detail_key (PersonaDetail.URL)

s/URL/URLS/

::: folks/field-details.vala
@@ +162,3 @@
+   * @param other the FieldDetail to compare with
+   *
+   * @since UNRELEASED

Missing a @return line.

::: tests/eds/set-urls.vala
@@ +74,3 @@
+
+      v = Value (typeof (string));
+      v.set_string ("Albus Percival Wulfric Brian Dumbledore");

I approve.
Comment 9 Travis Reitter 2011-08-13 16:59:52 UTC
commit f4f596bddedcc64670be03ec2ffa46e0d142a720
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Sat Aug 13 12:33:39 2011 +0200

    Write support for URLs in Edsf.Persona
    
    Closes: bgo#655609 - Implement setter for URLs