aboutsummaryrefslogtreecommitdiff
path: root/voctogui
diff options
context:
space:
mode:
authorMartin Keßler <martin@moegger.de>2016-11-06 13:16:37 +0100
committerMartin Keßler <martin@moegger.de>2016-11-06 13:16:37 +0100
commit197e6d8244af1132441f7bba4a904c205a8d4d63 (patch)
treeb4cb3da040871108d80182f88a28ead7c8948d0f /voctogui
parentb52dd80c6e2b7c95e798bff9d6b075080b63aa1c (diff)
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.
Diffstat (limited to 'voctogui')
-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')