From: Thierry Parmentelat Date: Mon, 23 May 2011 14:26:17 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/sface X-Git-Tag: sface-0.1-11~4 X-Git-Url: http://git.onelab.eu/?p=sface.git;a=commitdiff_plain;h=1790ec67340d64652164e895f1c7620580b40019;hp=cd0d3ba43d176aac4a076f8498c6efcb5111dc12 Merge branch 'master' of ssh://git.onelab.eu/git/sface --- diff --git a/macos/build-dmg.sh b/macos/build-dmg.sh index 87858f2..aa82588 100755 --- a/macos/build-dmg.sh +++ b/macos/build-dmg.sh @@ -183,9 +183,10 @@ Also make sure to trash the current one before retrying" ### install background and app icons # clean up any 'background' dir if exists rm -rf "$img_mnt"/{,.}background - mkdir -p "$img_mnt"/.background "$img_mnt"/$resource_path + mkdir -p "$img_mnt"/.background "$img_mnt"/$resource_path/sface/images cp $temp/sface/macos/graphic-install-background.png "$img_mnt"/.background/background.png cp $temp/sface/macos/graphic-sfa.icns "$img_mnt"/$resource_path/appIcon.icns + cp $temp/sface/macos/graphic-sfa.png "$img_mnt"/$resource_path/sface/images # the volume icons won't work - who cares # cp $temp/sface/macos/graphic-vol-sface.icns "$img_mnt"/.background/volumeIcon.icns # cp $temp/sface/macos/graphic-vol-sface.png "$img_mnt"/.background/volumeIcon.png diff --git a/sface/mainwindow.py b/sface/mainwindow.py index 620b000..19f05a9 100644 --- a/sface/mainwindow.py +++ b/sface/mainwindow.py @@ -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 @@ -27,7 +28,7 @@ class Nav(QWidget): self.title = QLabel("", self) scene=QGraphicsScene() - pixmap = QPixmap(locate_image_file('graphic-sfa.png')) + pixmap = QPixmap(locate_image_file('graphic-sfa')) logolabel=QLabel("",self) logolabel.setPixmap(pixmap) self.main = QLabel("", self)