aboutsummaryrefslogtreecommitdiff
path: root/voctogui/lib/ui.py
diff options
context:
space:
mode:
Diffstat (limited to 'voctogui/lib/ui.py')
-rw-r--r--voctogui/lib/ui.py16
1 files changed, 10 insertions, 6 deletions
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')