Commit 328345dc authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb

2006-03-24  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/undo.pdb
	* tools/pdbgen/pdb/vectors.pdb: replaced 'True', 'true' and
	'non-zero' by 'TRUE' where appropriate. Added %%desc%% to enum arg
	descriptions where missing. Get object names using
	gimp_object_get_name(). Set 'success' more consistently. Removed
	{ } from all enum arg descriptions...

	* tools/pdbgen/app.pl (make_arg_recs): ...and add the { }
	generically here. Removed some code that replaced the ',' by 'or'
	for enums without { } so all enums are now documented the same.

	* app/pdb/<some>_cmds.c
	* libgimp/<some>_pdb.c: regenerated.
parent cebdd67d
2006-03-24 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/brush.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/drawable_transform.pdb
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/gradient.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/paint_tools.pdb
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/palettes.pdb
* tools/pdbgen/pdb/patterns.pdb
* tools/pdbgen/pdb/plug_in.pdb
* tools/pdbgen/pdb/procedural_db.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/selection_tools.pdb
* tools/pdbgen/pdb/text_tool.pdb
* tools/pdbgen/pdb/transform_tools.pdb
* tools/pdbgen/pdb/undo.pdb
* tools/pdbgen/pdb/vectors.pdb: replaced 'True', 'true' and
'non-zero' by 'TRUE' where appropriate. Added %%desc%% to enum arg
descriptions where missing. Get object names using
gimp_object_get_name(). Set 'success' more consistently. Removed
{ } from all enum arg descriptions...
* tools/pdbgen/app.pl (make_arg_recs): ...and add the { }
generically here. Removed some code that replaced the ',' by 'or'
for enums without { } so all enums are now documented the same.
* app/pdb/<some>_cmds.c
* libgimp/<some>_pdb.c: regenerated.
2006-03-24 Sven Neumann <sven@gimp.org>
 
