[gimp] app: Fix keyboard shortcuts not working when non-image-windows focused



commit e36c3ee9bd19cf1b4f78d5881d86dacb9336409a
Author: Martin Nordholts <martinn src gnome org>
Date:   Wed Sep 30 07:34:55 2009 +0200

    app: Fix keyboard shortcuts not working when non-image-windows focused
    
    Handle GIMP_IS_DOCK_WINDOW in action_data_get_foo(). This makes image
    related keyboard shortcuts work again when e.g. a dock is the focused
    window. Fix discovered by Michael Natterer.

 app/actions/actions.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/actions/actions.c b/app/actions/actions.c
index 22ab3b0..36c1da5 100644
--- a/app/actions/actions.c
+++ b/app/actions/actions.c
@@ -37,6 +37,7 @@
 #include "widgets/gimpcontainerview.h"
 #include "widgets/gimpdock.h"
 #include "widgets/gimpdockable.h"
+#include "widgets/gimpdockwindow.h"
 #include "widgets/gimpimageeditor.h"
 #include "widgets/gimpitemtreeview.h"
 
@@ -269,6 +270,8 @@ action_data_get_gimp (gpointer data)
     return data;
   else if (GIMP_IS_DOCK (data))
     context = gimp_dock_get_context (((GimpDock *) data));
+  else if (GIMP_IS_DOCK_WINDOW (data))
+    context = gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
   else if (GIMP_IS_CONTAINER_VIEW (data))
     context = gimp_container_view_get_context ((GimpContainerView *) data);
   else if (GIMP_IS_CONTAINER_EDITOR (data))
@@ -298,6 +301,8 @@ action_data_get_context (gpointer data)
     return gimp_get_user_context (data);
   else if (GIMP_IS_DOCK (data))
     return gimp_dock_get_context ((GimpDock *) data);
+  else if (GIMP_IS_DOCK_WINDOW (data))
+    return gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
   else if (GIMP_IS_CONTAINER_VIEW (data))
     return gimp_container_view_get_context ((GimpContainerView *) data);
   else if (GIMP_IS_CONTAINER_EDITOR (data))
@@ -326,6 +331,8 @@ action_data_get_image (gpointer data)
     context = gimp_get_user_context (data);
   else if (GIMP_IS_DOCK (data))
     context = gimp_dock_get_context ((GimpDock *) data);
+  else if (GIMP_IS_DOCK_WINDOW (data))
+    context = gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
   else if (GIMP_IS_ITEM_TREE_VIEW (data))
     return gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
   else if (GIMP_IS_IMAGE_EDITOR (data))
@@ -355,6 +362,8 @@ action_data_get_display (gpointer data)
     context = gimp_get_user_context (data);
   else if (GIMP_IS_DOCK (data))
     context = gimp_dock_get_context ((GimpDock *) data);
+  else if (GIMP_IS_DOCK_WINDOW (data))
+    context = gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
   else if (GIMP_IS_NAVIGATION_EDITOR (data))
     context = ((GimpNavigationEditor *) data)->context;
 



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