Add wxStandardPaths::Dir_Config
This allows using GetUserDir(Dir_Config) to retrieve XDG-compliant location of the configuration files, independently of the file layout used by the global wxStandardPaths object. Recommend using this directory instead of GetUserDataDir() for multiple configuration files under Unix.
This commit is contained in:
parent
72c164f28c
commit
d56cf71466
5 changed files with 30 additions and 4 deletions
|
|
@ -79,6 +79,18 @@ public:
|
|||
*/
|
||||
Dir_Cache,
|
||||
|
||||
/**
|
||||
Directory containing configuration information.
|
||||
|
||||
Example return values:
|
||||
- Unix: `~/.config`
|
||||
- Windows: `C:\Users\username\AppData\Roaming`
|
||||
- Mac: @c `~/Library/Preferences`
|
||||
|
||||
@since 3.3.0
|
||||
*/
|
||||
Dir_Config,
|
||||
|
||||
/**
|
||||
Directory containing user documents.
|
||||
|
||||
|
|
@ -384,8 +396,8 @@ public:
|
|||
- Mac: @c ~/Library/Preferences
|
||||
|
||||
Only use this method if you have a single configuration file to put in this
|
||||
directory, otherwise GetUserDataDir() is more appropriate as the latter
|
||||
adds @c appinfo to the path, unlike this function.
|
||||
directory, otherwise calling AppendAppInfo() with the value returned by
|
||||
GetDir() with wxStandardPaths::Dir_Config is more appropriate.
|
||||
*/
|
||||
virtual wxString GetUserConfigDir() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue