[gimp] gui: #5339 Disable GEGL Op menu action if no image is open



commit ce93d5c3ab35365ed2870b061af40e8d520a8d51
Author: Stanislav Grinkov <43956-stanislavgrinkov users noreply gitlab gnome org>
Date:   Thu Jan 28 01:03:41 2021 +0600

    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
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]