jim-easterbrook / Photini

An easy to use digital photograph metadata (Exif, IPTC, XMP) editing application.
https://photini.readthedocs.io/
GNU General Public License v3.0
163 stars 24 forks source link

Use freedesktop specification for config location #9

Closed madanyang closed 10 years ago

madanyang commented 10 years ago

According to freedesktop specs [1] location of configuration files should be under ~/.config by default. This way the ~/ directory is not filled with configuration files of different software.

This commit sets the default config at ~/.config/photini/photini.ini

[1] http://www.freedesktop.org/wiki/Specifications/config-spec/

jim-easterbrook commented 10 years ago

I'd not really given much thought about where to keep the settings. Thanks for the link to freedesktop.org. Do you know of an equivalent 'standard' for Windows and MacOS? [Edit: I've found https://pypi.python.org/pypi/appdirs/1.2.0 now. Seems to do what's wanted.] [Edit 2: or, as Photini's a PyQt app, perhaps it should use http://pyqt.sourceforge.net/Docs/PyQt4/qsettings.html]

I won't merge this request at present for two reasons: You've not included the necessary directory creation. You've not included anything to migrate existing users' settings.

jim-easterbrook commented 10 years ago

I've implemented my idea of what's needed in commit 5b1a0bf. I took the opportunity to set file permissions while I was about it.

madanyang commented 10 years ago

It looks both do a very similar job. Thanks for taking it further then I thought. Let's see if I get Photini into next the openSUSE release ;=)

jim-easterbrook commented 10 years ago

I'm not sure it's ready for that much exposure!

madanyang commented 10 years ago

Probably more testers, more bug reports ;=)