[Greater-commits] r420 - trunk/GREAT-ER/Greater/Dialogs
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jul 12 16:24:54 CEST 2011
Author: bricks
Date: 2011-07-12 16:24:53 +0200 (Tue, 12 Jul 2011)
New Revision: 420
Modified:
trunk/GREAT-ER/Greater/Dialogs/about.py
Log:
Fix greater about dialog running standalone
Modified: trunk/GREAT-ER/Greater/Dialogs/about.py
===================================================================
--- trunk/GREAT-ER/Greater/Dialogs/about.py 2011-07-12 14:20:20 UTC (rev 419)
+++ trunk/GREAT-ER/Greater/Dialogs/about.py 2011-07-12 14:24:53 UTC (rev 420)
@@ -15,6 +15,13 @@
from wxPython.wx import *
+if __name__ == "__main__":
+ import sys, os.path
+ curdir = os.path.dirname(__file__)
+ global greaterdir
+ greaterdir = os.path.join(curdir, os.pardir, os.pardir)
+ sys.path.append(greaterdir)
+
from widgets import SMALLSPACE
class AboutDialog(wxDialog):
@@ -66,7 +73,7 @@
class _TestApp(wxApp):
def OnInit(self):
- pic = wxImage('../../Resources/Bitmaps/banner.png',
+ pic = wxImage(os.path.join(greaterdir, 'Resources/Bitmaps/banner.png'),
wxBITMAP_TYPE_PNG).ConvertToBitmap()
about_dialog(NULL, "About test", pic, 'text about the version')
return True
More information about the Greater-commits
mailing list