gimp r24790 - in trunk: . app/pdb tools/pdbgen/pdb



Author: mitch
Date: Mon Feb  4 17:12:25 2008
New Revision: 24790
URL: http://svn.gnome.org/viewvc/gimp?rev=24790&view=rev

Log:
2008-02-04  Michael Natterer  <mitch gimp org>

	* app/pdb/gimppdb-utils.[ch]: add gimp_pdb_item_is_attached()
	which is a replacement for gimp_item_is_attached() and returns a
	proper error message.

	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: use it.

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.



Modified:
   trunk/ChangeLog
   trunk/app/pdb/color_cmds.c
   trunk/app/pdb/drawable_cmds.c
   trunk/app/pdb/drawable_transform_cmds.c
   trunk/app/pdb/edit_cmds.c
   trunk/app/pdb/floating_sel_cmds.c
   trunk/app/pdb/gimppdb-utils.c
   trunk/app/pdb/gimppdb-utils.h
   trunk/app/pdb/layer_cmds.c
   trunk/app/pdb/paint_tools_cmds.c
   trunk/app/pdb/selection_cmds.c
   trunk/app/pdb/text_tool_cmds.c
   trunk/app/pdb/transform_tools_cmds.c
   trunk/tools/pdbgen/pdb/color.pdb
   trunk/tools/pdbgen/pdb/drawable.pdb
   trunk/tools/pdbgen/pdb/drawable_transform.pdb
   trunk/tools/pdbgen/pdb/edit.pdb
   trunk/tools/pdbgen/pdb/floating_sel.pdb
   trunk/tools/pdbgen/pdb/layer.pdb
   trunk/tools/pdbgen/pdb/paint_tools.pdb
   trunk/tools/pdbgen/pdb/selection.pdb
   trunk/tools/pdbgen/pdb/text_tool.pdb
   trunk/tools/pdbgen/pdb/transform_tools.pdb

Modified: trunk/app/pdb/color_cmds.c
==============================================================================
--- trunk/app/pdb/color_cmds.c	(original)
+++ trunk/app/pdb/color_cmds.c	Mon Feb  4 17:12:25 2008
@@ -44,6 +44,7 @@
 #include "core/gimpdrawable-threshold.h"
 #include "core/gimpdrawable.h"
 #include "gimp-intl.h"
+#include "gimppdb-utils.h"
 
 #include "internal_procs.h"
 
@@ -67,7 +68,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -106,7 +107,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable) ||
           (! gimp_drawable_has_alpha (drawable) &&
            channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -140,7 +141,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -166,7 +167,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -194,7 +195,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -220,7 +221,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           ! gimp_drawable_is_rgb (drawable))
         success = FALSE;
 
@@ -248,7 +249,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           ! gimp_drawable_is_rgb (drawable))
         success = FALSE;
 
@@ -276,7 +277,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -302,7 +303,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -334,7 +335,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable) || (num_points & 1) ||
           (! gimp_drawable_has_alpha (drawable) &&
            channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -371,7 +372,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable) || (num_bytes != 256) ||
           (! gimp_drawable_has_alpha (drawable) &&
            channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -412,7 +413,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -447,7 +448,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           ! gimp_drawable_is_rgb (drawable))
         success = FALSE;
 
@@ -487,7 +488,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable) ||
           (! gimp_drawable_has_alpha (drawable) &&
            channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -554,7 +555,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable))
         success = FALSE;
 
@@ -585,7 +586,7 @@
 
   if (success)
     {
-      if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
           gimp_drawable_is_indexed (drawable) ||
           (low_threshold > high_threshold))
         success = FALSE;

Modified: trunk/app/pdb/drawable_cmds.c
==============================================================================
--- trunk/app/pdb/drawable_cmds.c	(original)
+++ trunk/app/pdb/drawable_cmds.c	Mon Feb  4 17:12:25 2008
@@ -41,6 +41,7 @@
 #include "core/gimplayer.h"
 #include "core/gimplayermask.h"
 #include "gimp-intl.h"
+#include "gimppdb-utils.h"
 #include "plug-in/gimpplugin.h"
 #include "plug-in/gimppluginmanager.h"
 
