app: add member "default_run_mode" to GimpGeglProcedure

which determines if a filter is applied directly (RUN_NONINTERACTIVE)
or asynchronously using GimpOperationTool (RUN_INTERACTIVE).

Split filter actions in two groups, one for direct apply and one for
interactive apply, which have separate callbacks that create
GimpGeglProcedures with the right default_run_mode set.

(After doing this distinction automatically based on the existance of
editable properties, I figured will might want direct apply also for
filters that do have properties, such as e.g. dilate and erode, which
are just value-propagate with some constant property values)
This commit is contained in:
Michael Natterer
2017-05-31 23:41:37 +02:00
parent 320a3db133
commit 383419926b
5 changed files with 123 additions and 40 deletions

View File

@ -40,6 +40,8 @@ struct _GimpGeglProcedure
{
GimpProcedure parent_instance;
GimpRunMode default_run_mode;
gchar *menu_label;
gchar *label;
gchar *help_id;
@ -54,6 +56,7 @@ struct _GimpGeglProcedureClass
GType gimp_gegl_procedure_get_type (void) G_GNUC_CONST;
GimpProcedure * gimp_gegl_procedure_new (Gimp *gimp,
GimpRunMode default_run_mode,
const gchar *operation,
const gchar *name,
const gchar *menu_label,