WIP
This commit is contained in:
@@ -733,6 +733,7 @@ class SublimeMusicApp(Gtk.Application):
|
||||
|
||||
@dbus_propagate()
|
||||
def shuffle(self):
|
||||
if self.app_config.state.current_song:
|
||||
if self.app_config.state.shuffle_on:
|
||||
# Revert to the old play queue.
|
||||
old_play_queue_copy = self.app_config.state.old_play_queue
|
||||
|
@@ -94,6 +94,8 @@ class Desktop(Gtk.Box):
|
||||
|
||||
self.device_button.set_icon(f"chromecast{icon}-symbolic")
|
||||
|
||||
self.play_queue_button.set_sensitive(len(app_config.state.play_queue) > 0)
|
||||
|
||||
# Volume button and slider
|
||||
if app_config.state.is_muted:
|
||||
icon_name = "muted"
|
||||
|
@@ -119,6 +119,14 @@ class MobileHandle(Gtk.ActionBar):
|
||||
return box
|
||||
|
||||
def update(self, app_config: AppConfiguration, force: bool = False):
|
||||
empty_queue = len(app_config.state.play_queue) == 0
|
||||
|
||||
self.play_queue_button.set_sensitive(not empty_queue)
|
||||
self.menu_button.set_sensitive(not empty_queue)
|
||||
|
||||
if empty_queue:
|
||||
self.state.play_queue_open = False
|
||||
|
||||
if app_config.state.current_song is not None:
|
||||
self.song_title.set_markup(bleach.clean(app_config.state.current_song.title))
|
||||
# TODO (#71): use walrus once MYPY gets its act together
|
||||
|
Reference in New Issue
Block a user