From ce93d5c3ab35365ed2870b061af40e8d520a8d51 Mon Sep 17 00:00:00 2001 From: Stanislav Grinkov <43956-stanislavgrinkov@users.noreply.gitlab.gnome.org> Date: Thu, 28 Jan 2021 01:03:41 +0600 Subject: [PATCH] gui: #5339 Disable GEGL Op menu action if no image is open Because "GEGL Operations..." menu action should be active only if image is open --- app/actions/tools-actions.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c index 0d627a1243..0625b875d6 100644 --- a/app/actions/tools-actions.c +++ b/app/actions/tools-actions.c @@ -797,4 +797,12 @@ void tools_actions_update (GimpActionGroup *group, gpointer data) { + GimpImage *image = action_data_get_image (data); + +#define SET_SENSITIVE(action,condition) \ + gimp_action_group_set_action_sensitive (group, action, (condition) != 0) + + SET_SENSITIVE ("tools-gegl", image); + +#undef SET_SENSITIVE }