gimp r25238 - in trunk: . plug-ins/common



Author: neo
Date: Wed Mar 26 13:12:02 2008
New Revision: 25238
URL: http://svn.gnome.org/viewvc/gimp?rev=25238&view=rev

Log:
2008-03-26  Sven Neumann  <sven gimp org>

	* plug-ins/common/gif-save.c
	* plug-ins/common/psd-save.c (save_image): improved error messages.


Modified:
   trunk/ChangeLog
   trunk/plug-ins/common/gif-save.c
   trunk/plug-ins/common/psd-save.c

Modified: trunk/plug-ins/common/gif-save.c
==============================================================================
--- trunk/plug-ins/common/gif-save.c	(original)
+++ trunk/plug-ins/common/gif-save.c	Wed Mar 26 13:12:02 2008
@@ -93,7 +93,8 @@
                                         gint32            drawable_ID,
                                         gint32            orig_image_ID);
 
-static gboolean sanity_check           (gint32            image_ID);
+static gboolean sanity_check           (const gchar      *filename,
+                                        gint32            image_ID);
 static gboolean bad_bounds_dialog      (void);
 
 static gboolean save_dialog            (gint32            image_ID);
@@ -180,9 +181,6 @@
 {
   static GimpParam  values[2];
   GimpPDBStatusType status = GIMP_PDB_SUCCESS;
-  gint32            image_ID;
-  gint32            drawable_ID;
-  gint32            orig_image_ID;
   GimpExportReturn  export = GIMP_EXPORT_CANCEL;
 
   run_mode = param[0].data.d_int32;
@@ -191,13 +189,20 @@
 
   *nreturn_vals = 1;
   *return_vals  = values;
+
   values[0].type          = GIMP_PDB_STATUS;
   values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
 
   if (strcmp (name, SAVE_PROC) == 0)
     {
+      const gchar *filename;
+      gint32       image_ID;
+      gint32       drawable_ID;
+      gint32       orig_image_ID;
+
       image_ID    = orig_image_ID = param[1].data.d_int32;
       drawable_ID = param[2].data.d_int32;
+      filename    = param[3].data.d_string;
 
       /*  eventually export the image */
       switch (run_mode)
@@ -220,7 +225,7 @@
           break;
         }
 
-      if (sanity_check (image_ID))
+      if (sanity_check (filename, image_ID))
         {
           switch (run_mode)
             {
@@ -531,7 +536,8 @@
 
 
 static gboolean
-sanity_check (gint32 image_ID)
+sanity_check (const gchar *filename,
+              gint32       image_ID)
 {
   gint32 *layers;
   gint    nlayers;
@@ -544,8 +550,8 @@
 
   if (image_width > G_MAXUSHORT || image_height > G_MAXUSHORT)
     {
-      g_message (_("The GIF format does not support images larger "
-                   "than %d x %d pixels."), G_MAXUSHORT, G_MAXUSHORT);
+      g_message (_("Unable to save '%s'.  The GIF file format does not support images that are more than %d pixels wide or tall."),
+                 gimp_filename_to_utf8 (filename), G_MAXUSHORT);
       return FALSE;
     }
 

Modified: trunk/plug-ins/common/psd-save.c
==============================================================================
--- trunk/plug-ins/common/psd-save.c	(original)
+++ trunk/plug-ins/common/psd-save.c	Wed Mar 26 13:12:02 2008
@@ -1528,9 +1528,9 @@
   IFDBG printf (" Function: save_image\n");
 
   if (gimp_image_width (image_id) > 30000 ||
-      gimp_image_height(image_id) > 30000)
+      gimp_image_height (image_id) > 30000)
   {
-      g_message (_("Unable to save '%s'.  The psd file format does not support images that are more than 30000 pixels wide or tall."),
+      g_message (_("Unable to save '%s'.  The PSD file format does not support images that are more than 30,000 pixels wide or tall."),
                  gimp_filename_to_utf8 (filename));
       return FALSE;
     }
@@ -1542,7 +1542,7 @@
       drawable = gimp_drawable_get (layers[i]);
       if (drawable->width > 30000 || drawable->height > 30000)
         {
-          g_message (_("Unable to save '%s'.  The psd file format does not support images with layers that are more than 30000 pixels wide or tall."),
+          g_message (_("Unable to save '%s'.  The PSD file format does not support images with layers that are more than 30,000 pixels wide or tall."),
                      gimp_filename_to_utf8 (filename));
           g_free (layers);
           return FALSE;



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