diff options
author | MaZderMind <git@mazdermind.de> | 2015-09-27 16:35:41 +0200 |
---|---|---|
committer | MaZderMind <git@mazdermind.de> | 2015-09-27 16:35:41 +0200 |
commit | 867b8be36b312881b458ec51ab0b2a9950512f4a (patch) | |
tree | 309ac88ebd4a7e192f6284de16bb24fe94c34016 /voctogui/lib | |
parent | 24cd2c385d5177e194b2e3f2d18eeb1b2a28291f (diff) |
connect audio to command system
Diffstat (limited to 'voctogui/lib')
-rw-r--r-- | voctogui/lib/audioselector.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/voctogui/lib/audioselector.py b/voctogui/lib/audioselector.py index 141ecc4..8196e33 100644 --- a/voctogui/lib/audioselector.py +++ b/voctogui/lib/audioselector.py @@ -26,10 +26,15 @@ class AudioSelectorController(object): for name in Config.getlist('mix', 'sources'): combo.append(name, name) - #combo.set_active_id(name) + # connect event-handler and request initial state + Connection.on('audio_status', self.on_audio_status) + Connection.send('get_audio') self.timer_iteration = 0 + def on_audio_status(self, source) + self.combo.set_active_id(name) + def on_button_press_event(self, combo, event): if event.type != Gdk.EventType.DOUBLE_BUTTON_PRESS: return |