GNOME Bugzilla – Bug 459338
f-spot XDG Base Directory Specification and xdg-user-dirs support
Last modified: 2018-07-12 00:04:15 UTC
F-spot currently uses a photos folder, so distros that automatically create xdg-user-dirs folders have a photos folder and a pictures folder, which doesn't seem right. Should F-spot default to the pictures folder (or say, ~/pictures/photos) Forwarded from https://bugs.launchpad.net/ubuntu/+source/f-spot/+bug/127315 This has probably been brought up somewhere before, but I couldn't find it recently on the list or bugzilla...
I'de better choose a separate 'Photos' folder than the 'Pictures' one (if there is an XDG 'Photos' dir).
I was about to file a very similar bug, but found this one. So let me say yes, I think f-spot save pictures in the pictures directory (imágenes in my spanish system), that's what it is for.
*** Bug 509384 has been marked as a duplicate of this bug. ***
Created attachment 103540 [details] [review] proposed fix
I don't know it is possible or not but perhaps it is possible to put photos inside [Pictures]/Photos ?
I second that idea: users are likely to store various pictures types (drawings, backgrounds, anything) in their [Pictures] folder, and prefer to keep their photos library separate (since it is well organized by F-Spot).
Created attachment 109141 [details] [review] xdg-dir-support.patch more extensive xdg dir support inspired from banshee. stores the db under .config/f-spot, extensions under .cache/f-spot, photos directory under Pictures/f-spot.
Maxxer: I'm not sure users want "F-Spot" to appear in the folder tree of their home dir. Couldn't you use [Pictures]/Photos? This would be more generic - as a general rule, diplaying technical information such as the program name in the user data should be avoided. But this is a very nice patch.
Created attachment 109142 [details] [review] xdg-dir-support.patch sorry previous patch was missing Preferences.cs. and my comment was incorrect. The photo dir is Pictures/Photos
Taking into account bug #521488, the db should probably count as user /data/, and go into .local/share/f-spot by default (XDG_DATA_HOME rather than XDG_CONFIG_HOME).
Created attachment 109719 [details] [review] xdg-dir-support-v2.patch Updated patch: - takes advantage of Tim's suggestion - includes Sde previous patch - doesn't harm existing f-spot installs
*** Bug 521488 has been marked as a duplicate of this bug. ***
Its kinda unfortunate to hardcode an english name in the XDG dirs, which were created especially to handle translated directory names. Also, the XDG_PICTURES_DIR doesn't necessary have to be named "Pictures". There is alternative translations: "pictures", "Photos", "photos" in the xdg dirs and the sysadmin can change among these as he wishes. The user can also rename it as he wishes, nautilus will track renames of the directory and update the config file.
I should note this is still present in F-Spot 0.5.0.3 as included in Ubuntu 8.10. It would be nice to see it "NEW" instead of "UNCONFIRMED", or changed from an "enhancement" to a "bug", or even fixed for the next release.
Ralf has been banned for violating the Code of Conduct (criticism is welcome, but needs to be constructive). See http://live.gnome.org/CodeOfConduct for more information.
Wow! I've never seen so much anger against a software! I hope the violent rant from Ralf will not prevent the developers from fixing this bug. Obviously this is a major issue, and moreover a patch is available for a while. We do care about F-Spot internationalization precisely because it's a nice app that is so much polished in most other parts. Please commit this, using XDG_PICTURES_DIR, since it's what people agreed on. Thanks!
Milan (comment #10), and others: - this is _not_ an i18n issue, whatever ralf might have told. At first import, f-spot creates a folder named with the translation of the Photos word. Nothing is hardcoded at all. In doubt, look at the code - this is indeed an issue, but nothing major. XDG is more like guidelines, not rules. (refer to "Pirates of the Caribbean" movie for a full discussion on rules/guidelines) - patch exists, but the patch is wrong. xdg allows you to move directories without loosing the files links. This won't work (currently) in f-spot. - the rant won't prevent me for fixing it (not sure when) as I'm not affected by threats. OTOH, bribing works :) hope this clarify the situation of this bug.
Sorry for the i18n point then! I thought I could believe what Alex Larsson said (rather than rants), but one cannot trust anybody in this terrible GNOME world! ;-) Actually I'm using French, and in French "Photos" is the same, so I thought it was plain English. Keep up the good work...
*bump* Maxxer, Milan, can the patch be applied and this bug closed? This bug has accumulated nearly ten duplicates in Launchpad. If the patch is endorsed by Maxxer and Milan, it seems appropriate to merge it and resolve this.
Seems like a good target to review before the upcoming 0.6 release.
I'll take a look at this later today.
The patch looks reasonable, but I'm worried by this: (In reply to comment #19) > - patch exists, but the patch is wrong. xdg allows you to move directories > without loosing the files links. This won't work (currently) in f-spot. How does Ubuntu. which pushes this patch, solve this problem?
I recommend that another bug be filed against F-Spot to allow the directory renaming provided by the XDG-spec, and that this bug still be fixed in the meantime.
So, I've spent some time discussing this issue and the consensus is that it's probably not very safe to claim that we support the XDG Base Directory Specification, if we can't handle the renaming thing (thanks for mentioning Alexander). Having a user rename it's Photos directory and subsequently finding out that F-Spot no longer works is very unfortunate. To support this correctly, the following (as a bare minimum) needs to be in place: Track the name of the photos directory persistently (the meta table can be used for that), at startup check to see if it's still the same, if not, update the location of the photos that were in this folder. This avoids breakage. A more clean fix would be to support multiple photo locations (my ~/Photos, a USB disk, ...) and update the name of that location, instead of all the photo records. But that's more of a longer term thing, the fix above will probably the best way to go forward with this. Given that we're about to release .6 any time now, I'm moving this to the next milestone. It will not be fixed in the upcoming release, but should be doable to do so for the next one. In the meantime, you are free to ship this patch (you're already doing so anyway, if I understand it correctly), but from the F-Spot camp, we prefer not to claim to support this until we properly do so.
Currently, if a user renames her F-Spot "Photos" folder, F-Spot will break in the manner you describe, correct? If this is the case, renaming to "Pictures" will only caused increased confusion in the event that a user (1) knows that the XDG spec specifies that name, (2) knows about the clause in the spec regarding folder renaming, (3) believes that F-Spot implements the spec entirely, and (4) renames their "Pictures" folder and thus breaks F-Spot? First of all, any user who is that sophisticated will know how to easily fix the problem created by renaming the folder. Second of all, *many* more users are confused when confronted by the Photos/Pictures folder ambiguity. Bottom line: tens of thousands of users may be confused by the Photos/Pictures ambiguity. I would guess that fewer than ten users will make a misstep and become equally confused thinking that F-Spot supports folder renaming because it uses a folder named "Pictures" instead of "Photos".
How does Banshee track the XDG user directory changing? Given the move to use a lot of Banshee base code, is it now possible to default to use the base XDG Pictures directory?
F-Spot has moved to https://github.com/f-spot/f-spot/issues If this Bugzilla ticket is still valid in a recent version of F-Spot, please feel free to post this topic as a ticket in the F-Spot project on GitHub. Closing this report as WONTFIX as part of Bugzilla Housekeeping as we are planning to shut down GNOME Bugzilla in favor of GNOME Gitlab.