[GRASS-SVN] r46922 - in grass/trunk/gui/wxpython: . gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 1 13:43:46 EDT 2011
Author: martinl
Date: 2011-07-01 10:43:46 -0700 (Fri, 01 Jul 2011)
New Revision: 46922
Modified:
grass/trunk/gui/wxpython/gui_modules/toolbars.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: separed vector-related tools to the new toolbar
Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py 2011-07-01 17:38:34 UTC (rev 46921)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py 2011-07-01 17:43:46 UTC (rev 46922)
@@ -17,6 +17,7 @@
- LMDataToolbar
- LMToolsToolbar
- LMMiscToolbar
+ - LMVectorToolbar
- PsMapToolbar
(C) 2007-2011 by the GRASS Development Team
@@ -1519,14 +1520,6 @@
self.parent.OnAddOverlay),
('delcmd', icons["delCmd"],
self.parent.OnDeleteLayer),
- (None, ),
- ('importMap', icons["import"],
- self.parent.OnImportMenu),
- (None, ),
- ('vdigit', icons["vdigit"],
- self.parent.OnVDigit),
- ('attribute', icons["attrTable"],
- self.parent.OnShowAttributeTable),
))
class LMToolsToolbar(AbstractToolbar):
@@ -1544,7 +1537,10 @@
"""!Toolbar data
"""
icons = Icons['layerManager']
- return self._getToolbarData((('mapCalc', icons["mapcalc"],
+ return self._getToolbarData((('importMap', icons["import"],
+ self.parent.OnImportMenu),
+ (None, ),
+ ('mapCalc', icons["mapcalc"],
self.parent.OnMapCalculator),
('georect', Icons["georectify"]["georectify"],
self.parent.OnGCPManager),
@@ -1574,6 +1570,27 @@
('help', Icons["misc"]["help"],
self.parent.OnHelp),
))
+
+class LMVectorToolbar(AbstractToolbar):
+ """!Layer Manager `vector` toolbar
+ """
+ def __init__(self, parent):
+ AbstractToolbar.__init__(self, parent)
+
+ self.InitToolbar(self._toolbarData())
+
+ # realize the toolbar
+ self.Realize()
+
+ def _toolbarData(self):
+ """!Toolbar data
+ """
+ icons = Icons['layerManager']
+ return self._getToolbarData((('vdigit', icons["vdigit"],
+ self.parent.OnVDigit),
+ ('attribute', icons["attrTable"],
+ self.parent.OnShowAttributeTable),
+ ))
class PsMapToolbar(AbstractToolbar):
def __init__(self, parent):
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2011-07-01 17:38:34 UTC (rev 46921)
+++ grass/trunk/gui/wxpython/wxgui.py 2011-07-01 17:43:46 UTC (rev 46922)
@@ -84,7 +84,7 @@
from gui_modules import psmap
from gui_modules.debug import Debug
from gui_modules.ghelp import MenuTreeWindow, AboutWindow, InstallExtensionWindow
-from gui_modules.toolbars import LMWorkspaceToolbar, LMDataToolbar, LMToolsToolbar, LMMiscToolbar
+from gui_modules.toolbars import LMWorkspaceToolbar, LMDataToolbar, LMToolsToolbar, LMMiscToolbar, LMVectorToolbar
from gui_modules.gpyshell import PyShellWindow
from icons.icon import Icons
@@ -133,7 +133,8 @@
self.toolbars = { 'workspace' : LMWorkspaceToolbar(parent = self),
'data' : LMDataToolbar(parent = self),
'tools' : LMToolsToolbar(parent = self),
- 'misc' : LMMiscToolbar(parent = self) }
+ 'misc' : LMMiscToolbar(parent = self),
+ 'vector' : LMVectorToolbar(parent = self) }
self._toolbarsData = { 'workspace' : ("toolbarWorkspace", # name
_("Workspace Toolbar"), # caption
1), # row
@@ -146,13 +147,16 @@
'tools' : ("toolbarTools",
_("Tools Toolbar"),
2),
+ 'vector' : ("toolbarVector",
+ _("Vector Toolbar"),
+ 2),
}
if sys.platform == 'win32':
self._toolbarsList = ('workspace', 'data',
- 'tools', 'misc')
+ 'vector', 'tools', 'misc')
else:
self._toolbarsList = ('data', 'workspace',
- 'misc', 'tools')
+ 'misc', 'tools', 'vector')
for toolbar in self._toolbarsList:
name, caption, row = self._toolbarsData[toolbar]
self._auimgr.AddPane(self.toolbars[toolbar],
More information about the grass-commit
mailing list