* plug-ins/jpeg/jpeg-load.c (load_thumbnail_image): close the file
......
......@@ -107,7 +107,7 @@ brush_new_invoker (Gimp *gimp,
GimpData *data = gimp_data_factory_data_new (gimp->brush_factory, name);
if (data)
actual_name = g_strdup (GIMP_OBJECT (data)->name);
actual_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (data)));
else
success = FALSE;
}
......@@ -186,7 +186,7 @@ brush_duplicate_invoker (Gimp *gimp,
GIMP_DATA (brush));
if (brush_copy)
copy_name = g_strdup (GIMP_OBJECT (brush_copy)->name);
copy_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (brush_copy)));
else
success = FALSE;
}
......@@ -286,7 +286,7 @@ static ProcArg brush_is_generated_outargs[] =
{
GIMP_PDB_INT32,
"generated",
"True if the brush is generated"
"TRUE if the brush is generated"
}
};
......@@ -294,8 +294,8 @@ static ProcRecord brush_is_generated_proc =
{
"gimp-brush-is-generated",
"gimp-brush-is-generated",
"Tests if generated",
"Returns True if this brush is parametric, False for other types",
"Tests if brush is generated",
"Returns TRUE if this brush is parametric, FALSE for other types",
"Bill Skaggs <weskaggs@primate.ucdavis.edu>",
"Bill Skaggs",
"2004",
......@@ -336,7 +336,7 @@ brush_rename_invoker (Gimp *gimp,
if (brush && GIMP_DATA (brush)->writable)
{
gimp_object_set_name (GIMP_OBJECT (brush), new_name);
actual_name = g_strdup (GIMP_OBJECT (brush)->name);
actual_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (brush)));
}
else
success = FALSE;
......@@ -505,7 +505,7 @@ static ProcArg brush_is_editable_outargs[] =
{
GIMP_PDB_INT32,
"editable",
"True if the brush can be edited"
"TRUE if the brush can be edited"
}
};
......@@ -514,7 +514,7 @@ static ProcRecord brush_is_editable_proc =
"gimp-brush-is-editable",
"gimp-brush-is-editable",
"Tests if brush can be edited",
"Returns True if you have permission to change the brush",
"Returns TRUE if you have permission to change the brush",
"Bill Skaggs <weskaggs@primate.ucdavis.edu>",
"Bill Skaggs",
"2004",
......@@ -942,7 +942,7 @@ static ProcArg brush_get_shape_outargs[] =
{
GIMP_PDB_INT32,
"shape",
"The brush shape"
"The brush shape: { GIMP_BRUSH_GENERATED_CIRCLE (0), GIMP_BRUSH_GENERATED_SQUARE (1), GIMP_BRUSH_GENERATED_DIAMOND (2) }"
}
};
......@@ -1376,7 +1376,7 @@ static ProcArg brush_set_shape_outargs[] =
{
GIMP_PDB_INT32,
"shape-out",
"The brush shape actually assigned"
"The brush shape actually assigned: { GIMP_BRUSH_GENERATED_CIRCLE (0), GIMP_BRUSH_GENERATED_SQUARE (1), GIMP_BRUSH_GENERATED_DIAMOND (2) }"
}
};
......
......@@ -172,7 +172,7 @@ brushes_get_brush_invoker (Gimp *gimp,
if (brush)
{
name = g_strdup (GIMP_OBJECT (brush)->name);
name = g_strdup (gimp_object_get_name (GIMP_OBJECT (brush)));
width = brush->mask->width;
height = brush->mask->height;
spacing = gimp_brush_get_spacing (brush);
......@@ -373,7 +373,7 @@ brushes_get_brush_data_invoker (Gimp *gimp,
if (brush)
{
actual_name = g_strdup (GIMP_OBJECT (brush)->name);
actual_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (brush)));
opacity = 1.0;
spacing = gimp_brush_get_spacing (brush);
paint_mode = 0;
......
......@@ -522,7 +522,7 @@ static ProcArg buffer_get_image_type_outargs[] =
{
GIMP_PDB_INT32,
"image-type",
"The buffer image type"
"The buffer image type: { GIMP_RGB (0), GIMP_GRAY (1), GIMP_INDEXED (2) }"
}
};
......
......@@ -470,7 +470,7 @@ static ProcRecord channel_get_show_masked_proc =
"gimp-channel-get-show-masked",
"gimp-channel-get-show-masked",
"Get the composite method of the specified channel.",
"This procedure returns the specified channel's composite method. If it is non-zero, then the channel is composited with the image so that masked regions are shown. Otherwise, selected regions are shown.",
"This procedure returns the specified channel's composite method. If it is TRUE, then the channel is composited with the image so that masked regions are shown. Otherwise, selected regions are shown.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -526,7 +526,7 @@ static ProcRecord channel_set_show_masked_proc =
"gimp-channel-set-show-masked",
"gimp-channel-set-show-masked",
"Set the composite method of the specified channel.",
"This procedure sets the specified channel's composite method. If it is non-zero, then the channel is composited with the image so that masked regions are shown. Otherwise, selected regions are shown.",
"This procedure sets the specified channel's composite method. If it is TRUE, then the channel is composited with the image so that masked regions are shown. Otherwise, selected regions are shown.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......
......@@ -1111,7 +1111,7 @@ static ProcRecord color_balance_proc =
"gimp-color-balance",
"gimp-color-balance",
"Modify the color balance of the specified drawable.",
"Modify the color balance of the specified drawable. There are three axis which can be modified: cyan-red, magenta-green, and yellow-blue. Negative values increase the amount of the former, positive values increase the amount of the latter. Color balance can be controlled with the 'transfer_mode' setting, which allows shadows, midtones, and highlights in an image to be affected differently. The 'preserve_lum' parameter, if non-zero, ensures that the luminosity of each pixel remains fixed.",
"Modify the color balance of the specified drawable. There are three axis which can be modified: cyan-red, magenta-green, and yellow-blue. Negative values increase the amount of the former, positive values increase the amount of the latter. Color balance can be controlled with the 'transfer_mode' setting, which allows shadows, midtones, and highlights in an image to be affected differently. The 'preserve_lum' parameter, if TRUE, ensures that the luminosity of each pixel remains fixed.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1997",
......
......@@ -251,7 +251,7 @@ static ProcArg image_convert_indexed_inargs[] =
{
GIMP_PDB_INT32,
"remove-unused",
"Remove unused or duplicate colour entries from final palette, ignored if (palette_type == GIMP_MAKE_PALETTE)"
"Remove unused or duplicate color entries from final palette, ignored if (palette_type == GIMP_MAKE_PALETTE)"
},
{
GIMP_PDB_STRING,
......
......@@ -132,10 +132,10 @@ drawable_delete_invoker (Gimp *gimp,
if (success)
{
success = gimp_item_is_floating (GIMP_ITEM (drawable));
if (success)
if (gimp_item_is_floating (GIMP_ITEM (drawable)))
gimp_item_sink (GIMP_ITEM (drawable));
else
success = FALSE;
}
return procedural_db_return_args (&drawable_delete_proc, success);
......@@ -210,7 +210,7 @@ static ProcArg drawable_is_layer_outargs[] =
{
GIMP_PDB_INT32,
"layer",
"Non-zero if the drawable is a layer"
"TRUE if the drawable is a layer"
}
};
......@@ -219,7 +219,7 @@ static ProcRecord drawable_is_layer_proc =
"gimp-drawable-is-layer",
"gimp-drawable-is-layer",
"Returns whether the drawable is a layer.",
"This procedure returns non-zero if the specified drawable is a layer.",
"This procedure returns TRUE if the specified drawable is a layer.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -274,7 +274,7 @@ static ProcArg drawable_is_layer_mask_outargs[] =
{
GIMP_PDB_INT32,
"layer-mask",
"Non-zero if the drawable is a layer mask"
"TRUE if the drawable is a layer mask"
}
};
......@@ -283,7 +283,7 @@ static ProcRecord drawable_is_layer_mask_proc =
"gimp-drawable-is-layer-mask",
"gimp-drawable-is-layer-mask",
"Returns whether the drawable is a layer mask.",
"This procedure returns non-zero if the specified drawable is a layer mask.",
"This procedure returns TRUE if the specified drawable is a layer mask.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -338,7 +338,7 @@ static ProcArg drawable_is_channel_outargs[] =
{
GIMP_PDB_INT32,
"channel",
"Non-zero if the drawable is a channel"
"TRUE if the drawable is a channel"
}
};
......@@ -347,7 +347,7 @@ static ProcRecord drawable_is_channel_proc =
"gimp-drawable-is-channel",
"gimp-drawable-is-channel",
"Returns whether the drawable is a channel.",
"This procedure returns non-zero if the specified drawable is a channel.",
"This procedure returns TRUE if the specified drawable is a channel.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -538,7 +538,7 @@ static ProcRecord drawable_has_alpha_proc =
{
"gimp-drawable-has-alpha",
"gimp-drawable-has-alpha",
"Returns non-zero if the drawable has an alpha channel.",
"Returns TRUE if the drawable has an alpha channel.",
"This procedure returns whether the specified drawable has an alpha channel. This can only be true for layers, and the associated type will be one of: { RGBA , GRAYA, INDEXEDA }.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
......@@ -594,7 +594,7 @@ static ProcArg drawable_is_rgb_outargs[] =
{
GIMP_PDB_INT32,
"is-rgb",
"non-zero if the drawable is an RGB type"
"TRUE if the drawable is an RGB type"
}
};
......@@ -603,7 +603,7 @@ static ProcRecord drawable_is_rgb_proc =
"gimp-drawable-is-rgb",
"gimp-drawable-is-rgb",
"Returns whether the drawable is an RGB type.",
"This procedure returns non-zero if the specified drawable is of type { RGB, RGBA }.",
"This procedure returns TRUE if the specified drawable is of type { RGB, RGBA }.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -658,7 +658,7 @@ static ProcArg drawable_is_gray_outargs[] =
{
GIMP_PDB_INT32,
"is-gray",
"non-zero if the drawable is a grayscale type"
"TRUE if the drawable is a grayscale type"
}
};
......@@ -667,7 +667,7 @@ static ProcRecord drawable_is_gray_proc =
"gimp-drawable-is-gray",
"gimp-drawable-is-gray",
"Returns whether the drawable is a grayscale type.",
"This procedure returns non-zero if the specified drawable is of type { Gray, GrayA }.",
"This procedure returns TRUE if the specified drawable is of type { Gray, GrayA }.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -722,7 +722,7 @@ static ProcArg drawable_is_indexed_outargs[] =
{
GIMP_PDB_INT32,
"is-indexed",
"non-zero if the drawable is an indexed type"
"TRUE if the drawable is an indexed type"
}
};
......@@ -731,7 +731,7 @@ static ProcRecord drawable_is_indexed_proc =
"gimp-drawable-is-indexed",
"gimp-drawable-is-indexed",
"Returns whether the drawable is an indexed type.",
"This procedure returns non-zero if the specified drawable is of type { Indexed, IndexedA }.",
"This procedure returns TRUE if the specified drawable is of type { Indexed, IndexedA }.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -1822,9 +1822,7 @@ drawable_merge_shadow_invoker (Gimp *gimp,
if (success)
{
success = gimp_item_is_attached (GIMP_ITEM (drawable));
if (success)
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
{
gchar *undo_desc = NULL;
......@@ -1838,6 +1836,8 @@ drawable_merge_shadow_invoker (Gimp *gimp,
g_free (undo_desc);
}
else
success = FALSE;
}
return procedural_db_return_args (&drawable_merge_shadow_proc, success);
......@@ -2214,7 +2214,7 @@ static ProcArg drawable_fill_inargs[] =
{
GIMP_PDB_INT32,
"fill-type",
"The type of fill: GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_PATTERN_FILL (4)"
"The type of fill: { GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_PATTERN_FILL (4) }"
}
};
......@@ -2265,11 +2265,11 @@ drawable_offset_invoker (Gimp *gimp,
if (success)
{
success = gimp_item_is_attached (GIMP_ITEM (drawable));
if (success)
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
gimp_drawable_offset (drawable, context, wrap_around, fill_type,
offset_x, offset_y);
else
success = FALSE;
}
return procedural_db_return_args (&drawable_offset_proc, success);
......@@ -2290,7 +2290,7 @@ static ProcArg drawable_offset_inargs[] =
{
GIMP_PDB_INT32,
"fill-type",
"fill vacated regions of drawable with background or transparent: GIMP_OFFSET_BACKGROUND (0) or GIMP_OFFSET_TRANSPARENT (1)"
"fill vacated regions of drawable with background or transparent: { GIMP_OFFSET_BACKGROUND (0), GIMP_OFFSET_TRANSPARENT (1) }"
},
{
GIMP_PDB_INT32,
......@@ -2521,10 +2521,8 @@ drawable_sub_thumbnail_invoker (Gimp *gimp,
if (success)
{
success = ((src_x + src_width) <= gimp_item_width (GIMP_ITEM (drawable)) &&
(src_y + src_height) <= gimp_item_height (GIMP_ITEM (drawable)));
if (success)
if ((src_x + src_width) <= gimp_item_width (GIMP_ITEM (drawable)) &&
(src_y + src_height) <= gimp_item_height (GIMP_ITEM (drawable)))
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
TempBuf *buf;
......@@ -2552,10 +2550,10 @@ drawable_sub_thumbnail_invoker (Gimp *gimp,
temp_buf_free (buf);
}
else
{
success = FALSE;
}
success = FALSE;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&drawable_sub_thumbnail_proc, success);
......@@ -2683,10 +2681,10 @@ drawable_foreground_extract_invoker (Gimp *gimp,
if (success)
{
success = gimp_item_is_attached (GIMP_ITEM (drawable));
if (success)
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
gimp_drawable_foreground_extract (drawable, mode, mask, progress);
else
success = FALSE;
}
return procedural_db_return_args (&drawable_foreground_extract_proc, success);
......@@ -2702,7 +2700,7 @@ static ProcArg drawable_foreground_extract_inargs[] =
{
GIMP_PDB_INT32,
"mode",
"The algorithm to use: GIMP_FOREGROUND_EXTRACT_SIOX (0)"
"The algorithm to use: { GIMP_FOREGROUND_EXTRACT_SIOX (0) }"
},
{
GIMP_PDB_DRAWABLE,
......
......@@ -137,7 +137,7 @@ static ProcArg drawable_transform_flip_simple_inargs[] =
{
GIMP_PDB_INT32,
"flip-type",
"Type of flip: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)"
"Type of flip: { GIMP_ORIENTATION_HORIZONTAL (0), GIMP_ORIENTATION_VERTICAL (1) }"
},
{
GIMP_PDB_INT32,
......@@ -170,7 +170,7 @@ static ProcRecord drawable_transform_flip_simple_proc =
"gimp-drawable-transform-flip-simple",
"gimp-drawable-transform-flip-simple",
"Flip the specified drawable either vertically or horizontally.",
"This procedure flips the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then flipped. If auto_center is set to true, the flip is around the selection's center. Otherwise, the coordinate of the axis needs to be specified. The return value is the ID of the flipped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and flipped drawable.",
"This procedure flips the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then flipped. If auto_center is set to TRUE, the flip is around the selection's center. Otherwise, the coordinate of the axis needs to be specified. The return value is the ID of the flipped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and flipped drawable.",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......@@ -936,7 +936,7 @@ static ProcArg drawable_transform_rotate_simple_inargs[] =
{
GIMP_PDB_INT32,
"rotate-type",
"Type of rotation: GIMP_ROTATE_90 (0), GIMP_ROTATE_180 (1), GIMP_ROTATE_270 (2)"
"Type of rotation: { GIMP_ROTATE_90 (0), GIMP_ROTATE_180 (1), GIMP_ROTATE_270 (2) }"
},
{
GIMP_PDB_INT32,
......@@ -1708,7 +1708,7 @@ static ProcArg drawable_transform_shear_inargs[] =
{
GIMP_PDB_INT32,
"shear-type",
"Type of shear: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)"
"Type of shear: { GIMP_ORIENTATION_HORIZONTAL (0), GIMP_ORIENTATION_VERTICAL (1) }"
},
{
GIMP_PDB_FLOAT,
......@@ -1851,7 +1851,7 @@ static ProcArg drawable_transform_shear_default_inargs[] =
{
GIMP_PDB_INT32,
"shear-type",
"Type of shear: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)"
"Type of shear: { GIMP_ORIENTATION_HORIZONTAL (0), GIMP_ORIENTATION_VERTICAL (1) }"
},
{
GIMP_PDB_FLOAT,
......
......@@ -93,14 +93,14 @@ edit_cut_invoker (Gimp *gimp,
if (success)
{
success = gimp_item_is_attached (GIMP_ITEM (drawable));
if (success)
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
non_empty = gimp_edit_cut (image, drawable, context) != NULL;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&edit_cut_proc, success);
......@@ -164,14 +164,14 @@ edit_copy_invoker (Gimp *gimp,
if (success)
{
success = gimp_item_is_attached (GIMP_ITEM (drawable));
if (success)
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
non_empty = gimp_edit_copy (image, drawable, context) != NULL;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&edit_copy_proc, success);
......@@ -302,17 +302,17 @@ edit_paste_invoker (Gimp *gimp,
if (success)
{
success = (gimp_item_is_attached (GIMP_ITEM (drawable)) &&
gimp->global_buffer != NULL);
if (success)
if (gimp->global_buffer && gimp_item_is_attached (GIMP_ITEM (drawable)))
{
floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
drawable, gimp->global_buffer,
paste_into, -1, -1, -1, -1);
if (! floating_sel)
success = FALSE;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&edit_paste_proc, success);
......@@ -374,14 +374,15 @@ edit_paste_as_new_invoker (Gimp *gimp,
Argument *return_args;
GimpImage *image = NULL;
success = (gimp->global_buffer != NULL);
if (success)
if (gimp->global_buffer)
{
image = gimp_edit_paste_as_new (gimp, NULL, gimp->global_buffer);
if (! image)
success = FALSE;
}
else
success = FALSE;
return_args = procedural_db_return_args (&edit_paste_as_new_proc, success);
......@@ -440,21 +441,20 @@ edit_named_cut_invoker (Gimp *gimp,
if (success)
{
success = (strlen (buffer_name) > 0 &&
gimp_item_is_attached (GIMP_ITEM (drawable)));
if (success)
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
if (strlen (buffer_name) && gimp_item_is_attached (GIMP_ITEM (drawable)))
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
real_name = (gchar *) gimp_edit_named_cut (image, buffer_name,
drawable, context);
real_name = (gchar *) gimp_edit_named_cut (image, buffer_name,
drawable, context);
if (real_name)
real_name = g_strdup (real_name);
else
success = FALSE;
}
if (real_name)
real_name = g_strdup (real_name);
else
success = FALSE;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&edit_named_cut_proc, success);
......@@ -528,21 +528,20 @@ edit_named_copy_invoker (Gimp *gimp,
if (success)
{
success = (strlen (buffer_name) > 0 &&
gimp_item_is_attached (GIMP_ITEM (drawable)));
if (success)
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
if (strlen (buffer_name) && gimp_item_is_attached (GIMP_ITEM (drawable)))
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
real_name = (gchar *) gimp_edit_named_copy (image, buffer_name,
drawable, context);
real_name = (gchar *) gimp_edit_named_copy (image, buffer_name,
drawable, context);
if (real_name)
real_name = g_strdup (real_name);
else
success = FALSE;
}
if (real_name)
real_name = g_strdup (real_name);
else
success = FALSE;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&edit_named_copy_proc, success);
......@@ -616,18 +615,18 @@ edit_named_copy_visible_invoker (Gimp *gimp,
if (success)
{
success = (strlen (buffer_name) > 0);
if (success)
{
real_name = (gchar *) gimp_edit_named_copy_visible (image, buffer_name,
context);
if (strlen (buffer_name))
{
real_name = (gchar *) gimp_edit_named_copy_visible (image, buffer_name,
context);
if (real_name)
real_name = g_strdup (real_name);
else
success = FALSE;
}
if (real_name)
real_name = g_strdup (real_name);
else
success = FALSE;
}
else
success = FALSE;
}
return_args = procedural_db_return_args (&edit_named_copy_visible_proc, success);
......@@ -704,14 +703,10 @@ edit_named_paste_invoker (Gimp *gimp,
if (success)
{
GimpBuffer *buffer;
buffer = (GimpBuffer *)
GimpBuffer *buffer = (GimpBuffer *)
gimp_container_get_child_by_name (gimp->named_buffers, buffer_name);
success = (buffer != NULL && gimp_item_is_attached (GIMP_ITEM (drawable)));