소스 검색

wxGUI: add icon for python editor to the Layer Manager toolbar

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68318 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 년 전
부모
커밋
b02c4ddf74
3개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. BIN
      gui/icons/grass/python.png
  2. 1 1
      gui/wxpython/lmgr/pyshell.py
  3. 4 0
      gui/wxpython/lmgr/toolbars.py

BIN
gui/icons/grass/python.png


+ 1 - 1
gui/wxpython/lmgr/pyshell.py

@@ -132,5 +132,5 @@ class PyShellWindow(wx.Panel):
         # there when closing the main GUI
         simpleEditor = PyEditFrame(parent=self, giface=self.giface)
         simpleEditor.SetSize(self.parent.GetSize())
-        simpleEditor.CenterOnParent()
+        simpleEditor.CenterOnScreen()
         simpleEditor.Show()

+ 4 - 0
gui/wxpython/lmgr/toolbars.py

@@ -142,6 +142,8 @@ class LMToolsToolbar(BaseToolbar):
                                  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 @@ class LMToolsToolbar(BaseToolbar):
                                      (None, ),
                                      ('script-load', icons['script-load'],
                                       self.parent.OnRunScript),
+                                     ('python', icons['python'],
+                                      self.parent.pyshell.OnSimpleEditor),
                                      ))
 
 class LMMiscToolbar(BaseToolbar):