mirror of https://github.com/GNOME/gimp.git
plug-ins/FractalExplorer/Dialogs.c plug-ins/Lighting/lighting_ui.c
2005-03-04 Sven Neumann <sven@gimp.org> * plug-ins/FractalExplorer/Dialogs.c * plug-ins/Lighting/lighting_ui.c * plug-ins/gfig/gfig-dialog.c * plug-ins/gflare/gflare.c * plug-ins/gimpressionist/utils.c: same fix for path encoding as done in Script-Fu (see bug #165002).
This commit is contained in:
parent
ea267753f6
commit
b193a98da3
|
@ -1,3 +1,12 @@
|
|||
2005-03-04 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/FractalExplorer/Dialogs.c
|
||||
* plug-ins/Lighting/lighting_ui.c
|
||||
* plug-ins/gfig/gfig-dialog.c
|
||||
* plug-ins/gflare/gflare.c
|
||||
* plug-ins/gimpressionist/utils.c: same fix for path encoding as
|
||||
done in Script-Fu (see bug #165002).
|
||||
|
||||
2005-03-04 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* app/core/gimpimage-sample-points.c
|
||||
|
|
|
@ -516,22 +516,27 @@ explorer_dialog (void)
|
|||
GtkWidget *table;
|
||||
GtkWidget *button;
|
||||
GtkWidget *gradient;
|
||||
gchar *path;
|
||||
gchar *gradient_name;
|
||||
GSList *group = NULL;
|
||||
gint i;
|
||||
|
||||
gimp_ui_init ("fractalexplorer", TRUE);
|
||||
|
||||
fractalexplorer_path = gimp_gimprc_query ("fractalexplorer-path");
|
||||
path = gimp_gimprc_query ("fractalexplorer-path");
|
||||
|
||||
if (! fractalexplorer_path)
|
||||
if (path)
|
||||
{
|
||||
fractalexplorer_path = g_filename_from_utf8 (path, -1, NULL, NULL, NULL);
|
||||
g_free (path);
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *gimprc = gimp_personal_rc_file ("gimprc");
|
||||
gchar *full_path;
|
||||
gchar *esc_path;
|
||||
|
||||
full_path =
|
||||
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S,
|
||||
full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S,
|
||||
"fractalexplorer",
|
||||
G_SEARCHPATH_SEPARATOR_S,
|
||||
"${gimp_data_dir}", G_DIR_SEPARATOR_S,
|
||||
|
@ -551,7 +556,6 @@ explorer_dialog (void)
|
|||
g_free (esc_path);
|
||||
}
|
||||
|
||||
|
||||
wint.wimage = g_new (guchar, preview_width * preview_height * 3);
|
||||
elements = g_new (DialogElements, 1);
|
||||
|
||||
|
|
|
@ -949,6 +949,7 @@ main_dialog (GimpDrawable *drawable)
|
|||
GtkWidget *frame;
|
||||
GtkWidget *button;
|
||||
GtkWidget *toggle;
|
||||
gchar *path;
|
||||
gboolean run = FALSE;
|
||||
|
||||
/*
|
||||
|
@ -956,7 +957,13 @@ main_dialog (GimpDrawable *drawable)
|
|||
*/
|
||||
|
||||
gimp_ui_init ("Lighting", FALSE);
|
||||
lighting_effects_path = gimp_gimprc_query ("lighting-effects-path");
|
||||
|
||||
path = gimp_gimprc_query ("lighting-effects-path");
|
||||
if (path)
|
||||
{
|
||||
lighting_effects_path = g_filename_from_utf8 (path, -1, NULL, NULL, NULL);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
lighting_stock_init ();
|
||||
|
||||
|
|
|
@ -213,6 +213,7 @@ gfig_dialog (void)
|
|||
GtkWidget *hbox;
|
||||
GtkUIManager *ui_manager;
|
||||
GtkWidget *empty_label;
|
||||
gchar *path;
|
||||
|
||||
gimp_ui_init ("gfig", TRUE);
|
||||
|
||||
|
@ -256,16 +257,20 @@ gfig_dialog (void)
|
|||
|
||||
gfig_stock_init ();
|
||||
|
||||
gfig_path = gimp_gimprc_query ("gfig-path");
|
||||
path = gimp_gimprc_query ("gfig-path");
|
||||
|
||||
if (! gfig_path)
|
||||
if (path)
|
||||
{
|
||||
gfig_path = g_filename_from_utf8 (path, -1, NULL, NULL, NULL);
|
||||
g_free (path);
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *gimprc = gimp_personal_rc_file ("gimprc");
|
||||
gchar *full_path;
|
||||
gchar *esc_path;
|
||||
|
||||
full_path =
|
||||
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gfig",
|
||||
full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gfig",
|
||||
G_SEARCHPATH_SEPARATOR_S,
|
||||
"${gimp_data_dir}", G_DIR_SEPARATOR_S, "gfig",
|
||||
NULL);
|
||||
|
|
|
@ -836,6 +836,7 @@ plugin_run (const gchar *name,
|
|||
static GimpParam values[1];
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
gchar *path;
|
||||
|
||||
/* Initialize */
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
@ -871,15 +872,19 @@ plugin_run (const gchar *name,
|
|||
* Parse gflare path from gimprc and load gflares
|
||||
*/
|
||||
|
||||
gflare_path = gimp_gimprc_query ("gflare-path");
|
||||
if (! gflare_path)
|
||||
path = gimp_gimprc_query ("gflare-path");
|
||||
if (path)
|
||||
{
|
||||
gflare_path = g_filename_from_utf8 (path, -1, NULL, NULL, NULL);
|
||||
g_free (path);
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *gimprc = gimp_personal_rc_file ("gimprc");
|
||||
gchar *full_path;
|
||||
gchar *esc_path;
|
||||
|
||||
full_path =
|
||||
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gflare",
|
||||
full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gflare",
|
||||
G_SEARCHPATH_SEPARATOR_S,
|
||||
"${gimp_data_dir}", G_DIR_SEPARATOR_S, "gflare",
|
||||
NULL);
|
||||
|
|
|
@ -102,8 +102,7 @@ static GList *parsepath_cached_path = NULL;
|
|||
GList *
|
||||
parsepath (void)
|
||||
{
|
||||
gchar *gimpdatasubdir, *defaultpath, *tmps;
|
||||
|
||||
gchar *gimpdatasubdir, *defaultpath, *rc_path, *path;
|
||||
|
||||
if (parsepath_cached_path)
|
||||
return parsepath_cached_path;
|
||||
|
@ -114,9 +113,13 @@ parsepath (void)
|
|||
defaultpath = g_build_filename (gimp_directory (),
|
||||
"gimpressionist", gimpdatasubdir, NULL);
|
||||
|
||||
tmps = gimp_gimprc_query ("gimpressionist-path");
|
||||
|
||||
if (!tmps)
|
||||
path = gimp_gimprc_query ("gimpressionist-path");
|
||||
if (path)
|
||||
{
|
||||
rc_path = g_filename_from_utf8 (path, -1, NULL, NULL, NULL);
|
||||
g_free (path);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!g_file_test (gimpdatasubdir, G_FILE_TEST_IS_DIR))
|
||||
{
|
||||
|
@ -137,12 +140,13 @@ parsepath (void)
|
|||
"(or similar) to your gimprc file."), path);
|
||||
g_free (path);
|
||||
}
|
||||
tmps = g_strdup (defaultpath);
|
||||
|
||||
rc_path = g_strdup (defaultpath);
|
||||
}
|
||||
|
||||
parsepath_cached_path = gimp_path_parse (tmps, 16, FALSE, NULL);
|
||||
parsepath_cached_path = gimp_path_parse (rc_path, 16, FALSE, NULL);
|
||||
|
||||
g_free (tmps);
|
||||
g_free (rc_path);
|
||||
|
||||
return parsepath_cached_path;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue