Commit 32ec7403 authored by Georges Basile Stavracas Neto's avatar Georges Basile Stavracas Neto Committed by Marinus Schraal

disclistboxwidget: Turn into a GtkBox subclass

The current disc list implementation uses a GtkListBox as
the parent class. This brings some issues with it, as the
listbox widget has selectable, focusable rows that break
the keyboard navigation. The listbox rows also handle clicks
and add a strange effect to the disc list when clicking
outside the songs list.

Fix this by using GtkBox as the base class of DiscListBox,
and the keyboard and clicking issues are all gone. Remove a css
workaround as well.
parent d87d352f
......@@ -79,7 +79,6 @@
<object class="DiscListBox" id="disclistbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<property name="expand">False</property>
......@@ -11,11 +11,6 @@ flowbox, treeview, widget {
-gtk-key-bindings: unbind-ctrl-space;
/* Workaround the black border bug (#773459). */
list, row {
background: transparent;
.discsongsflowbox > flowboxchild {
padding: 0px;
......@@ -422,7 +422,7 @@ class DiscBox(Gtk.Box):
return True
class DiscListBox(Gtk.ListBox):
class DiscListBox(Gtk.Box):
"""A ListBox widget containing all discs of a particular
......@@ -438,8 +438,7 @@ class DiscListBox(Gtk.ListBox):
def __init__(self):
self._selection_mode = False
self._selection_mode_allowed = False
......@@ -465,7 +464,7 @@ class DiscListBox(Gtk.ListBox):
self._selected_items = []
def get_child_selected_items(child):
self._selected_items += child.get_child().get_selected_items()
self._selected_items += child.get_selected_items()
......@@ -499,7 +498,7 @@ class DiscListBox(Gtk.ListBox):
self._selection_mode = selection_mode
def set_child_selection_mode(child):
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