From e1338e4e129678e84941a0dbee985354a2b9ce9e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Oct 2017 19:54:47 -0400 Subject: [PATCH] gtk4-demo: Fix the scrollbar popup menu example A scrollbar is not a range anymore, so the callback needs some adjustments (!). --- demos/gtk-demo/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index 820f1dbd39..d0cca8c8f0 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -958,7 +958,7 @@ start_cb (GtkMenuItem *item, GtkWidget *scrollbar) { GtkAdjustment *adj; - adj = gtk_range_get_adjustment (GTK_RANGE (scrollbar)); + adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (scrollbar)); gtk_adjustment_set_value (adj, gtk_adjustment_get_lower (adj)); } @@ -967,7 +967,7 @@ end_cb (GtkMenuItem *item, GtkWidget *scrollbar) { GtkAdjustment *adj; - adj = gtk_range_get_adjustment (GTK_RANGE (scrollbar)); + adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (scrollbar)); gtk_adjustment_set_value (adj, gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj)); }