[gnome-music/wip/jfelder/player-core-small-cleanups: 6/6] playertoolbar: Hide the toolbar if the playlist becomes empty
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/player-core-small-cleanups: 6/6] playertoolbar: Hide the toolbar if the playlist becomes empty
- Date: Wed, 25 Sep 2019 13:44:49 +0000 (UTC)
commit 21b48b351ee626e8b95cec35d60b6acbdc538a96
Author: Jean Felder <jfelder src gnome org>
Date: Wed Jul 17 23:42:00 2019 +0200
playertoolbar: Hide the toolbar if the playlist becomes empty
gnomemusic/widgets/playertoolbar.py | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index d094597f..57083517 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -143,6 +143,12 @@ class PlayerToolbar(Gtk.ActionBar):
@log
def _sync_playing(self, player, state):
+ if (self._player.props.state == Playback.STOPPED
+ and not self._player.props.has_next
+ and not self._player.props.has_previous):
+ self.hide()
+ return
+
self.show()
if self._player.props.state == Playback.PLAYING:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]