about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTodd Fries <todd@fries.net>2011-02-25 20:24:53 +0000
committerTodd Fries <todd@fries.net>2011-02-25 20:24:53 +0000
commitee441b5437962c3ddf0274d61aaf712b61df0e02 (patch)
tree63575d0c5d68d41303272f58bc95fac703091aa5
parent07757e7636d971d061c07bdc1a7a2fe29d475a7e (diff)
downloadxombrero-ee441b5437962c3ddf0274d61aaf712b61df0e02.tar.gz
just like epiphany, route all new window policy decisions through one function
this fixes sonicwalls
go for it marco@
-rw-r--r--xxxterm.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 5c6bb1b..8c3d953 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -5844,29 +5844,6 @@ webview_progress_changed_cb(WebKitWebView *wv, int progress, struct tab *t)
 }
 
 int
-webview_nw_cb(WebKitWebView *wv, WebKitWebFrame *wf,
-    WebKitNetworkRequest *request, WebKitWebNavigationAction *na,
-    WebKitWebPolicyDecision *pd, struct tab *t)
-{
-	char			*uri;
-
-	if (t == NULL) {
-		show_oops_s("webview_nw_cb invalid paramters");
-		return (FALSE);
-	}
-
-	DNPRINTF(XT_D_NAV, "webview_nw_cb: %s\n",
-	    webkit_network_request_get_uri(request));
-
-	/* open in current tab */
-	uri = (char *)webkit_network_request_get_uri(request);
-	webkit_web_view_load_uri(t->wv, uri);
-	webkit_web_policy_decision_ignore(pd);
-
-	return (TRUE); /* we made the decission */
-}
-
-int
 webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
     WebKitNetworkRequest *request, WebKitWebNavigationAction *na,
     WebKitWebPolicyDecision *pd, struct tab *t)
@@ -6966,7 +6943,7 @@ create_new_tab(char *title, struct undo *u, int focus)
 	    "signal::download-requested", G_CALLBACK(webview_download_cb), t,
 	    "signal::mime-type-policy-decision-requested", G_CALLBACK(webview_mimetype_cb), t,
 	    "signal::navigation-policy-decision-requested", G_CALLBACK(webview_npd_cb), t,
-	    "signal::new-window-policy-decision-requested", G_CALLBACK(webview_nw_cb), t,
+	    "signal::new-window-policy-decision-requested", G_CALLBACK(webview_npd_cb), t,
 	    "signal::create-web-view", G_CALLBACK(webview_cwv_cb), t,
 	    "signal::close-web-view", G_CALLBACK(webview_closewv_cb), t,
 	    "signal::event", G_CALLBACK(webview_event_cb), t,