From 1dee538e419bc8ec43c4f17c29aec984a0e57674 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enrico=20Tr=C3=B6ger?= Date: Sun, 31 May 2009 03:43:15 +0200 Subject: [PATCH] Revisit inline find bindings to support the numpad '/' key --- midori/midori-view.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index 51216d41..6af6a93e 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -26,6 +26,7 @@ #include #include #include +#include #include /* 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)) { -- 2.39.5