Commit 9d3850bc authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

add gimp_pdb_item_is_attached() which is a replacement for

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.


svn path=/trunk/; revision=24790
parent b7d37bd4
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.
2008-02-04 Sven Neumann <sven@gimp.org>
* plug-ins/print/Makefile.am
......
......@@ -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 @@ brightness_contrast_invoker (GimpProcedure *procedure,
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 @@ levels_invoker (GimpProcedure *procedure,
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 @@ levels_auto_invoker (GimpProcedure *procedure,
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 @@ levels_stretch_invoker (GimpProcedure *procedure,
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 @@ posterize_invoker (GimpProcedure *procedure,
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 @@ desaturate_invoker (GimpProcedure *procedure,
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 @@ desaturate_full_invoker (GimpProcedure *procedure,
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 @@ equalize_invoker (GimpProcedure *procedure,
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 @@ invert_invoker (GimpProcedure *procedure,
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 @@ curves_spline_invoker (GimpProcedure *procedure,
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 @@ curves_explicit_invoker (GimpProcedure *procedure,
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 @@ color_balance_invoker (GimpProcedure *procedure,
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 @@ colorize_invoker (GimpProcedure *procedure,
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 @@ histogram_invoker (GimpProcedure *procedure,
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 @@ hue_saturation_invoker (GimpProcedure *procedure,
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 @@ threshold_invoker (GimpProcedure *procedure,
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;
......
......@@ -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 @@ drawable_merge_shadow_invoker (GimpProcedure *procedure,
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 @@ drawable_offset_invoker (GimpProcedure *procedure,
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 @@ drawable_foreground_extract_invoker (GimpProcedure *procedure,
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;
......
......@@ -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 @@ drawable_transform_flip_simple_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_flip_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_flip_default_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_perspective_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_perspective_default_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_rotate_simple_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_rotate_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_rotate_default_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_scale_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_scale_default_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_shear_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_shear_default_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_2d_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_2d_default_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_matrix_invoker (GimpProcedure *procedure,
{
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 @@ drawable_transform_matrix_default_invoker (GimpProcedure *procedure,
{
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))
......
......@@ -63,7 +63,7 @@ edit_cut_invoker (GimpProcedure *procedure,
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 @@ edit_copy_invoker (GimpProcedure *procedure,
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 @@ edit_paste_invoker (GimpProcedure *procedure,
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 @@ edit_named_cut_invoker (GimpProcedure *procedure,
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 @@ edit_named_copy_invoker (GimpProcedure *procedure,
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 @@ edit_named_paste_invoker (GimpProcedure *procedure,
{
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 @@ edit_clear_invoker (GimpProcedure *procedure,
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 @@ edit_fill_invoker (GimpProcedure *procedure,
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 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
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 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
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 @@ edit_blend_invoker (GimpProcedure *procedure,
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 @@ edit_stroke_invoker (GimpProcedure *procedure,
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 @@ edit_stroke_vectors_invoker (GimpProcedure *procedure,
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);
......
......@@ -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 @@ floating_sel_attach_invoker (GimpProcedure *procedure,
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;
......
......@@ -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 @@ gimp_pdb_get_paint_info (Gimp *gimp,
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;
}
......@@ -49,5 +49,8 @@ GimpPaintInfo * gimp_pdb_get_paint_info (Gimp *gimp,
const gchar *name,
GError **error);
gboolean gimp_pdb_item_is_attached (GimpItem *item,
GError **error);
#endif /* __GIMP_PDB_UTILS_H__ */
......@@ -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 @@ layer_scale_invoker (GimpProcedure *procedure,
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 @@ layer_resize_invoker (GimpProcedure *procedure,
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 @@ layer_resize_to_image_size_invoker (GimpProcedure *procedure,
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 @@ layer_add_mask_invoker (GimpProcedure *procedure,
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 @@ layer_remove_mask_invoker (GimpProcedure *procedure,
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;
......
......@@ -119,7 +119,7 @@ airbrush_invoker (GimpProcedure *procedure,
{
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 @@ airbrush_default_invoker (GimpProcedure *procedure,
{
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 @@ clone_invoker (GimpProcedure *procedure,
{
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 @@ clone_default_invoker (GimpProcedure *procedure,
{
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 @@ convolve_invoker (GimpProcedure *procedure,
{
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 @@ convolve_default_invoker (GimpProcedure *procedure,
{
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 @@ dodgeburn_invoker (GimpProcedure *procedure,
{
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 @@ dodgeburn_default_invoker (GimpProcedure *procedure,
{
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 @@ eraser_invoker (GimpProcedure *procedure,
{
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 @@ eraser_default_invoker (GimpProcedure *procedure,
{
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 @@ heal_invoker (GimpProcedure *procedure,
{
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 @@ heal_default_invoker (GimpProcedure *procedure,
{
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 @@ paintbrush_invoker (GimpProcedure *procedure,
{
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 @@ paintbrush_default_invoker (GimpProcedure *procedure,
{
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 @@ pencil_invoker (GimpProcedure *procedure,
{
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 @@ smudge_invoker (GimpProcedure *procedure,
{
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 @@ smudge_default_invoker (GimpProcedure *procedure,
{
GimpPaintInfo *info = gimp_pdb_get_paint_info (gimp, "gimp-smudge", error);
if (info && gimp_item_is_attached (GIMP_ITEM (drawable)))
if (info && gimp_pdb_