Commit d0e55640 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: deprecate gimp_image_add_layer,channel,vectors()

parent 9e0dccec
......@@ -916,7 +916,6 @@ image_add_layer_invoker (GimpProcedure *procedure,
GIMP_IMAGE_TYPE_BASE_TYPE (gimp_drawable_type (GIMP_DRAWABLE (layer))),
error))
{
/* FIXME tree */
success = gimp_image_add_layer (image, layer,
NULL, MAX (position, -1), TRUE);
}
......@@ -1023,7 +1022,6 @@ image_add_channel_invoker (GimpProcedure *procedure,
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (channel), image, error))
{
/* FIXME tree */
success = gimp_image_add_channel (image, channel,
NULL, MAX (position, -1), TRUE);
}
......@@ -1127,7 +1125,6 @@ image_add_vectors_invoker (GimpProcedure *procedure,
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (vectors), image, error))
{
/* FIXME tree */
success = gimp_image_add_vectors (image, vectors,
NULL, MAX (position, -1), TRUE);
}
......@@ -3711,12 +3708,12 @@ register_image_procs (GimpPDB *pdb)
"gimp-image-add-layer");
gimp_procedure_set_static_strings (procedure,
"gimp-image-add-layer",
"Add the specified layer to the image.",
"This procedure adds the specified layer to the image at the given position. If the position is specified as -1, then the layer is inserted above the active layer. The layer type must be compatible with the image base type.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
"Deprecated: Use 'gimp-image-insert-layer' instead.",
"Deprecated: Use 'gimp-image-insert-layer' instead.",
"",
"",
"",
"gimp-image-insert-layer");
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
......@@ -3816,12 +3813,12 @@ register_image_procs (GimpPDB *pdb)
"gimp-image-add-channel");
gimp_procedure_set_static_strings (procedure,
"gimp-image-add-channel",
"Add the specified channel to the image.",
"This procedure adds the specified channel to the image at the given position. If the position is specified as -1, then the channel is inserted above the active channel or, if no channel is active, at the top of the channel stack.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
"Deprecated: Use 'gimp-image-insert-channel' instead.",
"Deprecated: Use 'gimp-image-insert-channel' instead.",
"",
"",
"",
"gimp-image-insert-channel");
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
......@@ -3921,12 +3918,12 @@ register_image_procs (GimpPDB *pdb)
"gimp-image-add-vectors");
gimp_procedure_set_static_strings (procedure,
"gimp-image-add-vectors",
"Add the specified vectors object to the image.",
"This procedure adds the specified vectors object to the image at the given position. If the position is specified as -1, then the vectors object is inserted at the top of the vectors stack.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
"Deprecated: Use 'gimp-image-insert-vectors' instead.",
"Deprecated: Use 'gimp-image-insert-vectors' instead.",
"",
"",
"",
"gimp-image-insert-vectors");
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
......
......@@ -974,12 +974,7 @@ gimp_image_pick_correlate_layer (gint32 image_ID,
* @layer_ID: The layer.
* @position: The layer position.
*
* Add the specified layer to the image.
*
* This procedure adds the specified layer to the image at the given
* position. If the position is specified as -1, then the layer is
* inserted above the active layer. The layer type must be compatible
* with the image base type.
* Deprecated: Use gimp_image_insert_layer() instead.
*
* Returns: TRUE on success.
*/
......@@ -1089,12 +1084,7 @@ gimp_image_remove_layer (gint32 image_ID,
* @channel_ID: The channel.
* @position: The channel position.
*
* Add the specified channel to the image.
*
* This procedure adds the specified channel to the image at the given
* position. If the position is specified as -1, then the channel is
* inserted above the active channel or, if no channel is active, at
* the top of the channel stack.
* Deprecated: Use gimp_image_insert_channel() instead.
*
* Returns: TRUE on success.
*/
......@@ -1201,11 +1191,7 @@ gimp_image_remove_channel (gint32 image_ID,
* @vectors_ID: The vectors object.
* @position: The vectors objects position.
*
* Add the specified vectors object to the image.
*
* This procedure adds the specified vectors object to the image at the
* given position. If the position is specified as -1, then the vectors
* object is inserted at the top of the vectors stack.
* Deprecated: Use gimp_image_insert_vectors() instead.
*
* Returns: TRUE on success.
*/
......
......@@ -84,27 +84,33 @@ gboolean gimp_image_pick_color (gint32
gint32 gimp_image_pick_correlate_layer (gint32 image_ID,
gint x,
gint y);
#ifndef GIMP_DISABLE_DEPRECATED
gboolean gimp_image_add_layer (gint32 image_ID,
gint32 layer_ID,
gint position);
#endif /* GIMP_DISABLE_DEPRECATED */
gboolean gimp_image_insert_layer (gint32 image_ID,
gint32 layer_ID,
gint32 parent_ID,
gint position);
gboolean gimp_image_remove_layer (gint32 image_ID,
gint32 layer_ID);
#ifndef GIMP_DISABLE_DEPRECATED
gboolean gimp_image_add_channel (gint32 image_ID,
gint32 channel_ID,
gint position);
#endif /* GIMP_DISABLE_DEPRECATED */
gboolean gimp_image_insert_channel (gint32 image_ID,
gint32 channel_ID,
gint32 parent_ID,
gint position);
gboolean gimp_image_remove_channel (gint32 image_ID,
gint32 channel_ID);
#ifndef GIMP_DISABLE_DEPRECATED
gboolean gimp_image_add_vectors (gint32 image_ID,
gint32 vectors_ID,
gint position);
#endif /* GIMP_DISABLE_DEPRECATED */
gboolean gimp_image_insert_vectors (gint32 image_ID,
gint32 vectors_ID,
gint32 parent_ID,
......
......@@ -1162,15 +1162,7 @@ CODE
}
sub image_add_layer {
$blurb = 'Add the specified layer to the image.';
$help = <<'HELP';
This procedure adds the specified layer to the image at the given position.
If the position is specified as -1, then the layer is inserted above the
active layer. The layer type must be compatible with the image base type.
HELP
&std_pdb_misc;
&std_pdb_deprecated ('gimp-image-insert-layer');
@inargs = (
{ name => 'image', type => 'image',
......@@ -1188,7 +1180,6 @@ HELP
GIMP_IMAGE_TYPE_BASE_TYPE (gimp_drawable_type (GIMP_DRAWABLE (layer))),
error))
{
/* FIXME tree */
success = gimp_image_add_layer (image, layer,
NULL, MAX (position, -1), TRUE);
}
......@@ -1404,15 +1395,7 @@ CODE
}
sub image_add_channel {
$blurb = 'Add the specified channel to the image.';
$help = <<'HELP';
This procedure adds the specified channel to the image at the given position.
If the position is specified as -1, then the channel is inserted above the
active channel or, if no channel is active, at the top of the channel stack.
HELP
&std_pdb_misc;
&std_pdb_deprecated ('gimp-image-insert-channel');
@inargs = (
{ name => 'image', type => 'image',
......@@ -1428,7 +1411,6 @@ HELP
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (channel), image, error))
{
/* FIXME tree */
success = gimp_image_add_channel (image, channel,
NULL, MAX (position, -1), TRUE);
}
......@@ -1515,15 +1497,7 @@ CODE
}
sub image_add_vectors {
$blurb = 'Add the specified vectors object to the image.';
$help = <<'HELP';
This procedure adds the specified vectors object to the image at the given
position. If the position is specified as -1, then the vectors object is
inserted at the top of the vectors stack.
HELP
&std_pdb_misc;
&std_pdb_deprecated ('gimp-image-insert-vectors');
@inargs = (
{ name => 'image', type => 'image',
......@@ -1538,7 +1512,6 @@ HELP
{
if (gimp_pdb_item_is_floating (GIMP_ITEM (vectors), image, error))
{
/* FIXME tree */
success = gimp_image_add_vectors (image, vectors,
NULL, MAX (position, -1), TRUE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment