[gimp] pdb: deprecate vectors API that is now in item



commit 0fdf7c6e282cff93b58132636af4632271345c34
Author: Michael Natterer <mitch gimp org>
Date:   Fri Jul 9 10:10:55 2010 +0200

    pdb: deprecate vectors API that is now in item

 app/pdb/vectors-cmds.c       |   60 +++++++++++++++++++++---------------------
 libgimp/gimpvectors_pdb.c    |   44 +++++++++---------------------
 libgimp/gimpvectors_pdb.h    |    4 +++
 tools/pdbgen/pdb/vectors.pdb |   44 +++++++-----------------------
 4 files changed, 57 insertions(+), 95 deletions(-)
---
diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c
index 3e663a9..574197f 100644
--- a/app/pdb/vectors-cmds.c
+++ b/app/pdb/vectors-cmds.c
@@ -1560,12 +1560,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-is-valid");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-is-valid",
-                                     "Returns TRUE if the vectors object is valid.",
-                                     "This procedure checks if the given vectors ID is valid and refers to an existing vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-is-valid' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-is-valid' instead.",
                                      "Sven Neumann <sven gimp org>",
                                      "Sven Neumann",
                                      "2007",
-                                     NULL);
+                                     "gimp-item-is-valid");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1689,12 +1689,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-get-image");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-get-image",
-                                     "Returns the vectors objects image.",
-                                     "Returns the vectors objects image.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-image' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-image' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-get-image");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1718,12 +1718,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-get-name");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-get-name",
-                                     "Gets the name of the vectors object.",
-                                     "Gets the name of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-name' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-name' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-get-name");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1748,12 +1748,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-set-name");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-set-name",
-                                     "Sets the name of the vectors object.",
-                                     "Sets the name of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-name' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-name' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-set-name");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1778,12 +1778,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-get-visible");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-get-visible",
-                                     "Gets the visibility of the vectors object.",
-                                     "Gets the visibility of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-visible' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-visible' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-get-visible");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1807,12 +1807,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-set-visible");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-set-visible",
-                                     "Sets the visibility of the vectors object.",
-                                     "Sets the visibility of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-visible' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-visible' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-set-visible");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1836,12 +1836,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-get-linked");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-get-linked",
-                                     "Gets the linked state of the vectors object.",
-                                     "Gets the linked state of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-linked' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-linked' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-get-linked");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1865,12 +1865,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-set-linked");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-set-linked",
-                                     "Sets the linked state of the vectors object.",
-                                     "Sets the linked state of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-linked' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-linked' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-set-linked");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1894,12 +1894,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-get-tattoo");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-get-tattoo",
-                                     "Get the tattoo of the vectors object.",
-                                     "Get the tattoo state of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-tattoo' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-get-tattoo' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-get-tattoo");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
@@ -1923,12 +1923,12 @@ register_vectors_procs (GimpPDB *pdb)
                                "gimp-vectors-set-tattoo");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-vectors-set-tattoo",
-                                     "Set the tattoo of the vectors object.",
-                                     "Set the tattoo of the vectors object.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-tattoo' instead.",
+                                     "This procedure is deprecated! Use 'gimp-item-set-tattoo' instead.",
                                      "Simon Budig",
                                      "Simon Budig",
                                      "2005",
