[gnome-music/wip/jfelder/mpris-cleanup: 18/24] mpris: Make app attribute internal



commit ce08fb19e29d80c3c8c0fe786cf3e02df230a2dc
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 6204d83a..a4c52a41 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()
@@ -705,7 +705,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]