summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2017-05-11 15:23:22 +0200
committerQuentin Rameau <quinq@fifth.space>2017-05-11 15:23:22 +0200
commit298e688933395af61f56cb2a8710e7bac8e5453d (patch)
treeafdbddcc49f1fcde7552bedb07fec19e4232fca5 /surf.c
parent745a319bafd6ff0702c37d0333142ca18e801a4a (diff)
downloadsurf-298e688933395af61f56cb2a8710e7bac8e5453d.tar.gz
surf-298e688933395af61f56cb2a8710e7bac8e5453d.tar.bz2
surf-298e688933395af61f56cb2a8710e7bac8e5453d.zip
Add config option for setting default charset.
This will be used for pages with no specified charset.
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/surf.c b/surf.c
index 57c4c22..a482f23 100644
--- a/surf.c
+++ b/surf.c
@@ -65,6 +65,7 @@ typedef enum {
Certificate,
CookiePolicies,
DiskCache,
+ DefaultCharset,
DNSPrefetch,
FontSize,
FrameFlattening,
@@ -695,6 +696,9 @@ setparameter(Client *c, int refresh, ParamName p, const Arg *a)
WEBKIT_CACHE_MODEL_WEB_BROWSER :
WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
return; /* do not update */
+ case DefaultCharset:
+ webkit_settings_set_default_charset(s, a->v);
+ return; /* do not update */
case DNSPrefetch:
webkit_settings_set_enable_dns_prefetching(s, a->b);
return; /* do not update */
@@ -1008,6 +1012,7 @@ newview(Client *c, WebKitWebView *rv)
} else {
settings = webkit_settings_new_with_settings(
"auto-load-images", curconfig[LoadImages].val.b,
+ "default-charset", curconfig[DefaultCharset].val.v,
"default-font-size", curconfig[FontSize].val.i,
"enable-caret-browsing", curconfig[CaretBrowsing].val.b,
"enable-developer-extras", curconfig[Inspector].val.b,