From 197e6d8244af1132441f7bba4a904c205a8d4d63 Mon Sep 17 00:00:00 2001 From: Martin Keßler Date: Sun, 6 Nov 2016 13:16:37 +0100 Subject: added configuration option to specify initial audio source if such an initial source is specified, removed the GUI element to change it later. this is to avoid accidentally changing the source during production. --- voctogui/lib/ui.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'voctogui/lib/ui.py') diff --git a/voctogui/lib/ui.py b/voctogui/lib/ui.py index 92d0692..a8fb6a9 100644 --- a/voctogui/lib/ui.py +++ b/voctogui/lib/ui.py @@ -58,12 +58,16 @@ class Ui(UiBuilder): uibuilder=self ) - drawing_area = self.find_widget_recursive(self.win, 'combo_audio') - self.audio_selector_controller = AudioSelectorController( - drawing_area, - win=self.win, - uibuilder=self - ) + # check if there is a fixed audio source configured. + # if so, remove the combo-box entirely instead of setting it up. + if Config.has_option('mix', 'audiosource'): + drawing_area.remove(self.find_widget_recursive(self.win, 'box_audio')) + else: + self.audio_selector_controller = AudioSelectorController( + drawing_area=self.find_widget_recursive(self.win, 'combo_audio'), + win=self.win, + uibuilder=self + ) # Setup Toolbar Controllers toolbar = self.find_widget_recursive(self.win, 'toolbar') -- cgit v1.2.3