Skip to content
  • Emmanuele Bassi's avatar
    listbox: Unbind the model before removing children · fb3f817f
    Emmanuele Bassi authored
    Calling gtk_list_box_remove_all() is a no-op with a bound model; after
    the introduction of the remove_all() method in 49e56fc7, we were left
    with row widgets after the dispose() call chained up.
    
    We could restore the explicit unparenting inside dispose() instead of
    calling remove_all(), but since the bound list model is provided by the
    user of GtkListBox, it's more appropriate to unbind it in the dispose()
    implementation, to avoid any potential reference cycle (especially in
    higher level languages that have no explicit reference acquisition).
    
    We clean up the bound model, and its associated state, if any; and then
    we remove all the row widgets that are left.
    fb3f817f