#!/usr/bin/python3 from .menu_bar import MenuBar from .track_control import TrackControl from .settings import Settings class GUICommunication: """ Class handling events that are a bit more complex. """ def __init__(self, app): self.app = app self.menu_bar = MenuBar(self.app) self.track_control = TrackControl(self.app) self.settings = Settings(self.app) self.settings.update_all() def on_track_change(self, previous_track=None, track=None): self.track_control.on_track_change(previous_track, track) self.app.library.on_track_change(previous_track, track) def on_playstate_update(self): self.track_control.on_playstate_update() def on_settings_change(self, key, value): self.settings.update_settings(key, value)