Commit a70698c4 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

removed file_utils_filename_to_utf8() ...

2004-01-19  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...

	* libgimpbase/gimputils.[ch]: ... and added it here as
	gimp_filename_to_utf8(). Added some docs that promise less than
	the current implementation holds so that we can change the
	implementation later.

	* app/*/*.c: use gimp_filename_to_utf8() where
	file_utils_filenames_to_utf8() has been used before.

	* libgimpbase/gimpbase.def: changed accordingly.

	* configure.in: reset GIMP_INTERFACE_AGE.
parent e4467c1d
2004-01-19 Sven Neumann <sven@gimp.org>
* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...
* libgimpbase/gimputils.[ch]: ... and added it here as
gimp_filename_to_utf8(). Added some docs that promise less than
the current implementation holds so that we can change the
implementation later.
* app/*/*.c: use gimp_filename_to_utf8() where
file_utils_filenames_to_utf8() has been used before.
* libgimpbase/gimpbase.def: changed accordingly.
* configure.in: reset GIMP_INTERFACE_AGE.
2004-01-19 Pedro Gimeno <pggimeno@wanadoo.es>
* plug-ins/common/compose.c (compose)
......@@ -51,6 +51,8 @@ Bugs fixed in GIMP 2.0pre2
- 131721: Fix handling of alpha channels across undo steps (Mitch)
- 128025: Fix behaviour when there is a floating selection (Mitch)
- 131076: Make fuzzy select tool respect alpha channel in indexed mode (Mitch)
- 131779: Improve indexed scaling dialog (Mitch)
- 127673: Overlapping widgets in gradient editor {Mitch)
Other contributions:
David Odin, Manish Singh, Simon Budig, Michael Natterer, Sven Neumann,
......
......@@ -717,7 +717,7 @@ temp_buf_swap (TempBuf *buf)
if (g_file_test (filename, G_FILE_TEST_IS_DIR))
{
g_message ("Error in temp buf caching: \"%s\" is a directory (cannot overwrite)",
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (filename);
return;
}
......@@ -738,7 +738,7 @@ temp_buf_swap (TempBuf *buf)
unlink (filename);
perror ("Write error on temp buf");
g_message ("Cannot write \"%s\"",
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (filename);
return;
}
......@@ -748,7 +748,7 @@ temp_buf_swap (TempBuf *buf)
unlink (filename);
perror ("Error in temp buf caching");
g_message ("Cannot write \"%s\"",
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (filename);
return;
}
......
......@@ -185,7 +185,7 @@ tile_swap_exit1 (gpointer key,
if (def_swap_file->swap_file_end != 0)
{
g_warning ("swap file not empty: \"%s\"\n",
file_utils_filename_to_utf8 (swap_file->filename));
gimp_filename_to_utf8 (swap_file->filename));
tile_swap_print_gaps (def_swap_file);
}
......
......@@ -106,7 +106,7 @@ gimp_config_path_expand_only (const gchar *path,
#ifndef G_OS_WIN32
if (*p == '~')
{
length += strlen (file_utils_filename_to_utf8 (g_get_home_dir ()));
length += strlen (gimp_filename_to_utf8 (g_get_home_dir ()));
p += 1;
}
else
......@@ -161,7 +161,7 @@ gimp_config_path_expand_only (const gchar *path,
substs = g_renew (gchar *, substs, 2 * (n_substs + SUBSTS_ALLOC));
substs[2*n_substs] = token;
substs[2*n_substs + 1] = file_utils_filename_to_utf8 (s);
substs[2*n_substs + 1] = gimp_filename_to_utf8 (s);
n_substs++;
length += strlen (s);
......@@ -188,8 +188,8 @@ gimp_config_path_expand_only (const gchar *path,
if (*p == '~')
{
*n = '\0';
strcat (n, file_utils_filename_to_utf8 (g_get_home_dir ()));
n += strlen (file_utils_filename_to_utf8 (g_get_home_dir ()));
strcat (n, gimp_filename_to_utf8 (g_get_home_dir ()));
n += strlen (gimp_filename_to_utf8 (g_get_home_dir ()));
p += 1;
}
else
......
......@@ -472,7 +472,7 @@ gimp_config_file_copy (const gchar *source,
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (source), g_strerror (errno));
gimp_filename_to_utf8 (source), g_strerror (errno));
return FALSE;
}
......@@ -481,7 +481,7 @@ gimp_config_file_copy (const gchar *source,
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Could not open '%s' for writing: %s"),
file_utils_filename_to_utf8 (dest), g_strerror (errno));
gimp_filename_to_utf8 (dest), g_strerror (errno));
fclose (sfile);
return FALSE;
}
......@@ -492,7 +492,7 @@ gimp_config_file_copy (const gchar *source,
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Error while writing '%s': %s"),
file_utils_filename_to_utf8 (dest), g_strerror (errno));
gimp_filename_to_utf8 (dest), g_strerror (errno));
fclose (sfile);
fclose (dfile);
return FALSE;
......@@ -503,7 +503,7 @@ gimp_config_file_copy (const gchar *source,
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Error while reading '%s': %s"),
file_utils_filename_to_utf8 (source), g_strerror (errno));
gimp_filename_to_utf8 (source), g_strerror (errno));
fclose (sfile);
fclose (dfile);
return FALSE;
......@@ -515,7 +515,7 @@ gimp_config_file_copy (const gchar *source,
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Error while writing '%s': %s"),
file_utils_filename_to_utf8 (dest), g_strerror (errno));
gimp_filename_to_utf8 (dest), g_strerror (errno));
return FALSE;
}
......@@ -542,7 +542,7 @@ gimp_config_file_backup_on_error (const gchar *filename,
g_message (_("There was an error parsing your '%s' file. "
"Default values will be used. A backup of your "
"configuration has been created at '%s'."),
name, file_utils_filename_to_utf8 (backup));
name, gimp_filename_to_utf8 (backup));
g_free (backup);
......
......@@ -341,7 +341,7 @@ gimp_rc_load (GimpRc *rc)
if (rc->verbose)
g_print (_("Parsing '%s'\n"),
file_utils_filename_to_utf8 (rc->system_gimprc));
gimp_filename_to_utf8 (rc->system_gimprc));
if (! gimp_config_deserialize_file (GIMP_CONFIG (rc),
rc->system_gimprc, NULL, &error))
......@@ -354,7 +354,7 @@ gimp_rc_load (GimpRc *rc)
if (rc->verbose)
g_print (_("Parsing '%s'\n"),
file_utils_filename_to_utf8 (rc->user_gimprc));
gimp_filename_to_utf8 (rc->user_gimprc));
if (! gimp_config_deserialize_file (GIMP_CONFIG (rc),
rc->user_gimprc, NULL, &error))
......@@ -579,7 +579,7 @@ gimp_rc_save (GimpRc *rc)
if (rc->verbose)
g_print (_("Saving '%s'\n"),
file_utils_filename_to_utf8 (rc->user_gimprc));
gimp_filename_to_utf8 (rc->user_gimprc));
if (! gimp_config_serialize_to_file (GIMP_CONFIG (rc),
rc->user_gimprc,
......
......@@ -92,7 +92,7 @@ gimp_scanner_new_file (const gchar *filename,
g_set_error (error, GIMP_CONFIG_ERROR, code,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -100,7 +100,7 @@ gimp_scanner_new_file (const gchar *filename,
/* gimp_scanner_new() takes a "name" for the scanner, not a filename. Thus
* do convert to UTF-8.
*/
scanner = gimp_scanner_new (file_utils_filename_to_utf8 (filename), fd, error);
scanner = gimp_scanner_new (gimp_filename_to_utf8 (filename), fd, error);
g_scanner_input_file (scanner, fd);
......
......@@ -414,7 +414,7 @@ gimp_brush_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -557,7 +557,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"),
(gint) sizeof (header),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -592,7 +592,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Unknown depth %d."),
file_utils_filename_to_utf8 (filename), header.bytes);
gimp_filename_to_utf8 (filename), header.bytes);
return NULL;
}
/* fallthrough */
......@@ -605,7 +605,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Unknown version %d."),
file_utils_filename_to_utf8 (filename), header.version);
gimp_filename_to_utf8 (filename), header.version);
return NULL;
}
......@@ -621,14 +621,14 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (name);
return NULL;
}
utf8 = gimp_any_to_utf8 (name, -1,
_("Invalid UTF-8 string in brush file '%s'."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (name);
name = utf8;
}
......@@ -726,7 +726,7 @@ gimp_brush_load_brush (gint fd,
_("Fatal parse error in brush file '%s': "
"Unsupported brush depth %d\n"
"GIMP brushes must be GRAY or RGBA."),
file_utils_filename_to_utf8 (filename), header.bytes);
gimp_filename_to_utf8 (filename), header.bytes);
g_free (name);
return NULL;
}
......@@ -737,7 +737,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (name);
return NULL;
}
......
......@@ -414,7 +414,7 @@ gimp_brush_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -557,7 +557,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"),
(gint) sizeof (header),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -592,7 +592,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Unknown depth %d."),
file_utils_filename_to_utf8 (filename), header.bytes);
gimp_filename_to_utf8 (filename), header.bytes);
return NULL;
}
/* fallthrough */
......@@ -605,7 +605,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Unknown version %d."),
file_utils_filename_to_utf8 (filename), header.version);
gimp_filename_to_utf8 (filename), header.version);
return NULL;
}
......@@ -621,14 +621,14 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (name);
return NULL;
}
utf8 = gimp_any_to_utf8 (name, -1,
_("Invalid UTF-8 string in brush file '%s'."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (name);
name = utf8;
}
......@@ -726,7 +726,7 @@ gimp_brush_load_brush (gint fd,
_("Fatal parse error in brush file '%s': "
"Unsupported brush depth %d\n"
"GIMP brushes must be GRAY or RGBA."),
file_utils_filename_to_utf8 (filename), header.bytes);
gimp_filename_to_utf8 (filename), header.bytes);
g_free (name);
return NULL;
}
......@@ -737,7 +737,7 @@ gimp_brush_load_brush (gint fd,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File appears truncated."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_free (name);
return NULL;
}
......
......@@ -129,7 +129,7 @@ gimp_brush_generated_save (GimpData *data,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for writing: %s"),
file_utils_filename_to_utf8 (data->filename),
gimp_filename_to_utf8 (data->filename),
g_strerror (errno));
return FALSE;
}
......@@ -378,7 +378,7 @@ gimp_brush_generated_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -390,7 +390,7 @@ gimp_brush_generated_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Not a GIMP brush file."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
return NULL;
}
......@@ -401,7 +401,7 @@ gimp_brush_generated_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Unknown GIMP brush version."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
return NULL;
}
......
......@@ -129,7 +129,7 @@ gimp_brush_generated_save (GimpData *data,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for writing: %s"),
file_utils_filename_to_utf8 (data->filename),
gimp_filename_to_utf8 (data->filename),
g_strerror (errno));
return FALSE;
}
......@@ -378,7 +378,7 @@ gimp_brush_generated_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -390,7 +390,7 @@ gimp_brush_generated_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Not a GIMP brush file."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
return NULL;
}
......@@ -401,7 +401,7 @@ gimp_brush_generated_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Unknown GIMP brush version."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
return NULL;
}
......
......@@ -129,7 +129,7 @@ gimp_brush_generated_save (GimpData *data,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for writing: %s"),
file_utils_filename_to_utf8 (data->filename),
gimp_filename_to_utf8 (data->filename),
g_strerror (errno));
return FALSE;
}
......@@ -378,7 +378,7 @@ gimp_brush_generated_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -390,7 +390,7 @@ gimp_brush_generated_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Not a GIMP brush file."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
return NULL;
}
......@@ -401,7 +401,7 @@ gimp_brush_generated_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"Unknown GIMP brush version."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
return NULL;
}
......
......@@ -352,7 +352,7 @@ gimp_brush_pipe_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -374,7 +374,7 @@ gimp_brush_pipe_load (const gchar *filename,
else
{
g_message (_("Invalid UTF-8 string in brush file '%s'."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed"));
}
}
......@@ -385,7 +385,7 @@ gimp_brush_pipe_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File is corrupt."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
close (fd);
return NULL;
}
......@@ -405,7 +405,7 @@ gimp_brush_pipe_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File is corrupt."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
close (fd);
g_object_unref (pipe);
g_string_free (buffer, TRUE);
......@@ -495,7 +495,7 @@ gimp_brush_pipe_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File is corrupt."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
close (fd);
g_object_unref (pipe);
return NULL;
......
......@@ -352,7 +352,7 @@ gimp_brush_pipe_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -374,7 +374,7 @@ gimp_brush_pipe_load (const gchar *filename,
else
{
g_message (_("Invalid UTF-8 string in brush file '%s'."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
gimp_object_set_name (GIMP_OBJECT (pipe), _("Unnamed"));
}
}
......@@ -385,7 +385,7 @@ gimp_brush_pipe_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File is corrupt."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
close (fd);
return NULL;
}
......@@ -405,7 +405,7 @@ gimp_brush_pipe_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File is corrupt."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
close (fd);
g_object_unref (pipe);
g_string_free (buffer, TRUE);
......@@ -495,7 +495,7 @@ gimp_brush_pipe_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"File is corrupt."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
close (fd);
g_object_unref (pipe);
return NULL;
......
......@@ -285,7 +285,7 @@ gimp_environ_table_load_env_file (const GimpDatafileData *file_data,
if (name[0] == '\0')
{
g_message (_("Empty variable name in environment file %s"),
file_utils_filename_to_utf8 (file_data->filename));
gimp_filename_to_utf8 (file_data->filename));
continue;
}
......@@ -303,7 +303,7 @@ gimp_environ_table_load_env_file (const GimpDatafileData *file_data,
if (! gimp_environ_table_legal_name (name))
{
g_message (_("Illegal variable name in environment file %s: %s"),
file_utils_filename_to_utf8 (file_data->filename), name);
gimp_filename_to_utf8 (file_data->filename), name);
continue;
}
......
......@@ -356,7 +356,7 @@ gimp_gradient_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -366,7 +366,7 @@ gimp_gradient_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in gradient file '%s': "
"Not a GIMP gradient file."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
fclose (file);
return NULL;
}
......@@ -382,7 +382,7 @@ gimp_gradient_load (const gchar *filename,
utf8 = gimp_any_to_utf8 (&line[strlen ("Name: ")], -1,
_("Invalid UTF-8 string in gradient file '%s'."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_strstrip (utf8);
gimp_object_set_name (GIMP_OBJECT (gradient), utf8);
......@@ -411,7 +411,7 @@ gimp_gradient_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in gradient file '%s': "
"File is corrupt."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_object_unref (gradient);
fclose (file);
return NULL;
......@@ -467,7 +467,7 @@ gimp_gradient_load (const gchar *filename,
else
{
g_message (_("Corrupt segment %d in gradient file '%s'."),
i, file_utils_filename_to_utf8 (filename));
i, gimp_filename_to_utf8 (filename));
}
prev = seg;
......@@ -509,7 +509,7 @@ gimp_gradient_save (GimpData *data,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for writing: %s"),
file_utils_filename_to_utf8 (data->filename),
gimp_filename_to_utf8 (data->filename),
g_strerror (errno));
return FALSE;
}
......@@ -595,7 +595,7 @@ gimp_gradient_save_as_pov (GimpGradient *gradient,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for writing: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return FALSE;
}
else
......
......@@ -379,7 +379,7 @@ gimp_palette_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -396,12 +396,12 @@ gimp_palette_load (const gchar *filename,
_("Fatal parse error in palette file '%s': "
"Missing magic header.\n"
"Does this file need converting from DOS?"),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
else
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in palette file '%s': "
"Missing magic header."),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
fclose (fp);
......@@ -417,7 +417,7 @@ gimp_palette_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in palette file '%s': "
"Read error in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
fclose (fp);
g_object_unref (palette);
return NULL;
......@@ -431,7 +431,7 @@ gimp_palette_load (const gchar *filename,
utf8 = gimp_any_to_utf8 (&str[strlen ("Name: ")], -1,
_("Invalid UTF-8 string in palette file '%s'"),
file_utils_filename_to_utf8 (filename));
gimp_filename_to_utf8 (filename));
g_strstrip (utf8);
gimp_object_set_name (GIMP_OBJECT (palette), utf8);
......@@ -442,7 +442,7 @@ gimp_palette_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in palette file '%s': "
"Read error in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
fclose (fp);
g_object_unref (palette);
return NULL;
......@@ -461,7 +461,7 @@ gimp_palette_load (const gchar *filename,
g_message (_("Reading palette file '%s': "
"Invalid number of columns in line %d. "
"Using default value."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
columns = 0;
}
......@@ -472,7 +472,7 @@ gimp_palette_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in palette file '%s': "
"Read error in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
fclose (fp);
g_object_unref (palette);
return NULL;
......@@ -506,7 +506,7 @@ gimp_palette_load (const gchar *filename,
/* maybe we should just abort? */
g_message (_("Reading palette file '%s': "
"Missing RED component in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
tok = strtok (NULL, " \t");
if (tok)
......@@ -514,7 +514,7 @@ gimp_palette_load (const gchar *filename,
else
g_message (_("Reading palette '%s': "
"Missing GREEN component in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
tok = strtok (NULL, " \t");
if (tok)
......@@ -522,7 +522,7 @@ gimp_palette_load (const gchar *filename,
else
g_message (_("Reading palette file '%s': "
"Missing BLUE component in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
/* optional name */
tok = strtok (NULL, "\n");
......@@ -532,7 +532,7 @@ gimp_palette_load (const gchar *filename,
b < 0 || b > 255)
g_message (_("Reading palette file '%s': "
"RGB value out of range in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
gimp_rgba_set_uchar (&color,
(guchar) r,
......@@ -551,7 +551,7 @@ gimp_palette_load (const gchar *filename,
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in palette file '%s': "
"Read error in line %d."),
file_utils_filename_to_utf8 (filename), linenum);
gimp_filename_to_utf8 (filename), linenum);
fclose (fp);
g_object_unref (palette);
return NULL;
......@@ -590,7 +590,7 @@ gimp_palette_save (GimpData *data,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for writing: %s"),
file_utils_filename_to_utf8 (data->filename),
gimp_filename_to_utf8 (data->filename),
g_strerror (errno));
return FALSE;
}
......
......@@ -379,7 +379,7 @@ gimp_palette_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_OPEN,
_("Could not open '%s' for reading: %s"),
file_utils_filename_to_utf8 (filename), g_strerror (errno));
gimp_filename_to_utf8 (filename), g_strerror (errno));
return NULL;
}
......@@ -396,12 +396,12 @@ gimp_palette_load (const gchar *filename,
_("Fatal parse error in palette file '%s': "
"Missing magic header.\n"
"Does this file need converting from DOS?"),
file_utils_filename_to_utf8 (filename));