Introduction
Introduction Statistics Contact Development Disclaimer Help
tmerge - surf - customized build of surf, the suckless webkit browser
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit 2d9716907da6c5ae1c494958b25b2b7969adf28a
parent fb64ed7af166f6d712dcba58ee59d58145752e90
Author: Enno Boland (Gottox) <[email protected]>
Date: Mon, 8 Jun 2009 09:27:40 +0200
merge
Diffstat:
M surf.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/surf.c b/surf.c
t@@ -28,6 +28,7 @@ typedef struct Client {
gint progress;
struct Client *next;
} Client;
+SoupCookieJar *cookiejar;
Client *clients = NULL;
gboolean embed = FALSE;
gboolean showxid = FALSE;
t@@ -185,7 +186,7 @@ keypress(GtkWidget* w, GdkEventKey *ev, gpointer d) {
return FALSE;
}
}
- if(ev->state == GDK_CONTROL_MASK || ev->state == (GDK_CONTROL_MASK | G…
+ else if(ev->state == GDK_CONTROL_MASK || ev->state == (GDK_CONTROL_MAS…
switch(ev->keyval) {
case GDK_r:
case GDK_R:
t@@ -210,6 +211,16 @@ keypress(GtkWidget* w, GdkEventKey *ev, gpointer d) {
return TRUE;
}
}
+ else {
+ switch(ev->keyval) {
+ case GDK_k:
+ webkit_web_view_move_cursor(c->view, GTK_MOVEMENT_DISP…
+ return TRUE;
+ case GDK_j:
+ webkit_web_view_move_cursor(c->view, GTK_MOVEMENT_DISP…
+ return TRUE;
+ }
+ }
return FALSE;
}
t@@ -260,7 +271,7 @@ loadfile(const Client *c, const gchar *f) {
g_string_prepend(uri, "file://");
loaduri(c, uri->str);
}
-
+
}
void
t@@ -367,7 +378,7 @@ processx(GdkXEvent *e, GdkEvent *event, gpointer d) {
if(((XEvent *)e)->type == PropertyNotify) {
ev = &((XEvent *)e)->xproperty;
if(ignore_once == FALSE && ev->atom == urlprop && ev->state ==…
- XGetWindowProperty(dpy, ev->window, urlprop, 0L, BUFSI…
+ XGetWindowProperty(dpy, ev->window, urlprop, 0L, BUFSI…
&adummy, &idummy, &ldummy, &ldummy, &buf);
loaduri(c, (gchar *)buf);
XFree(buf);
t@@ -422,8 +433,10 @@ updatetitle(Client *c) {
int main(int argc, char *argv[]) {
gchar *uri = NULL, *file = NULL;
+ SoupSession *s;
Client *c;
int o;
+ const gchar *home, *filename;
gtk_init(NULL, NULL);
if (!g_thread_supported())
t@@ -465,6 +478,14 @@ int main(int argc, char *argv[]) {
goto argerr;
if(!clients)
newclient();
+
+ /* cookie persistance */
+ s = webkit_get_default_session();
+ home = g_get_home_dir();
+ filename = g_build_filename(home, ".surf-cookies", NULL);
+ cookiejar = soup_cookie_jar_text_new(filename, FALSE);
+ soup_session_add_feature(s, SOUP_SESSION_FEATURE(cookiejar));
+
gtk_main();
cleanup();
return EXIT_SUCCESS;
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.