[gimp] Bug 586451: Alpha Logo scripts incorrectly become...
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 586451: Alpha Logo scripts incorrectly become...
- Date: Tue, 7 Feb 2012 16:33:40 +0000 (UTC)
commit 7cf2ee6397ac05ca8a925b8667fc313cc321a099
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]