[gnome-music/wip/mschraal/assorted-cleanups: 6/7] grltrackerwrapper: Cleanup init arguments



commit 69b23a7f9367b5bd62908c96c7ae8530f25363ed
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Mar 26 14:02:47 2020 +0100

    grltrackerwrapper: Cleanup init arguments

 gnomemusic/coregrilo.py                       | 3 +--
 gnomemusic/grilowrappers/grltrackerwrapper.py | 7 ++-----
 2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 9aaf661c..ed66c6b9 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -132,8 +132,7 @@ class CoreGrilo(GObject.GObject):
                 and new_state == TrackerState.AVAILABLE):
             if source.props.source_id not in self._wrappers.keys():
                 new_wrapper = GrlTrackerWrapper(
-                    source, self._coremodel, self._application, self,
-                    self._tracker_wrapper)
+                    source, self._application, self._tracker_wrapper)
                 self._wrappers[source.props.source_id] = new_wrapper
                 self._log.debug("Adding wrapper {}".format(new_wrapper))
             else:
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 385bbe66..be7909f8 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -62,20 +62,17 @@ class GrlTrackerWrapper(GObject.GObject):
     ]
 
     def __init__(
-            self, source, coremodel, application, grilo, tracker_wrapper):
+            self, source, application, tracker_wrapper):
         """Initialize the Tracker wrapper
 
         :param Grl.TrackerSource source: The Tracker source to wrap
-        :param CoreModel coremodel: CoreModel instance to use models
-        from
         :param Application application: Application instance
-        :param CoreGrilo grilo: The CoreGrilo instance
         :param TrackerWrapper tracker_wrapper: The TrackerWrapper instance
         """
         super().__init__()
 
         self._application = application
-        self._coremodel = coremodel
+        self._coremodel = application.props.coremodel
         self._log = application.props.log
         self._model = self._coremodel.props.songs
         self._source = None


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