From 867b8be36b312881b458ec51ab0b2a9950512f4a Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 27 Sep 2015 16:35:41 +0200 Subject: connect audio to command system --- voctogui/lib/audioselector.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'voctogui') 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 -- cgit v1.2.3