Commit e0d1652a authored by Vincent Untz's avatar Vincent Untz Committed by Tristan Van Berkom

Port tests to GtkScrollable API instead of deprecated GtkLayout API

https://bugzilla.gnome.org/show_bug.cgi?id=633374
parent 3b1c301a
......@@ -9780,12 +9780,12 @@ void create_layout (GtkWidget *widget)
/* We set step sizes here since GtkLayout does not set
* them itself.
*/
hadjustment = gtk_layout_get_hadjustment (layout);
vadjustment = gtk_layout_get_vadjustment (layout);
hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
gtk_adjustment_set_step_increment (hadjustment, 10.0);
gtk_adjustment_set_step_increment (vadjustment, 10.0);
gtk_layout_set_hadjustment (layout, hadjustment);
gtk_layout_set_vadjustment (layout, vadjustment);
gtk_scrollable_set_hadjustment (GTK_SCROLLABLE (layout), hadjustment);
gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (layout), vadjustment);
gtk_widget_set_events (layout_widget, GDK_EXPOSURE_MASK);
g_signal_connect (layout, "draw",
......
......@@ -62,7 +62,7 @@ scroll_layout (gpointer data)
GtkWidget *layout = data;
GtkAdjustment *adj;
adj = gtk_layout_get_hadjustment (GTK_LAYOUT (layout));
adj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
gtk_adjustment_set_value (adj,
gtk_adjustment_get_value (adj) + 5.0);
return TRUE;
......@@ -96,12 +96,12 @@ create_layout (GtkWidget *vbox)
/* We set step sizes here since GtkLayout does not set
* them itself.
*/
hadjustment = gtk_layout_get_hadjustment (layout);
vadjustment = gtk_layout_get_vadjustment (layout);
hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
gtk_adjustment_set_step_increment (hadjustment, 10.0);
gtk_adjustment_set_step_increment (vadjustment, 10.0);
gtk_layout_set_hadjustment (layout, hadjustment);
gtk_layout_set_vadjustment (layout, vadjustment);
gtk_scrollable_set_hadjustment (GTK_SCROLLABLE (layout), hadjustment);
gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (layout), vadjustment);
gtk_widget_set_events (layout_widget, GDK_EXPOSURE_MASK);
g_signal_connect (layout, "draw",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment