gimp r26679 - in trunk: . plug-ins/common plug-ins/gradient-flare



Author: mitch
Date: Wed Aug 20 14:19:35 2008
New Revision: 26679
URL: http://svn.gnome.org/viewvc/gimp?rev=26679&view=rev

Log:
2008-08-20  Michael Natterer  <mitch gimp org>

	* plug-ins/common/align-layers.c
	* plug-ins/common/blur-gauss.c
	* plug-ins/common/cartoon.c
	* plug-ins/common/edge-dog.c
	* plug-ins/common/edge-neon.c
	* plug-ins/common/edge-sobel.c
	* plug-ins/common/photocopy.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/softglow.c
	* plug-ins/gradient-flare/gradient-flare.c: pass error messages
	with the return values instead of calling g_message().



Modified:
   trunk/ChangeLog
   trunk/plug-ins/common/align-layers.c
   trunk/plug-ins/common/blur-gauss.c
   trunk/plug-ins/common/cartoon.c
   trunk/plug-ins/common/edge-dog.c
   trunk/plug-ins/common/edge-neon.c
   trunk/plug-ins/common/edge-sobel.c
   trunk/plug-ins/common/photocopy.c
   trunk/plug-ins/common/pixelize.c
   trunk/plug-ins/common/softglow.c
   trunk/plug-ins/gradient-flare/gradient-flare.c

Modified: trunk/plug-ins/common/align-layers.c
==============================================================================
--- trunk/plug-ins/common/align-layers.c	(original)
+++ trunk/plug-ins/common/align-layers.c	Wed Aug 20 14:19:35 2008
@@ -146,7 +146,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam  values[1];
+  static GimpParam  values[2];
   GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
   GimpRunMode       run_mode;
   gint              image_id, layer_num;
@@ -168,7 +168,9 @@
       gimp_image_get_layers (image_id, &layer_num);
       if (layer_num < 2)
         {
-          g_message (_("There are not enough layers to align."));
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("There are not enough layers to align.");
           return;
         }
       gimp_get_data (PLUG_IN_PROC, &VALS);

Modified: trunk/plug-ins/common/blur-gauss.c
==============================================================================
--- trunk/plug-ins/common/blur-gauss.c	(original)
+++ trunk/plug-ins/common/blur-gauss.c	Wed Aug 20 14:19:35 2008
@@ -265,7 +265,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   gint32             image_ID;
   GimpDrawable      *drawable;
   GimpRunMode        run_mode;
@@ -442,8 +442,10 @@
         }
       else
         {
-          g_message (_("Cannot operate on indexed color images."));
-          status = GIMP_PDB_EXECUTION_ERROR;
+          status        = GIMP_PDB_EXECUTION_ERROR;
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("Cannot operate on indexed color images.");
         }
 
       gimp_drawable_detach (drawable);

Modified: trunk/plug-ins/common/cartoon.c
==============================================================================
--- trunk/plug-ins/common/cartoon.c	(original)
+++ trunk/plug-ins/common/cartoon.c	Wed Aug 20 14:19:35 2008
@@ -160,7 +160,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   GimpRunMode        run_mode;
   GimpDrawable      *drawable;
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
@@ -226,8 +226,10 @@
         }
       else
         {
-          g_message (_("Cannot operate on indexed color images."));
-          status = GIMP_PDB_EXECUTION_ERROR;
+          status        = GIMP_PDB_EXECUTION_ERROR;
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("Cannot operate on indexed color images.");
         }
     }
 

Modified: trunk/plug-ins/common/edge-dog.c
==============================================================================
--- trunk/plug-ins/common/edge-dog.c	(original)
+++ trunk/plug-ins/common/edge-dog.c	Wed Aug 20 14:19:35 2008
@@ -153,7 +153,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   gint32             image_ID;
   GimpDrawable      *drawable;
   GimpRunMode        run_mode;
@@ -248,8 +248,10 @@
         }
       else
         {
-          g_message (_("Cannot operate on indexed color images."));
-          status = GIMP_PDB_EXECUTION_ERROR;
+          status        = GIMP_PDB_EXECUTION_ERROR;
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("Cannot operate on indexed color images.");
         }
 
       gimp_drawable_detach (drawable);

