diff options
-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 |