aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-09-27 16:35:41 +0200
committerMaZderMind <git@mazdermind.de>2015-09-27 16:35:41 +0200
commit867b8be36b312881b458ec51ab0b2a9950512f4a (patch)
tree309ac88ebd4a7e192f6284de16bb24fe94c34016
parent24cd2c385d5177e194b2e3f2d18eeb1b2a28291f (diff)
connect audio to command system
-rw-r--r--voctogui/lib/audioselector.py7
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