105
gchar *gimpdatasubdir, *defaultpath, *tmps;
107
gchar *rc_path, *path;
108
109
if (parsepath_cached_path)
109
110
return parsepath_cached_path;
111
gimpdatasubdir = g_build_filename (gimp_data_directory (),
112
"gimpressionist", NULL);
114
defaultpath = g_build_filename (gimp_directory (),
115
"gimpressionist", gimpdatasubdir, NULL);
117
tmps = gimp_gimprc_query ("gimpressionist-path");
121
if (!g_file_test (gimpdatasubdir, G_FILE_TEST_IS_DIR))
123
/* No gimpressionist-path parameter,
124
and the default doesn't exist */
125
gchar *path = g_strconcat ("${gimp_dir}",
128
G_SEARCHPATH_SEPARATOR_S,
134
/* don't translate the gimprc entry */
135
g_message (_("It is highly recommended to add\n"
136
" (gimpressionist-path \"%s\")\n"
137
"(or similar) to your gimprc file."), path);
140
tmps = g_strdup (defaultpath);
143
parsepath_cached_path = gimp_path_parse (tmps, 16, FALSE, NULL);
112
path = gimp_gimprc_query ("gimpressionist-path");
115
rc_path = g_filename_from_utf8 (path, -1, NULL, NULL, NULL);
120
gchar *gimprc = gimp_personal_rc_file ("gimprc");
121
gchar *full_path = gimp_config_build_data_path ("gimpressionist");
122
gchar *esc_path = g_strescape (full_path, NULL);
124
g_message (_("No %s in gimprc:\n"
125
"You need to add an entry like\n"
128
"gflare-path", "gflare-path",
129
esc_path, gimp_filename_to_utf8 (gimprc));
134
rc_path = gimp_config_path_expand (full_path, TRUE, NULL);
138
parsepath_cached_path = gimp_path_parse (rc_path, 16, FALSE, NULL);
147
142
return parsepath_cached_path;