fixed weird issue where glade file wasn't working

This commit is contained in:
punkrockguy318 2008-06-05 02:04:33 +00:00
parent 89c4dcc76a
commit 00a47173b4
1 changed files with 5 additions and 4 deletions

9
gfceu
View File

@ -489,6 +489,7 @@ optionsfile = appconfigdir + 'gfceu_options.dat'
fceu_binary = None fceu_binary = None
aoss_binary = None aoss_binary = None
fceu_server_binary = None fceu_server_binary = None
glade_file = None
#version is defined earlier in the code #version is defined earlier in the code
#have_vfs is defined earlier in the code #have_vfs is defined earlier in the code
@ -496,12 +497,12 @@ class WidgetsWrapper:
def __init__(self): def __init__(self):
# Search for the glade file # Search for the glade file
# Check first in the directory of this script. # Check first in the directory of this script.
if os.path.isfile(os.path.dirname(sys.argv[0])+'/gfceu.glade'): if os.path.isfile(os.path.dirname(sys.argv[0])+'gfceu.glade'):
glade_file = os.path.dirname(sys.argv[0])+'/gfceu.glade' glade_file = os.path.dirname(sys.argv[0]) + 'gfceu.glade'
# Then check in the share directory (installed) # Then check in the share directory (installed)
elif os.path.isfile(os.path.dirname(sys.argv[0]) +\ elif os.path.isfile(os.path.dirname(sys.argv[0]) +\
'/../share/gfceu/gfceu.glade'): '../share/gfceu/gfceu.glade'):
glade_file = os.path.dirname(sys.argv[0])+'/../share/gfceu/gfceu.glade' glade_file = os.path.dirname(sys.argv[0])+'../share/gfceu/gfceu.glade'
else: else:
print 'ERROR.' print 'ERROR.'
print 'Could not find the glade interface file.' print 'Could not find the glade interface file.'