aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-12-01 18:18:11 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2010-12-01 18:18:11 -0700
commitd2a7f3228589c24948adb22922f1ccccaa5996fc (patch)
tree88ac3b90100c1f769d040e4c83d3386f1ccdbace
parent087242a5ddc1532fa1464d1e322ed6b6da3ccced (diff)
remove selected_url logic from create_web_view_cb. fixes FS#130 and FS#214.
-rw-r--r--src/callbacks.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index 4f0e4ac..35453cf 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -745,32 +745,15 @@ create_web_view_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer us
(void) web_view;
(void) frame;
(void) user_data;
- if (uzbl.state.selected_url != NULL) {
- if (uzbl.state.verbose)
- printf("\nNew web view -> %s\n", uzbl.state.selected_url);
- if (strncmp(uzbl.state.selected_url, "javascript:", strlen("javascript:")) == 0) {
- WebKitWebView* new_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-
- g_signal_connect (new_view, "web-view-ready",
- G_CALLBACK(create_web_view_js_cb), NULL);
-
- return new_view;
- }
- else
- send_event(NEW_WINDOW, uzbl.state.selected_url, NULL);
-
- } else {
- if (uzbl.state.verbose)
- printf("New web view -> javascript link...\n");
+ if (uzbl.state.verbose)
+ printf("New web view -> javascript link...\n");
- WebKitWebView* new_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ WebKitWebView* new_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
- g_signal_connect (new_view, "web-view-ready",
- G_CALLBACK(create_web_view_js_cb), NULL);
- return new_view;
- }
- return NULL;
+ g_signal_connect (new_view, "web-view-ready",
+ G_CALLBACK(create_web_view_js_cb), NULL);
+ return new_view;
}
gboolean