chiark / gitweb /
Build fixes for GTK2.
authorSimon Tatham <anakin@pobox.com>
Tue, 24 Oct 2017 18:39:11 +0000 (19:39 +0100)
committerSimon Tatham <anakin@pobox.com>
Tue, 24 Oct 2017 18:39:11 +0000 (19:39 +0100)
I had left one mention of the new GTK3-only variable
'awaiting_resize_ack' unprotected by #ifdefs. Also, the GTK2 version
of message_box() was missing some consts in its prototype, presumably
because when I had that #ifdeffed out the compiler didn't warn me
about those ones.

gtk.c

diff --git a/gtk.c b/gtk.c
index 37ba8078e20d5858eb25659cf34336cb2f57cece..3078e517baa4c2b083ba0af32637bdf49f1a9bf3 100644 (file)
--- a/gtk.c
+++ b/gtk.c
@@ -1397,7 +1397,9 @@ static gint configure_area(GtkWidget *widget,
 {
     frontend *fe = (frontend *)data;
     resize_puzzle_to_area(fe, event->width, event->height);
+#if GTK_CHECK_VERSION(3,0,0)
     fe->awaiting_resize_ack = FALSE;
+#endif
     return TRUE;
 }
 
@@ -1522,8 +1524,8 @@ static void msgbox_button_clicked(GtkButton *button, gpointer data)
     gtk_widget_destroy(GTK_WIDGET(data));
 }
 
-int message_box(GtkWidget *parent, char *title, char *msg, int centre,
-               int type)
+int message_box(GtkWidget *parent, const char *title, const char *msg,
+                int centre, int type)
 {
     GtkWidget *window, *hbox, *text, *button;
     char *titles;