disclistbox: Simplify code

Instead of using the GtkListBox's specific ::insert(), use
the add() function from GtkContainer.

This will simplify the transition from GtkListBox to GtkBox
in the future.
parent 504305de
......@@ -285,7 +285,7 @@ class AlbumWidget(Gtk.EventBox):
for disc_nr in discs:
disc = self._create_disc_box(disc_nr, discs[disc_nr])
self._disc_listbox.insert(disc, -1)
if len(discs) == 1:
......@@ -444,9 +444,9 @@ class DiscListBox(Gtk.ListBox):
self._selected_items = []
def insert(self, widget, position):
def add(self, widget):
"""Insert a DiscBox widget"""
super().insert(widget, position)
widget.connect('selection-changed', self._on_selection_changed)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment