diff options
author | Cem Keylan <cem@ckyln.com> | 2021-08-09 00:39:46 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2021-08-09 00:39:46 +0300 |
commit | 72381f7139252551c72bbc6e5854e89981c00969 (patch) | |
tree | ae1a4f82a59a950bffe2561c6960241bb73e2144 | |
parent | 9f83ee35f2847cb339348e79185dddb636497c99 (diff) | |
parent | 97790aedc153817aee4f88d96b6aa54b419597a3 (diff) | |
download | lariza-72381f7139252551c72bbc6e5854e89981c00969.tar.gz |
Merge remote-tracking branch 'refs/remotes/upstream/main'
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | PATCHES | 4 | ||||
-rw-r--r-- | browser.c | 15 |
3 files changed, 19 insertions, 4 deletions
@@ -1,5 +1,9 @@ Release history for lariza +v21.06 2021-06-19 + [Fixed] + - Setting a preferred language works again (workaround in place). + v21.01 2021-01-22 [Changed] - The file "adblock.black" has been renamed to "adblock". @@ -10,7 +10,9 @@ The project used to be hosted on GitHub, so there is a couple of forks: https://github.com/vain/lariza/network/members -I'm not aware of any non-GitHub forks at the moment. +Non-GitHub forks: + + https://chorizo.armaanb.net Why? @@ -129,6 +129,7 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show, struct Client *c; gchar *f; GtkWidget *evbox, *tabbox; + WebKitWebContext *wc; if (uri != NULL && cooperative_instances && !cooperative_alone) { @@ -153,6 +154,17 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show, else c->web_view = webkit_web_view_new_with_related_view(related_wv); + /* XXX We have just created a new WebView with either the default + * WebContext (if related_wv == NULL) or a WebView with an inherited + * context. Still, it doesn't use the preferred languages we might + * have set on the default WebContext. This used to work. New bug in + * WebKit or changed API? */ + if (accepted_language[0] != NULL) + { + wc = webkit_web_view_get_context(WEBKIT_WEB_VIEW(c->web_view)); + webkit_web_context_set_preferred_languages(wc, accepted_language); + } + webkit_web_view_set_zoom_level(WEBKIT_WEB_VIEW(c->web_view), global_zoom); g_signal_connect(G_OBJECT(c->web_view), "notify::favicon", G_CALLBACK(changed_favicon), c); @@ -861,9 +873,6 @@ init_default_web_context(void) webkit_web_context_set_web_extensions_directory(wc, p); g_free(p); - if (accepted_language[0] != NULL) - webkit_web_context_set_preferred_languages(wc, accepted_language); - g_signal_connect(G_OBJECT(wc), "download-started", G_CALLBACK(download_handle_start), NULL); |