diff options
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) { |