app/file-open.c app/file-utils.c app/gimprc.c app/plug_in.c

2001-10-24  Michael Natterer  <mitch@gimp.org>

	* app/file-open.c
	* app/file-utils.c
	* app/gimprc.c
	* app/plug_in.c
	* app/user_install.c
	* app/base/base.c
	* app/base/temp-buf.c
	* app/core/gimpdata.c
	* app/core/gimpdatafiles.c
	* app/core/gimpimagefile.c
	* app/gui/about-dialog.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/gui.c
	* app/gui/menus.c
	* app/gui/splash.c
	* app/gui/tips-dialog.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c
	* libgimpbase/gimpenv.c
	* plug-ins/FractalExplorer/FractalExplorer.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c
	* tools/pdbgen/pdb/fileops.pdb: use g_build_filename() all over
	the place instead of g_strconcat() and friends together with
	G_DIR_SEPARATOR_S. Also removed all attempts to manually detect
	double dir separators. LibGimpBase's searchpath utility functions
	don't append a G_DIR_SEPARATOR_S to all paths any more.

	* app/pdb/fileops_cmds.c: regenerated.
This commit is contained in:
Michael Natterer
2001-10-24 15:56:33 +00:00
committed by Michael Natterer
parent f766956e67
commit 840a9700f4
57 changed files with 689 additions and 670 deletions

View File

@ -267,6 +267,7 @@ gimp_data_create_filename (GimpData *data,
GList *path;
gchar *dir;
gchar *filename;
gchar *fullpath;
gchar *safe_name;
gint i;
gint unum = 1;
@ -290,27 +291,38 @@ gimp_data_create_filename (GimpData *data,
if (safe_name[i] == G_DIR_SEPARATOR || isspace (safe_name[i]))
safe_name[i] = '_';
filename = g_strdup_printf ("%s%s%s",
dir, safe_name,
filename = g_strdup_printf ("%s%s",
safe_name,
gimp_data_get_extension (data));
while ((file = fopen (filename, "r")))
fullpath = g_build_filename (dir, filename, NULL);
g_free (filename);
while ((file = fopen (fullpath, "r")))
{
fclose (file);
g_free (filename);
filename = g_strdup_printf ("%s%s_%d%s",
dir, safe_name, unum,
g_free (fullpath);
filename = g_strdup_printf ("%s_%d%s",
safe_name,
unum,
gimp_data_get_extension (data));
fullpath = g_build_filename (dir, filename, NULL);
g_free (filename);
unum++;
}
g_free (dir);
g_free (safe_name);
gimp_data_set_filename (data, filename);
gimp_data_set_filename (data, fullpath);
g_free (filename);
g_free (fullpath);
}
GimpData *