@@ -814,7 +815,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           const gchar *undo_desc = _("Plug-In");
 
@@ -1016,7 +1017,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         gimp_drawable_offset (drawable, context, wrap_around, fill_type,
                               offset_x, offset_y);
       else
@@ -1205,7 +1206,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         gimp_drawable_foreground_extract (drawable, mode, mask, progress);
       else
         success = FALSE;

Modified: trunk/app/pdb/drawable_transform_cmds.c
==============================================================================
--- trunk/app/pdb/drawable_transform_cmds.c	(original)
+++ trunk/app/pdb/drawable_transform_cmds.c	Mon Feb  4 17:12:25 2008
@@ -38,6 +38,7 @@
 #include "core/gimpimage.h"
 #include "core/gimpprogress.h"
 #include "gimp-intl.h"
+#include "gimppdb-utils.h"
 
 #include "internal_procs.h"
 
@@ -68,7 +69,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -124,7 +125,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -194,7 +195,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -282,7 +283,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -362,7 +363,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -436,7 +437,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -492,7 +493,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -566,7 +567,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -650,7 +651,7 @@
     {
       gint x, y, width, height;
 
-      success = (gimp_item_is_attached (GIMP_ITEM (drawable)) && x0 < x1 && y0 < y1);
+      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) && x0 < x1 && y0 < y1);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -721,7 +722,7 @@
     {
       gint x, y, width, height;
 
-      success = (gimp_item_is_attached (GIMP_ITEM (drawable)) && x0 < x1 && y0 < y1);
+      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) && x0 < x1 && y0 < y1);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -798,7 +799,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -865,7 +866,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -952,7 +953,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -1030,7 +1031,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -1122,7 +1123,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -1208,7 +1209,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))

Modified: trunk/app/pdb/edit_cmds.c
==============================================================================
--- trunk/app/pdb/edit_cmds.c	(original)
+++ trunk/app/pdb/edit_cmds.c	Mon Feb  4 17:12:25 2008
@@ -63,7 +63,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
           GError    *my_error = NULL;
@@ -106,7 +106,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
           GError    *my_error = NULL;
