[GRASS-SVN] r68318 - in grass/trunk/gui: icons/grass wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 26 08:29:54 PDT 2016


Author: martinl
Date: 2016-04-26 08:29:54 -0700 (Tue, 26 Apr 2016)
New Revision: 68318

Added:
   grass/trunk/gui/icons/grass/python.png
Modified:
   grass/trunk/gui/wxpython/lmgr/pyshell.py
   grass/trunk/gui/wxpython/lmgr/toolbars.py
Log:
wxGUI: add icon for python editor to the Layer Manager toolbar

Added: grass/trunk/gui/icons/grass/python.png
===================================================================
(Binary files differ)


Property changes on: grass/trunk/gui/icons/grass/python.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Modified: grass/trunk/gui/wxpython/lmgr/pyshell.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/pyshell.py	2016-04-26 15:15:05 UTC (rev 68317)
+++ grass/trunk/gui/wxpython/lmgr/pyshell.py	2016-04-26 15:29:54 UTC (rev 68318)
@@ -132,5 +132,5 @@
         # there when closing the main GUI
         simpleEditor = PyEditFrame(parent=self, giface=self.giface)
         simpleEditor.SetSize(self.parent.GetSize())
-        simpleEditor.CenterOnParent()
+        simpleEditor.CenterOnScreen()
         simpleEditor.Show()

Modified: grass/trunk/gui/wxpython/lmgr/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/toolbars.py	2016-04-26 15:15:05 UTC (rev 68317)
+++ grass/trunk/gui/wxpython/lmgr/toolbars.py	2016-04-26 15:29:54 UTC (rev 68318)
@@ -142,6 +142,8 @@
                                  label = _('Cartographic Composer')),
             'script-load': MetaIcon(img = 'script-load',
                                  label = _('Launch user-defined script')),
+            'python': MetaIcon(img = 'python',
+                               label = _('Open a simple Python code editor')),
             }
         
         return self._getToolbarData((('importMap', icons["import"],
@@ -158,6 +160,8 @@
                                      (None, ),
                                      ('script-load', icons['script-load'],
                                       self.parent.OnRunScript),
+                                     ('python', icons['python'],
+                                      self.parent.pyshell.OnSimpleEditor),
                                      ))
 
 class LMMiscToolbar(BaseToolbar):



More information about the grass-commit mailing list