From e78e24465bbe90150509946211148a364a75a115 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Wed, 17 Jun 2015 12:18:32 +0200 Subject: start filling the gui from code --- voctogui/voctogui.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'voctogui/voctogui.py') 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() -- cgit v1.2.3