shithub: puzzles

Download patch

ref: 8399cff6a3b9bf15c6d1d9e0c905d1411f25f9b8
parent: 89391ba66a2fd3826e16dc288eaa1a1516b1e9de
author: Simon Tatham <anakin@pobox.com>
date: Mon Aug 1 13:23:12 EDT 2022

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.)

--- a/gtk.c
+++ b/gtk.c
@@ -399,7 +399,7 @@
      * 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,