gtk3/gtk3-fix-tests-build.patch

60 lines
2.6 KiB
Diff
Raw Normal View History

commit 4f9f52a6ea3c2010473005430bcb31e80ec543c4
Author: Vincent Untz <vuntz@gnome.org>
Date: Thu Oct 28 12:16:55 2010 -0400
Port tests to GtkScrollable API instead of deprecated GtkLayout API
https://bugzilla.gnome.org/show_bug.cgi?id=633374
diff --git a/tests/testgtk.c b/tests/testgtk.c
index d748912..f240b3f 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -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",
diff --git a/tests/testoffscreen.c b/tests/testoffscreen.c
index e20ea38..8b4e61f 100644
--- a/tests/testoffscreen.c
+++ b/tests/testoffscreen.c
@@ -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",