Port tests to GtkScrollable API instead of deprecated GtkLayout API

https://bugzilla.gnome.org/show_bug.cgi?id=633374
This commit is contained in:
Vincent Untz 2010-10-28 12:16:55 -04:00
parent 60feed7360
commit 4f9f52a6ea
2 changed files with 9 additions and 9 deletions

View File

@ -9780,12 +9780,12 @@ void create_layout (GtkWidget *widget)
/* We set step sizes here since GtkLayout does not set /* We set step sizes here since GtkLayout does not set
* them itself. * them itself.
*/ */
hadjustment = gtk_layout_get_hadjustment (layout); hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
vadjustment = gtk_layout_get_vadjustment (layout); vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
gtk_adjustment_set_step_increment (hadjustment, 10.0); gtk_adjustment_set_step_increment (hadjustment, 10.0);
gtk_adjustment_set_step_increment (vadjustment, 10.0); gtk_adjustment_set_step_increment (vadjustment, 10.0);
gtk_layout_set_hadjustment (layout, hadjustment); gtk_scrollable_set_hadjustment (GTK_SCROLLABLE (layout), hadjustment);
gtk_layout_set_vadjustment (layout, vadjustment); gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (layout), vadjustment);
gtk_widget_set_events (layout_widget, GDK_EXPOSURE_MASK); gtk_widget_set_events (layout_widget, GDK_EXPOSURE_MASK);
g_signal_connect (layout, "draw", g_signal_connect (layout, "draw",

View File

@ -62,7 +62,7 @@ scroll_layout (gpointer data)
GtkWidget *layout = data; GtkWidget *layout = data;
GtkAdjustment *adj; 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_set_value (adj,
gtk_adjustment_get_value (adj) + 5.0); gtk_adjustment_get_value (adj) + 5.0);
return TRUE; return TRUE;
@ -96,12 +96,12 @@ create_layout (GtkWidget *vbox)
/* We set step sizes here since GtkLayout does not set /* We set step sizes here since GtkLayout does not set
* them itself. * them itself.
*/ */
hadjustment = gtk_layout_get_hadjustment (layout); hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
vadjustment = gtk_layout_get_vadjustment (layout); vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (layout));
gtk_adjustment_set_step_increment (hadjustment, 10.0); gtk_adjustment_set_step_increment (hadjustment, 10.0);
gtk_adjustment_set_step_increment (vadjustment, 10.0); gtk_adjustment_set_step_increment (vadjustment, 10.0);
gtk_layout_set_hadjustment (layout, hadjustment); gtk_scrollable_set_hadjustment (GTK_SCROLLABLE (layout), hadjustment);
gtk_layout_set_vadjustment (layout, vadjustment); gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (layout), vadjustment);
gtk_widget_set_events (layout_widget, GDK_EXPOSURE_MASK); gtk_widget_set_events (layout_widget, GDK_EXPOSURE_MASK);
g_signal_connect (layout, "draw", g_signal_connect (layout, "draw",