search path for the logo image on mac
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 23 May 2011 14:17:04 +0000 (16:17 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 23 May 2011 14:17:04 +0000 (16:17 +0200)
sface/mainwindow.py

index 620b000..ab19e07 100644 (file)
@@ -13,8 +13,9 @@ from sface.screens.mainscreen import MainScreen
 from sface.screens.helpscreen import HelpScreen
 
 # depending on the platform..
+# could probably use Qt's resource system but looks overkill for just one file...
 def locate_image_file (filename):
-    for dir in [ '/usr/share' ] :
+    for dir in [ '/usr/share', '/Applications/sface.app/Contents/Resources/sface' ] :
         for suffix in ['png','jpg']:
             attempt=os.path.join(dir,'images',"%s.%s"%(filename,suffix))
             if os.path.isfile(attempt) : return attempt