[gnome-music/wip/mschraal/albumsview-selection-rework: 16/17] disclistboxwidget: Remove DiscListBox




commit 3d484bf3fe8611e7a58293cdfa83780b63ebd2af
Author: Marinus Schraal <mschraal gnome org>
Date:   Sat Sep 11 01:08:40 2021 +0200

    disclistboxwidget: Remove DiscListBox
    
    It became an empty shell with all the changes lately.

 data/ui/AlbumWidget.ui                  |  2 +-
 gnomemusic/widgets/albumwidget.py       |  3 +--
 gnomemusic/widgets/disclistboxwidget.py | 15 ---------------
 gnomemusic/widgets/songwidget.py        |  2 +-
 4 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/data/ui/AlbumWidget.ui b/data/ui/AlbumWidget.ui
index 2c71e044c..0b4388a89 100644
--- a/data/ui/AlbumWidget.ui
+++ b/data/ui/AlbumWidget.ui
@@ -136,7 +136,7 @@
           </object>
         </child>
         <child>
-          <object class="DiscListBox" id="_disc_list_box">
+          <object class="GtkListBox" id="_disc_list_box">
             <property name="can_focus">False</property>
             <property name="margin-top">48</property>
             <property name="selection_mode">0</property>
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index 9d93f5337..aff8e0c3b 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -33,7 +33,6 @@ from gnomemusic.corealbum import CoreAlbum
 from gnomemusic.defaulticon import DefaultIcon
 from gnomemusic.utils import ArtSize
 from gnomemusic.widgets.disclistboxwidget import DiscBox
-from gnomemusic.widgets.disclistboxwidget import DiscListBox  # noqa: F401
 from gnomemusic.widgets.playlistdialog import PlaylistDialog
 if typing.TYPE_CHECKING:
     from gnomemusic.application import Application
@@ -195,7 +194,7 @@ class AlbumWidget(Handy.Clamp):
 
         self._corealbum.bind_property(
             "selected", disc, "selected", GObject.BindingFlags.SYNC_CREATE)
-        self._disc_list_box.bind_property(
+        self.bind_property(
             "selection-mode", disc_box, "selection-mode",
             GObject.BindingFlags.BIDIRECTIONAL
             | GObject.BindingFlags.SYNC_CREATE)
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index 5ac1bee87..ad6e202e6 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -151,18 +151,3 @@ class DiscBox(Gtk.ListBoxRow):
         song_context_menu.props.relative_to = self._list_box
         song_context_menu.props.pointing_to = rect
         song_context_menu.popup()
-
-
-class DiscListBox(Gtk.ListBox):
-    """A ListBox widget containing all discs of a particular
-    album
-    """
-    __gtype_name__ = 'DiscListBox'
-
-    selection_mode = GObject.Property(type=bool, default=False)
-
-    def __init__(self):
-        """Initialize"""
-        super().__init__()
-
-        self.props.valign = Gtk.Align.START
diff --git a/gnomemusic/widgets/songwidget.py b/gnomemusic/widgets/songwidget.py
index 3649a12db..fd255dd31 100644
--- a/gnomemusic/widgets/songwidget.py
+++ b/gnomemusic/widgets/songwidget.py
@@ -38,7 +38,7 @@ from gnomemusic.widgets.starimage import StarImage  # noqa: F401
 
 @Gtk.Template(resource_path='/org/gnome/Music/ui/SongWidget.ui')
 class SongWidget(Gtk.ListBoxRow):
-    """The single song widget used in DiscListBox
+    """The single song widget used in DiscBox
 
     Contains
      * play icon (depending on state)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]