gimp r28099 - in trunk: . app/pdb libgimp tools/pdbgen/pdb



Author: neo
Date: Wed Mar  4 18:24:29 2009
New Revision: 28099
URL: http://svn.gnome.org/viewvc/gimp?rev=28099&view=rev

Log:
2009-03-04  Sven Neumann  <sven gimp org>

	Bug 574149 â Can't get name/filename of files loaded from URI

	* tools/pdbgen/pdb/image.pdb (image_get_name_invoker): use
	gimp_image_get_display_name().

	* app/pdb/image-cmds.c
	* libgimp/gimpimage_pdb.c: regenerated.



Modified:
   trunk/ChangeLog
   trunk/app/pdb/image-cmds.c
   trunk/libgimp/gimpimage_pdb.c
   trunk/tools/pdbgen/pdb/image.pdb

Modified: trunk/app/pdb/image-cmds.c
==============================================================================
--- trunk/app/pdb/image-cmds.c	(original)
+++ trunk/app/pdb/image-cmds.c	Wed Mar  4 18:24:29 2009
@@ -534,7 +534,7 @@
       gimp_image_rotate (image, context, rotate_type, progress);
 
       if (progress)
-        gimp_progress_end (progress);  
+        gimp_progress_end (progress);
     }
 
   return gimp_procedure_get_return_values (procedure, success,
@@ -2189,12 +2189,7 @@
 
   if (success)
     {
-      gchar *filename = gimp_image_get_filename (image);
-
-      if (filename)
-        name = g_filename_display_basename (filename);
-      else
-        name = g_strdup (_("Untitled"));
+      name = g_strdup (gimp_image_get_display_name (image));
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
@@ -4688,7 +4683,7 @@
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-get-name",
                                      "Returns the specified image's name.",
-                                     "This procedure returns the specified image's name.",
+                                     "This procedure returns the image's name. If the image has a filename, then this is the base name (the last component of the path).",
                                      "Spencer Kimball & Peter Mattis",
                                      "Spencer Kimball & Peter Mattis",
                                      "1995-1996",

Modified: trunk/libgimp/gimpimage_pdb.c
==============================================================================
--- trunk/libgimp/gimpimage_pdb.c	(original)
+++ trunk/libgimp/gimpimage_pdb.c	Wed Mar  4 18:24:29 2009
@@ -2412,7 +2412,9 @@
  *
  * Returns the specified image's name.
  *
- * This procedure returns the specified image's name.
+ * This procedure returns the image's name. If the image has a
+ * filename, then this is the base name (the last component of the
+ * path).
  *
  * Returns: The name.
  */

Modified: trunk/tools/pdbgen/pdb/image.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/image.pdb	(original)
+++ trunk/tools/pdbgen/pdb/image.pdb	Wed Mar  4 18:24:29 2009
@@ -428,7 +428,7 @@
   gimp_image_rotate (image, context, rotate_type, progress);
 
   if (progress)
-    gimp_progress_end (progress);  
+    gimp_progress_end (progress);
 }
 CODE
     );
@@ -2212,7 +2212,10 @@
 
 sub image_get_name {
     $blurb = "Returns the specified image's name.";
-    $help  = "This procedure returns the specified image's name.";
+    $help  =  <<'HELP';
+This procedure returns the image's name. If the image has a filename,
+then this is the base name (the last component of the path).
+HELP
 
     &std_pdb_misc;
 
@@ -2229,12 +2232,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  gchar *filename = gimp_image_get_filename (image);
-
-  if (filename)
-    name = g_filename_display_basename (filename);
-  else
-    name = g_strdup (_("Untitled"));
+  name = g_strdup (gimp_image_get_display_name (image));
 }
 CODE
     );
@@ -2244,7 +2242,7 @@
     $blurb = "Returns the specified image's resolution.";
 
     $help = <<'HELP';
-This procedure returns the specified image's resolution in dots per inch. 
+This procedure returns the specified image's resolution in dots per inch.
 This value is independent of any of the layers in this image.
 HELP
 
@@ -2275,7 +2273,7 @@
     $blurb = "Sets the specified image's resolution.";
 
     $help = <<'HELP';
-This procedure sets the specified image's resolution in dots per inch. 
+This procedure sets the specified image's resolution in dots per inch.
 This value is independent of any of the layers in this image.
 No scaling or resizing is performed.
 HELP



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]