shithub: puzzles

Download patch

ref: 1b2e4d525f5e5686afdbec09c7b796ff546c6357
parent: 90b73ebcb7f0d2c834e00ba0ad74084ad5a5695b
author: Simon Tatham <anakin@pobox.com>
date: Sat Oct 3 08:28:24 EDT 2015

GTK 3 port: change API functions for widget sizing.

set_usize is deprecated, and get_preferred_size is the GTK 3 thing we
should use in place of size_request.

--- a/gtk.c
+++ b/gtk.c
@@ -2563,11 +2563,12 @@
 	    (GTK_STATUSBAR(fe->statusbar), "game");
 	gtk_statusbar_push(GTK_STATUSBAR(fe->statusbar), fe->statusctx,
 			   "test");
+#if GTK_CHECK_VERSION(3,0,0)
+	gtk_widget_get_preferred_size(fe->statusbar, &req, NULL);
+#else
 	gtk_widget_size_request(fe->statusbar, &req);
-#if 0
-	/* For GTK 2.0, should we be using gtk_widget_set_size_request? */
 #endif
-	gtk_widget_set_usize(viewport, -1, req.height);
+	gtk_widget_set_size_request(viewport, -1, req.height);
     } else
 	fe->statusbar = NULL;