-import os
+import os, os.path
import sys
import time
from sface.screens.mainscreen import MainScreen
from sface.screens.helpscreen import HelpScreen
+# depending on the platform..
+def locate_image_file (filename):
+ for dir in [ '/usr/share' ] :
+ for suffix in ['png','jpg']:
+ attempt=os.path.join(dir,'images',"%s.%s"%(filename,suffix))
+ if os.path.is_file(attempt) : return attempt
+ return os.path.join('/could/not/locate/image/file',filename)
+
+
class Nav(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.title = QLabel("", self)
scene=QGraphicsScene()
- pixmap = QPixmap('/Users/parmentelat/git/sface/macos/graphic-sfa64.png')
+ pixmap = QPixmap(locate_image_file('graphic-sfa.png'))
logolabel=QLabel("",self)
logolabel.setPixmap(pixmap)
self.main = QLabel("", self)