From 39a130d82a549ecbfeb9877c35404a218f4c2380 Mon Sep 17 00:00:00 2001 From: Ben Woolley Date: Mon, 23 Mar 2015 23:57:25 -0700 Subject: [PATCH 03/13] Add configuration for HTML5 local storage database path. --- config.def.h | 1 + surf.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/config.def.h b/config.def.h index a98b72a..dd40848 100644 --- a/config.def.h +++ b/config.def.h @@ -5,6 +5,7 @@ static char *useragent = "Mozilla/5.0 (X11; U; Unix; en-US) " static char *scriptfile = "~/.surf/script.js"; static char *styledir = "~/.surf/styles/"; static char *cachefolder = "~/.surf/cache/"; +static char *dbfolder = "~/.surf/databases/"; static Bool kioskmode = FALSE; /* Ignore shortcuts */ static Bool showindicators = TRUE; /* Show indicators in window title */ diff --git a/surf.c b/surf.c index 87c10ef..6c84071 100644 --- a/surf.c +++ b/surf.c @@ -923,6 +923,8 @@ newclient(void) { runscript(frame); settings = webkit_web_view_get_settings(c->view); + g_object_set(G_OBJECT(settings), "html5-local-storage-database-path", dbfolder, NULL); + if(!(ua = getenv("SURF_USERAGENT"))) ua = useragent; g_object_set(G_OBJECT(settings), "user-agent", ua, NULL); @@ -1224,6 +1226,7 @@ setup(void) { cookiefile = buildpath(cookiefile); scriptfile = buildpath(scriptfile); cachefolder = buildpath(cachefolder); + dbfolder = buildpath(dbfolder); styledir = buildpath(styledir); if(stylefile == NULL) { for(i = 0; i < LENGTH(styles); i++) { -- 2.2.2