-                                     NULL);
+                                     "gimp-item-set-tattoo");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_vectors_id ("vectors",
                                                            "vectors",
diff --git a/libgimp/gimpvectors_pdb.c b/libgimp/gimpvectors_pdb.c
index 84d2875..993cac3 100644
--- a/libgimp/gimpvectors_pdb.c
+++ b/libgimp/gimpvectors_pdb.c
@@ -25,6 +25,9 @@
 #include <string.h>
 
 #include "gimp.h"
+#undef GIMP_DISABLE_DEPRECATED
+#undef __GIMP_VECTORS_PDB_H__
+#include "gimpvectors_pdb.h"
 
 
 /**
@@ -40,10 +43,7 @@
  * gimp_vectors_is_valid:
  * @vectors_ID: The vectors object to check.
  *
- * Returns TRUE if the vectors object is valid.
- *
- * This procedure checks if the given vectors ID is valid and refers to
- * an existing vectors object.
+ * This procedure is deprecated! Use gimp_item_is_valid() instead.
  *
  * Returns: Whether the vectors ID is valid.
  *
@@ -178,9 +178,7 @@ gimp_vectors_copy (gint32 vectors_ID)
  * gimp_vectors_get_image:
  * @vectors_ID: The vectors object.
  *
- * Returns the vectors objects image.
- *
- * Returns the vectors objects image.
+ * This procedure is deprecated! Use gimp_item_get_image() instead.
  *
  * Returns: The vectors image.
  *
@@ -210,9 +208,7 @@ gimp_vectors_get_image (gint32 vectors_ID)
  * gimp_vectors_get_name:
  * @vectors_ID: The vectors object.
  *
- * Gets the name of the vectors object.
- *
- * Gets the name of the vectors object.
+ * This procedure is deprecated! Use gimp_item_get_name() instead.
  *
  * Returns: The name of the vectors object.
  *
@@ -243,9 +239,7 @@ gimp_vectors_get_name (gint32 vectors_ID)
  * @vectors_ID: The vectors object.
  * @name: the new name of the path.
  *
- * Sets the name of the vectors object.
- *
- * Sets the name of the vectors object.
+ * This procedure is deprecated! Use gimp_item_set_name() instead.
  *
  * Returns: TRUE on success.
  *
@@ -276,9 +270,7 @@ gimp_vectors_set_name (gint32       vectors_ID,
  * gimp_vectors_get_visible:
  * @vectors_ID: The vectors object.
  *
- * Gets the visibility of the vectors object.
- *
- * Gets the visibility of the vectors object.
+ * This procedure is deprecated! Use gimp_item_get_visible() instead.
  *
  * Returns: TRUE if the path is visible, FALSE otherwise.
  *
@@ -309,9 +301,7 @@ gimp_vectors_get_visible (gint32 vectors_ID)
  * @vectors_ID: The vectors object.
  * @visible: Whether the path is visible.
  *
- * Sets the visibility of the vectors object.
- *
- * Sets the visibility of the vectors object.
+ * This procedure is deprecated! Use gimp_item_set_visible() instead.
  *
  * Returns: TRUE on success.
  *
@@ -342,9 +332,7 @@ gimp_vectors_set_visible (gint32   vectors_ID,
  * gimp_vectors_get_linked:
  * @vectors_ID: The vectors object.
  *
- * Gets the linked state of the vectors object.
- *
- * Gets the linked state of the vectors object.
+ * This procedure is deprecated! Use gimp_item_get_linked() instead.
  *
  * Returns: TRUE if the path is linked, FALSE otherwise.
  *
@@ -375,9 +363,7 @@ gimp_vectors_get_linked (gint32 vectors_ID)
  * @vectors_ID: The vectors object.
  * @linked: Whether the path is linked.
  *
- * Sets the linked state of the vectors object.
- *
- * Sets the linked state of the vectors object.
+ * This procedure is deprecated! Use gimp_item_set_linked() instead.
  *
  * Returns: TRUE on success.
  *
@@ -408,9 +394,7 @@ gimp_vectors_set_linked (gint32   vectors_ID,
  * gimp_vectors_get_tattoo:
  * @vectors_ID: The vectors object.
  *
- * Get the tattoo of the vectors object.
- *
- * Get the tattoo state of the vectors object.
+ * This procedure is deprecated! Use gimp_item_get_tattoo() instead.
  *
  * Returns: The vectors tattoo.
  *
@@ -441,9 +425,7 @@ gimp_vectors_get_tattoo (gint32 vectors_ID)
  * @vectors_ID: The vectors object.
  * @tattoo: the new tattoo.
  *
- * Set the tattoo of the vectors object.
- *
- * Set the tattoo of the vectors object.
+ * This procedure is deprecated! Use gimp_item_set_tattoo() instead.
  *
  * Returns: TRUE on success.
  *
diff --git a/libgimp/gimpvectors_pdb.h b/libgimp/gimpvectors_pdb.h
index 67db719..f962d2b 100644
--- a/libgimp/gimpvectors_pdb.h
+++ b/libgimp/gimpvectors_pdb.h
@@ -28,12 +28,15 @@ G_BEGIN_DECLS
 /* For information look into the C source or the html documentation */
 
 
+#ifndef GIMP_DISABLE_DEPRECATED
 gboolean              gimp_vectors_is_valid                  (gint32                  vectors_ID);
+#endif /* GIMP_DISABLE_DEPRECATED */
 gint32                gimp_vectors_new                       (gint32                  image_ID,
                                                               const gchar            *name);
 gint32                gimp_vectors_new_from_text_layer       (gint32                  image_ID,
                                                               gint32                  layer_ID);
 gint32                gimp_vectors_copy                      (gint32                  vectors_ID);
+#ifndef GIMP_DISABLE_DEPRECATED
 gint32                gimp_vectors_get_image                 (gint32                  vectors_ID);
 gchar*                gimp_vectors_get_name                  (gint32                  vectors_ID);
 gboolean              gimp_vectors_set_name                  (gint32                  vectors_ID,
@@ -47,6 +50,7 @@ gboolean              gimp_vectors_set_linked                (gint32
 gint                  gimp_vectors_get_tattoo                (gint32                  vectors_ID);
 gboolean              gimp_vectors_set_tattoo                (gint32                  vectors_ID,
                                                               gint                    tattoo);
+#endif /* GIMP_DISABLE_DEPRECATED */
 gint*                 gimp_vectors_get_strokes               (gint32                  vectors_ID,
                                                               gint                   *num_strokes);
 gdouble               gimp_vectors_stroke_get_length         (gint32                  vectors_ID,
diff --git a/tools/pdbgen/pdb/vectors.pdb b/tools/pdbgen/pdb/vectors.pdb
index 930c99d..a9aff65 100644
--- a/tools/pdbgen/pdb/vectors.pdb
+++ b/tools/pdbgen/pdb/vectors.pdb
@@ -15,13 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 sub vectors_is_valid {
-    $blurb = 'Returns TRUE if the vectors object is valid.';
-
-    $help = <<'HELP';
-This procedure checks if the given vectors ID is valid and refers to an
-existing vectors object.
-HELP
-
+    &std_pdb_deprecated ('gimp-item-is-valid');
     &neo_pdb_misc('2007', '2.4');
 
     @inargs = (
@@ -157,9 +151,7 @@ CODE
 }
 
 sub vectors_get_image {
-    $blurb = 'Returns the vectors objects image.';
-    $help  = 'Returns the vectors objects image.';
-
+    &std_pdb_deprecated ('gimp-item-get-image');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -182,9 +174,7 @@ CODE
 }
 
 sub vectors_get_name {
-    $blurb = 'Gets the name of the vectors object.';
-    $help  = 'Gets the name of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-get-name');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -207,9 +197,7 @@ CODE
 }
 
 sub vectors_set_name {
-    $blurb = 'Sets the name of the vectors object.';
-    $help  = 'Sets the name of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-set-name');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -229,9 +217,7 @@ CODE
 }
 
 sub vectors_get_visible {
-    $blurb = 'Gets the visibility of the vectors object.';
-    $help  = 'Gets the visibility of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-get-visible');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -254,9 +240,7 @@ CODE
 }
 
 sub vectors_set_visible {
-    $blurb = 'Sets the visibility of the vectors object.';
-    $help  = 'Sets the visibility of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-set-visible');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -276,9 +260,7 @@ CODE
 }
 
 sub vectors_get_linked {
-    $blurb = 'Gets the linked state of the vectors object.';
-    $help  = 'Gets the linked state of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-get-linked');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -301,9 +283,7 @@ CODE
 }
 
 sub vectors_set_linked {
-    $blurb = 'Sets the linked state of the vectors object.';
-    $help  = 'Sets the linked state of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-set-linked');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -323,9 +303,7 @@ CODE
 }
 
 sub vectors_get_tattoo {
-    $blurb = 'Get the tattoo of the vectors object.';
-    $help  = 'Get the tattoo state of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-get-tattoo');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (
@@ -348,9 +326,7 @@ CODE
 }
 
 sub vectors_set_tattoo {
-    $blurb = 'Set the tattoo of the vectors object.';
-    $help  = 'Set the tattoo of the vectors object.';
-
+    &std_pdb_deprecated ('gimp-item-set-tattoo');
     &simon_pdb_misc('2005', '2.4');
 
     @inargs = (



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