[gnome-music/wip/mschraal/searchview-selection-fixes-3-34: 1/4] disclistbox: Do not change a DiscBox selection-mode from DiscListBox
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/searchview-selection-fixes-3-34: 1/4] disclistbox: Do not change a DiscBox selection-mode from DiscListBox
- Date: Thu, 13 Feb 2020 14:54:00 +0000 (UTC)
commit cdd1546f186db3d2ca4490eca158e2b5134088ab
Author: Jean Felder <jfelder src gnome org>
Date: Thu Jan 9 17:32:36 2020 +0100
disclistbox: Do not change a DiscBox selection-mode from DiscListBox
Instead a DiscListBox consumer should create a binding between
DiscListBox and DiscBox.
gnomemusic/widgets/artistalbumwidget.py | 5 +++++
gnomemusic/widgets/disclistboxwidget.py | 6 ------
2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/widgets/artistalbumwidget.py b/gnomemusic/widgets/artistalbumwidget.py
index 18d916e1..f6315e1e 100644
--- a/gnomemusic/widgets/artistalbumwidget.py
+++ b/gnomemusic/widgets/artistalbumwidget.py
@@ -99,6 +99,11 @@ class ArtistAlbumWidget(Gtk.Box):
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
+ self._disc_list_box.bind_property(
+ "selection-mode", disc_box, "selection-mode",
+ GObject.BindingFlags.BIDIRECTIONAL
+ | GObject.BindingFlags.SYNC_CREATE)
+
return disc_box
def _create_disc_box(self, disc_nr, album_model):
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index 1df609f9..b7e95e33 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -193,9 +193,3 @@ class DiscListBox(Gtk.ListBox):
return
self._selection_mode = value
-
- def set_selection_mode(child):
- print("set selection mode on", child)
- child.props.selection_mode = value
-
- self.foreach(set_selection_mode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]