From d10b11edc4a308b5f41a89543c7aea427e6305eb Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 24 Jul 2022 19:44:22 +0300 Subject: [PATCH 42/42] gtk4: Do not cast map scrollbars to GtkRange See osdn #45218 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/mapview.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/gui-gtk-4.0/mapview.c b/client/gui-gtk-4.0/mapview.c index 5ba31d20ad..00f7fe4104 100644 --- a/client/gui-gtk-4.0/mapview.c +++ b/client/gui-gtk-4.0/mapview.c @@ -676,8 +676,10 @@ void update_map_canvas_scrollbars_size(void) map_hadj = gtk_adjustment_new(-1, xmin, xmax, xstep, xsize, xsize); map_vadj = gtk_adjustment_new(-1, ymin, ymax, ystep, ysize, ysize); - gtk_range_set_adjustment(GTK_RANGE(map_horizontal_scrollbar), map_hadj); - gtk_range_set_adjustment(GTK_RANGE(map_vertical_scrollbar), map_vadj); + gtk_scrollbar_set_adjustment(GTK_SCROLLBAR(map_horizontal_scrollbar), + map_hadj); + gtk_scrollbar_set_adjustment(GTK_SCROLLBAR(map_vertical_scrollbar), + map_vadj); g_signal_connect(map_hadj, "value_changed", G_CALLBACK(scrollbar_jump_callback), -- 2.35.1