@@ -188,7 +188,8 @@
 
   if (success)
     {
-      if (gimp->global_buffer && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp->global_buffer &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
                                           drawable, gimp->global_buffer,
@@ -260,7 +261,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
           GError    *my_error = NULL;
@@ -310,7 +311,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
           GError    *my_error = NULL;
@@ -408,7 +409,7 @@
     {
       GimpBuffer *buffer = gimp_pdb_get_buffer (gimp, buffer_name, error);
 
-      if (buffer && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (buffer && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
                                           drawable, buffer,
@@ -481,7 +482,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
 
@@ -511,7 +512,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
 
@@ -554,7 +555,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
           gboolean   do_seed_fill;
@@ -609,7 +610,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
           gboolean   do_seed_fill;
@@ -676,7 +677,7 @@
 
   if (success)
     {
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success && supersample)
         {
@@ -727,7 +728,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage      *image = gimp_item_get_image (GIMP_ITEM (drawable));
           GimpStrokeDesc *desc  = gimp_stroke_desc_new (gimp, context);
@@ -764,7 +765,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpStrokeDesc *desc  = gimp_stroke_desc_new (gimp, context);
 

Modified: trunk/app/pdb/floating_sel_cmds.c
==============================================================================
--- trunk/app/pdb/floating_sel_cmds.c	(original)
+++ trunk/app/pdb/floating_sel_cmds.c	Mon Feb  4 17:12:25 2008
@@ -32,6 +32,7 @@
 #include "core/gimplayer-floating-sel.h"
 #include "core/gimplayer.h"
 #include "gimp-intl.h"
+#include "gimppdb-utils.h"
 #include "gimppdberror.h"
 
 #include "internal_procs.h"
@@ -147,7 +148,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         floating_sel_attach (layer, drawable);
       else
         success = FALSE;

Modified: trunk/app/pdb/gimppdb-utils.c
==============================================================================
--- trunk/app/pdb/gimppdb-utils.c	(original)
+++ trunk/app/pdb/gimppdb-utils.c	Mon Feb  4 17:12:25 2008
@@ -28,6 +28,7 @@
 #include "core/gimpbrushgenerated.h"
 #include "core/gimpcontainer.h"
 #include "core/gimpdatafactory.h"
+#include "core/gimpitem.h"
 
 #include "gimppdb-utils.h"
 #include "gimppdberror.h"
@@ -284,3 +285,24 @@
 
   return paint_info;
 }
+
+gboolean
+gimp_pdb_item_is_attached (GimpItem  *item,
+                           GError   **error)
+{
+  g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
+  g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+  if (! gimp_item_is_attached (item))
+    {
+      g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_CALLING_ERROR,
+                   _("Item '%s' (%d) cannot be used because it has not "
+                     "been added to an image"),
+                   gimp_object_get_name (GIMP_OBJECT (item)),
+                   gimp_item_get_ID (item));
+
+      return FALSE;
+    }
+
+  return TRUE;
+}

Modified: trunk/app/pdb/gimppdb-utils.h
==============================================================================
--- trunk/app/pdb/gimppdb-utils.h	(original)
+++ trunk/app/pdb/gimppdb-utils.h	Mon Feb  4 17:12:25 2008
@@ -49,5 +49,8 @@
                                               const gchar  *name,
                                               GError      **error);
 
+gboolean        gimp_pdb_item_is_attached    (GimpItem     *item,
+                                              GError      **error);
+
 
 #endif /* __GIMP_PDB_UTILS_H__ */

Modified: trunk/app/pdb/layer_cmds.c
==============================================================================
--- trunk/app/pdb/layer_cmds.c	(original)
+++ trunk/app/pdb/layer_cmds.c	Mon Feb  4 17:12:25 2008
@@ -39,6 +39,7 @@
 #include "core/gimplayer.h"
 #include "core/gimplayermask.h"
 #include "gimp-intl.h"
+#include "gimppdb-utils.h"
 
 #include "internal_procs.h"
 
@@ -236,7 +237,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (layer)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
         gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
                                    gimp->config->interpolation_type, NULL,
                                    local_origin);
@@ -270,7 +271,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (layer)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
         gimp_item_resize (GIMP_ITEM (layer), context,
                           new_width, new_height, offx, offy);
       else
@@ -295,7 +296,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (layer)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
         gimp_layer_resize_to_image (layer, context);
       else
         success = FALSE;
@@ -496,7 +497,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (layer)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
         gimp_layer_add_mask (layer, mask, TRUE);
       else
         success = FALSE;
@@ -522,7 +523,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (layer)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
         gimp_layer_apply_mask (layer, mode, TRUE);
       else
         success = FALSE;

Modified: trunk/app/pdb/paint_tools_cmds.c
==============================================================================
--- trunk/app/pdb/paint_tools_cmds.c	(original)
+++ trunk/app/pdb/paint_tools_cmds.c	Mon Feb  4 17:12:25 2008
@@ -119,7 +119,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-airbrush", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -160,7 +160,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-airbrush", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -205,7 +205,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-clone", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -249,7 +249,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-clone", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -290,7 +290,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-convolve", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -332,7 +332,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-convolve", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -375,7 +375,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-dodge-burn", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -418,7 +418,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-dodge-burn", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -459,7 +459,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-eraser", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -501,7 +501,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-eraser", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -544,7 +544,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-heal", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -584,7 +584,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-heal", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -627,7 +627,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-paintbrush", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -672,7 +672,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-paintbrush", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -709,7 +709,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-pencil", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -748,7 +748,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-smudge", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -789,7 +789,7 @@
     {
       GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-smudge", error);
 
-      if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpPaintOptions *options = gimp_paint_options_new (info);
 

Modified: trunk/app/pdb/selection_cmds.c
==============================================================================
--- trunk/app/pdb/selection_cmds.c	(original)
+++ trunk/app/pdb/selection_cmds.c	Mon Feb  4 17:12:25 2008
@@ -36,6 +36,7 @@
 #include "core/gimppickable.h"
 #include "core/gimpselection.h"
 #include "gimp-intl.h"
+#include "gimppdb-utils.h"
 
 #include "internal_procs.h"
 
@@ -186,7 +187,7 @@
 
   if (success)
     {
-      if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
 

Modified: trunk/app/pdb/text_tool_cmds.c
==============================================================================
--- trunk/app/pdb/text_tool_cmds.c	(original)
+++ trunk/app/pdb/text_tool_cmds.c	Mon Feb  4 17:12:25 2008
@@ -33,6 +33,7 @@
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
 #include "core/gimplayer.h"
+#include "gimppdb-utils.h"
 #include "text/gimptext-compat.h"
 
 #include "internal_procs.h"
@@ -73,7 +74,7 @@
 
   if (success)
     {
-      if (drawable && ! gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (drawable && ! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         success = FALSE;
 
       if (success)
@@ -193,7 +194,7 @@
 
   if (success)
     {
-      if (drawable && ! gimp_item_is_attached (GIMP_ITEM (drawable)))
+      if (drawable && ! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
         success = FALSE;
 
       if (success)

Modified: trunk/app/pdb/transform_tools_cmds.c
==============================================================================
--- trunk/app/pdb/transform_tools_cmds.c	(original)
+++ trunk/app/pdb/transform_tools_cmds.c	Mon Feb  4 17:12:25 2008
@@ -38,6 +38,7 @@
 #include "core/gimpimage.h"
 #include "core/gimpprogress.h"
 #include "gimp-intl.h"
+#include "gimppdb-utils.h"
 
 #include "internal_procs.h"
 
@@ -62,7 +63,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -116,7 +117,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -185,7 +186,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -259,7 +260,7 @@
     {
       gint x, y, width, height;
 
-      success = (gimp_item_is_attached (GIMP_ITEM (drawable)) &&
+      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) &&
                  x0 < x1 && y0 < y1);
 
       if (success &&
@@ -330,7 +331,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -410,7 +411,7 @@
     {
       gint x, y, width, height;
 
-      success = gimp_item_is_attached (GIMP_ITEM (drawable));
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
       if (success &&
           gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))

Modified: trunk/tools/pdbgen/pdb/color.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/color.pdb	(original)
+++ trunk/tools/pdbgen/pdb/color.pdb	Mon Feb  4 17:12:25 2008
@@ -42,7 +42,7 @@
         headers => [ qw("core/gimpdrawable-brightness-contrast.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -94,7 +94,7 @@
 	headers => [ qw("core/gimpdrawable-levels.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable) ||
       (! gimp_drawable_has_alpha (drawable) &&
        channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -136,7 +136,7 @@
         headers => [ qw("core/gimpdrawable-levels.h") ],
         code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -159,7 +159,7 @@
         headers => [ qw("core/gimpdrawable-levels.h") ],
         code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -192,7 +192,7 @@
         headers => [ qw("core/gimpdrawable-posterize.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -222,7 +222,7 @@
 	headers => [ qw("core/gimpdrawable-desaturate.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       ! gimp_drawable_is_rgb (drawable))
     success = FALSE;
 
@@ -259,7 +259,7 @@
 	headers => [ qw("core/gimpdrawable-desaturate.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       ! gimp_drawable_is_rgb (drawable))
     success = FALSE;
 
@@ -296,7 +296,7 @@
 	headers => [ qw("core/gimpdrawable-equalize.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -327,7 +327,7 @@
 	headers => [ qw("core/gimpdrawable-invert.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -369,7 +369,7 @@
 	headers => [ qw("core/gimpdrawable-curves.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable) || (num_points & 1) ||
       (! gimp_drawable_has_alpha (drawable) &&
        channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -415,7 +415,7 @@
 	headers => [ qw("core/gimpdrawable-curves.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable) || (num_bytes != 256) ||
       (! gimp_drawable_has_alpha (drawable) &&
        channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -466,7 +466,7 @@
 	headers => [ qw("core/gimpdrawable-color-balance.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -506,7 +506,7 @@
 	headers => [ qw("core/gimpdrawable-colorize.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       ! gimp_drawable_is_rgb (drawable))
     success = FALSE;
 
@@ -570,7 +570,7 @@
                         "core/gimpdrawable-histogram.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable) ||
       (! gimp_drawable_has_alpha (drawable) &&
        channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -633,7 +633,7 @@
 	headers => [ qw("core/gimpdrawable-hue-saturation.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable))
     success = FALSE;
 
@@ -670,7 +670,7 @@
 	headers => [ qw("core/gimpdrawable-threshold.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_item_is_attached (GIMP_ITEM (drawable)) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) ||
       gimp_drawable_is_indexed (drawable) ||
       (low_threshold > high_threshold))
     success = FALSE;
@@ -686,6 +686,7 @@
 
 @headers = qw(<gegl.h>
               "core/gimpdrawable.h"
+              "gimppdb-utils.h"
               "gimp-intl.h");
 
 @procs = qw(brightness_contrast

Modified: trunk/tools/pdbgen/pdb/drawable.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/drawable.pdb	(original)
+++ trunk/tools/pdbgen/pdb/drawable.pdb	Mon Feb  4 17:12:25 2008
@@ -70,7 +70,7 @@
 	headers => [ qw("plug-in/gimpplugin.h" "plug-in/gimppluginmanager.h") ],
 	code    => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       const gchar *undo_desc = _("Plug-In");
 
@@ -1186,7 +1186,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     gimp_drawable_offset (drawable, context, wrap_around, fill_type,
                           offset_x, offset_y);
   else
@@ -1254,7 +1254,7 @@
 	headers => [ qw("core/gimpdrawable-foreground-extract.h") ],
         code    => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     gimp_drawable_foreground_extract (drawable, mode, mask, progress);
   else
     success = FALSE;
@@ -1272,6 +1272,7 @@
               "core/gimpdrawable-offset.h"
               "core/gimplayer.h"
               "core/gimplayermask.h"
+              "gimppdb-utils.h"
               "gimp-intl.h");
 
 @procs = qw(drawable_is_valid

Modified: trunk/tools/pdbgen/pdb/drawable_transform.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/drawable_transform.pdb	(original)
+++ trunk/tools/pdbgen/pdb/drawable_transform.pdb	Mon Feb  4 17:12:25 2008
@@ -25,10 +25,10 @@
 
 sub transform_invoke {
     my ($progress_text, $assemble_matrix, $check) = @_;
-    my $success_check = 'gimp_item_is_attached (GIMP_ITEM (drawable));';
+    my $success_check = 'gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);';
 
     if ($check) {
-        $success_check = "(gimp_item_is_attached (GIMP_ITEM (drawable)) && " . $check . ");";
+        $success_check = "(gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) && " . $check . ");";
     }
 
     %invoke = (
@@ -71,10 +71,10 @@
 
 sub transform_default_invoke {
     my ($progress_text, $assemble_matrix, $check) = @_;
-    my $success_check = 'gimp_item_is_attached (GIMP_ITEM (drawable));';
+    my $success_check = 'gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);';
 
     if ($check) {
-        $success_check = "(gimp_item_is_attached (GIMP_ITEM (drawable)) && " . $check . ");";
+        $success_check = "(gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) && " . $check . ");";
     }
 
     %invoke = (
@@ -166,7 +166,7 @@
 {
   gint x, y, width, height;
 
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success &&
       gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -463,7 +463,7 @@
 {
   gint x, y, width, height;
 
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success &&
       gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -1025,10 +1025,15 @@
 }
 
 
- headers = qw("libgimpmath/gimpmath.h" "config/gimpcoreconfig.h"
-              "core/gimp.h" "core/gimp-transform-utils.h" "core/gimpimage.h"
-              "core/gimpdrawable.h" "core/gimpdrawable-transform.h"
+ headers = qw("libgimpmath/gimpmath.h"
+              "config/gimpcoreconfig.h"
+              "core/gimp.h"
+              "core/gimp-transform-utils.h"
+              "core/gimpimage.h"
+              "core/gimpdrawable.h"
+              "core/gimpdrawable-transform.h"
               "core/gimpprogress.h"
+              "gimppdb-utils.h"
               "gimp-intl.h");
 
 @procs = qw(drawable_transform_flip_simple

Modified: trunk/tools/pdbgen/pdb/edit.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/edit.pdb	(original)
+++ trunk/tools/pdbgen/pdb/edit.pdb	Mon Feb  4 17:12:25 2008
@@ -45,7 +45,7 @@
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
       GError    *my_error = NULL;
@@ -94,7 +94,7 @@
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
       GError    *my_error = NULL;
@@ -194,7 +194,8 @@
     %invoke = (
 	code => <<CODE
 {
-  if (gimp->global_buffer && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp->global_buffer &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
                                       drawable, gimp->global_buffer,
@@ -271,7 +272,7 @@
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
       GError    *my_error = NULL;
@@ -323,7 +324,7 @@
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
       GError    *my_error = NULL;
@@ -426,7 +427,7 @@
 {
   GimpBuffer *buffer = gimp_pdb_get_buffer (gimp, buffer_name, error);
 
-  if (buffer && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (buffer && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
                                       drawable, buffer,
@@ -501,7 +502,7 @@
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
 
@@ -541,7 +542,7 @@
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
 
@@ -609,7 +610,7 @@
 	                 "core/gimpchannel.h") ],
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
       gboolean   do_seed_fill;
@@ -693,7 +694,7 @@
 	                 "core/gimpchannel.h") ],
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
       gboolean   do_seed_fill;
@@ -770,7 +771,7 @@
         headers => [ qw("core/gimpdrawable-blend.h") ],
 	code => <<'CODE'
 {
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success && supersample)
     {
@@ -826,7 +827,7 @@
 	headers => [ qw("core/gimpstrokedesc.h") ],
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage      *image = gimp_item_get_image (GIMP_ITEM (drawable));
       GimpStrokeDesc *desc  = gimp_stroke_desc_new (gimp, context);
@@ -867,7 +868,7 @@
 	headers => [ qw("core/gimpstrokedesc.h") ],
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpStrokeDesc *desc  = gimp_stroke_desc_new (gimp, context);
 

Modified: trunk/tools/pdbgen/pdb/floating_sel.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/floating_sel.pdb	(original)
+++ trunk/tools/pdbgen/pdb/floating_sel.pdb	Mon Feb  4 17:12:25 2008
@@ -150,7 +150,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     floating_sel_attach (layer, drawable);
   else
     success = FALSE;
@@ -224,6 +224,7 @@
 
 @headers = qw("core/gimplayer-floating-sel.h"
               "gimppdberror.h"
+              "gimppdb-utils.h"
               "gimp-intl.h");
 
 @procs = qw(floating_sel_remove floating_sel_anchor floating_sel_to_layer

Modified: trunk/tools/pdbgen/pdb/layer.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/layer.pdb	(original)
+++ trunk/tools/pdbgen/pdb/layer.pdb	Mon Feb  4 17:12:25 2008
@@ -185,7 +185,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (layer)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
     gimp_layer_add_mask (layer, mask, TRUE);
   else
     success = FALSE;
@@ -214,7 +214,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (layer)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
     gimp_layer_apply_mask (layer, mode, TRUE);
   else
     success = FALSE;
@@ -250,7 +250,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (layer)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
     gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
                                gimp->config->interpolation_type, NULL,
                                local_origin);
@@ -291,7 +291,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (layer)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
     gimp_item_resize (GIMP_ITEM (layer), context,
                       new_width, new_height, offx, offy);
   else
@@ -319,7 +319,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (layer)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
     gimp_layer_resize_to_image (layer, context);
   else
     success = FALSE;
@@ -953,6 +953,7 @@
               "core/gimp.h"
               "core/gimpimage-undo.h"
               "core/gimpitem-linked.h"
+              "gimppdb-utils.h"
               "gimp-intl.h");
 
 @procs = qw(layer_new layer_new_from_drawable layer_copy

Modified: trunk/tools/pdbgen/pdb/paint_tools.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/paint_tools.pdb	(original)
+++ trunk/tools/pdbgen/pdb/paint_tools.pdb	Mon Feb  4 17:12:25 2008
@@ -55,7 +55,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-airbrush", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -100,7 +100,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-airbrush", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -156,7 +156,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-clone", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -205,7 +205,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-clone", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -246,7 +246,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-convolve", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -289,7 +289,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-convolve", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -333,7 +333,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-eraser", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -377,7 +377,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-eraser", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -426,7 +426,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-eraser", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -480,7 +480,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-heal", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -525,7 +525,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-heal", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -577,7 +577,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-paintbrush", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -634,7 +634,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-paintbrush", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -674,7 +674,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-pencil", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -713,7 +713,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-smudge", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -758,7 +758,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-smudge", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -802,7 +802,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-dodge-burn", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 
@@ -849,7 +849,7 @@
 {
   GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-dodge-burn", error);
 
-  if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (info && gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpPaintOptions *options = gimp_paint_options_new (info);
 

Modified: trunk/tools/pdbgen/pdb/selection.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/selection.pdb	(original)
+++ trunk/tools/pdbgen/pdb/selection.pdb	Mon Feb  4 17:12:25 2008
@@ -184,7 +184,7 @@
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
 
@@ -548,7 +548,9 @@
 }
 
 
- headers = qw("core/gimpchannel-select.h" "core/gimppickable.h"
+ headers = qw("core/gimpchannel-select.h"
+              "core/gimppickable.h"
+              "gimppdb-utils.h"
               "gimp-intl.h");
 
 @procs = qw(selection_bounds selection_value selection_is_empty

Modified: trunk/tools/pdbgen/pdb/text_tool.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/text_tool.pdb	(original)
+++ trunk/tools/pdbgen/pdb/text_tool.pdb	Mon Feb  4 17:12:25 2008
@@ -73,7 +73,7 @@
     %invoke = (
         code => <<'CODE'
 {
-  if (drawable && ! gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (drawable && ! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     success = FALSE;
 
   if (success)
@@ -193,7 +193,7 @@
     %invoke = (
         code => <<'CODE'
 {
-  if (drawable && ! gimp_item_is_attached (GIMP_ITEM (drawable)))
+  if (drawable && ! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
     success = FALSE;
 
   if (success)
@@ -266,7 +266,9 @@
 }
 
 
- headers = qw("libgimpbase/gimpbase.h" "text/gimptext-compat.h");
+ headers = qw("libgimpbase/gimpbase.h"
+              "text/gimptext-compat.h"
+              "gimppdb-utils.h");
 
 @procs = qw(text_fontname text_get_extents_fontname
             text text_get_extents);

Modified: trunk/tools/pdbgen/pdb/transform_tools.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/transform_tools.pdb	(original)
+++ trunk/tools/pdbgen/pdb/transform_tools.pdb	Mon Feb  4 17:12:25 2008
@@ -38,7 +38,7 @@
 {
   gint x, y, width, height;
 
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success &&
       gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -95,7 +95,7 @@
 {
   gint x, y, width, height;
 
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success &&
       gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -159,7 +159,7 @@
 {
   gint x, y, width, height;
 
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success &&
       gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -232,7 +232,7 @@
 {
   gint x, y, width, height;
 
-  success = (gimp_item_is_attached (GIMP_ITEM (drawable)) &&
+  success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error) &&
              x0 < x1 && y0 < y1);
 
   if (success &&
@@ -299,7 +299,7 @@
 {
   gint x, y, width, height;
 
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success &&
       gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -374,7 +374,7 @@
 {
   gint x, y, width, height;
 
-  success = gimp_item_is_attached (GIMP_ITEM (drawable));
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error);
 
   if (success &&
       gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
@@ -410,10 +410,15 @@
 }
 
 
- headers = qw("libgimpmath/gimpmath.h" "config/gimpcoreconfig.h"
-              "core/gimp.h" "core/gimp-transform-utils.h" "core/gimpimage.h"
-              "core/gimpdrawable.h" "core/gimpdrawable-transform.h"
+ headers = qw("libgimpmath/gimpmath.h"
+              "config/gimpcoreconfig.h"
+              "core/gimp.h"
+              "core/gimp-transform-utils.h"
+              "core/gimpimage.h"
+              "core/gimpdrawable.h"
+              "core/gimpdrawable-transform.h"
               "core/gimpprogress.h"
+              "gimppdb-utils.h"
               "gimp-intl.h");
 
 @procs = qw(flip perspective rotate scale shear transform_2d);



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