[gimp] display - run the file-open command when double-clicking in an empty shell.



commit 5d668971d78c763662ac1f47fc317e2a81b2cf47
Author: Jehan <jehan girinstud io>
Date:   Sat Dec 1 22:26:36 2012 +0900

    display - run the file-open command when double-clicking in an empty shell.

 app/display/gimpdisplayshell-tool-events.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 95d7906..776cc4d 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -247,6 +247,20 @@ gimp_display_shell_canvas_no_image_events (GtkWidget        *canvas,
 {
   switch (event->type)
     {
+    case GDK_2BUTTON_PRESS:
+      {
+        GdkEventButton  *bevent = (GdkEventButton *) event;
+        if (bevent->button == 1)
+          {
+            GimpImageWindow *window  = gimp_display_shell_get_window (shell);
+            GimpUIManager   *manager = gimp_image_window_get_ui_manager (window);
+
+            gimp_ui_manager_activate_action (manager, "file", "file-open");
+          }
+        return TRUE;
+      }
+      break;
+
     case GDK_BUTTON_PRESS:
       if (gdk_event_triggers_context_menu (event))
         {



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