Introduction
Introduction Statistics Contact Development Disclaimer Help
topening new windows works now. - surf - customized build of surf, the suckless…
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit 20c257e90c75a12d2d276fc3fda08a4732efcc5b
parent 58322c0b11dc9eccc71d70c260ac1005e19674bb
Author: Enno Boland (Gottox) <[email protected]>
Date: Sat, 6 Jun 2009 17:26:43 +0200
opening new windows works now.
Diffstat:
M surf.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/surf.c b/surf.c
t@@ -45,7 +45,8 @@ static void progresschange(WebKitWebView *view, gint p, gpoi…
static void loadcommit(WebKitWebView *view, WebKitWebFrame *f, gpointer d);
static void linkhover(WebKitWebView* page, const gchar* t, const gchar* l, gpo…
static void destroyclient(Client *c);
-static gboolean newwindow(WebKitWebView *view, WebKitWebFrame *f,
+WebKitWebView newwindow(WebKitWebView *v, WebKitWebFrame *f, gpointer d);
+static gboolean decidewindow(WebKitWebView *view, WebKitWebFrame *f,
WebKitNetworkRequest *r, WebKitWebNavigationAction *n,
WebKitWebPolicyDecision *p, gpointer d);
static gboolean download(WebKitWebView *view, GObject *o, gpointer d);
t@@ -123,16 +124,19 @@ download(WebKitWebView *view, GObject *o, gpointer d) {
}
gboolean
-newwindow(WebKitWebView *view, WebKitWebFrame *f,
+decidewindow(WebKitWebView *view, WebKitWebFrame *f,
WebKitNetworkRequest *r, WebKitWebNavigationAction *n,
WebKitWebPolicyDecision *p, gpointer d) {
/* TODO */
- puts("new");
- Client *c = newclient();
- webkit_web_view_load_request(c->view, r);
return TRUE;
}
+WebKitWebView newwindow(WebKitWebView *v, WebKitWebFrame *f, gpointer d) {
+ /* TODO */
+ Client *c = newclient();
+ return *c->view;
+}
+
void
linkhover(WebKitWebView* page, const gchar* t, const gchar* l, gpointer d) {
Client *c = (Client *)d;
t@@ -316,7 +320,8 @@ newclient(void) {
g_signal_connect(G_OBJECT(c->view), "load-progress-changed", G_CALLBAC…
g_signal_connect(G_OBJECT(c->view), "load-committed", G_CALLBACK(loadc…
g_signal_connect(G_OBJECT(c->view), "hovering-over-link", G_CALLBACK(l…
- g_signal_connect(G_OBJECT(c->view), "new-window-policy-decision-reques…
+ g_signal_connect(G_OBJECT(c->view), "create-web-view", G_CALLBACK(neww…
+ g_signal_connect(G_OBJECT(c->view), "new-window-policy-decision-reques…
g_signal_connect(G_OBJECT(c->view), "download-requested", G_CALLBACK(d…
/* urlbar */
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.