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>
|
2005-03-04 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||||
|
|
||||||
* app/core/gimpimage-sample-points.c
|
* app/core/gimpimage-sample-points.c
|
||||||
|
|
|
@ -516,27 +516,32 @@ explorer_dialog (void)
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *gradient;
|
GtkWidget *gradient;
|
||||||
|
gchar *path;
|
||||||
gchar *gradient_name;
|
gchar *gradient_name;
|
||||||
GSList *group = NULL;
|
GSList *group = NULL;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
gimp_ui_init ("fractalexplorer", TRUE);
|
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 *gimprc = gimp_personal_rc_file ("gimprc");
|
||||||
gchar *full_path;
|
gchar *full_path;
|
||||||
gchar *esc_path;
|
gchar *esc_path;
|
||||||
|
|
||||||
full_path =
|
full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S,
|
||||||
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S,
|
"fractalexplorer",
|
||||||
"fractalexplorer",
|
G_SEARCHPATH_SEPARATOR_S,
|
||||||
G_SEARCHPATH_SEPARATOR_S,
|
"${gimp_data_dir}", G_DIR_SEPARATOR_S,
|
||||||
"${gimp_data_dir}", G_DIR_SEPARATOR_S,
|
"fractalexplorer",
|
||||||
"fractalexplorer",
|
NULL);
|
||||||
NULL);
|
|
||||||
esc_path = g_strescape (full_path, NULL);
|
esc_path = g_strescape (full_path, NULL);
|
||||||
g_free (full_path);
|
g_free (full_path);
|
||||||
|
|
||||||
|
@ -551,7 +556,6 @@ explorer_dialog (void)
|
||||||
g_free (esc_path);
|
g_free (esc_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wint.wimage = g_new (guchar, preview_width * preview_height * 3);
|
wint.wimage = g_new (guchar, preview_width * preview_height * 3);
|
||||||
elements = g_new (DialogElements, 1);
|
elements = g_new (DialogElements, 1);
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ static GtkWidget *light_type_combo;
|
||||||
static GtkWidget *lightselect_combo;
|
static GtkWidget *lightselect_combo;
|
||||||
static GtkWidget *spin_intensity;
|
static GtkWidget *spin_intensity;
|
||||||
static GtkWidget *isolate_button;
|
static GtkWidget *isolate_button;
|
||||||
static gchar *lighting_effects_path = NULL;
|
static gchar *lighting_effects_path = NULL;
|
||||||
|
|
||||||
static void create_main_notebook (GtkWidget *container);
|
static void create_main_notebook (GtkWidget *container);
|
||||||
|
|
||||||
|
@ -949,6 +949,7 @@ main_dialog (GimpDrawable *drawable)
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *toggle;
|
GtkWidget *toggle;
|
||||||
|
gchar *path;
|
||||||
gboolean run = FALSE;
|
gboolean run = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -956,7 +957,13 @@ main_dialog (GimpDrawable *drawable)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gimp_ui_init ("Lighting", FALSE);
|
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 ();
|
lighting_stock_init ();
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,7 @@ gfig_dialog (void)
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkUIManager *ui_manager;
|
GtkUIManager *ui_manager;
|
||||||
GtkWidget *empty_label;
|
GtkWidget *empty_label;
|
||||||
|
gchar *path;
|
||||||
|
|
||||||
gimp_ui_init ("gfig", TRUE);
|
gimp_ui_init ("gfig", TRUE);
|
||||||
|
|
||||||
|
@ -256,19 +257,23 @@ gfig_dialog (void)
|
||||||
|
|
||||||
gfig_stock_init ();
|
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 *gimprc = gimp_personal_rc_file ("gimprc");
|
||||||
gchar *full_path;
|
gchar *full_path;
|
||||||
gchar *esc_path;
|
gchar *esc_path;
|
||||||
|
|
||||||
full_path =
|
full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gfig",
|
||||||
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gfig",
|
G_SEARCHPATH_SEPARATOR_S,
|
||||||
G_SEARCHPATH_SEPARATOR_S,
|
"${gimp_data_dir}", G_DIR_SEPARATOR_S, "gfig",
|
||||||
"${gimp_data_dir}", G_DIR_SEPARATOR_S, "gfig",
|
NULL);
|
||||||
NULL);
|
|
||||||
esc_path = g_strescape (full_path, NULL);
|
esc_path = g_strescape (full_path, NULL);
|
||||||
g_free (full_path);
|
g_free (full_path);
|
||||||
|
|
||||||
|
|
|
@ -833,9 +833,10 @@ plugin_run (const gchar *name,
|
||||||
gint *nreturn_vals,
|
gint *nreturn_vals,
|
||||||
GimpParam **return_vals)
|
GimpParam **return_vals)
|
||||||
{
|
{
|
||||||
static GimpParam values[1];
|
static GimpParam values[1];
|
||||||
GimpRunMode run_mode;
|
GimpRunMode run_mode;
|
||||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||||
|
gchar *path;
|
||||||
|
|
||||||
/* Initialize */
|
/* Initialize */
|
||||||
run_mode = param[0].data.d_int32;
|
run_mode = param[0].data.d_int32;
|
||||||
|
@ -871,18 +872,22 @@ plugin_run (const gchar *name,
|
||||||
* Parse gflare path from gimprc and load gflares
|
* Parse gflare path from gimprc and load gflares
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gflare_path = gimp_gimprc_query ("gflare-path");
|
path = gimp_gimprc_query ("gflare-path");
|
||||||
if (! 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 *gimprc = gimp_personal_rc_file ("gimprc");
|
||||||
gchar *full_path;
|
gchar *full_path;
|
||||||
gchar *esc_path;
|
gchar *esc_path;
|
||||||
|
|
||||||
full_path =
|
full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gflare",
|
||||||
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gflare",
|
G_SEARCHPATH_SEPARATOR_S,
|
||||||
G_SEARCHPATH_SEPARATOR_S,
|
"${gimp_data_dir}", G_DIR_SEPARATOR_S, "gflare",
|
||||||
"${gimp_data_dir}", G_DIR_SEPARATOR_S, "gflare",
|
NULL);
|
||||||
NULL);
|
|
||||||
esc_path = g_strescape (full_path, NULL);
|
esc_path = g_strescape (full_path, NULL);
|
||||||
g_free (full_path);
|
g_free (full_path);
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,7 @@ static GList *parsepath_cached_path = NULL;
|
||||||
GList *
|
GList *
|
||||||
parsepath (void)
|
parsepath (void)
|
||||||
{
|
{
|
||||||
gchar *gimpdatasubdir, *defaultpath, *tmps;
|
gchar *gimpdatasubdir, *defaultpath, *rc_path, *path;
|
||||||
|
|
||||||
|
|
||||||
if (parsepath_cached_path)
|
if (parsepath_cached_path)
|
||||||
return parsepath_cached_path;
|
return parsepath_cached_path;
|
||||||
|
@ -114,9 +113,13 @@ parsepath (void)
|
||||||
defaultpath = g_build_filename (gimp_directory (),
|
defaultpath = g_build_filename (gimp_directory (),
|
||||||
"gimpressionist", gimpdatasubdir, NULL);
|
"gimpressionist", gimpdatasubdir, NULL);
|
||||||
|
|
||||||
tmps = gimp_gimprc_query ("gimpressionist-path");
|
path = gimp_gimprc_query ("gimpressionist-path");
|
||||||
|
if (path)
|
||||||
if (!tmps)
|
{
|
||||||
|
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))
|
if (!g_file_test (gimpdatasubdir, G_FILE_TEST_IS_DIR))
|
||||||
{
|
{
|
||||||
|
@ -137,12 +140,13 @@ parsepath (void)
|
||||||
"(or similar) to your gimprc file."), path);
|
"(or similar) to your gimprc file."), path);
|
||||||
g_free (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;
|
return parsepath_cached_path;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue