document the fact that gimp_image_get_filename() returns the filename in

2004-11-13  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/image.pdb: document the fact that
	gimp_image_get_filename() returns the filename in the filesystem
	encoding. Fixed gimp_image_get_name() to actually return the name
	in UTF-8 encoding.

	* app/pdb/image_cmds.c
	* libgimp/gimpimage_pdb.c

	* app/vectors/gimpbezierstroke.h: formatting.
This commit is contained in:
Sven Neumann 2004-11-13 20:34:43 +00:00 committed by Sven Neumann
parent eaa1d8f85d
commit 9a9a3ba3de
5 changed files with 34 additions and 12 deletions

View file

@ -1,3 +1,15 @@
2004-11-13 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/image.pdb: document the fact that
gimp_image_get_filename() returns the filename in the filesystem
encoding. Fixed gimp_image_get_name() to actually return the name
in UTF-8 encoding.
* app/pdb/image_cmds.c
* libgimp/gimpimage_pdb.c
* app/vectors/gimpbezierstroke.h: formatting.
2004-11-13 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.[ch]

View file

@ -3774,7 +3774,7 @@ static ProcRecord image_get_filename_proc =
{
"gimp_image_get_filename",
"Returns the specified image's filename.",
"This procedure returns the specified image's filename -- if it was loaded or has since been saved. Otherwise, returns NULL.",
"This procedure returns the specified image's filename in the filesystem encoding. The image has a filename only if it was loaded or has since been saved. Otherwise, this function returns %NULL.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
@ -3864,8 +3864,12 @@ image_get_name_invoker (Gimp *gimp,
if (filename)
{
name = g_path_get_basename (filename);
g_free (filename);
gchar *basename = g_path_get_basename (filename);
name = g_filename_to_utf8 (basename, -1, NULL, NULL, NULL);
g_free (basename);
if (! name)
name = g_strdup (_("(invalid UTF-8 string)"));
}
else
{

View file

@ -77,10 +77,10 @@ GimpStroke * gimp_bezier_stroke_new_ellipse (const GimpCoords *center,
gdouble radius_y);
GimpAnchor * gimp_bezier_stroke_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode);
GimpAnchor * gimp_bezier_stroke_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode);
#endif /* __GIMP_BEZIER_STROKE_H__ */

View file

@ -1835,8 +1835,9 @@ gimp_image_set_component_visible (gint32 image_ID,
*
* Returns the specified image's filename.
*
* This procedure returns the specified image's filename -- if it was
* loaded or has since been saved. Otherwise, returns NULL.
* This procedure returns the specified image's filename in the
* filesystem encoding. The image has a filename only if it was loaded
* or has since been saved. Otherwise, this function returns %NULL.
*
* Returns: The filename.
*/

View file

@ -1283,7 +1283,8 @@ CODE2
[ <<'CODE1', <<'CODE2' ]);
$help =~ s/\. $//;
$help .= <<'HELP';
-- if it was loaded or has since been saved. Otherwise, returns NULL.
in the filesystem encoding. The image has a filename only if it was loaded
or has since been saved. Otherwise, this function returns %NULL.
HELP
$outargs[0]->{alias} =~ s/g_strdup \((.*)\)/$1/;
@ -1305,8 +1306,12 @@ CODE2
if (filename)
{
name = g_path_get_basename (filename);
g_free (filename);
gchar *basename = g_path_get_basename (filename);
name = g_filename_to_utf8 (basename, -1, NULL, NULL, NULL);
g_free (basename);
if (! name)
name = g_strdup (_("(invalid UTF-8 string)"));
}
else
{