[Greater-commits] r429 - trunk/GREAT-ER/Greater/UI
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jul 13 10:23:35 CEST 2011
Author: bricks
Date: 2011-07-13 10:23:34 +0200 (Wed, 13 Jul 2011)
New Revision: 429
Modified:
trunk/GREAT-ER/Greater/UI/mainwindow.py
Log:
Extract version info string into own method
Modified: trunk/GREAT-ER/Greater/UI/mainwindow.py
===================================================================
--- trunk/GREAT-ER/Greater/UI/mainwindow.py 2011-07-13 08:17:23 UTC (rev 428)
+++ trunk/GREAT-ER/Greater/UI/mainwindow.py 2011-07-13 08:23:34 UTC (rev 429)
@@ -134,42 +134,44 @@
filename = os.path.join(self.application.ResourceDir(),
"Bitmaps", "banner.png")
pic = wxImage(filename).ConvertToBitmap()
+ about_dialog(self, "About", pic, self.get_version_info())
+
+ def get_version_info(self):
if self.Context().session.SimulationServerConnection():
greater_model_version = self.Context().session.SimulationServerConnection().version
else:
greater_model_version = "GREAT-ER model system: Not connected"
api_version = da_get_version().split(' ',1)
- about_dialog(self, "About", pic,
- "GREAT-ER desktop\n"
- "Copyright (C) 2002, 2003, 2011 Intevation GmbH.\n"
- "Licensed under the GNU General Public License\n\n"
- "Version:\n %s\n\n"
- "using:\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- " %s\n"
- % (Greater.version.longversion,
- greater_model_version,
- api_version[0], api_version[1],
- "Python %d.%d.%d" % sys.version_info[:3],
- "Thuban %s" % Thuban.version.longversion,
- SciParam.version.longversion,
- "wxPython %s" % wxPython_version,
- "NumPy %s" % numpy.version.version,
- "Python Image Library %s" % Image.VERSION,
- "%s" % twisted.copyright.longversion,
- "Gdal %s" % osgeo.gdal.__version__,
- "Reportlab %s" % reportlab.Version,
- ))
+ return "GREAT-ER desktop\n"\
+ "Copyright (C) 2002, 2003, 2011 Intevation GmbH.\n"\
+ "Licensed under the GNU General Public License\n\n"\
+ "Version:\n %s\n\n"\
+ "using:\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ " %s\n"\
+ % (Greater.version.longversion,
+ greater_model_version,
+ api_version[0], api_version[1],
+ "Python %d.%d.%d" % sys.version_info[:3],
+ "Thuban %s" % Thuban.version.longversion,
+ SciParam.version.longversion,
+ "wxPython %s" % wxPython_version,
+ "NumPy %s" % numpy.version.version,
+ "Python Image Library %s" % Image.VERSION,
+ "%s" % twisted.copyright.longversion,
+ "Gdal %s" % osgeo.gdal.__version__,
+ "Reportlab %s" % reportlab.Version,
+ )
def view_position_changed(self):
"""Override the default method with a simplier representation."""
More information about the Greater-commits
mailing list