[gnome-music/wip/mschraal/window-selection-mode: 17/22] albumwidget: Remove unused init arguments



commit 495d099c9d8a75938b9b419eb05ea35d819e5be5
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Sep 2 09:22:50 2018 +0200

    albumwidget: Remove unused init arguments

 gnomemusic/views/albumsview.py    | 3 +--
 gnomemusic/views/searchview.py    | 3 +--
 gnomemusic/widgets/albumwidget.py | 8 ++------
 3 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index a2decd60..73417833 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -44,8 +44,7 @@ class AlbumsView(BaseView):
         super().__init__('albums', _("Albums"), window)
 
         self.player = player
-        self._album_widget = AlbumWidget(
-            player, self, self._header_bar, self._selection_toolbar)
+        self._album_widget = AlbumWidget(player, self)
         self.add(self._album_widget)
         self.albums_selected = []
         self.all_items = []
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index cc74567b..9f25c4b6 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -65,8 +65,7 @@ class SearchView(BaseView):
         self._albums_selected = []
         self._albums = {}
         self._albums_index = 0
-        self._album_widget = AlbumWidget(
-            player, self, self._header_bar, self._selection_toolbar)
+        self._album_widget = AlbumWidget(player, self)
         self.add(self._album_widget)
 
         self._artists_albums_selected = []
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index ebcf2fdf..adad88b5 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -63,13 +63,11 @@ class AlbumWidget(Gtk.EventBox):
         return '<AlbumWidget>'
 
     @log
-    def __init__(self, player, parent_view, header_bar, selection_toolbar):
+    def __init__(self, player, parent_view):
         """Initialize the AlbumWidget.
 
         :param player: The player object
         :param parent_view: The view this widget is part of
-        :param header_bar: The header bar object
-        :param selection_toolbar: The selection toolbar object
         """
         super().__init__()
 
@@ -81,15 +79,13 @@ class AlbumWidget(Gtk.EventBox):
 
         self._create_model()
         self._album = None
-        self._header_bar = header_bar
-        self._selection_toolbar = selection_toolbar
 
         self.bind_property(
             'selection-mode', self._disc_listbox, 'selection-mode',
             GObject.BindingFlags.BIDIRECTIONAL)
 
         self.bind_property(
-            'selection-mode', self._header_bar, 'selection-mode',
+            'selection-mode', self._parent_view, 'selection-mode',
             GObject.BindingFlags.BIDIRECTIONAL |
             GObject.BindingFlags.SYNC_CREATE)
 


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