[gimp/metadata-browser] Bug 586451: Alpha Logo scripts incorrectly	become...
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gimp/metadata-browser] Bug 586451: Alpha Logo scripts incorrectly	become...
- Date: Wed, 12 Sep 2012 22:47:45 +0000 (UTC)
commit f32d6fed00da03ddaa998b30ee704e5be4547b52
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Tue Feb 7 16:56:41 2012 +0100
    Bug 586451: Alpha Logo scripts incorrectly become...
    
    sensitive after "Refresh Scripts"
 app/actions/plug-in-actions.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/app/actions/plug-in-actions.c b/app/actions/plug-in-actions.c
index ce58868..64a31a2 100644
--- a/app/actions/plug-in-actions.c
+++ b/app/actions/plug-in-actions.c
@@ -28,6 +28,7 @@
 #include "actions-types.h"
 
 #include "core/gimp.h"
+#include "core/gimpcontext.h"
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
 
@@ -497,6 +498,25 @@ plug_in_actions_add_proc (GimpActionGroup     *group,
       g_free (path_original);
       g_free (path_translated);
     }
+
+  if ((proc->menu_label || proc->menu_paths) &&
+      ! proc->file_proc                      &&
+      proc->image_types_val)
+    {
+      GimpContext  *context = gimp_get_user_context (group->gimp);
+      GimpImage    *image = context ? gimp_context_get_image (context) : NULL;
+      GimpDrawable *drawable = NULL;
+      gboolean      sensitive;
+
+      if (image)
+        drawable = gimp_image_get_active_drawable (image);
+
+      sensitive = gimp_plug_in_procedure_get_sensitive (proc, drawable);
+
+      gimp_action_group_set_action_sensitive (group,
+                                              gimp_object_get_name (proc),
+                                              sensitive);
+    }
 }
 
 static void
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]