[gimp] pdb: remove drawable's and vector's "lock-content" API



commit 20c3dc0df9774c3566f915fe34c43c62f9f653e5
Author: Michael Natterer <mitch gimp org>
Date:   Fri Jul 9 09:46:31 2010 +0200

    pdb: remove drawable's and vector's "lock-content" API
    
    because it's new in 2.8 and doesn't need to be deprecated.

 app/pdb/drawable-cmds.c       |  114 -----------------------------------------
 app/pdb/internal-procs.c      |    2 +-
 app/pdb/vectors-cmds.c        |  114 -----------------------------------------
 libgimp/gimpdrawable_pdb.c    |   66 ------------------------
 libgimp/gimpdrawable_pdb.h    |    3 -
 libgimp/gimpvectors_pdb.c     |   66 ------------------------
 libgimp/gimpvectors_pdb.h     |    3 -
 tools/pdbgen/pdb/drawable.pdb |   53 -------------------
 tools/pdbgen/pdb/vectors.pdb  |   51 ------------------
 9 files changed, 1 insertions(+), 471 deletions(-)
---
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index 164d134..310345e 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -725,62 +725,6 @@ drawable_set_linked_invoker (GimpProcedure      *procedure,
 }
 
 static GValueArray *
-drawable_get_lock_content_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
-{
-  gboolean success = TRUE;
-  GValueArray *return_vals;
-  GimpDrawable *drawable;
-  gboolean lock_content = FALSE;
-
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-
-  if (success)
-    {
-      lock_content = gimp_item_get_lock_content (GIMP_ITEM (drawable));
-    }
-
-  return_vals = gimp_procedure_get_return_values (procedure, success,
-                                                  error ? *error : NULL);
-
-  if (success)
-    g_value_set_boolean (&return_vals->values[1], lock_content);
-
-  return return_vals;
-}
-
-static GValueArray *
-drawable_set_lock_content_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
-{
-  gboolean success = TRUE;
-  GimpDrawable *drawable;
-  gboolean lock_content;
-
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  lock_content = g_value_get_boolean (&args->values[1]);
-
-  if (success)
-    {
-      if (gimp_item_can_lock_content (GIMP_ITEM (drawable)))
-        gimp_item_set_lock_content (GIMP_ITEM (drawable), lock_content, TRUE);
-      else
-        success = FALSE;
-    }
-
-  return gimp_procedure_get_return_values (procedure, success,
-                                           error ? *error : NULL);
-}
-
-static GValueArray *
 drawable_get_tattoo_invoker (GimpProcedure      *procedure,
                              Gimp               *gimp,
                              GimpContext        *context,
@@ -2090,64 +2034,6 @@ register_drawable_procs (GimpPDB *pdb)
   g_object_unref (procedure);
 
   /*
-   * gimp-drawable-get-lock-content
-   */
-  procedure = gimp_procedure_new (drawable_get_lock_content_invoker);
-  gimp_object_set_static_name (GIMP_OBJECT (procedure),
-                               "gimp-drawable-get-lock-content");
-  gimp_procedure_set_static_strings (procedure,
-                                     "gimp-drawable-get-lock-content",
-                                     "Get the 'lock content' state of the specified drawable.",
-                                     "This procedure returns the specified drawable's lock content state.",
-                                     "Michael Natterer <mitch gimp org>",
-                                     "Michael Natterer",
-                                     "2009",
-                                     NULL);
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_drawable_id ("drawable",
-                                                            "drawable",
-                                                            "The drawable",
-                                                            pdb->gimp, FALSE,
-                                                            GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_boolean ("lock-content",
-                                                         "lock content",
-                                                         "Whether the drawable's pixels are locked",
-                                                         FALSE,
-                                                         GIMP_PARAM_READWRITE));
-  gimp_pdb_register_procedure (pdb, procedure);
-  g_object_unref (procedure);
-
-  /*
-   * gimp-drawable-set-lock-content
-   */
-  procedure = gimp_procedure_new (drawable_set_lock_content_invoker);
-  gimp_object_set_static_name (GIMP_OBJECT (procedure),
-                               "gimp-drawable-set-lock-content");
-  gimp_procedure_set_static_strings (procedure,
-                                     "gimp-drawable-set-lock-content",
-                                     "Set the 'lock content' state of the specified drawable.",
-                                     "This procedure sets the specified drawable's lock content state.",
-                                     "Michael Natterer <mitch gimp org>",
-                                     "Michael Natterer",
-                                     "2009",
-                                     NULL);
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_drawable_id ("drawable",
-                                                            "drawable",
-                                                            "The drawable",
-                                                            pdb->gimp, FALSE,
-                                                            GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               g_param_spec_boolean ("lock-content",
-                                                     "lock content",
-                                                     "The new drawable 'lock content' state",
-                                                     FALSE,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_pdb_register_procedure (pdb, procedure);
-  g_object_unref (procedure);
-
-  /*
    * gimp-drawable-get-tattoo
    */
   procedure = gimp_procedure_new (drawable_get_tattoo_invoker);
diff --git a/app/pdb/internal-procs.c b/app/pdb/internal-procs.c
index 6b91b85..fa1e7b9 100644
--- a/app/pdb/internal-procs.c
+++ b/app/pdb/internal-procs.c
@@ -28,7 +28,7 @@
 #include "internal-procs.h"
 
 
-/* 621 procedures registered total */
+/* 617 procedures registered total */
 
 void
 internal_procs_init (GimpPDB *pdb)
diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c
index ea9e2af..3e663a9 100644
--- a/app/pdb/vectors-cmds.c
+++ b/app/pdb/vectors-cmds.c
@@ -368,62 +368,6 @@ vectors_set_linked_invoker (GimpProcedure      *procedure,
 }
 
 static GValueArray *
-vectors_get_lock_content_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
-{
-  gboolean success = TRUE;
-  GValueArray *return_vals;
-  GimpVectors *vectors;
-  gboolean lock_content = FALSE;
-
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-
-  if (success)
-    {
-      lock_content = gimp_item_get_lock_content (GIMP_ITEM (vectors));
-    }
-
-  return_vals = gimp_procedure_get_return_values (procedure, success,
-                                                  error ? *error : NULL);
-
-  if (success)
-    g_value_set_boolean (&return_vals->values[1], lock_content);
-
-  return return_vals;
-}
-
-static GValueArray *
-vectors_set_lock_content_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
-{
-  gboolean success = TRUE;
-  GimpVectors *vectors;
-  gboolean lock_content;
-
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  lock_content = g_value_get_boolean (&args->values[1]);
-
-  if (success)
-    {
-      if (gimp_item_can_lock_content (GIMP_ITEM (vectors)))
-        gimp_item_set_lock_content (GIMP_ITEM (vectors), lock_content, TRUE);
-      else
-        success = FALSE;
-    }
-
-  return gimp_procedure_get_return_values (procedure, success,
-                                           error ? *error : NULL);
-}
-
-static GValueArray *
 vectors_get_tattoo_invoker (GimpProcedure      *procedure,
                             Gimp               *gimp,
                             GimpContext        *context,
@@ -1943,64 +1887,6 @@ register_vectors_procs (GimpPDB *pdb)
   g_object_unref (procedure);
 
   /*
-   * gimp-vectors-get-lock-content
-   */
-  procedure = gimp_procedure_new (vectors_get_lock_content_invoker);
-  gimp_object_set_static_name (GIMP_OBJECT (procedure),
-                               "gimp-vectors-get-lock-content");
-  gimp_procedure_set_static_strings (procedure,
-                                     "gimp-vectors-get-lock-content",
-                                     "Gets the 'lock content' state of the vectors object.",
-                                     "Gets the 'lock content' state of the vectors object.",
-                                     "Michael Natterer <mitch gimp org>",
-                                     "Michael Natterer",
-                                     "2009",
-                                     NULL);
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_vectors_id ("vectors",
-                                                           "vectors",
-                                                           "The vectors object",
-                                                           pdb->gimp, FALSE,
-                                                           GIMP_PARAM_READWRITE));
-  gimp_procedure_add_return_value (procedure,
-                                   g_param_spec_boolean ("lock-content",
-                                                         "lock content",
-                                                         "Whether the path's strokes are locked",
-                                                         FALSE,
-                                                         GIMP_PARAM_READWRITE));
-  gimp_pdb_register_procedure (pdb, procedure);
-  g_object_unref (procedure);
-
-  /*
-   * gimp-vectors-set-lock-content
-   */
-  procedure = gimp_procedure_new (vectors_set_lock_content_invoker);
-  gimp_object_set_static_name (GIMP_OBJECT (procedure),
-                               "gimp-vectors-set-lock-content");
-  gimp_procedure_set_static_strings (procedure,
-                                     "gimp-vectors-set-lock-content",
-                                     "Sets the 'lock content' state of the vectors object.",
-                                     "Sets the 'lock content' state of the vectors object.",
-                                     "Michael Natterer <mitch gimp org>",
-                                     "Michael Natterer",
-                                     "2009",
-                                     NULL);
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_vectors_id ("vectors",
-                                                           "vectors",
-                                                           "The vectors object",
-                                                           pdb->gimp, FALSE,
-                                                           GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               g_param_spec_boolean ("lock-content",
-                                                     "lock content",
-                                                     "Whether the path's strokes are locked",
-                                                     FALSE,
-                                                     GIMP_PARAM_READWRITE));
-  gimp_pdb_register_procedure (pdb, procedure);
-  g_object_unref (procedure);
-
-  /*
    * gimp-vectors-get-tattoo
    */
   procedure = gimp_procedure_new (vectors_get_tattoo_invoker);
diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c
index 5e27bcb..00a958c 100644
--- a/libgimp/gimpdrawable_pdb.c
+++ b/libgimp/gimpdrawable_pdb.c
@@ -799,72 +799,6 @@ gimp_drawable_set_linked (gint32   drawable_ID,
 }
 
 /**
- * gimp_drawable_get_lock_content:
- * @drawable_ID: The drawable.
- *
- * Get the 'lock content' state of the specified drawable.
- *
- * This procedure returns the specified drawable's lock content state.
- *
- * Returns: Whether the drawable's pixels are locked.
- *
- * Since: GIMP 2.8
- */
-gboolean
-gimp_drawable_get_lock_content (gint32 drawable_ID)
-{
-  GimpParam *return_vals;
-  gint nreturn_vals;
-  gboolean lock_content = FALSE;
-
-  return_vals = gimp_run_procedure ("gimp-drawable-get-lock-content",
-                                    &nreturn_vals,
-                                    GIMP_PDB_DRAWABLE, drawable_ID,
-                                    GIMP_PDB_END);
-
-  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
-    lock_content = return_vals[1].data.d_int32;
-
-  gimp_destroy_params (return_vals, nreturn_vals);
-
-  return lock_content;
-}
-
-/**
- * gimp_drawable_set_lock_content:
- * @drawable_ID: The drawable.
- * @lock_content: The new drawable 'lock content' state.
- *
- * Set the 'lock content' state of the specified drawable.
- *
- * This procedure sets the specified drawable's lock content state.
- *
- * Returns: TRUE on success.
- *
- * Since: GIMP 2.8
- */
-gboolean
-gimp_drawable_set_lock_content (gint32   drawable_ID,
-                                gboolean lock_content)
-{
-  GimpParam *return_vals;
-  gint nreturn_vals;
-  gboolean success = TRUE;
-
-  return_vals = gimp_run_procedure ("gimp-drawable-set-lock-content",
-                                    &nreturn_vals,
-                                    GIMP_PDB_DRAWABLE, drawable_ID,
-                                    GIMP_PDB_INT32, lock_content,
-                                    GIMP_PDB_END);
-
-  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
-
-  gimp_destroy_params (return_vals, nreturn_vals);
-
-  return success;
-}
-
-/**
  * gimp_drawable_get_tattoo:
  * @drawable_ID: The drawable.
  *
diff --git a/libgimp/gimpdrawable_pdb.h b/libgimp/gimpdrawable_pdb.h
index 9bfc751..8b49bc3 100644
--- a/libgimp/gimpdrawable_pdb.h
+++ b/libgimp/gimpdrawable_pdb.h
@@ -60,9 +60,6 @@ gboolean                 gimp_drawable_set_visible        (gint32
 gboolean                 gimp_drawable_get_linked         (gint32                      drawable_ID);
 gboolean                 gimp_drawable_set_linked         (gint32                      drawable_ID,
                                                            gboolean                    linked);
-gboolean                 gimp_drawable_get_lock_content   (gint32                      drawable_ID);
-gboolean                 gimp_drawable_set_lock_content   (gint32                      drawable_ID,
-                                                           gboolean                    lock_content);
 gint                     gimp_drawable_get_tattoo         (gint32                      drawable_ID);
 gboolean                 gimp_drawable_set_tattoo         (gint32                      drawable_ID,
                                                            gint                        tattoo);
diff --git a/libgimp/gimpvectors_pdb.c b/libgimp/gimpvectors_pdb.c
index 26d323b..84d2875 100644
--- a/libgimp/gimpvectors_pdb.c
+++ b/libgimp/gimpvectors_pdb.c
@@ -405,72 +405,6 @@ gimp_vectors_set_linked (gint32   vectors_ID,
 }
 
 /**
- * gimp_vectors_get_lock_content:
- * @vectors_ID: The vectors object.
- *
- * Gets the 'lock content' state of the vectors object.
- *
- * Gets the 'lock content' state of the vectors object.
- *
- * Returns: Whether the path's strokes are locked.
- *
- * Since: GIMP 2.8
- */
-gboolean
-gimp_vectors_get_lock_content (gint32 vectors_ID)
-{
-  GimpParam *return_vals;
-  gint nreturn_vals;
-  gboolean lock_content = FALSE;
-
-  return_vals = gimp_run_procedure ("gimp-vectors-get-lock-content",
-                                    &nreturn_vals,
-                                    GIMP_PDB_VECTORS, vectors_ID,
-                                    GIMP_PDB_END);
-
-  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
-    lock_content = return_vals[1].data.d_int32;
-
-  gimp_destroy_params (return_vals, nreturn_vals);
-
-  return lock_content;
-}
-
-/**
- * gimp_vectors_set_lock_content:
- * @vectors_ID: The vectors object.
- * @lock_content: Whether the path's strokes are locked.
- *
- * Sets the 'lock content' state of the vectors object.
- *
- * Sets the 'lock content' state of the vectors object.
- *
- * Returns: TRUE on success.
- *
- * Since: GIMP 2.8
- */
-gboolean
-gimp_vectors_set_lock_content (gint32   vectors_ID,
-                               gboolean lock_content)
-{
-  GimpParam *return_vals;
-  gint nreturn_vals;
-  gboolean success = TRUE;
-
-  return_vals = gimp_run_procedure ("gimp-vectors-set-lock-content",
-                                    &nreturn_vals,
-                                    GIMP_PDB_VECTORS, vectors_ID,
-                                    GIMP_PDB_INT32, lock_content,
-                                    GIMP_PDB_END);
-
-  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
-
-  gimp_destroy_params (return_vals, nreturn_vals);
-
-  return success;
-}
-
-/**
  * gimp_vectors_get_tattoo:
  * @vectors_ID: The vectors object.
  *
diff --git a/libgimp/gimpvectors_pdb.h b/libgimp/gimpvectors_pdb.h
index 24d37bc..67db719 100644
--- a/libgimp/gimpvectors_pdb.h
+++ b/libgimp/gimpvectors_pdb.h
@@ -44,9 +44,6 @@ gboolean              gimp_vectors_set_visible               (gint32
 gboolean              gimp_vectors_get_linked                (gint32                  vectors_ID);
 gboolean              gimp_vectors_set_linked                (gint32                  vectors_ID,
                                                               gboolean                linked);
-gboolean              gimp_vectors_get_lock_content          (gint32                  vectors_ID);
-gboolean              gimp_vectors_set_lock_content          (gint32                  vectors_ID,
-                                                              gboolean                lock_content);
 gint                  gimp_vectors_get_tattoo                (gint32                  vectors_ID);
 gboolean              gimp_vectors_set_tattoo                (gint32                  vectors_ID,
                                                               gint                    tattoo);
diff --git a/tools/pdbgen/pdb/drawable.pdb b/tools/pdbgen/pdb/drawable.pdb
index 38f5d7c..f5be342 100644
--- a/tools/pdbgen/pdb/drawable.pdb
+++ b/tools/pdbgen/pdb/drawable.pdb
@@ -865,58 +865,6 @@ CODE
     );
 }
 
-sub drawable_get_lock_content {
-    $blurb = "Get the 'lock content' state of the specified drawable.";
-
-    $help = "This procedure returns the specified drawable's lock content state.";
-
-    &mitch_pdb_misc('2009', '2.8');
-
-    @inargs = (
-	{ name => 'drawable', type => 'drawable',
-	  desc => 'The drawable' }
-    );
-
-    @outargs = (
-	{ name => 'lock_content', type => 'boolean',
-	  desc => "Whether the drawable's pixels are locked" }
-    );
-
-    %invoke = (
-	code => <<'CODE'
-{
-  lock_content = gimp_item_get_lock_content (GIMP_ITEM (drawable));
-}
-CODE
-    );
-}
-
-sub drawable_set_lock_content {
-    $blurb = "Set the 'lock content' state of the specified drawable.";
-
-    $help = "This procedure sets the specified drawable's lock content state.";
-
-    &mitch_pdb_misc('2009', '2.8');
-
-    @inargs = (
-	{ name => 'drawable', type => 'drawable',
-	  desc => 'The drawable' },
-	{ name => 'lock_content', type => 'boolean',
-	  desc => "The new drawable 'lock content' state" }
-    );
-
-    %invoke = (
-	code => <<'CODE'
-{
-  if (gimp_item_can_lock_content (GIMP_ITEM (drawable)))
-    gimp_item_set_lock_content (GIMP_ITEM (drawable), lock_content, TRUE);
-  else
-    success = FALSE;
-}
-CODE
-    );
-}
-
 sub drawable_get_tattoo {
     $blurb = "Get the tattoo of the specified drawable.";
 
@@ -1417,7 +1365,6 @@ CODE
             drawable_get_name drawable_set_name
             drawable_get_visible drawable_set_visible
             drawable_get_linked drawable_set_linked
-            drawable_get_lock_content drawable_set_lock_content
             drawable_get_tattoo drawable_set_tattoo
             drawable_mask_bounds
             drawable_mask_intersect
diff --git a/tools/pdbgen/pdb/vectors.pdb b/tools/pdbgen/pdb/vectors.pdb
index 86e0f8a..930c99d 100644
--- a/tools/pdbgen/pdb/vectors.pdb
+++ b/tools/pdbgen/pdb/vectors.pdb
@@ -322,56 +322,6 @@ CODE
     );
 }
 
-sub vectors_get_lock_content {
-    $blurb = "Gets the 'lock content' state of the vectors object.";
-    $help  = "Gets the 'lock content' state of the vectors object.";
-
-    &mitch_pdb_misc('2009', '2.8');
-
-    @inargs = (
-	{ name => 'vectors', type => 'vectors',
-	  desc => 'The vectors object' }
-    );
-
-    @outargs = (
-        { name => 'lock_content', type => 'boolean',
-          desc => "Whether the path's strokes are locked" }
-    );
-
-    %invoke = (
-        code => <<"CODE"
-{
-  lock_content = gimp_item_get_lock_content (GIMP_ITEM (vectors));
-}
-CODE
-    );
-}
-
-sub vectors_set_lock_content {
-    $blurb = "Sets the 'lock content' state of the vectors object.";
-    $help  = "Sets the 'lock content' state of the vectors object.";
-
-    &mitch_pdb_misc('2009', '2.8');
-
-    @inargs = (
-	{ name => 'vectors', type => 'vectors',
-	  desc => 'The vectors object' },
-	{ name => 'lock_content', type => 'boolean',
-	  desc => "Whether the path's strokes are locked" }
-    );
-
-    %invoke = (
-        code => <<"CODE"
-{
-  if (gimp_item_can_lock_content (GIMP_ITEM (vectors)))
-    gimp_item_set_lock_content (GIMP_ITEM (vectors), lock_content, TRUE);
-  else
-    success = FALSE;
-}
-CODE
-    );
-}
-
 sub vectors_get_tattoo {
     $blurb = 'Get the tattoo of the vectors object.';
     $help  = 'Get the tattoo state of the vectors object.';
@@ -1594,7 +1544,6 @@ CODE
             vectors_get_name vectors_set_name
             vectors_get_visible vectors_set_visible
             vectors_get_linked vectors_set_linked
-            vectors_get_lock_content vectors_set_lock_content
             vectors_get_tattoo vectors_set_tattoo
             vectors_get_strokes 
             vectors_stroke_get_length



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