Commit 3a34a2b5 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 764320 - Xsane Gimp no device dialog

Pass the run_mode again to GIMP_EXTENSION plug-ins, this got lost in
the cleanup in commit dda06ac0.
Spotted by Massimo.
parent 68b91cc9
......@@ -78,6 +78,7 @@ plug_in_run_cmd_callback (GtkAction *action,
switch (procedure->proc_type)
{
case GIMP_EXTENSION:
args = procedure_commands_get_run_mode_arg (procedure);
break;
case GIMP_PLUGIN:
......
......@@ -36,6 +36,28 @@
#include "procedure-commands.h"
GimpValueArray *
procedure_commands_get_run_mode_arg (GimpProcedure *procedure)
{
GimpValueArray *args;
gint n_args = 0;
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_INT32 (procedure->args[n_args]))
{
g_value_set_int (gimp_value_array_index (args, n_args),
GIMP_RUN_INTERACTIVE);
n_args++;
}
gimp_value_array_truncate (args, n_args);
return args;
}
GimpValueArray *
procedure_commands_get_data_args (GimpProcedure *procedure,
GimpObject *object)
......
......@@ -19,6 +19,7 @@
#define __PROCEDURE_COMMANDS_H__
GimpValueArray * procedure_commands_get_run_mode_arg (GimpProcedure *procedure);
GimpValueArray * procedure_commands_get_data_args (GimpProcedure *procedure,
GimpObject *object);
GimpValueArray * procedure_commands_get_image_args (GimpProcedure *procedure,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment