[gnome-music/wip/mschraal/assorted-cleanups: 2/11] grlsearchwrapper: Cleanup init arguments
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/assorted-cleanups: 2/11] grlsearchwrapper: Cleanup init arguments
- Date: Thu, 26 Mar 2020 15:57:39 +0000 (UTC)
commit 4d1f03e5dfe73854d56b9880e54650be08d91363
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Mar 26 14:20:09 2020 +0100
grlsearchwrapper: Cleanup init arguments
gnomemusic/coregrilo.py | 2 +-
gnomemusic/grilowrappers/grlsearchwrapper.py | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index ed66c6b9..2e15ef15 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -146,7 +146,7 @@ class CoreGrilo(GObject.GObject):
and source.supported_operations() & Grl.SupportedOps.SEARCH
and "net:internet" not in source.props.source_tags):
self._search_wrappers[source.props.source_id] = GrlSearchWrapper(
- source, self._coremodel, self._application, self)
+ source, self._application)
self._log.debug("Adding search source {}".format(source))
def _on_source_removed(self, registry, source):
diff --git a/gnomemusic/grilowrappers/grlsearchwrapper.py b/gnomemusic/grilowrappers/grlsearchwrapper.py
index b2842b28..3910f065 100644
--- a/gnomemusic/grilowrappers/grlsearchwrapper.py
+++ b/gnomemusic/grilowrappers/grlsearchwrapper.py
@@ -54,27 +54,23 @@ class GrlSearchWrapper(GObject.GObject):
Grl.METADATA_KEY_URL
]
- def __init__(self, source, coremodel, application, grilo):
+ def __init__(self, source, application):
"""Initialize a search wrapper
Initialize a generic Grilo source search wrapper.
:param Grl.Source source: The Grilo source to wrap
- :param CoreModel coremodel: CoreModel instance to use models
- from
:param Application application: Application instance
- :param CoreGrilo grilo: The CoreGrilo instance
"""
super().__init__()
self._application = application
- self._coremodel = coremodel
self._coreselection = application.props.coreselection
- self._grilo = grilo
self._log = application.props.log
self._source = source
- self._song_search_proxy = self._coremodel.props.songs_search_proxy
+ coremodel = application.props.coremodel
+ self._song_search_proxy = coremodel.props.songs_search_proxy
self._song_search_store = Gio.ListStore.new(CoreSong)
# FIXME: Workaround for adding the right list type to the proxy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]