[gnome-music/wip/mschraal/gtk4: 69/90] Correctly reveal PlayerToolbar
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 69/90] Correctly reveal PlayerToolbar
- Date: Sat, 27 Jun 2020 11:58:25 +0000 (UTC)
commit 983982ee7ae8fcbe20b00518d0b004f653d6e047
Author: Marinus Schraal <mschraal gnome org>
Date: Sun May 3 01:12:46 2020 +0200
Correctly reveal PlayerToolbar
gnomemusic/widgets/playertoolbar.py | 4 ++--
gnomemusic/window.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index c0a7e8eb..25735e92 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -132,10 +132,10 @@ class PlayerToolbar(Gtk.ActionBar):
if (self._player.props.state == Playback.STOPPED
and not self._player.props.has_next
and not self._player.props.has_previous):
- self.hide()
+ self.props.revealed = False
return
- self.show()
+ self.props.revealed = True
if self._player.props.state == Playback.PLAYING:
icon_name = "media-playback-pause-symbolic"
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index d439c65c..1469e4da 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -449,7 +449,7 @@ class Window(Gtk.ApplicationWindow):
def _on_selection_mode_changed(self, widget, data=None):
if (not self.props.selection_mode
and self._player.state == Playback.STOPPED):
- self._player_toolbar.hide()
+ self._player_toolbar.props.revealed = False
def _on_add_to_playlist(self, widget):
if self.props.active_view == self.views[View.PLAYLIST]:
@@ -474,4 +474,4 @@ class Window(Gtk.ApplicationWindow):
:param bool visible: actionbar visibility
"""
- self._player_toolbar.set_visible(visible)
+ self._player_toolbar.props.revealed = visible
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]