[gnome-music/wip/jfelder/mpris-cleanup: 61/67] mpris: Make app attribute internal



commit 428b014d5c67f93b82cda7e929cf91de1cedb73b
Author: Jean Felder <jfelder src gnome org>
Date:   Thu Mar 14 10:35:13 2019 +0100

    mpris: Make app attribute internal

 gnomemusic/mpris.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 64251f96..ac011a91 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -276,7 +276,7 @@ class MPRIS(DBusInterface):
         path = '/org/mpris/MediaPlayer2'
         super().__init__(name, path)
 
-        self.app = app
+        self._app = app
         self.player = app.get_active_window()._player
         self.player.connect(
             'song-changed', self._on_current_song_changed)
@@ -624,10 +624,10 @@ class MPRIS(DBusInterface):
         self._reload_playlists()
 
     def _raise(self):
-        self.app.do_activate()
+        self._app.do_activate()
 
     def _quit(self):
-        self.app.quit()
+        self._app.quit()
 
     def _next(self):
         self.player.next()
@@ -711,7 +711,7 @@ class MPRIS(DBusInterface):
 
     def _activate_playlist(self, playlist_path):
         playlist_id = self._get_playlist_from_dbus_path(playlist_path).get_id()
-        self.app._window.views[View.PLAYLIST].activate_playlist(playlist_id)
+        self._app._window.views[View.PLAYLIST].activate_playlist(playlist_id)
 
     def _get_playlists(self, index, max_count, order, reverse):
         """Gets a set of playlists (MPRIS Method).


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