From 60c1d19a74dec02c7f5fca3e13286595872e8a92 Mon Sep 17 00:00:00 2001 From: einarr Date: Thu, 27 Apr 2006 11:20:12 +0000 Subject: [PATCH] Get correct path for glade file based on the path of the system package. --- system/dialogs.py | 3 ++- system/fluents.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/system/dialogs.py b/system/dialogs.py index 2c05877..807584c 100644 --- a/system/dialogs.py +++ b/system/dialogs.py @@ -7,7 +7,8 @@ import gobject from system import logger, project, workflow import workflows -GLADEFILENAME = os.path.dirname(sys.argv[0]) + '/system/fluent.glade' +DATADIR = os.path.dirname(sys.modules['system'].__file__) +GLADEFILENAME = os.path.join(DATADIR, 'fluent.glade') class CreateProjectDruid(gtk.Window): """A druid for creating a new project. diff --git a/system/fluents.py b/system/fluents.py index 520255f..a79cfe8 100755 --- a/system/fluents.py +++ b/system/fluents.py @@ -17,7 +17,8 @@ from system import project, workflow, dataset, logger, plots, navigator, dialogs PROGRAM_NAME = 'fluents' VERSION = '0.1.0' -GLADEFILENAME = os.path.dirname(sys.argv[0]) + '/system/fluent.glade' +DATADIR = os.path.dirname(sys.modules['system'].__file__) +GLADEFILENAME = os.path.join(DATADIR, 'fluent.glade') class FluentApp: