[gnome-music/wip/jfelder/player-playlist: 8/8] playertoolbar: Use player play_pause method



commit 907119a49468f3f3dc6ee28ae11a57a3d8afa39d
Author: Jean Felder <jfelder src gnome org>
Date:   Fri Aug 3 14:50:50 2018 +0200

    playertoolbar: Use player play_pause method

 gnomemusic/widgets/playertoolbar.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index 63d86b28..abc5b450 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -107,10 +107,7 @@ class PlayerToolbar(Gtk.ActionBar):
     @Gtk.Template.Callback()
     @log
     def _on_play_button_clicked(self, button):
-        if self._player.get_playback_status() == Playback.PLAYING:
-            self._player.pause()
-        else:
-            self._player.play()
+        self._player.play_pause()
 
     @Gtk.Template.Callback()
     @log


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