[GRASS-SVN] r53292 - in grass/trunk/gui/wxpython: gui_core lmgr xml

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 29 11:26:48 PDT 2012


Author: martinl
Date: 2012-09-29 11:26:48 -0700 (Sat, 29 Sep 2012)
New Revision: 53292

Modified:
   grass/trunk/gui/wxpython/gui_core/ghelp.py
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/xml/menudata.xml
Log:
wxGUI: #1743 (WXGUI About GRASS dialog should allow to copy version information)


Modified: grass/trunk/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/ghelp.py	2012-09-29 18:01:28 UTC (rev 53291)
+++ grass/trunk/gui/wxpython/gui_core/ghelp.py	2012-09-29 18:26:48 UTC (rev 53292)
@@ -393,8 +393,6 @@
 
         # notebook
         self.aboutNotebook = FormListbook(self.panel, style = wx.BK_LEFT)
-        #self.aboutNotebook = GNotebook(self.panel, style = globalvar.FNPageStyle | FN.FNB_NO_X_BUTTON) 
-        #self.aboutNotebook.SetTabAreaColour(globalvar.FNPageColor)
         
         for title, win in ((_("Info"), self._pageInfo()),
                            (_("Copyright"), self._pageCopyright()),
@@ -472,7 +470,7 @@
 
         row += 2
         infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
-                                               label = _('SVN Revision:')),
+                                               label = '%s:' % _('SVN Revision')),
                           pos = (row, 0),
                           flag = wx.ALIGN_RIGHT)
         
@@ -483,7 +481,7 @@
         
         row += 1
         infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
-                                               label = _('GIS Library Revision:')),
+                                               label = '%s:' % _('GIS Library Revision')),
                           pos = (row, 0),
                           flag = wx.ALIGN_RIGHT)
         
@@ -495,7 +493,7 @@
 
         row += 2
         infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
-                                               label = _('Python:')),
+                                               label = 'Python:'),
                           pos = (row, 0),
                           flag = wx.ALIGN_RIGHT)
         
@@ -506,7 +504,7 @@
 
         row += 1
         infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
-                                               label = _('wxPython:')),
+                                               label =  'wxPython:'),
                           pos = (row, 0),
                           flag = wx.ALIGN_RIGHT)
         
@@ -521,7 +519,7 @@
         
         row += 2
         infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
-                                               label = _('Language:')),
+                                               label = "%s:" % _('Language')),
                           pos = (row, 0),
                           flag = wx.ALIGN_RIGHT)
         self.langUsed = grass.gisenv().get('LANG', None)

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2012-09-29 18:01:28 UTC (rev 53291)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2012-09-29 18:26:48 UTC (rev 53292)
@@ -22,6 +22,7 @@
 import os
 import tempfile
 import stat
+import platform
 try:
     import xml.etree.ElementTree as etree
 except ImportError:
@@ -775,6 +776,23 @@
                                             lcmd = ['d.vect', 'map=%s' % name])
         dlg.Destroy()
         
+    def OnSystemInfo(self, event):
+        """!Print system information"""
+        vInfo = grass.version()
+        
+        self.goutput.WriteLog("%s: %s\n"
+                              "%s: %s\n"
+                              "%s: %s (%s)\n"
+                              "Python: %s\n"
+                              "wxPython: %s\n"
+                              "%s: %s\n"% (_("GRASS version"), vInfo['version'],
+                                           _("GRASS SVN Revision"), vInfo['revision'],
+                                           _("GIS Library Revision"), vInfo['libgis_revision'], vInfo['libgis_date'].split(' ', 1)[0],
+                                           platform.python_version(),
+                                           wx.__version__,
+                                           _("Platform"), platform.platform()),
+                              switchPage = True)
+    
     def OnAboutGRASS(self, event):
         """!Display 'About GRASS' dialog"""
         win = AboutWindow(self)

Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml	2012-09-29 18:01:28 UTC (rev 53291)
+++ grass/trunk/gui/wxpython/xml/menudata.xml	2012-09-29 18:26:48 UTC (rev 53292)
@@ -3380,6 +3380,11 @@
         </menuitem>
         <separator />
         <menuitem>
+          <label>About system</label>
+          <help>Prints system information</help>
+          <handler>OnSystemInfo</handler>
+        </menuitem>
+        <menuitem>
           <label>About GRASS GIS</label>
           <help>About GRASS GIS</help>
           <handler>OnAboutGRASS</handler>



More information about the grass-commit mailing list