gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / gimp-make-gegl-introspect-optional.patch
1 From 2cae9b9acf9da98c4c9990819ffbd5aabe23017e Mon Sep 17 00:00:00 2001
2 From: Jehan <jehan@girinstud.io>
3 Date: Mon, 14 Dec 2020 19:53:38 +0100
4 Subject: [PATCH] app: make "gegl:introspect" an optional operation dependency.
5
6 Check at runtime for the operation availability and set the "Show Image
7 Graph" action active depending on this check.
8
9 This goes with discussions to make this operation optional with a
10 runtime check for the tool `dot`.
11 See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/84
12 ---
13 app/actions/debug-actions.c | 6 ++++++
14 app/sanity.c | 1 -
15 2 files changed, 6 insertions(+), 1 deletion(-)
16
17 diff --git a/app/actions/debug-actions.c b/app/actions/debug-actions.c
18 index 6be4422b228..22ca38b15ea 100644
19 --- a/app/actions/debug-actions.c
20 +++ b/app/actions/debug-actions.c
21 @@ -103,4 +103,10 @@ void
22 debug_actions_update (GimpActionGroup *group,
23 gpointer data)
24 {
25 +#define SET_SENSITIVE(action,condition) \
26 + gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
27 +
28 + SET_SENSITIVE ("debug-show-image-graph", gegl_has_operation ("gegl:introspect"));
29 +
30 +#undef SET_SENSITIVE
31 }
32 diff --git a/app/sanity.c b/app/sanity.c
33 index 015801a396e..6374ac1ad20 100644
34 --- a/app/sanity.c
35 +++ b/app/sanity.c
36 @@ -650,7 +650,6 @@ sanity_check_gegl_ops (void)
37 "gegl:hue-chroma",
38 "gegl:illusion",
39 "gegl:image-gradient",
40 - "gegl:introspect",
41 "gegl:invert-gamma",
42 "gegl:invert-linear",
43 "gegl:lens-blur",