summaryrefslogtreecommitdiff
path: root/src/view.c
diff options
context:
space:
mode:
authorportix <none@none>2012-12-06 12:19:18 +0100
committerportix <none@none>2012-12-06 12:19:18 +0100
commit7b0f52f71067a8c451a1c19c0437909b51d1cfff (patch)
tree514841405af57223af5d5d393226bd40cf76b1be /src/view.c
parentcfe31126f94c76ee9c2f1d5c7bfb13f31b9efcc1 (diff)
downloaddwb-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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/view.c b/src/view.c
index 67560899..fda972f0 100644
--- a/src/view.c
+++ b/src/view.c
@@ -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;
}/*}}}*/