gimp r28100 - in branches/gimp-2-6: . app/pdb libgimp tools/pdbgen/pdb



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

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

	Merged from trunk:

	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:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/app/pdb/image-cmds.c
   branches/gimp-2-6/libgimp/gimpimage_pdb.c
   branches/gimp-2-6/tools/pdbgen/pdb/image.pdb

Modified: branches/gimp-2-6/app/pdb/image-cmds.c
==============================================================================
--- branches/gimp-2-6/app/pdb/image-cmds.c	(original)
+++ branches/gimp-2-6/app/pdb/image-cmds.c	Wed Mar  4 18:25:22 2009
@@ -535,7 +535,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,
@@ -2190,12 +2190,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,
@@ -4689,7 +4684,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: branches/gimp-2-6/libgimp/gimpimage_pdb.c
==============================================================================
--- branches/gimp-2-6/libgimp/gimpimage_pdb.c	(original)
+++ branches/gimp-2-6/libgimp/gimpimage_pdb.c	Wed Mar  4 18:25:22 2009
@@ -2413,7 +2413,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: branches/gimp-2-6/tools/pdbgen/pdb/image.pdb
==============================================================================
--- branches/gimp-2-6/tools/pdbgen/pdb/image.pdb	(original)
+++ branches/gimp-2-6/tools/pdbgen/pdb/image.pdb	Wed Mar  4 18:25:22 2009
@@ -429,7 +429,7 @@
   gimp_image_rotate (image, context, rotate_type, progress);
 
   if (progress)
-    gimp_progress_end (progress);  
+    gimp_progress_end (progress);
 }
 CODE
     );
@@ -2213,7 +2213,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;
 
@@ -2230,12 +2233,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
     );
@@ -2245,7 +2243,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
 
@@ -2276,7 +2274,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]