From 0e0bb324ba271da502eb407883da9bfe77fdd5b9 Mon Sep 17 00:00:00 2001 From: Reset Reboot Date: Mon, 7 Sep 2015 17:51:38 +0200 Subject: [PATCH] Added some new config to make the setup copy the glade file --- setup.py | 2 +- src/jsoninspector.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8f94989..5c153a9 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = "jsoninspector", version = "1.3", packages = find_packages('src', exclude=['distribute_setup']), - scripts = ['src/jsoninspector.py'], + scripts = ['src/jsoninspector.py','src/jsoninspector.glade'], entry_points = { 'gui_scripts': [ 'jsoninspector = jsoninspector:MainApp.start', diff --git a/src/jsoninspector.py b/src/jsoninspector.py index ecd541d..3eec458 100644 --- a/src/jsoninspector.py +++ b/src/jsoninspector.py @@ -25,7 +25,12 @@ class MainWindowMethods(object): principal """ self.builder = gtk.Builder() - self.builder.add_from_file(resource_filename(__name__,'../../src/jsoninspector.glade')) + try: + self.builder.add_from_file(resource_filename(__name__,'../../src/jsoninspector.glade')) + + except: + self.builder.add_from_file(resource_filename(__name__,'jsoninspector.glade')) + self.builder.connect_signals(self) # Prepara los renderizados de columna y las asigna a los valores