[gnome-music/wip/mschraal/restore-loading-notifications: 1/2] coremodel: Pass Application object to init
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/restore-loading-notifications: 1/2] coremodel: Pass Application object to init
- Date: Mon, 16 Sep 2019 15:56:42 +0000 (UTC)
commit 776e6c688d3d041289d9106c0b3f703d4144bf66
Author: Marinus Schraal <mschraal gnome org>
Date: Mon Sep 16 16:32:49 2019 +0200
coremodel: Pass Application object to init
gnomemusic/application.py | 2 +-
gnomemusic/coregrilo.py | 4 ++--
gnomemusic/coremodel.py | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index dc6e4559..53f6fd4c 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -64,7 +64,7 @@ class Application(Gtk.Application):
self._window = None
self._coreselection = CoreSelection()
- self._coremodel = CoreModel(self._coreselection)
+ self._coremodel = CoreModel(self)
self._settings = Gio.Settings.new('org.gnome.Music')
self._player = Player(self)
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 47b3151e..1c47624f 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -51,11 +51,11 @@ class CoreGrilo(GObject.GObject):
def __repr__(self):
return "<CoreGrilo>"
- def __init__(self, coremodel, coreselection):
+ def __init__(self, coremodel, application):
super().__init__()
self._coremodel = coremodel
- self._coreselection = coreselection
+ self._coreselection = application.props.coreselection
self._search_wrappers = {}
self._thumbnail_sources = []
self._thumbnail_sources_timeout = None
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index d00e7886..0e0ecae5 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -75,7 +75,7 @@ class CoreModel(GObject.GObject):
grilo = GObject.Property(type=CoreGrilo, default=None)
songs_available = GObject.Property(type=bool, default=False)
- def __init__(self, coreselection):
+ def __init__(self, application):
super().__init__()
self._flatten_model = None
@@ -86,7 +86,7 @@ class CoreModel(GObject.GObject):
self._model = Gio.ListStore.new(CoreSong)
self._songliststore = SongListStore(self._model)
- self._coreselection = coreselection
+ self._coreselection = application.props.coreselection
self._album_model = Gio.ListStore()
self._album_model_sort = Gfm.SortListModel.new(self._album_model)
self._album_model_sort.set_sort_func(
@@ -133,7 +133,7 @@ class CoreModel(GObject.GObject):
self._user_playlists_model_sort.set_sort_func(
self._wrap_list_store_sort_func(self._playlists_sort))
- self.props.grilo = CoreGrilo(self, self._coreselection)
+ self.props.grilo = CoreGrilo(self, application)
# FIXME: Not all instances of internal _grilo use have been
# fixed.
self._grilo = self.props.grilo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]