[gnome-music/wip/jfelder/mpris-cleanup: 23/29] mpris: Make app attribute internal



commit cbf040bf3d2f70c84f2dbb735eac052fbda2fa84
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 1bf4b52b..83fbb245 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -277,7 +277,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)
@@ -628,10 +628,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()
@@ -708,7 +708,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]