[gimp] libgimp: deprecate gimp_[drawable]_attach_new_parasite()



commit 94737aae8cf13dd635f0c700728b0a66935acb22
Author: Michael Natterer <mitch gimp org>
Date:   Fri Jul 9 13:30:31 2010 +0200

    libgimp: deprecate gimp_[drawable]_attach_new_parasite()
    
    They were unused, and it's silly to have a "convenience" function
    to replace three trivial lines of code.

 libgimp/gimp.c         |    3 +++
 libgimp/gimp.h         |    2 ++
 libgimp/gimpdrawable.c |    3 +++
 libgimp/gimpdrawable.h |    2 ++
 4 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index 5939a87..d395c34 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -99,6 +99,7 @@
 #include "libgimpbase/gimpprotocol.h"
 #include "libgimpbase/gimpwire.h"
 
+#undef GIMP_DISABLE_DEPRECATED
 #include "gimp.h"
 #include "gimpunitcache.h"
 
@@ -1486,6 +1487,8 @@ gimp_extension_process (guint timeout)
  * Convenience function that creates a parasite and attaches it
  * to GIMP.
  *
+ * Deprecated: Use gimp_parasite_attach() instead.
+ *
  * Return value: TRUE on successful creation and attachment of
  * the new parasite.
  *
diff --git a/libgimp/gimp.h b/libgimp/gimp.h
index f2e8e47..19e571e 100644
--- a/libgimp/gimp.h
+++ b/libgimp/gimp.h
@@ -330,10 +330,12 @@ guint32        gimp_user_time           (void) G_GNUC_CONST;
 
 const gchar  * gimp_get_progname        (void) G_GNUC_CONST;
 
+#ifndef GIMP_DISABLE_DEPRECATED
 gboolean       gimp_attach_new_parasite (const gchar    *name,
                                          gint            flags,
                                          gint            size,
                                          gconstpointer   data);
+#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/libgimp/gimpdrawable.c b/libgimp/gimpdrawable.c
index 06b4108..7a9a847 100644
--- a/libgimp/gimpdrawable.c
+++ b/libgimp/gimpdrawable.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 
+#undef GIMP_DISABLE_DEPRECATED
 #include "gimp.h"
 
 
@@ -331,6 +332,8 @@ gimp_drawable_get_sub_thumbnail_data (gint32  drawable_ID,
  * Convenience function that creates a parasite and attaches it
  * to GIMP.
  *
+ * Deprecated: use gimp_image_parasite_attach() instead.
+ *
  * Return value: TRUE on successful creation and attachment of
  * the new parasite.
  *
diff --git a/libgimp/gimpdrawable.h b/libgimp/gimpdrawable.h
index 39f4aa9..dd18987 100644
--- a/libgimp/gimpdrawable.h
+++ b/libgimp/gimpdrawable.h
@@ -68,11 +68,13 @@ guchar       * gimp_drawable_get_sub_thumbnail_data (gint32         drawable_ID,
                                                      gint          *dest_height,
                                                      gint          *bpp);
 
+#ifndef GIMP_DISABLE_DEPRECATED
 gboolean       gimp_drawable_attach_new_parasite    (gint32         drawable_ID,
                                                      const gchar   *name,
                                                      gint           flags,
                                                      gint           size,
                                                      gconstpointer  data);
+#endif /* GIMP_DISABLE_DEPRECATED */
 
 G_END_DECLS
 



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