[gnome-music/wip/mschraal/grltrackerplaylist-empty-playlist-delete: 9/9] albumsview: Use Application object directly



commit 87ee58004e3cf920d6431cf6504c661029de0a8e
Author: Marinus Schraal <mschraal gnome org>
Date:   Tue Feb 11 15:07:33 2020 +0100

    albumsview: Use Application object directly

 gnomemusic/views/albumsview.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index e479fec5..b414a8ad 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -59,6 +59,7 @@ class AlbumsView(Gtk.Stack):
         self.name = "albums"
         self.title = _("Albums")
 
+        self._application = application
         self._window = application.props.window
         self._headerbar = self._window._headerbar
         self._adjustment_timeout_id = None
@@ -228,7 +229,7 @@ class AlbumsView(Gtk.Stack):
         if self.props.selection_mode is False:
             self.props.selection_mode = True
 
-        with self._window._app.props.coreselection.freeze_notify():
+        with self._application.props.coreselection.freeze_notify():
             if self._ctrl_hold is False:
                 self.deselect_all()
             for child in self._flowbox.get_selected_children():
@@ -245,7 +246,7 @@ class AlbumsView(Gtk.Stack):
         Selects or deselects all items without sending the notify::active
         signal for performance purposes.
         """
-        with self._window._app.props.coreselection.freeze_notify():
+        with self._application.props.coreselection.freeze_notify():
             for child in self._flowbox.get_children():
                 child.props.selected = selected
 


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