Closed madanyang closed 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.
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.
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 ;=)
I'm not sure it's ready for that much exposure!
Probably more testers, more bug reports ;=)
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/