[gnome-music/wip/mschraal/core: 73/92] discllistbox: Replace flowbox with listbox for ease of development
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core: 73/92] discllistbox: Replace flowbox with listbox for ease of development
- Date: Mon, 17 Jun 2019 22:53:05 +0000 (UTC)
commit 3122371b3fe46bd113305258b51b1140559b42a6
Author: Marinus Schraal <mschraal gnome org>
Date: Sat Jun 1 14:19:28 2019 +0200
discllistbox: Replace flowbox with listbox for ease of development
data/ui/DiscBox.ui | 6 +++---
gnomemusic/widgets/disclistboxwidget.py | 15 +++++++++------
2 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/DiscBox.ui b/data/ui/DiscBox.ui
index 923f46e3..8bc0bede 100644
--- a/data/ui/DiscBox.ui
+++ b/data/ui/DiscBox.ui
@@ -24,12 +24,12 @@
</packing>
</child>
<child>
- <object class="DiscSongsFlowBox" id="_disc_songs_flowbox">
+ <object class="GtkListBox" id="_list_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
+<!-- <property name="orientation">vertical</property> -->
+<!-- <property name="homogeneous">True</property> -->
<property name="selection_mode">none</property>
</object>
<packing>
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index bc40c68d..f5f2598c 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -30,7 +30,7 @@ from gnomemusic.widgets.songwidget import SongWidget
import gnomemusic.utils as utils
-class DiscSongsFlowBox(Gtk.FlowBox):
+class DiscSongsFlowBox(Gtk.ListBox):
"""FlowBox containing the songs on one disc
DiscSongsFlowBox allows setting the number of columns to
@@ -92,7 +92,8 @@ class DiscBox(Gtk.Box):
__gtype_name__ = 'DiscBox'
_disc_label = Gtk.Template.Child()
- _disc_songs_flowbox = Gtk.Template.Child()
+ #_disc_songs_flowbox = Gtk.Template.Child()
+ _list_box = Gtk.Template.Child()
__gsignals__ = {
'selection-changed': (GObject.SignalFlags.RUN_FIRST, None, ()),
@@ -124,12 +125,12 @@ class DiscBox(Gtk.Box):
if listmodel is not None:
self._listmodel = listmodel
- self._disc_songs_flowbox.bind_model(
+ self._list_box.bind_model(
self._listmodel, self._create_widget)
- self.bind_property(
- 'columns', self._disc_songs_flowbox, 'columns',
- GObject.BindingFlags.SYNC_CREATE)
+ # self.bind_property(
+ # 'columns', self._list_box, 'columns',
+ # GObject.BindingFlags.SYNC_CREATE)
self.bind_property(
'show-disc-label', self._disc_label, 'visible',
GObject.BindingFlags.SYNC_CREATE)
@@ -212,6 +213,8 @@ class DiscBox(Gtk.Box):
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
+ song_widget.show_all()
+
return song_widget
@log
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]