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

This commit is contained in:
Chris Jones 2010-01-09 17:49:14 +00:00
parent 80e0926a05
commit 2b7be76004
2 changed files with 5 additions and 1 deletions

View File

@ -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"