! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Please add support for the xdg dirs spec
Status:
CLOSED: FIXED

Comments

Description Lionel Le Folgoc 2011-01-26 22:34:35 CET
Created attachment 3425 
work in progress untested patch

Hi,

Orage doesn't seem to follow the XDG base dir spec (see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html): it only tries to read config or data files in $HOME, making very difficult any attempt to provide a default configuration at the system level (e.g. for a distribution). 

Quick'n'dirty summary of the spec:
- reading: if $XDG_CONFIG_HOME (resp. $XDG_DATA_HOME) doesn't contain the orage conf (resp. data), then look into each dir of $XDG_CONFIG_DIRS (resp. $XDG_DATA_DIRS) to find it
- writing: no change required from your current code, all writes go to $XDG_CONFIG_HOME (resp. XDG_DATA_HOME)

I attach a patch that adds two (untested) functions to do the lookup in $XDG_CONFIG_DIRS and $XDG_DATA_DIRS, which could maybe serve as a starting point?

Thanks!
Comment 1 Nick Schermer editbugs 2011-01-27 09:09:10 CET
Orage links to libxfce4util, so why not use xfce_resource_lookup or xfce_rc_config_open?
Comment 2 Lionel Le Folgoc 2011-01-27 16:27:58 CET
Nope, it seems it has been gtk-only-ized for the 4.8 version.
Comment 3 juha editbugs 2011-01-31 14:27:34 CET
This is now fixed in 4.8.0.6 git version.

Thanks for the usefull functions. I used them as they were.
Comment 4 juha editbugs 2011-05-31 22:39:05 CEST
Fixed in 4.8.1

Bug #7192

Reported by:
Lionel Le Folgoc
Reported on: 2011-01-26
Last modified on: 2011-05-31

People

CC List:
1 user

Version

Attachments

work in progress untested patch (1.25 KB, patch)
2011-01-26 22:34 CET , Lionel Le Folgoc
no flags

Additional information