From 2b7be76004435ee08d84ee616a05d6e4002d73b1 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 9 Jan 2010 17:49:14 +0000 Subject: [PATCH] Move our preferences glade file to terminatorlib/ so we can use the built-in knowledge of where that is on-disk to find the .glade file --- {data => terminatorlib}/preferences.glade | 0 terminatorlib/prefseditor.py | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) rename {data => terminatorlib}/preferences.glade (100%) diff --git a/data/preferences.glade b/terminatorlib/preferences.glade similarity index 100% rename from data/preferences.glade rename to terminatorlib/preferences.glade diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 0651019c..d099de73 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -1,5 +1,6 @@ #!/usr/bin/python +import os import gtk import gobject @@ -27,7 +28,10 @@ class PrefsEditor: self.term = term self.builder = gtk.Builder() try: - gladefile = open('/home/cmsj/code/personal/terminator/branches/epicrefactor/data/preferences.glade', 'r') + # Figure out where our library is on-disk so we can open our + (head, tail) = os.path.split(config.__file__) + librarypath = os.path.join(head, 'preferences.glade') + gladefile = open(librarypath, 'r') gladedata = gladefile.read() except Exception, ex: print "Failed to find preferences.glade"