]> spindle.queued.net Git - midori/commitdiff
Revisit inline find bindings to support the numpad '/' key
authorEnrico Tröger <enrico.troeger@uvena.de>
Sun, 31 May 2009 01:43:15 +0000 (03:43 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 31 May 2009 01:43:15 +0000 (03:43 +0200)
midori/midori-view.c

index 51216d41b36475fdc8a2794936adf6bdb5f97467..6af6a93eae1641dc1f53c18054e9d9d3f91cc3af 100644 (file)
@@ -26,6 +26,7 @@
 #include <glib/gi18n.h>
 #include <glib/gprintf.h>
 #include <glib/gstdio.h>
+#include <gdk/gdkkeysyms.h>
 #include <webkit/webkit.h>
 
 /* This is unstable API, so we need to declare it */
@@ -1016,15 +1017,16 @@ gtk_widget_key_press_event_cb (WebKitWebView* web_view,
                                MidoriView*    view)
 {
     guint character = gdk_unicode_to_keyval (event->keyval);
-    /* Skip control characters */
-    if (character == (event->keyval | 0x01000000))
-        return FALSE;
 
-    if (character == '.' || character == '/')
+    if (event->keyval == '.' || event->keyval == '/' || event->keyval == GDK_KP_Divide)
         character = '\0';
     else if (!view->find_while_typing)
         return FALSE;
 
+    /* Skip control characters */
+    if (character == (event->keyval | 0x01000000))
+        return FALSE;
+
     if (!webkit_web_view_can_cut_clipboard (web_view)
         && !webkit_web_view_can_paste_clipboard (web_view))
     {