Returns the user-specific GIMP settings directory.
If the environment variable `GIMP3_DIRECTORY` exists, it is used. If it is an absolute path, it is used as is. If it is a relative path, it is taken to be a subdirectory of the home directory. If it is a relative path, and no home directory can be determined, it is taken to be a subdirectory of [func@Gimp.data_directory].
The usual case is that no `GIMP3_DIRECTORY` environment variable exists, and then we use a subdirectory of the local configuration directory (which subdirectory may vary depending on build setup):
If neither the configuration nor home directory exist, [func@GLib.get_user_config_dir] will return `{tmp}/{user_name}/.config/` where the temporary directory `{tmp}` and the `{user_name}` are determined according to platform rules.
In any case, we always return some non-empty string, whether it corresponds to an existing directory or not.
In config files such as `gimprc`, the string "${gimp_dir}" expands to this directory.
The returned string is owned by GIMP and must not be modified or freed. The returned string is in the encoding used for filenames by GLib, which isn't necessarily UTF-8 (on Windows it is always UTF-8.)
|
The user-specific GIMP settings directory. |