Merge pull request #411 from jcornwall/master

Pulseaudio: Update status immediately when volume changes
This commit is contained in:
enkore 2016-07-20 13:08:05 +02:00 committed by GitHub
commit 0974f2547a
2 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,10 @@ class Module(SettingsBase):
def run(self):
pass
def send_output(self):
"""Send a status update with the current module output"""
self.__status_handler.io.async_refresh()
def __log_button_event(self, button, cb, args, action, **kwargs):
msg = "{}: button={}, cb='{}', args={}, kwargs={}, type='{}'".format(
self.__name__, button, cb, args, kwargs, action)

View File

@ -177,6 +177,8 @@ class PulseAudio(Module, ColorRangeModule):
volume_bar=volume_bar),
}
self.send_output()
def change_sink(self):
curr_sink = self.sink
sinks = list(s.split()[1] for s in self.sinks)