list-box-helper: Unset row header if unneeded

The usual implementation of the header func adds headers to all rows but
the first one. If the first row then gets removed, the second row
becomes the first and keeps its header, since nothing ever removes it.
Fix this by also removing the header if we are looking at the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=743441
This commit is contained in:
Timm Bäder 2015-01-24 16:23:26 +01:00
parent a1ebe5ad5b
commit fe77d8020a

View file

@ -28,7 +28,10 @@ cc_list_box_update_header_func (GtkListBoxRow *row,
GtkWidget *current;
if (before == NULL)
return;
{
gtk_list_box_row_set_header (row, NULL);
return;
}
current = gtk_list_box_row_get_header (row);
if (current == NULL)