diff options
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() |