Merge lp:~kalikiana/midori/commasearch into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: André Stösel
Approved revision: 6292
Merged at revision: 6293
Proposed branch: lp:~kalikiana/midori/commasearch
Merge into: lp:midori
Diff against target: 40 lines (+6/-2)
1 file modified
midori/midori-view.c (+6/-2)
To merge this branch: bzr merge lp:~kalikiana/midori/commasearch
Reviewer Review Type Date Requested Status
André Stösel Approve
Review via email: mp+177659@code.launchpad.net

Commit message

Check the hit test result for editable to see if , should search

To post a comment you must log in.
Revision history for this message
André Stösel (ivaldi) wrote :

Works fine!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-view.c'
2--- midori/midori-view.c 2013-07-27 12:35:55 +0000
3+++ midori/midori-view.c 2013-07-30 17:47:24 +0000
4@@ -1513,6 +1513,7 @@
5 MidoriView* view)
6 {
7 #ifdef HAVE_WEBKIT2
8+ katze_object_assign (view->hit_test, g_object_ref (hit_test_result));
9 if (!webkit_hit_test_result_context_is_link (hit_test_result))
10 {
11 katze_assign (view->link_uri, NULL);
12@@ -1901,7 +1902,6 @@
13 GdkEventKey* event,
14 MidoriView* view)
15 {
16-#ifndef HAVE_WEBKIT2
17 guint character;
18
19 event->state = event->state & MIDORI_KEYS_MODIFIER_MASK;
20@@ -1929,8 +1929,13 @@
21 if (character == (event->keyval | 0x01000000))
22 return FALSE;
23
24+ #ifdef HAVE_WEBKIT2
25+ WebKitHitTestResultContext context = katze_object_get_int (view->hit_test, "context");
26+ if (!(context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE))
27+ #else
28 if (!webkit_web_view_can_cut_clipboard (web_view)
29 && !webkit_web_view_can_paste_clipboard (web_view))
30+ #endif
31 {
32 gchar* text = character ? g_strdup_printf ("%c", character) : NULL;
33 #if GTK_CHECK_VERSION(3, 2, 0)
34@@ -1942,7 +1947,6 @@
35 g_free (text);
36 return TRUE;
37 }
38-#endif
39 return FALSE;
40 }
41

Subscribers

People subscribed via source and target branches

to all changes: