[Greater-commits] r3669 - in branches/3.0.0-all-models/GREAT-ER: . Greater/Dialogs Greater/UI

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jul 25 16:36:23 CEST 2011


Author: aheinecke
Date: 2011-07-25 16:36:23 +0200 (Mon, 25 Jul 2011)
New Revision: 3669

Modified:
   branches/3.0.0-all-models/GREAT-ER/
   branches/3.0.0-all-models/GREAT-ER/ChangeLog
   branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/about.py
   branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py
   branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py
Log:
Merged revisions 412,420-421,423,426-430 via svnmerge from 
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ER

........
  r412 | bricks | 2011-07-12 15:50:34 +0200 (Tue, 12 Jul 2011) | 2 lines
  
  Set default width of GREAT-ER to 800 pixels
........
  r420 | bricks | 2011-07-12 16:24:53 +0200 (Tue, 12 Jul 2011) | 2 lines
  
  Fix greater about dialog running standalone
........
  r421 | bricks | 2011-07-12 16:26:24 +0200 (Tue, 12 Jul 2011) | 2 lines
  
  Increment the width of about dialog
........
  r423 | bricks | 2011-07-12 16:28:37 +0200 (Tue, 12 Jul 2011) | 2 lines
  
  Update and fix About dialog text
........
  r426 | bricks | 2011-07-13 09:35:48 +0200 (Wed, 13 Jul 2011) | 2 lines
  
  Add additional version info from greater components
........
  r427 | bricks | 2011-07-13 09:36:21 +0200 (Wed, 13 Jul 2011) | 2 lines
  
  Increment width of about dialog to show greater api version string in one line
........
  r428 | bricks | 2011-07-13 10:17:23 +0200 (Wed, 13 Jul 2011) | 2 lines
  
  Use new Bugtracker URL from wald project
........
  r429 | bricks | 2011-07-13 10:23:34 +0200 (Wed, 13 Jul 2011) | 2 lines
  
  Extract version info string into own method
........
  r430 | bricks | 2011-07-13 10:38:58 +0200 (Wed, 13 Jul 2011) | 2 lines
  
  Add me as author
........



Property changes on: branches/3.0.0-all-models/GREAT-ER
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/GREAT-ER:1-232,310,312-315,319,322,327,333,335,340-344,346-347,368,375,397-398,400,403,410
   + /trunk/GREAT-ER:1-232,310,312-315,319,322,327,333,335,340-344,346-347,368,375,397-398,400,403,410,412-430

Modified: branches/3.0.0-all-models/GREAT-ER/ChangeLog
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/ChangeLog	2011-07-25 14:26:15 UTC (rev 3668)
+++ branches/3.0.0-all-models/GREAT-ER/ChangeLog	2011-07-25 14:36:23 UTC (rev 3669)
@@ -38,6 +38,13 @@
 		- Fix typo
 		- Check if a binary object has a file_obj before accessing it
 	* Greater/version.py: Changed to 2.9.5-full
+	* Greater/Dialogs/about.py: 
+		- Make it possible to run the dialog standalone
+		- Add bricks as author
+		- Extract version info string into method
+		- Change bugtracker to wald url.
+		- Add additional Version informations
+		- Update about dialog text and size
 
 2006-05-10  Frank Koormann   <frank at intevation.de>
 

Modified: branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/about.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/about.py	2011-07-25 14:26:15 UTC (rev 3668)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/about.py	2011-07-25 14:36:23 UTC (rev 3669)
@@ -1,6 +1,7 @@
 # Copyright (c) 2003 by Intevation GmbH
 # Authors:
 # Jan-Oliver Wagner <jan at intevation.de>
+# Bjoern Ricks <bjoern.ricks at intevation.de>
 #
 # This program is free software under the GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
@@ -15,6 +16,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):
@@ -33,7 +41,7 @@
         bs.Add(bitmap, 0, wxALL, SMALLSPACE)
         width, height = bitmap.GetSizeTuple()
         tc = wxTextCtrl(self, -1, self.text,
-                        size = wxSize(300,height),
+                        size = wxSize(400,height),
                         style = wxTE_MULTILINE | wxTE_READONLY)
         bs.Add(tc, 0, wxALL, SMALLSPACE)
         top_box.Add(bs, 0, wxALL, SMALLSPACE)
@@ -66,7 +74,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

Modified: branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py	2011-07-25 14:26:15 UTC (rev 3668)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py	2011-07-25 14:36:23 UTC (rev 3669)
@@ -120,7 +120,7 @@
 
     def CreateMainWindow(self):
         return GreaterMainWindow(NULL, -1, "GREAT-ER", self, None,
-                                 size = wxSize(650, 400))
+                                 size = wxSize(800, 400))
 
     def create_session(self):
         """Create a GREAT-ER session"""
@@ -163,7 +163,7 @@
                                                exc_traceback)
                 message = "An unhandled exception occurred:\n%s\n" % exc_value+\
                           "(please report to " \
-                          "http://great-er.intevation.org/bugtracker.html)"\
+                          "http://wald.intevation.org/tracker/?group_id=55"\
                           "\n\n\n"+\
                           "".join(lines)
                 print message

Modified: branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py	2011-07-25 14:26:15 UTC (rev 3668)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py	2011-07-25 14:36:23 UTC (rev 3669)
@@ -2,6 +2,7 @@
 # Authors:
 # Bernhard Herzog <bh at intevation.de>
 # Thomas Koester <tkoester at intevation.de>
+# Bjoern Ricks <bjoern.ricks at intevation.de>
 #
 # This program is free software under the GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
@@ -31,6 +32,11 @@
 
 import Greater.version
 import SciParam.version
+import numpy.version
+import Image
+import twisted.copyright
+import osgeo.gdal
+import reportlab
 from wxPython.wx import __version__ as wxPython_version
 
 from context import context_session_open, context_results_exist, \
@@ -131,32 +137,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"
-                           "with Sediment Exposure Module\n"
-                           "Copyright (C) 2002, 2003, 2005 Intevation GmbH.\n"
-                           "Licensed under the GNU General Public License\n\n"
-                           "Version:\n  %s\n"
-                           "using:\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],
-                              Thuban.version.longversion,
-                              SciParam.version.longversion,
-                              "wxPython %s" % wxPython_version,
-                              "Python %d.%d.%d" % sys.version_info[:3]))
+        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