diff options
author | Timm Bäder <mail@baedert.org> | 2017-05-02 21:50:50 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-05-05 11:18:25 +0200 |
commit | 3d21128dbb5e8551203c9e7aa6df481a62a24069 (patch) | |
tree | 23d012305ecba35a0166706e69950945345bdd7b /testsuite | |
parent | 1a7a089e2c2e1886c5481e6b980f1f138f9cec7c (diff) | |
download | gtk+-3d21128dbb5e8551203c9e7aa6df481a62a24069.tar.gz |
Remove gtk_widget_get_preferred_*
They are unnecessary now that we have gtk_widget_measure.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gtk/scrolledwindow.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/testsuite/gtk/scrolledwindow.c b/testsuite/gtk/scrolledwindow.c index a54e85cb15..c0a4df7e53 100644 --- a/testsuite/gtk/scrolledwindow.c +++ b/testsuite/gtk/scrolledwindow.c @@ -33,7 +33,8 @@ test_size (GtkOrientation orientation, { gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW (scrolledwindow), MIN_SIZE); - gtk_widget_get_preferred_width (scrolledwindow, &size, NULL); + gtk_widget_measure (scrolledwindow, GTK_ORIENTATION_HORIZONTAL, -1, + &size, NULL, NULL, NULL); g_assert_cmpint (size, ==, MIN_SIZE); } @@ -47,8 +48,10 @@ test_size (GtkOrientation orientation, * Here, the content is purposely bigger than the scrolled window, * so it should grow up to max-content-width. */ - gtk_widget_get_preferred_width (scrolledwindow, NULL, &size); - gtk_widget_get_preferred_width (box, &child_size, NULL); + gtk_widget_measure (scrolledwindow, GTK_ORIENTATION_HORIZONTAL, -1, + NULL, &size, NULL, NULL); + gtk_widget_measure (box, GTK_ORIENTATION_HORIZONTAL, -1, + &child_size, NULL, NULL, NULL); g_assert_cmpint (child_size, ==, BOX_SIZE); g_assert_cmpint (size, ==, MAX_SIZE); @@ -61,7 +64,8 @@ test_size (GtkOrientation orientation, { gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (scrolledwindow), MIN_SIZE); - gtk_widget_get_preferred_height (scrolledwindow, &size, NULL); + gtk_widget_measure (scrolledwindow, GTK_ORIENTATION_HORIZONTAL, -1, + &size, NULL, NULL, NULL); g_assert_cmpint (size, ==, MIN_SIZE); } @@ -75,8 +79,10 @@ test_size (GtkOrientation orientation, * Here, the content is purposely bigger than the scrolled window, * so it should grow up to max-content-height. */ - gtk_widget_get_preferred_height (scrolledwindow, NULL, &size); - gtk_widget_get_preferred_height (box, &child_size, NULL); + gtk_widget_measure (scrolledwindow, GTK_ORIENTATION_VERTICAL, -1, + NULL, &size, NULL, NULL); + gtk_widget_measure (box, GTK_ORIENTATION_VERTICAL, -1, + &child_size, NULL, NULL, NULL); g_assert_cmpint (child_size, ==, BOX_SIZE); g_assert_cmpint (size, ==, MAX_SIZE); |