[gtk+] gtk4-demo: Fix the scrollbar popup menu example



commit e1338e4e129678e84941a0dbee985354a2b9ce9e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 7 19:54:47 2017 -0400

    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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index 820f1db..d0cca8c 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));
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]