mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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.
This commit is contained in:
7
gtk.c
7
gtk.c
@ -2563,11 +2563,12 @@ static frontend *new_window(char *arg, int argtype, char **error)
|
|||||||
(GTK_STATUSBAR(fe->statusbar), "game");
|
(GTK_STATUSBAR(fe->statusbar), "game");
|
||||||
gtk_statusbar_push(GTK_STATUSBAR(fe->statusbar), fe->statusctx,
|
gtk_statusbar_push(GTK_STATUSBAR(fe->statusbar), fe->statusctx,
|
||||||
"test");
|
"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);
|
gtk_widget_size_request(fe->statusbar, &req);
|
||||||
#if 0
|
|
||||||
/* For GTK 2.0, should we be using gtk_widget_set_size_request? */
|
|
||||||
#endif
|
#endif
|
||||||
gtk_widget_set_usize(viewport, -1, req.height);
|
gtk_widget_set_size_request(viewport, -1, req.height);
|
||||||
} else
|
} else
|
||||||
fe->statusbar = NULL;
|
fe->statusbar = NULL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user