MATCHED_SECTION,
UNMATCHED_SECTION
} section_state = NO_SECTION;
+ gboolean after_items = FALSE;
has_sections = gtk_list_item_manager_get_has_sections (items);
g_assert_true (has_sections);
g_assert_true (tile->widget);
section_state = MATCHED_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_UNMATCHED_HEADER:
g_assert_cmpint (tile->n_items, ==, 0);
g_assert_null (tile->widget);
section_state = UNMATCHED_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_FOOTER:
g_assert_true (has_sections);
g_assert_null (tile->widget);
section_state = NO_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_UNMATCHED_FOOTER:
g_assert_cmpint (tile->n_items, ==, 0);
g_assert_null (tile->widget);
section_state = NO_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_ITEM:
g_object_unref (item);
g_assert_cmpint (n_items, ==, gtk_list_item_base_get_position (GTK_LIST_ITEM_BASE (tile->widget)));
g_assert_cmpint (tile->n_items, ==, 1);
+ after_items = FALSE;
+ }
+ else
+ {
+ after_items = TRUE;
}
if (tile->n_items)
n_items += tile->n_items;
g_assert_true (tile->widget);
}
- for (tile = gtk_list_tile_gc (items, gtk_list_item_manager_get_first (items));
- tile != NULL;
- tile = gtk_list_tile_gc (items, gtk_rb_tree_node_get_next (tile)))
- ;
+ gtk_list_item_manager_gc_tiles (items);
n_items = 0;
g_assert_true (has_sections);
g_assert_true (tile->widget);
section_state = MATCHED_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_UNMATCHED_HEADER:
g_assert_cmpint (tile->n_items, ==, 0);
g_assert_false (tile->widget);
section_state = UNMATCHED_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_FOOTER:
g_assert_true (has_sections);
g_assert_false (tile->widget);
section_state = NO_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_UNMATCHED_FOOTER:
g_assert_cmpint (tile->n_items, ==, 0);
g_assert_false (tile->widget);
section_state = NO_SECTION;
+ after_items = FALSE;
break;
case GTK_LIST_TILE_ITEM:
if (tile->widget)
{
g_assert_cmpint (tile->n_items, ==, 1);
+ after_items = FALSE;
+ }
+ else
+ {
+ g_assert_false (after_items);
+ after_items = TRUE;
}
if (tile->n_items)
n_items += tile->n_items;