mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
Port tests to GtkScrollable API instead of deprecated GtkLayout API
https://bugzilla.gnome.org/show_bug.cgi?id=633374
This commit is contained in:
parent
60feed7360
commit
4f9f52a6ea
@ -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",
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user