[gimp] pdb: deprecate gimp_image_add_layer,channel,vectors()



commit d0e55640eccfefc4ef382875cb6122ad79f49c93
Author: Michael Natterer <mitch gimp org>
Date:   Mon Sep 6 00:15:40 2010 +0200

    pdb: deprecate gimp_image_add_layer,channel,vectors()

 app/pdb/image-cmds.c       |   39 ++++++++++++++++++---------------------
 libgimp/gimpimage_pdb.c    |   20 +++-----------------
 libgimp/gimpimage_pdb.h    |    6 ++++++
 tools/pdbgen/pdb/image.pdb |   33 +++------------------------------
 4 files changed, 30 insertions(+), 68 deletions(-)
---
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index e967d10..e607e7c 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -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",
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index 9d39ae4..2541e06 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -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.
  */
diff --git a/libgimp/gimpimage_pdb.h b/libgimp/gimpimage_pdb.h
index af8cb29..0469ff5 100644
--- a/libgimp/gimpimage_pdb.h
+++ b/libgimp/gimpimage_pdb.h
@@ -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,
diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb
index ee0b47d..0750fdd 100644
--- a/tools/pdbgen/pdb/image.pdb
+++ b/tools/pdbgen/pdb/image.pdb
@@ -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);
     }



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