diff --git a/app/actions/filters-actions.c b/app/actions/filters-actions.c index 4b65c41294..bcbdbba7d8 100644 --- a/app/actions/filters-actions.c +++ b/app/actions/filters-actions.c @@ -777,7 +777,7 @@ filters_actions_setup (GimpActionGroup *group) G_N_ELEMENTS (filters_interactive_actions)); gegl_actions = g_strv_builder_new (); - op_classes = gimp_gegl_get_op_classes (); + op_classes = gimp_gegl_get_op_classes (TRUE); for (iter = op_classes; iter; iter = iter->next) { diff --git a/app/gegl/gimp-gegl-utils.c b/app/gegl/gimp-gegl-utils.c index 49d35bc307..10c398b99d 100644 --- a/app/gegl/gimp-gegl-utils.c +++ b/app/gegl/gimp-gegl-utils.c @@ -42,9 +42,11 @@ /* local function prototypes */ static gboolean gimp_gegl_op_blacklisted (const gchar *name, - const gchar *categories); + const gchar *categories, + gboolean block_gimp_ops); static GList * gimp_gegl_get_op_subclasses (GType type, - GList *classes); + GList *classes, + gboolean block_gimp_ops); static gint gimp_gegl_compare_op_names (GeglOperationClass *a, GeglOperationClass *b); @@ -52,11 +54,11 @@ static gint gimp_gegl_compare_op_names (GeglOperationClass *a, /* public functions */ GList * -gimp_gegl_get_op_classes (void) +gimp_gegl_get_op_classes (gboolean block_gimp_ops) { GList *operations; - operations = gimp_gegl_get_op_subclasses (GEGL_TYPE_OPERATION, NULL); + operations = gimp_gegl_get_op_subclasses (GEGL_TYPE_OPERATION, NULL, block_gimp_ops); operations = g_list_sort (operations, (GCompareFunc) @@ -473,7 +475,8 @@ gimp_gegl_buffer_set_extent (GeglBuffer *buffer, static gboolean gimp_gegl_op_blacklisted (const gchar *name, - const gchar *categories_str) + const gchar *categories_str, + gboolean block_gimp_ops) { static const gchar * const category_blacklist[] = { @@ -534,7 +537,7 @@ gimp_gegl_op_blacklisted (const gchar *name, if (g_getenv ("GIMP_TESTING_NO_GEGL_BLACKLIST")) return FALSE; - if (g_str_has_prefix (name, "gimp")) + if (block_gimp_ops && g_str_has_prefix (name, "gimp")) return TRUE; for (i = 0; i < G_N_ELEMENTS (name_blacklist); i++) @@ -568,8 +571,9 @@ gimp_gegl_op_blacklisted (const gchar *name, /* Builds a GList of the class structures of all subtypes of type. */ static GList * -gimp_gegl_get_op_subclasses (GType type, - GList *classes) +gimp_gegl_get_op_subclasses (GType type, + GList *classes, + gboolean block_gimp_ops) { GeglOperationClass *klass; GType *ops; @@ -585,11 +589,11 @@ gimp_gegl_get_op_subclasses (GType type, categories = gegl_operation_class_get_key (klass, "categories"); - if (! gimp_gegl_op_blacklisted (klass->name, categories)) + if (! gimp_gegl_op_blacklisted (klass->name, categories, block_gimp_ops)) classes = g_list_prepend (classes, klass); for (i = 0; i < n_ops; i++) - classes = gimp_gegl_get_op_subclasses (ops[i], classes); + classes = gimp_gegl_get_op_subclasses (ops[i], classes, block_gimp_ops); if (ops) g_free (ops); diff --git a/app/gegl/gimp-gegl-utils.h b/app/gegl/gimp-gegl-utils.h index 8f460be31b..20d284b2b4 100644 --- a/app/gegl/gimp-gegl-utils.h +++ b/app/gegl/gimp-gegl-utils.h @@ -21,7 +21,7 @@ #pragma once -GList * gimp_gegl_get_op_classes (void); +GList * gimp_gegl_get_op_classes (gboolean block_gimp_ops); GType gimp_gegl_get_op_enum_type (const gchar *operation, const gchar *property); diff --git a/app/tools/gimpgegltool.c b/app/tools/gimpgegltool.c index 5b6c72c907..0b66435a13 100644 --- a/app/tools/gimpgegltool.c +++ b/app/tools/gimpgegltool.c @@ -166,7 +166,7 @@ gimp_gegl_tool_dialog (GimpFilterTool *filter_tool) store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); - opclasses = gimp_gegl_get_op_classes (); + opclasses = gimp_gegl_get_op_classes (TRUE); for (iter = opclasses; iter; iter = iter->next) {