[gnome-music/wip/mschraal/artistalbums-cleanup: 3/3] artistalbumswidget: Remove unused init arguments



commit da53fb56abe7ae5277d3df3703c63d44743acc95
Author: Marinus Schraal <mschraal gnome org>
Date:   Tue Sep 4 13:45:56 2018 +0200

    artistalbumswidget: Remove unused init arguments

 gnomemusic/views/artistsview.py          |  3 +--
 gnomemusic/views/searchview.py           |  3 +--
 gnomemusic/widgets/artistalbumswidget.py | 11 ++++-------
 gnomemusic/widgets/artistalbumwidget.py  |  3 +--
 4 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index 3b28d03b..f90aadf6 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -124,8 +124,7 @@ class ArtistsView(BaseView):
         self._view.add(new_artist_albums_widget)
 
         artist_albums = ArtistAlbumsWidget(
-            artist, albums, self.player, self._headerbar,
-            self._selection_toolbar, self._window)
+            artist, albums, self.player, self._window)
         self._artists[artist.casefold()]['widget'] = artist_albums
         new_artist_albums_widget.add(artist_albums)
         new_artist_albums_widget.show()
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index 970a6bcd..380c1300 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -146,8 +146,7 @@ class SearchView(BaseView):
             albums = self._artists[artist.casefold()]['albums']
 
             self._artist_albums_widget = ArtistAlbumsWidget(
-                artist, albums, self.player, self._headerbar,
-                self._selection_toolbar, self._window, True)
+                artist, albums, self.player, self._window, True)
             self.add(self._artist_albums_widget)
             self._artist_albums_widget.show()
 
diff --git a/gnomemusic/widgets/artistalbumswidget.py b/gnomemusic/widgets/artistalbumswidget.py
index 2eb88152..b8a2b1d0 100644
--- a/gnomemusic/widgets/artistalbumswidget.py
+++ b/gnomemusic/widgets/artistalbumswidget.py
@@ -55,15 +55,13 @@ class ArtistAlbumsWidget(Gtk.Box):
 
     @log
     def __init__(
-            self, artist, albums, player, headerbar, selection_toolbar,
-            window, selection_mode_allowed=False):
+            self, artist, albums, player, window,
+            selection_mode_allowed=False):
         super().__init__(orientation=Gtk.Orientation.VERTICAL)
         self._player = player
         self._artist = artist
         self._window = window
         self._selection_mode_allowed = selection_mode_allowed
-        self._selection_toolbar = selection_toolbar
-        self._headerbar = headerbar
 
         self._artist_label.props.label = self._artist
 
@@ -125,9 +123,8 @@ class ArtistAlbumsWidget(Gtk.Box):
     @log
     def _add_album(self, album):
         widget = ArtistAlbumWidget(
-            album, self._player, self._model, self._headerbar,
-            self._selection_mode_allowed, self._songs_grid_size_group,
-            self._cover_size_group)
+            album, self._player, self._model, self._selection_mode_allowed,
+            self._songs_grid_size_group, self._cover_size_group)
 
         self.bind_property(
             'selection-mode', widget, 'selection-mode',
diff --git a/gnomemusic/widgets/artistalbumwidget.py b/gnomemusic/widgets/artistalbumwidget.py
index d5e854d8..82dfa619 100644
--- a/gnomemusic/widgets/artistalbumwidget.py
+++ b/gnomemusic/widgets/artistalbumwidget.py
@@ -54,7 +54,7 @@ class ArtistAlbumWidget(Gtk.Box):
 
     @log
     def __init__(
-            self, media, player, model, header_bar, selection_mode_allowed,
+            self, media, player, model, selection_mode_allowed,
             size_group=None, cover_size_group=None):
         super().__init__(orientation=Gtk.Orientation.HORIZONTAL)
 
@@ -66,7 +66,6 @@ class ArtistAlbumWidget(Gtk.Box):
         self._artist = utils.get_artist_name(self._media)
         self._album_title = utils.get_album_title(self._media)
         self._model = model
-        self._header_bar = header_bar
         self._selection_mode = False
         self._selection_mode_allowed = selection_mode_allowed
 


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