diff options
author | portix <none@none> | 2012-12-06 12:19:18 +0100 |
---|---|---|
committer | portix <none@none> | 2012-12-06 12:19:18 +0100 |
commit | 7b0f52f71067a8c451a1c19c0437909b51d1cfff (patch) | |
tree | 514841405af57223af5d5d393226bd40cf76b1be /src/view.c | |
parent | cfe31126f94c76ee9c2f1d5c7bfb13f31b9efcc1 (diff) | |
download | dwb-7b0f52f71067a8c451a1c19c0437909b51d1cfff.zip |
Change to normal mode in view_navigation_policy_cb; use gtk_clipboard_get instead of gtk_widget_get_clipboard
Diffstat (limited to 'src/view.c')
-rw-r--r-- | src/view.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -461,7 +461,7 @@ view_navigation_policy_cb(WebKitWebView *web, WebKitWebFrame *frame, WebKitNetwo WebKitWebPolicyDecision *policy, GList *gl) { - char *uri = (char *) webkit_network_request_get_uri(request); + const char *uri = webkit_network_request_get_uri(request); gboolean ret = false; WebKitWebNavigationReason reason = webkit_web_navigation_action_get_reason(action); @@ -563,6 +563,7 @@ view_navigation_policy_cb(WebKitWebView *web, WebKitWebFrame *frame, WebKitNetwo return true; } dwb_soup_clean(); + break; case WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED: if (dwb.state.mode == SEARCH_FIELD_MODE) { @@ -579,9 +580,14 @@ view_navigation_policy_cb(WebKitWebView *web, WebKitWebFrame *frame, WebKitNetwo webkit_web_policy_decision_ignore(policy); return true; } + break; default: break; } + if (gl == dwb.state.fview && (dwb.state.mode == INSERT_MODE || dwb.state.mode == FIND_MODE) && frame == webkit_web_view_get_main_frame(web)) + { + dwb_change_mode(NORMAL_MODE, true); + } return ret; }/*}}}*/ |