gimp r27844 - in branches/gimp-2-6: . plug-ins/file-jpeg



Author: neo
Date: Sun Dec 28 02:11:31 2008
New Revision: 27844
URL: http://svn.gnome.org/viewvc/gimp?rev=27844&view=rev

Log:
2008-12-28  Sven Neumann  <sven gimp org>

	Merged from trunk:

	Bug 563985 â jpg save dialog: "cancel" is treated like "commit"
	for settings

	* plug-ins/file-jpeg/jpeg.c (run): only attach the comment and
	settings to the image if the save was successful.



Modified:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/plug-ins/file-jpeg/jpeg.c

Modified: branches/gimp-2-6/plug-ins/file-jpeg/jpeg.c
==============================================================================
--- branches/gimp-2-6/plug-ins/file-jpeg/jpeg.c	(original)
+++ branches/gimp-2-6/plug-ins/file-jpeg/jpeg.c	Sun Dec 28 02:11:31 2008
@@ -498,28 +498,31 @@
             gimp_display_delete (display_ID);
           else
             gimp_image_delete (image_ID);
-        }
-
-      /* pw - now we need to change the defaults to be whatever
-       * was used to save this image.  Dump the old parasites
-       * and add new ones. */
+       }
 
-      gimp_image_parasite_detach (orig_image_ID, "gimp-comment");
-      if (image_comment && strlen (image_comment))
+      if (status == GIMP_PDB_SUCCESS)
         {
-          parasite = gimp_parasite_new ("gimp-comment",
-                                        GIMP_PARASITE_PERSISTENT,
-                                        strlen (image_comment) + 1,
-                                        image_comment);
+          /* pw - now we need to change the defaults to be whatever
+           * was used to save this image.  Dump the old parasites
+           * and add new ones. */
+
+          gimp_image_parasite_detach (orig_image_ID, "gimp-comment");
+          if (image_comment && strlen (image_comment))
+            {
+              parasite = gimp_parasite_new ("gimp-comment",
+                                            GIMP_PARASITE_PERSISTENT,
+                                            strlen (image_comment) + 1,
+                                            image_comment);
+              gimp_image_parasite_attach (orig_image_ID, parasite);
+              gimp_parasite_free (parasite);
+            }
+          gimp_image_parasite_detach (orig_image_ID, "jpeg-save-options");
+
+          parasite = gimp_parasite_new ("jpeg-save-options",
+                                    0, sizeof (jsvals), &jsvals);
           gimp_image_parasite_attach (orig_image_ID, parasite);
           gimp_parasite_free (parasite);
         }
-      gimp_image_parasite_detach (orig_image_ID, "jpeg-save-options");
-
-      parasite = gimp_parasite_new ("jpeg-save-options",
-                                    0, sizeof (jsvals), &jsvals);
-      gimp_image_parasite_attach (orig_image_ID, parasite);
-      gimp_parasite_free (parasite);
     }
   else
     {



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