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



Author: neo
Date: Mon Apr  7 15:07:29 2008
New Revision: 25394
URL: http://svn.gnome.org/viewvc/gimp?rev=25394&view=rev

Log:
2008-04-07  Sven Neumann  <sven gimp org>

	* plug-ins/common/compose.c: use gimp_drawable_is_valid() to check
	if a drawable ID is valid.


Modified:
   trunk/ChangeLog
   trunk/plug-ins/common/compose.c

Modified: trunk/plug-ins/common/compose.c
==============================================================================
--- trunk/plug-ins/common/compose.c	(original)
+++ trunk/plug-ins/common/compose.c	Mon Apr  7 15:07:29 2008
@@ -703,9 +703,10 @@
   /* Check image sizes */
   if (compose_by_drawable)
     {
-      if (0 == gimp_drawable_bpp (inputs[first_ID].comp.ID))
+      if (! gimp_drawable_is_valid (inputs[first_ID].comp.ID))
         {
-          g_message (_("Specified layer %d not found"), inputs[first_ID].comp.ID);
+          g_message (_("Specified layer %d not found"),
+                     inputs[first_ID].comp.ID);
           return -1;
         }
 
@@ -716,9 +717,10 @@
 	{
           if (inputs[j].is_ID)
             {
-              if (0 == gimp_drawable_bpp (inputs[j].comp.ID))
+              if (! gimp_drawable_is_valid (inputs[j].comp.ID))
                 {
-                  g_message (_("Specified layer %d not found"), inputs[j].comp.ID);
+                  g_message (_("Specified layer %d not found"),
+                             inputs[j].comp.ID);
                   return -1;
                 }
 
@@ -786,6 +788,7 @@
       if (inputs[j].is_ID)
         {
           incr_src[j] = drawable_src[j]->bpp;
+
           if ((incr_src[j] != 1) && (incr_src[j] != 2))
             {
               g_message (_("Image is not a gray image (bpp=%d)"),
@@ -813,7 +816,7 @@
     {
       layer_ID_dst = composevals.source_layer_ID;
 
-      if (0 == gimp_drawable_bpp (layer_ID_dst))
+      if (! gimp_drawable_is_valid (layer_ID_dst))
         {
           g_message (_("Unable to recompose, source layer not found"));
           return -1;



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