Commit db006168 authored by Jehan's avatar Jehan

libgimpbase: add gimp_installation_directory_file().

Fix previous commit.
Ahahah! Mitch, you didn't test your code before pushing! Bad boy! :P
parent 10ce7021
......@@ -760,6 +760,36 @@ gimp_directory_file (const gchar *first_element,
return file;
}
/**
* gimp_installation_directory_file:
* @first_element: the first element of a path to a file in the
* top installation directory, or %NULL.
* @...: a %NULL terminated list of the remaining elements of the path
* to the file.
*
* Returns a #GFile in the installation directory, or the installation
* directory itself if @first_element is %NULL.
*
* See also: gimp_installation_directory().
*
* Since: 2.10.10
*
* Returns: a new @GFile for the path, Free with g_object_unref().
**/
GFile *
gimp_installation_directory_file (const gchar *first_element,
...)
{
GFile *file;
va_list args;
va_start (args, first_element);
file = gimp_child_file (gimp_installation_directory (), first_element, args);
va_end (args);
return file;
}
/**
* gimp_data_directory_file:
* @first_element: the first element of a path to a file in the
......
......@@ -47,41 +47,43 @@ GIMPVAR const guint gimp_minor_version;
GIMPVAR const guint gimp_micro_version;
const gchar * gimp_directory (void) G_GNUC_CONST;
const gchar * gimp_installation_directory (void) G_GNUC_CONST;
const gchar * gimp_data_directory (void) G_GNUC_CONST;
const gchar * gimp_locale_directory (void) G_GNUC_CONST;
const gchar * gimp_sysconf_directory (void) G_GNUC_CONST;
const gchar * gimp_plug_in_directory (void) G_GNUC_CONST;
const gchar * gimp_cache_directory (void) G_GNUC_CONST;
const gchar * gimp_temp_directory (void) G_GNUC_CONST;
GFile * gimp_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_data_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_locale_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_sysconf_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_plug_in_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
const gchar * gimp_gtkrc (void) G_GNUC_CONST;
gchar * gimp_personal_rc_file (const gchar *basename) G_GNUC_MALLOC;
GList * gimp_path_parse (const gchar *path,
gint max_paths,
gboolean check,
GList **check_failed);
gchar * gimp_path_to_str (GList *path) G_GNUC_MALLOC;
void gimp_path_free (GList *path);
gchar * gimp_path_get_user_writable_dir (GList *path) G_GNUC_MALLOC;
const gchar * gimp_directory (void) G_GNUC_CONST;
const gchar * gimp_installation_directory (void) G_GNUC_CONST;
const gchar * gimp_data_directory (void) G_GNUC_CONST;
const gchar * gimp_locale_directory (void) G_GNUC_CONST;
const gchar * gimp_sysconf_directory (void) G_GNUC_CONST;
const gchar * gimp_plug_in_directory (void) G_GNUC_CONST;
const gchar * gimp_cache_directory (void) G_GNUC_CONST;
const gchar * gimp_temp_directory (void) G_GNUC_CONST;
GFile * gimp_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_installation_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_data_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_locale_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_sysconf_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
GFile * gimp_plug_in_directory_file (const gchar *first_element,
...) G_GNUC_MALLOC;
const gchar * gimp_gtkrc (void) G_GNUC_CONST;
gchar * gimp_personal_rc_file (const gchar *basename) G_GNUC_MALLOC;
GList * gimp_path_parse (const gchar *path,
gint max_paths,
gboolean check,
GList **check_failed);
gchar * gimp_path_to_str (GList *path) G_GNUC_MALLOC;
void gimp_path_free (GList *path);
gchar * gimp_path_get_user_writable_dir (GList *path) G_GNUC_MALLOC;
/* should be considered private, don't use! */
void gimp_env_init (gboolean plug_in);
void gimp_env_init (gboolean plug_in);
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment