libgimpconfig: new API gimp_config_build_system_path().
This is the complementary of gimp_config_build_writable_path() to properly get the system vs. user directories.
This commit is contained in:
@ -267,6 +267,27 @@ gimp_config_build_writable_path (const gchar *name)
|
||||
return g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, name, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_config_build_system_path:
|
||||
* @name: directory name (in UTF-8 encoding)
|
||||
*
|
||||
* Creates a search path as it is used in the gimprc file. The path
|
||||
* returned by gimp_config_build_system_path() is just the read-only
|
||||
* parts of the search path constructed by gimp_config_build_plug_in_path().
|
||||
*
|
||||
* Note that you cannot use this path directly with gimp_path_parse().
|
||||
* As it is in the gimprc notation, you first need to expand and
|
||||
* recode it using gimp_config_path_expand().
|
||||
*
|
||||
* Returns: a newly allocated string
|
||||
*
|
||||
* Since: 2.10.6
|
||||
**/
|
||||
gchar *
|
||||
gimp_config_build_system_path (const gchar *name)
|
||||
{
|
||||
return g_strconcat ("${gimp_plug_in_dir}", G_DIR_SEPARATOR_S, name, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_config_path_expand:
|
||||
|
||||
@ -92,6 +92,7 @@ gchar * gimp_file_get_config_path (GFile *file,
|
||||
gchar * gimp_config_build_data_path (const gchar *name) G_GNUC_MALLOC;
|
||||
gchar * gimp_config_build_writable_path (const gchar *name) G_GNUC_MALLOC;
|
||||
gchar * gimp_config_build_plug_in_path (const gchar *name) G_GNUC_MALLOC;
|
||||
gchar * gimp_config_build_system_path (const gchar *name) G_GNUC_MALLOC;
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user