about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2010-02-27 03:50:48 +0000
committerMarco Peereboom <marco@conformal.com>2010-02-27 03:50:48 +0000
commit153728d76ba3902ea6a2315a241bc781a40ede90 (patch)
treeea57a83990ac1974b8d2079f334b2198f6423ab8
parent8870ba874e8271ddf92e3cea9969a9dee5e30fc1 (diff)
downloadxombrero-153728d76ba3902ea6a2315a241bc781a40ede90.tar.gz
more javascript open window tricks from
Christophe Etcheverry <cetcheve@omitufo.org>
-rw-r--r--xxxterm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 5253060..01f5808 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -1029,6 +1029,18 @@ webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
 	return (TRUE); /* we made the decission */
 }
 
+WebKitWebView *
+webview_cwv_cb(WebKitWebView *wv, WebKitWebFrame *wf, struct tab *t)
+{
+	if (t == NULL)
+		errx(1, "webview_cwv_cb");
+
+	DNPRINTF(XT_D_NAV, "webview_cwv_cb: %s\n",
+	    webkit_web_view_get_uri(wv));
+
+	return (wv);
+}
+
 int
 webview_event_cb(GtkWidget *w, GdkEventButton *e, struct tab *t)
 {
@@ -1559,6 +1571,7 @@ create_new_tab(char *title, int focus)
 	    "signal::mime-type-policy-decision-requested", (GCallback)webview_mimetype_cb, t,
 	    "signal::navigation-policy-decision-requested", (GCallback)webview_npd_cb, t,
 	    "signal::new-window-policy-decision-requested", (GCallback)webview_nw_cb, t,
+	    "signal::create-web-view", (GCallback)webview_cwv_cb, t,
 	    "signal::event", (GCallback)webview_event_cb, t,
 	    NULL);