diff options
author | portix <none@none> | 2013-01-27 23:09:17 +0100 |
---|---|---|
committer | portix <none@none> | 2013-01-27 23:09:17 +0100 |
commit | 3f9e17180eaac20a37a0c3594293c0f916f8ab8b (patch) | |
tree | 35288be5ddcce1fdc4e794c8282120776696bc72 /src | |
parent | 046a50d2352d3a517f03054f54f24fdb5636ec21 (diff) | |
download | dwb-3f9e17180eaac20a37a0c3594293c0f916f8ab8b.zip |
New option 'accept-language'
Diffstat (limited to 'src')
-rw-r--r-- | src/config.h | 2 | ||||
-rw-r--r-- | src/dwb.c | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 81c6cb09..9f126c95 100644 --- a/src/config.h +++ b/src/config.h @@ -1170,4 +1170,6 @@ static WebSettings DWB_SETTINGS[] = { SETTING_GLOBAL, BOOLEAN, { .b = false }, NULL, { 0 }, }, { { "print-previewer", "Command used for the printing preview", }, SETTING_GLOBAL, CHAR, { .p = NULL }, NULL, { 0 }, }, + { { "accept-language", "If set will be used for 'Accept-Language' header in all requests", }, + SETTING_GLOBAL | SETTING_ONINIT, CHAR, { .p = NULL }, (S_Func)dwb_set_accept_language, { 0 }, }, };/*}}}*/ @@ -77,6 +77,7 @@ static DwbStatus dwb_set_ntlm(GList *gl, WebSettings *s); static DwbStatus dwb_set_find_delay(GList *gl, WebSettings *s); static DwbStatus dwb_set_do_not_track(GList *gl, WebSettings *s); static DwbStatus dwb_set_show_single_tab(GList *gl, WebSettings *s); +static DwbStatus dwb_set_accept_language(GList *gl, WebSettings *s); #ifdef WITH_LIBSOUP_2_38 static DwbStatus dwb_set_dns_lookup(GList *gl, WebSettings *s); #endif @@ -175,6 +176,14 @@ dwb_set_adblock(GList *gl, WebSettings *s) } }/*}}}*/ +/*{{{*/ +static DwbStatus +dwb_set_accept_language(GList *gl, WebSettings *s) +{ + g_object_set(webkit_get_default_session(), "accept-language", s->arg_local.p, NULL); + return STATUS_OK; +}/*}}}*/ + /* dwb_set_cookies {{{ */ static DwbStatus dwb_set_cookies(GList *gl, WebSettings *s) { |