Modified: trunk/plug-ins/common/edge-neon.c
==============================================================================
--- trunk/plug-ins/common/edge-neon.c	(original)
+++ trunk/plug-ins/common/edge-neon.c	Wed Aug 20 14:19:35 2008
@@ -152,7 +152,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   GimpRunMode        run_mode;
   GimpDrawable      *drawable;
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
@@ -222,8 +222,10 @@
     }
   else
     {
-      g_message (_("Cannot operate on indexed color images."));
-      status = GIMP_PDB_EXECUTION_ERROR;
+      status        = GIMP_PDB_EXECUTION_ERROR;
+      *nreturn_vals = 2;
+      values[1].type          = GIMP_PDB_STRING;
+      values[1].data.d_string = _("Cannot operate on indexed color images.");
     }
 
   values[0].data.d_status = status;

Modified: trunk/plug-ins/common/edge-sobel.c
==============================================================================
--- trunk/plug-ins/common/edge-sobel.c	(original)
+++ trunk/plug-ins/common/edge-sobel.c	Wed Aug 20 14:19:35 2008
@@ -134,7 +134,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   GimpDrawable      *drawable;
   GimpRunMode        run_mode;
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
@@ -206,8 +206,10 @@
     }
   else
     {
-      /* g_message ("Cannot operate on indexed color images"); */
-      status = GIMP_PDB_EXECUTION_ERROR;
+      status        = GIMP_PDB_EXECUTION_ERROR;
+      *nreturn_vals = 2;
+      values[1].type          = GIMP_PDB_STRING;
+      values[1].data.d_string = _("Cannot operate on indexed color images.");
     }
 
   gimp_drawable_detach (drawable);

Modified: trunk/plug-ins/common/photocopy.c
==============================================================================
--- trunk/plug-ins/common/photocopy.c	(original)
+++ trunk/plug-ins/common/photocopy.c	Wed Aug 20 14:19:35 2008
@@ -171,7 +171,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   GimpRunMode        run_mode;
   GimpDrawable      *drawable;
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
@@ -238,8 +238,10 @@
         }
       else
         {
-          g_message (_("Cannot operate on indexed color images."));
-          status = GIMP_PDB_EXECUTION_ERROR;
+          status        = GIMP_PDB_EXECUTION_ERROR;
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("Cannot operate on indexed color images.");
         }
     }
 

Modified: trunk/plug-ins/common/pixelize.c
==============================================================================
--- trunk/plug-ins/common/pixelize.c	(original)
+++ trunk/plug-ins/common/pixelize.c	Wed Aug 20 14:19:35 2008
@@ -198,7 +198,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   GimpDrawable      *drawable;
   GimpRunMode        run_mode;
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
@@ -287,8 +287,10 @@
         }
       else
         {
-          /* g_message ("pixelize: cannot operate on indexed color images"); */
-          status = GIMP_PDB_EXECUTION_ERROR;
+          status        = GIMP_PDB_EXECUTION_ERROR;
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("Cannot operate on indexed color images.");
         }
     }
 

Modified: trunk/plug-ins/common/softglow.c
==============================================================================
--- trunk/plug-ins/common/softglow.c	(original)
+++ trunk/plug-ins/common/softglow.c	Wed Aug 20 14:19:35 2008
@@ -152,7 +152,7 @@
      gint             *nreturn_vals,
      GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   GimpRunMode        run_mode;
   GimpDrawable      *drawable;
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
@@ -218,8 +218,10 @@
         }
       else
         {
-          g_message (_("Cannot operate on indexed color images."));
-          status = GIMP_PDB_EXECUTION_ERROR;
+          status        = GIMP_PDB_EXECUTION_ERROR;
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("Cannot operate on indexed color images.");
         }
     }
 

Modified: trunk/plug-ins/gradient-flare/gradient-flare.c
==============================================================================
--- trunk/plug-ins/gradient-flare/gradient-flare.c	(original)
+++ trunk/plug-ins/gradient-flare/gradient-flare.c	Wed Aug 20 14:19:35 2008
@@ -827,7 +827,7 @@
             gint             *nreturn_vals,
             GimpParam       **return_vals)
 {
-  static GimpParam   values[1];
+  static GimpParam   values[2];
   GimpRunMode        run_mode;
   GimpPDBStatusType  status = GIMP_PDB_SUCCESS;
   gchar             *path;
@@ -961,8 +961,10 @@
         }
       else
         {
-          g_message (_("Cannot operate on indexed color images."));
-          status = GIMP_PDB_EXECUTION_ERROR;
+          status        = GIMP_PDB_EXECUTION_ERROR;
+          *nreturn_vals = 2;
+          values[1].type          = GIMP_PDB_STRING;
+          values[1].data.d_string = _("Cannot operate on indexed color images.");
         }
     }
 



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