logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 0dc338ad3f7c7789960f25ce6c4a2e2c886e2307
parent: b83e68106620bc9832354c51a75e67c58e423e59
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 18 Dec 2019 16:27:46 +0100

Add GtkSettings overwrite on dark-theme

Bug: https://bugs.webkit.org/show_bug.cgi?id=197947

Diffstat:

Mbadwolf.c7+++++++
Mconfig.h6++++++
Mkeybindings.c5++---
3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -748,6 +748,13 @@ main(int argc, char *argv[]) gtk_init(&argc, &argv); +#ifdef BADWOLF_PREFER_DARK_THEME + g_object_set(gtk_settings_get_default(), + "gtk-application-prefer-dark-theme", + BADWOLF_PREFER_DARK_THEME, + NULL); +#endif + g_fprintf(stderr, _("Running Badwolf version: %s\n"), version); g_fprintf(stderr, _("Buildtime WebKit version: %d.%d.%d\n"), diff --git a/config.h b/config.h @@ -86,4 +86,10 @@ */ #define BADWOLF_STATUSLABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE +/* BADWOLF_PREFER_DARK_THEME: Overwrites user GtkSettings for gtk-application-prefer-dark-theme + * Done as a temporary workaround against https://bugs.webkit.org/show_bug.cgi?id=197947 + * Remove definition to keep user settings, should only be done once the bug is fixed. + */ +#define BADWOLF_PREFER_DARK_THEME FALSE + #endif /* CONFIG_H_INCLUDED */ diff --git a/keybindings.c b/keybindings.c @@ -24,7 +24,7 @@ about_dialogCb_activate_link(GtkAboutDialog *about_dialog, gchar *uri, gpointer static void badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) { - struct Window *window = (struct Window *)user_data; + struct Window *window = (struct Window *)user_data; GtkWidget *about_dialog = gtk_about_dialog_new(); gtk_window_set_transient_for(GTK_WINDOW(about_dialog), main_window); @@ -39,8 +39,7 @@ badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) _("Minimalist and privacy-oriented WebKitGTK+ browser")); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog), version); - g_signal_connect( - about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window); + g_signal_connect(about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window); (void)gtk_dialog_run(GTK_DIALOG(about_dialog)); gtk_widget_destroy(about_dialog);