From 153728d76ba3902ea6a2315a241bc781a40ede90 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Sat, 27 Feb 2010 03:50:48 +0000 Subject: more javascript open window tricks from Christophe Etcheverry --- xxxterm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); -- cgit 1.4.1-2-gfad0