summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorEnno Boland (tox) <tox@s01.de>2010-05-28 13:20:17 +0200
committerEnno Boland (tox) <tox@s01.de>2010-05-28 13:20:17 +0200
commitca1c7f434bbf40a0ed65591910d81f13445c2db0 (patch)
treed1b8d74da80d0c68ab0eedd99d44f818d62ad8e2 /surf.c
parent8cc71f8216d0ca28a2c22306e7efc9e7ec587383 (diff)
downloadsurf-0.4.tar.gz
surf-0.4.tar.bz2
surf-0.4.zip
Adding Nibbles patch0.4
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/surf.c b/surf.c
index 8c76d73..b2e7f20 100644
--- a/surf.c
+++ b/surf.c
@@ -23,7 +23,7 @@
#define LENGTH(x) (sizeof x / sizeof x[0])
#define CLEANMASK(mask) (mask & ~(GDK_MOD2_MASK))
-enum { AtomFind, AtomGo, AtomUri, AtomHiLight, AtomLast };
+enum { AtomFind, AtomGo, AtomUri, AtomLast };
typedef union Arg Arg;
union Arg {
@@ -188,10 +188,7 @@ createwindow(WebKitWebView *v, WebKitWebFrame *f, Client *c) {
gboolean
decidedownload(WebKitWebView *v, WebKitWebFrame *f, WebKitNetworkRequest *r, gchar *m, WebKitWebPolicyDecision *p, Client *c) {
if(!webkit_web_view_can_show_mime_type(v, m)) {
- webkit_web_policy_decision_ignore(p);
- webkit_web_view_load_html_string(c->view,
- "Can't display content.",
- webkit_network_request_get_uri(r));
+ webkit_web_policy_decision_download(p);
return TRUE;
}
return FALSE;
@@ -334,7 +331,7 @@ initdownload(WebKitWebView *view, WebKitDownload *o, Client *c) {
Arg arg;
updatewinid(c);
- arg = (Arg)DOWNLOAD("_SURF_HILIGHT");
+ arg = (Arg)DOWNLOAD((char *)webkit_download_get_uri(o));
spawn(c, &arg);
return FALSE;
}
@@ -503,11 +500,12 @@ newclient(void) {
g_object_set(G_OBJECT(settings), "auto-load-images", loadimage, NULL);
g_object_set(G_OBJECT(settings), "enable-plugins", plugin, NULL);
g_object_set(G_OBJECT(settings), "enable-scripts", script, NULL);
+ g_object_set(G_OBJECT(settings), "enable-spatial-navigation", true, NULL);
+
g_free(uri);
setatom(c, AtomFind, "");
setatom(c, AtomUri, "about:blank");
- setatom(c, AtomHiLight, "about:blank");
if(NOBACKGROUND)
webkit_web_view_set_transparent(c->view, TRUE);
@@ -688,7 +686,6 @@ setup(void) {
atoms[AtomFind] = XInternAtom(dpy, "_SURF_FIND", False);
atoms[AtomGo] = XInternAtom(dpy, "_SURF_GO", False);
atoms[AtomUri] = XInternAtom(dpy, "_SURF_URI", False);
- atoms[AtomHiLight] = XInternAtom(dpy, "_SURF_HILIGHT", False);
/* dirs and files */
cookiefile = buildpath(cookiefile);
@@ -763,7 +760,6 @@ update(Client *c) {
t = g_strdup(c->linkhover);
else
t = g_strdup(c->title);
- setatom(c, AtomHiLight, c->linkhover ? c->linkhover : geturi(c));
drawindicator(c);
gtk_window_set_title(GTK_WINDOW(c->win), t);
g_free(t);