pdb, app, libgimp: rename *-paste-as-new to *-paste-as-new-image
Keep the old function names around as deprecated compat wrappers.
This commit is contained in:
@ -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",
|
||||
|
||||
@ -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));
|
||||
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
67
libgimp/gimpedit.c
Normal file
67
libgimp/gimpedit.c
Normal file
@ -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);
|
||||
}
|
||||
41
libgimp/gimpedit.h
Normal file
41
libgimp/gimpedit.h
Normal file
@ -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__ */
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user