use g_filename_display_basename().

2005-02-20  Sven Neumann  <sven@gimp.org>

	* plug-ins/gimpressionist/presets.c (get_object_name): use
	g_filename_display_basename().
This commit is contained in:
Sven Neumann 2005-02-20 21:58:40 +00:00 committed by Sven Neumann
parent 1e6a94e614
commit 0c7778377b
2 changed files with 24 additions and 2 deletions

View File

@ -1,3 +1,22 @@
2005-02-20 Sven Neumann <sven@gimp.org>
* plug-ins/gimpressionist/presets.c (get_object_name): use
g_filename_display_basename().
2005-02-20 Sven Neumann <sven@gimp.org>
* app/core/gimpgradient-load.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/plug-in/plug-in.c
* libgimpbase/gimputils.c
* libgimpmodule/gimpmodule.c
* libgimpwidgets/gimppatheditor.c
* tools/pdbgen/pdb/image.pdb: use g_filename_display_name() or
g_filename_display_basename() where appropriate.
* app/pdb/image_cmds.c: regenerated.
2005-02-20 Sven Neumann <sven@gimp.org>
* app/base/pixel-processor.c: better error reporting.

View File

@ -125,8 +125,8 @@ get_object_name (gchar *dir, gchar *filename, void *context)
* */
full_path = g_build_filename (dir, filename, NULL);
unprocessed_line = get_early_line_from_preset (full_path, "name=");
g_free (full_path);
if (unprocessed_line)
{
ret = g_strcompress (unprocessed_line);
@ -135,8 +135,11 @@ get_object_name (gchar *dir, gchar *filename, void *context)
else
{
/* The object name defaults to a filename-derived description */
ret = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
ret = g_filename_display_basename (full_path);
}
g_free (full_path);
return ret;
}