Visually indicate changes of playlist and library (close #42)
Set the GTK “needs-attention” property of the header bar stack switcher for the playlist and the library panel when their content changes.
This commit is contained in:
parent
670d50cefd
commit
3f12eedf96
2 changed files with 67 additions and 0 deletions
|
|
@ -115,6 +115,8 @@ class Client(Base):
|
|||
SIGNAL_LOAD_PLAYLIST = 'load-playlist'
|
||||
# Signal: load audio output devices
|
||||
SIGNAL_LOAD_OUTPUT_DEVICES = 'load-output-devices'
|
||||
# Signal: custom (dummy) event to trigger callback
|
||||
SIGNAL_CUSTOM = 'custom'
|
||||
# Signal: error
|
||||
SIGNAL_ERROR = 'error'
|
||||
|
||||
|
|
@ -275,6 +277,11 @@ class Client(Base):
|
|||
self._add_action(self._set_volume, volume)
|
||||
|
||||
|
||||
def get_custom(self, name):
|
||||
self._logger.info("get custom \"%s\"", name)
|
||||
self._add_action(self._get_custom, name)
|
||||
|
||||
|
||||
# Private methods
|
||||
|
||||
def _connect(self, host, port, password):
|
||||
|
|
@ -604,6 +611,10 @@ class Client(Base):
|
|||
self._call('setvol', volume)
|
||||
|
||||
|
||||
def _get_custom(self, name):
|
||||
self._callback(Client.SIGNAL_CUSTOM, name)
|
||||
|
||||
|
||||
def _start_worker(self):
|
||||
"""Start the worker thread which waits for action to be performed."""
|
||||
self._logger.debug("start worker")
|
||||
|
|
|
|||
Loading…
Reference in a new issue