[gimp] pdb, app, libgimp: rename *-paste-as-new to *-paste-as-new-image
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb, app, libgimp: rename *-paste-as-new to *-paste-as-new-image
- Date: Tue, 20 Sep 2016 18:23:43 +0000 (UTC)
commit 109e01dbdd902189d12e9d696c66aca9de80e1cc
Author: Michael Natterer <mitch gimp org>
Date: Tue Sep 20 20:20:25 2016 +0200
pdb, app, libgimp: rename *-paste-as-new to *-paste-as-new-image
Keep the old function names around as deprecated compat wrappers.
app/pdb/edit-cmds.c | 42 ++++++++--------
app/pdb/gimp-pdb-compat.c | 8 ++-
libgimp/Makefile.am | 3 +
libgimp/gimp.def | 2 +
libgimp/gimp.h | 1 +
libgimp/gimpedit.c | 67 +++++++++++++++++++++++++++
libgimp/gimpedit.h | 41 ++++++++++++++++
libgimp/gimpedit_pdb.c | 20 ++++----
libgimp/gimpedit_pdb.h | 112 ++++++++++++++++++++++----------------------
tools/pdbgen/pdb/edit.pdb | 26 ++++++----
10 files changed, 223 insertions(+), 99 deletions(-)
---
diff --git a/app/pdb/edit-cmds.c b/app/pdb/edit-cmds.c
index 812f207..c792750 100644
--- a/app/pdb/edit-cmds.c
+++ b/app/pdb/edit-cmds.c
@@ -234,12 +234,12 @@ edit_paste_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
-edit_paste_as_new_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+edit_paste_as_new_image_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
@@ -471,12 +471,12 @@ edit_named_paste_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
-edit_named_paste_as_new_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+edit_named_paste_as_new_image_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
@@ -1059,13 +1059,13 @@ register_edit_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-edit-paste-as-new
+ * gimp-edit-paste-as-new-image
*/
- procedure = gimp_procedure_new (edit_paste_as_new_invoker);
+ procedure = gimp_procedure_new (edit_paste_as_new_image_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-edit-paste-as-new");
+ "gimp-edit-paste-as-new-image");
gimp_procedure_set_static_strings (procedure,
- "gimp-edit-paste-as-new",
+ "gimp-edit-paste-as-new-image",
"Paste buffer to a new image.",
"This procedure pastes a copy of the internal GIMP edit buffer to a new
image. The GIMP edit buffer will be empty unless a call was previously made to either 'gimp-edit-cut' or
'gimp-edit-copy'. This procedure returns the new image or -1 if the edit buffer was empty.",
"Michael Natterer <mitch gimp org>",
@@ -1235,15 +1235,15 @@ register_edit_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-edit-named-paste-as-new
+ * gimp-edit-named-paste-as-new-image
*/
- procedure = gimp_procedure_new (edit_named_paste_as_new_invoker);
+ procedure = gimp_procedure_new (edit_named_paste_as_new_image_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-edit-named-paste-as-new");
+ "gimp-edit-named-paste-as-new-image");
gimp_procedure_set_static_strings (procedure,
- "gimp-edit-named-paste-as-new",
+ "gimp-edit-named-paste-as-new-image",
"Paste named buffer to a new image.",
- "This procedure works like 'gimp-edit-paste-as-new' but pastes a named
buffer instead of the global buffer.",
+ "This procedure works like 'gimp-edit-paste-as-new-image' but pastes a
named buffer instead of the global buffer.",
"Michael Natterer <mitch gimp org>",
"Michael Natterer",
"2005",
diff --git a/app/pdb/gimp-pdb-compat.c b/app/pdb/gimp-pdb-compat.c
index 7e346e6..9c72912 100644
--- a/app/pdb/gimp-pdb-compat.c
+++ b/app/pdb/gimp-pdb-compat.c
@@ -482,8 +482,12 @@ gimp_pdb_compat_procs_register (GimpPDB *pdb,
{ "gimp-parasite-find", "gimp-get-parasite" },
{ "gimp-parasite-attach", "gimp-attach-parasite" },
{ "gimp-parasite-detach", "gimp-detach-parasite" },
- { "gimp-parasite-list", "gimp-get-parasite-list" }
- };
+ { "gimp-parasite-list", "gimp-get-parasite-list" },
+
+ /* deprecations since 2.8 */
+ { "gimp-edit-paste-as-new", "gimp-edit-paste-as-new-image" },
+ { "gimp-edit-named-paste-as-new", "gimp-edit-named-paste-as-new-image" }
+ };
g_return_if_fail (GIMP_IS_PDB (pdb));
diff --git a/libgimp/Makefile.am b/libgimp/Makefile.am
index 00242b2..72ce2b7 100644
--- a/libgimp/Makefile.am
+++ b/libgimp/Makefile.am
@@ -208,6 +208,8 @@ libgimp_sources = \
gimpchannel.h \
gimpdrawable.c \
gimpdrawable.h \
+ gimpedit.c \
+ gimpedit.h \
gimpfontselect.c \
gimpfontselect.h \
gimpgimprc.c \
@@ -336,6 +338,7 @@ gimpinclude_HEADERS = \
gimpbrushselect.h \
gimpchannel.h \
gimpdrawable.h \
+ gimpedit.h \
gimpfontselect.h \
gimpgimprc.h \
gimpgradients.h \
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index a20c383..94ff0bc 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -290,7 +290,9 @@ EXPORTS
gimp_edit_named_cut
gimp_edit_named_paste
gimp_edit_named_paste_as_new
+ gimp_edit_named_paste_as_new_image
gimp_edit_paste
+ gimp_edit_paste_as_new_image
gimp_edit_paste_as_new
gimp_edit_stroke
gimp_edit_stroke_vectors
diff --git a/libgimp/gimp.h b/libgimp/gimp.h
index f9bd796..0b89b20 100644
--- a/libgimp/gimp.h
+++ b/libgimp/gimp.h
@@ -39,6 +39,7 @@
#include <libgimp/gimpbrushselect.h>
#include <libgimp/gimpchannel.h>
#include <libgimp/gimpdrawable.h>
+#include <libgimp/gimpedit.h>
#include <libgimp/gimpfontselect.h>
#include <libgimp/gimpgimprc.h>
#include <libgimp/gimpgradients.h>
diff --git a/libgimp/gimpedit.c b/libgimp/gimpedit.c
new file mode 100644
index 0000000..0808148
--- /dev/null
+++ b/libgimp/gimpedit.c
@@ -0,0 +1,67 @@
+/* LIBGIMP - The GIMP Library
+ * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
+ *
+ * gimpedit.c
+ *
+ * This library is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "gimp.h"
+
+
+/**
+ * gimp_edit_paste_as_new:
+ *
+ * Paste buffer to a new image.
+ *
+ * This procedure pastes a copy of the internal GIMP edit buffer to a
+ * new image. The GIMP edit buffer will be empty unless a call was
+ * previously made to either gimp_edit_cut() or gimp_edit_copy(). This
+ * procedure returns the new image or -1 if the edit buffer was empty.
+ *
+ * Deprecated: Use gimp_edit_paste_as_new_image() instead.
+ *
+ * Returns: The new image.
+ *
+ * Since: 2.4
+ **/
+gint32
+gimp_edit_paste_as_new (void)
+{
+ return gimp_edit_paste_as_new_image ();
+}
+
+/**
+ * gimp_edit_named_paste_as_new:
+ * @buffer_name: The name of the buffer to paste.
+ *
+ * Paste named buffer to a new image.
+ *
+ * This procedure works like gimp_edit_paste_as_new_image() but pastes a
+ * named buffer instead of the global buffer.
+ *
+ * Deprecated: Use gimp_edit_named_paste_as_new_image() instead.
+ *
+ * Returns: The new image.
+ *
+ * Since: 2.4
+ **/
+gint32
+gimp_edit_named_paste_as_new (const gchar *buffer_name)
+{
+ return gimp_edit_named_paste_as_new_image (buffer_name);
+}
diff --git a/libgimp/gimpedit.h b/libgimp/gimpedit.h
new file mode 100644
index 0000000..5766eb2
--- /dev/null
+++ b/libgimp/gimpedit.h
@@ -0,0 +1,41 @@
+/* LIBGIMP - The GIMP Library
+ * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
+ *
+ * gimpedit.h
+ *
+ * This library is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
+#error "Only <libgimp/gimp.h> can be included directly."
+#endif
+
+#ifndef __GIMP_EDIT_H__
+#define __GIMP_EDIT_H__
+
+G_BEGIN_DECLS
+
+/* For information look into the C source or the html documentation */
+
+
+GIMP_DEPRECATED_FOR(gimp_edit_paste_as_new_image)
+gint32 gimp_edit_paste_as_new (void);
+
+GIMP_DEPRECATED_FOR(gimp_edit_named_paste_as_new_image)
+gint32 gimp_edit_named_paste_as_new (const gchar *buffer_name);
+
+G_END_DECLS
+
+#endif /* __GIMP_EDIT_H__ */
diff --git a/libgimp/gimpedit_pdb.c b/libgimp/gimpedit_pdb.c
index 312daa1..d1678d7 100644
--- a/libgimp/gimpedit_pdb.c
+++ b/libgimp/gimpedit_pdb.c
@@ -195,7 +195,7 @@ gimp_edit_paste (gint32 drawable_ID,
}
/**
- * gimp_edit_paste_as_new:
+ * gimp_edit_paste_as_new_image:
*
* Paste buffer to a new image.
*
@@ -206,16 +206,16 @@ gimp_edit_paste (gint32 drawable_ID,
*
* Returns: The new image.
*
- * Since: 2.4
+ * Since: 2.10
**/
gint32
-gimp_edit_paste_as_new (void)
+gimp_edit_paste_as_new_image (void)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 image_ID = -1;
- return_vals = gimp_run_procedure ("gimp-edit-paste-as-new",
+ return_vals = gimp_run_procedure ("gimp-edit-paste-as-new-image",
&nreturn_vals,
GIMP_PDB_END);
@@ -384,26 +384,26 @@ gimp_edit_named_paste (gint32 drawable_ID,
}
/**
- * gimp_edit_named_paste_as_new:
+ * gimp_edit_named_paste_as_new_image:
* @buffer_name: The name of the buffer to paste.
*
* Paste named buffer to a new image.
*
- * This procedure works like gimp_edit_paste_as_new() but pastes a
- * named buffer instead of the global buffer.
+ * This procedure works like gimp_edit_paste_as_new_image() but pastes
+ * a named buffer instead of the global buffer.
*
* Returns: The new image.
*
- * Since: 2.4
+ * Since: 2.10
**/
gint32
-gimp_edit_named_paste_as_new (const gchar *buffer_name)
+gimp_edit_named_paste_as_new_image (const gchar *buffer_name)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 image_ID = -1;
- return_vals = gimp_run_procedure ("gimp-edit-named-paste-as-new",
+ return_vals = gimp_run_procedure ("gimp-edit-named-paste-as-new-image",
&nreturn_vals,
GIMP_PDB_STRING, buffer_name,
GIMP_PDB_END);
diff --git a/libgimp/gimpedit_pdb.h b/libgimp/gimpedit_pdb.h
index 7bfb111..9108c1a 100644
--- a/libgimp/gimpedit_pdb.h
+++ b/libgimp/gimpedit_pdb.h
@@ -32,62 +32,62 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-gboolean gimp_edit_cut (gint32 drawable_ID);
-gboolean gimp_edit_copy (gint32 drawable_ID);
-gboolean gimp_edit_copy_visible (gint32 image_ID);
-gint32 gimp_edit_paste (gint32 drawable_ID,
- gboolean paste_into);
-gint32 gimp_edit_paste_as_new (void);
-gchar* gimp_edit_named_cut (gint32 drawable_ID,
- const gchar *buffer_name);
-gchar* gimp_edit_named_copy (gint32 drawable_ID,
- const gchar *buffer_name);
-gchar* gimp_edit_named_copy_visible (gint32 image_ID,
- const gchar *buffer_name);
-gint32 gimp_edit_named_paste (gint32 drawable_ID,
- const gchar *buffer_name,
- gboolean paste_into);
-gint32 gimp_edit_named_paste_as_new (const gchar *buffer_name);
-gboolean gimp_edit_clear (gint32 drawable_ID);
-gboolean gimp_edit_fill (gint32 drawable_ID,
- GimpFillType fill_type);
-gboolean gimp_edit_bucket_fill (gint32 drawable_ID,
- GimpBucketFillMode fill_mode,
- GimpLayerModeEffects paint_mode,
- gdouble opacity,
- gdouble threshold,
- gboolean sample_merged,
- gdouble x,
- gdouble y);
-gboolean gimp_edit_bucket_fill_full (gint32 drawable_ID,
- GimpBucketFillMode fill_mode,
- GimpLayerModeEffects paint_mode,
- gdouble opacity,
- gdouble threshold,
- gboolean sample_merged,
- gboolean fill_transparent,
- GimpSelectCriterion select_criterion,
- gdouble x,
- gdouble y);
-gboolean gimp_edit_blend (gint32 drawable_ID,
- GimpBlendMode blend_mode,
- GimpLayerModeEffects paint_mode,
- GimpGradientType gradient_type,
- gdouble opacity,
- gdouble offset,
- GimpRepeatMode repeat,
- gboolean reverse,
- gboolean supersample,
- gint max_depth,
- gdouble threshold,
- gboolean dither,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2);
-gboolean gimp_edit_stroke (gint32 drawable_ID);
-gboolean gimp_edit_stroke_vectors (gint32 drawable_ID,
- gint32 vectors_ID);
+gboolean gimp_edit_cut (gint32 drawable_ID);
+gboolean gimp_edit_copy (gint32 drawable_ID);
+gboolean gimp_edit_copy_visible (gint32 image_ID);
+gint32 gimp_edit_paste (gint32 drawable_ID,
+ gboolean paste_into);
+gint32 gimp_edit_paste_as_new_image (void);
+gchar* gimp_edit_named_cut (gint32 drawable_ID,
+ const gchar *buffer_name);
+gchar* gimp_edit_named_copy (gint32 drawable_ID,
+ const gchar *buffer_name);
+gchar* gimp_edit_named_copy_visible (gint32 image_ID,
+ const gchar *buffer_name);
+gint32 gimp_edit_named_paste (gint32 drawable_ID,
+ const gchar *buffer_name,
+ gboolean paste_into);
+gint32 gimp_edit_named_paste_as_new_image (const gchar *buffer_name);
+gboolean gimp_edit_clear (gint32 drawable_ID);
+gboolean gimp_edit_fill (gint32 drawable_ID,
+ GimpFillType fill_type);
+gboolean gimp_edit_bucket_fill (gint32 drawable_ID,
+ GimpBucketFillMode fill_mode,
+ GimpLayerModeEffects paint_mode,
+ gdouble opacity,
+ gdouble threshold,
+ gboolean sample_merged,
+ gdouble x,
+ gdouble y);
+gboolean gimp_edit_bucket_fill_full (gint32 drawable_ID,
+ GimpBucketFillMode fill_mode,
+ GimpLayerModeEffects paint_mode,
+ gdouble opacity,
+ gdouble threshold,
+ gboolean sample_merged,
+ gboolean fill_transparent,
+ GimpSelectCriterion select_criterion,
+ gdouble x,
+ gdouble y);
+gboolean gimp_edit_blend (gint32 drawable_ID,
+ GimpBlendMode blend_mode,
+ GimpLayerModeEffects paint_mode,
+ GimpGradientType gradient_type,
+ gdouble opacity,
+ gdouble offset,
+ GimpRepeatMode repeat,
+ gboolean reverse,
+ gboolean supersample,
+ gint max_depth,
+ gdouble threshold,
+ gboolean dither,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2);
+gboolean gimp_edit_stroke (gint32 drawable_ID);
+gboolean gimp_edit_stroke_vectors (gint32 drawable_ID,
+ gint32 vectors_ID);
G_END_DECLS
diff --git a/tools/pdbgen/pdb/edit.pdb b/tools/pdbgen/pdb/edit.pdb
index b5638d8..a93d83a 100644
--- a/tools/pdbgen/pdb/edit.pdb
+++ b/tools/pdbgen/pdb/edit.pdb
@@ -225,7 +225,7 @@ CODE
);
}
-sub edit_paste_as_new {
+sub edit_paste_as_new_image {
$blurb = 'Paste buffer to a new image.';
$help = <<'HELP';
@@ -235,7 +235,7 @@ previously made to either gimp_edit_cut() or gimp_edit_copy(). This
procedure returns the new image or -1 if the edit buffer was empty.
HELP
- &mitch_pdb_misc('2005', '2.4');
+ &mitch_pdb_misc('2005', '2.10');
@outargs = (
{ name => 'image', type => 'image',
@@ -279,6 +279,7 @@ HELP
{ name => 'buffer_name', type => 'string', non_empty => 1,
desc => 'The name of the buffer to create' }
);
+
@outargs = (
{ name => 'real_name', type => 'string',
desc => 'The real name given to the buffer, or NULL if the
@@ -334,6 +335,7 @@ HELP
{ name => 'buffer_name', type => 'string', non_empty => 1,
desc => 'The name of the buffer to create' }
);
+
@outargs = (
{ name => 'real_name', type => 'string',
desc => 'The real name given to the buffer, or NULL if the
@@ -469,15 +471,15 @@ CODE
)
}
-sub edit_named_paste_as_new {
+sub edit_named_paste_as_new_image {
$blurb = 'Paste named buffer to a new image.';
$help = <<'HELP';
-This procedure works like gimp_edit_paste_as_new() but pastes a named buffer
-instead of the global buffer.
+This procedure works like gimp_edit_paste_as_new_image() but pastes a
+named buffer instead of the global buffer.
HELP
- &mitch_pdb_misc('2005', '2.4');
+ &mitch_pdb_misc('2005', '2.10');
@inargs = (
{ name => 'buffer_name', type => 'string',
@@ -1024,11 +1026,15 @@ CODE
"gimp-intl.h");
@procs = qw(edit_cut
- edit_copy edit_copy_visible
- edit_paste edit_paste_as_new
+ edit_copy
+ edit_copy_visible
+ edit_paste
+ edit_paste_as_new_image
edit_named_cut
- edit_named_copy edit_named_copy_visible
- edit_named_paste edit_named_paste_as_new
+ edit_named_copy
+ edit_named_copy_visible
+ edit_named_paste
+ edit_named_paste_as_new_image
edit_clear
edit_fill
edit_bucket_fill
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]