gimp/0001-app-make-gegl-introspect-an-optional-operation-depen.patch
Stefan Brüns 0e20ad6f59 Accepting request 866500 from home:StefanBruens:branches:graphics
- Make graphviz/dot only required for runtime debugging an
  optional dependency, fixes bsc#1180614.
- Cleanup spec file, remove Leap 42.x parts

OBS-URL: https://build.opensuse.org/request/show/866500
OBS-URL: https://build.opensuse.org/package/show/graphics/gimp?expand=0&rev=50
2021-01-28 15:38:06 +00:00

47 lines
1.5 KiB
Diff

From aa135ac1f814bf6197b2951ec0796547907a08ed Mon Sep 17 00:00:00 2001
From: Jehan <jehan@girinstud.io>
Date: Mon, 14 Dec 2020 19:53:38 +0100
Subject: [PATCH] app: make "gegl:introspect" an optional operation dependency.
Check at runtime for the operation availability and set the "Show Image
Graph" action active depending on this check.
This goes with discussions to make this operation optional with a
runtime check for the tool `dot`.
See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/84
---
app/actions/debug-actions.c | 6 ++++++
app/sanity.c | 1 -
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/actions/debug-actions.c b/app/actions/debug-actions.c
index 98a2f07..70ceb0d 100644
--- a/app/actions/debug-actions.c
+++ b/app/actions/debug-actions.c
@@ -98,4 +98,10 @@ void
debug_actions_update (GimpActionGroup *group,
gpointer data)
{
+#define SET_SENSITIVE(action,condition) \
+ gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
+
+ SET_SENSITIVE ("debug-show-image-graph", gegl_has_operation ("gegl:introspect"));
+
+#undef SET_SENSITIVE
}
diff --git a/app/sanity.c b/app/sanity.c
index 0ad044a..81120bb 100644
--- a/app/sanity.c
+++ b/app/sanity.c
@@ -650,7 +650,6 @@ sanity_check_gegl_ops (void)
"gegl:hue-chroma",
"gegl:illusion",
"gegl:image-gradient",
- "gegl:introspect",
"gegl:invert-gamma",
"gegl:invert-linear",
"gegl:lens-blur",
--
2.30.0