Re-fix the GTK dark theme check.

Ben Hutchings points out that when I 'harmlessly' changed 'dark_theme'
from a gboolean to a bool, it wasn't harmless, because its address is
passed to g_object_get, which expects a pointer to gboolean. (And of
course it's a variadic function, so it can't type-check that.)
This commit is contained in:
Simon Tatham
2022-08-01 17:23:12 +01:00
parent 89391ba66a
commit 8399cff6a3

2
gtk.c
View File

@ -399,7 +399,7 @@ static void set_window_background(frontend *fe, int colour)
* menu and status bars unreadable. This might be visible through
* the gtk-application-prefer-dark-theme flag or else we have to
* work it out from the name. */
bool dark_theme = false;
gboolean dark_theme = false;
char *theme_name = NULL;
g_object_get(gtk_settings_get_default(),
"gtk-application-prefer-dark-theme", &dark_theme,