diff options
author | MaZderMind <github@mazdermind.de> | 2015-06-17 12:18:32 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-06-17 12:18:32 +0200 |
commit | e78e24465bbe90150509946211148a364a75a115 (patch) | |
tree | 3c205708dfaa6edcd44a72af7212a5b99ed180a2 /voctogui/voctogui.py | |
parent | ce5c7ebd8b631386c0a9c911cb3ecb20c3f824dc (diff) |
start filling the gui from code
Diffstat (limited to 'voctogui/voctogui.py')
-rwxr-xr-x | voctogui/voctogui.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/voctogui/voctogui.py b/voctogui/voctogui.py index 39c2957..233bd16 100755 --- a/voctogui/voctogui.py +++ b/voctogui/voctogui.py @@ -30,14 +30,11 @@ from lib.uibuilder import UiBuilder class Voctogui(object): def __init__(self): self.log = logging.getLogger('Voctogui') - - # Instanciate GTK-Builder - self.builder = UiBuilder() # Uf a UI-File was specified on the Command-Line, load it if Args.ui_file: self.log.info('loading ui-file from file specified on command-line: %s', self.options.ui_file) - self.builder.add_from_file(Args.ui_file) + self.builder = UiBuilder(Args.ui_file) else: # Paths to look for the gst-switch UI-File @@ -52,9 +49,12 @@ class Voctogui(object): if os.path.isfile(path): self.log.info('loading ui-file from file %s', path) - self.builder.add_from_file(path) + self.builder = UiBuilder(path) break + if self.builder is None: + raise Exception("Can't find any .ui-Files to use (searched %s)" % (', '.join(paths))) + self.builder.setup() |