mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
libgimp, plug-ins, extensions: gimp_image_procedure_new2() renamed gimp_image_procedure_new().
This commit is contained in:
parent
5c8aa1f242
commit
1d50c81130
57 changed files with 225 additions and 299 deletions
|
@ -103,9 +103,9 @@ goat_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
goat_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
goat_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
|
|
@ -72,7 +72,7 @@ var Goat = GObject.registerClass({
|
|||
return procedure;
|
||||
}
|
||||
|
||||
run(procedure, run_mode, image, drawables, args, run_data) {
|
||||
run(procedure, run_mode, image, drawables, config, run_data) {
|
||||
/* TODO: localization. */
|
||||
|
||||
if (drawables.length != 1) {
|
||||
|
|
|
@ -41,7 +41,7 @@ function _(message)
|
|||
return GLib.dgettext(nil, message);
|
||||
end
|
||||
|
||||
function run(procedure, run_mode, image, drawables, args, run_data)
|
||||
function run(procedure, run_mode, image, drawables, config, run_data)
|
||||
-- procedure:new_return_values() crashes LGI so we construct the
|
||||
-- GimpValueArray manually.
|
||||
local retval = Gimp.ValueArray(1)
|
||||
|
|
|
@ -37,8 +37,8 @@ class Goat (Gimp.PlugIn):
|
|||
|
||||
def do_create_procedure(self, name):
|
||||
procedure = Gimp.ImageProcedure.new(self, name,
|
||||
Gimp.PDBProcType.PLUGIN,
|
||||
self.run, None)
|
||||
Gimp.PDBProcType.PLUGIN,
|
||||
self.run, None)
|
||||
|
||||
procedure.set_image_types("*")
|
||||
procedure.set_sensitivity_mask (Gimp.ProcedureSensitivityMask.DRAWABLE)
|
||||
|
@ -54,7 +54,7 @@ class Goat (Gimp.PlugIn):
|
|||
|
||||
return procedure
|
||||
|
||||
def run(self, procedure, run_mode, image, n_drawables, drawables, args, run_data):
|
||||
def run(self, procedure, run_mode, image, n_drawables, drawables, config, run_data):
|
||||
if n_drawables != 1:
|
||||
msg = _("Procedure '{}' only works with one drawable.").format(procedure.get_name())
|
||||
error = GLib.Error.new_literal(Gimp.PlugIn.error_quark(), msg, 0)
|
||||
|
|
|
@ -57,7 +57,7 @@ public class Goat : Gimp.PlugIn {
|
|||
Gimp.RunMode run_mode,
|
||||
Gimp.Image image,
|
||||
Gimp.Drawable[] drawables,
|
||||
Gimp.ValueArray args) {
|
||||
Gimp.ProcedureConfig config) {
|
||||
var drawable = drawables[0];
|
||||
|
||||
if (run_mode == Gimp.RunMode.INTERACTIVE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue