From 0ff88346cd991f14c3158411dc7b4d1d48b26262 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 9 Apr 2023 05:29:14 +0200 Subject: listitemmanager: Make sections configurable Add a gtk_list_item_manager_set_has_sections() (default: FALSE) that requires explicit turning on for the listitemmanager to gain section support. --- testsuite/gtk/listitemmanager.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'testsuite/gtk') diff --git a/testsuite/gtk/listitemmanager.c b/testsuite/gtk/listitemmanager.c index 9173d5e708..828a281745 100644 --- a/testsuite/gtk/listitemmanager.c +++ b/testsuite/gtk/listitemmanager.c @@ -372,7 +372,7 @@ test_exhaustive (void) if (g_test_verbose ()) print_list_item_manager_tiles (items); - switch (g_test_rand_int_range (0, 5)) + switch (g_test_rand_int_range (0, 6)) { case 0: if (g_test_verbose ()) @@ -413,6 +413,15 @@ test_exhaustive (void) } break; + case 5: + { + gboolean has_sections = g_test_rand_bit (); + if (g_test_verbose ()) + g_test_message ("Setting has_sections to %s", has_sections ? "true" : "false"); + gtk_list_item_manager_set_has_sections (items, has_sections); + } + break; + default: g_assert_not_reached (); break; -- cgit v1.2.1