[gnome-music/wip/jfelder/playback-status-v4: 3/12] application: Create a search property
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/playback-status-v4: 3/12] application: Create a search property
- Date: Mon, 1 Jun 2020 00:28:32 +0000 (UTC)
commit 33adb72260cc351227ac54abb484e238633187f7
Author: Jean Felder <jfelder src gnome org>
Date: Sun Jan 12 02:31:28 2020 +0100
application: Create a search property
gnomemusic/application.py | 13 +++++++++++++
gnomemusic/window.py | 3 +--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index ba8f4d45..ad920272 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -43,6 +43,7 @@ from gnomemusic.musiclogger import MusicLogger
from gnomemusic.pauseonsuspend import PauseOnSuspend
from gnomemusic.player import Player
from gnomemusic.scrobbler import LastFmScrobbler
+from gnomemusic.search import Search
from gnomemusic.widgets.aboutdialog import AboutDialog
from gnomemusic.widgets.lastfmdialog import LastfmDialog
from gnomemusic.window import Window
@@ -63,6 +64,8 @@ class Application(Gtk.Application):
self._window = None
self._log = MusicLogger()
+ self._search = Search()
+
self._coreselection = CoreSelection()
self._coremodel = CoreModel(self)
# Order is important: CoreGrilo initializes the Grilo sources,
@@ -162,6 +165,16 @@ class Application(Gtk.Application):
"""
return self._window
+ @GObject.Property(
+ type=Search, flags=GObject.ParamFlags.READABLE)
+ def search(self):
+ """Get class providing all listmodels.
+
+ :returns: List model provider class
+ :rtype: Search
+ """
+ return self._search
+
def _set_actions(self):
action_entries = [
('about', self._about, None),
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 0100676b..89d88968 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -91,14 +91,13 @@ class Window(Gtk.ApplicationWindow):
self._view_before_search = None
self._player = app.props.player
+ self._search = app.props.search
self._setup_view()
MediaKeys(self._player, self)
def _setup_view(self):
- self._search = Search()
-
self._headerbar = HeaderBar(self._app)
self._headerbar.props.stack = self._stack
self._search_headerbar = SearchHeaderBar(self._app)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]