[GRASS-SVN] r43055 - in grass/trunk/gui/wxpython: . gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 11 17:33:31 EDT 2010
Author: martinl
Date: 2010-08-11 21:33:31 +0000 (Wed, 11 Aug 2010)
New Revision: 43055
Modified:
grass/trunk/gui/wxpython/gui_modules/toolbars.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: move add command to the submenu
Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py 2010-08-11 21:24:28 UTC (rev 43054)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py 2010-08-11 21:33:31 UTC (rev 43055)
@@ -1712,7 +1712,6 @@
self.addshaded = wx.NewId()
self.addvect = wx.NewId()
self.addthematic = wx.NewId()
- self.addcmd = wx.NewId()
self.addgrp = wx.NewId()
self.addovl = wx.NewId()
self.delcmd = wx.NewId()
@@ -1751,9 +1750,6 @@
(self.addthematic, 'addthematic', Icons["addthematic"].GetBitmap(),
wx.ITEM_NORMAL, _("Add various vector-based map layers"), "",
self.parent.OnAddVectorMisc),
- (self.addcmd, 'addcmd', Icons["addcmd"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["addcmd"].GetLabel(), Icons["addcmd"].GetDesc(),
- self.parent.OnAddCommand),
(self.addgrp, 'addgrp', Icons["addgrp"].GetBitmap(),
wx.ITEM_NORMAL, Icons["addgrp"].GetLabel(), Icons["addgrp"].GetDesc(),
self.parent.OnAddGroup),
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2010-08-11 21:24:28 UTC (rev 43054)
+++ grass/trunk/gui/wxpython/wxgui.py 2010-08-11 21:33:31 UTC (rev 43055)
@@ -100,7 +100,7 @@
"""
def __init__(self, parent, id = wx.ID_ANY, title = _("GRASS GIS Layer Manager"),
workspace = None,
- size = (600, 450), style = wx.DEFAULT_FRAME_STYLE, **kwargs):
+ size = (575, 450), style = wx.DEFAULT_FRAME_STYLE, **kwargs):
self.parent = parent
self.baseTitle = title
self.iconsize = (16, 16)
@@ -1260,7 +1260,12 @@
addrhumb.SetBitmap(Icons["addrhumb"].GetBitmap(self.iconsize))
ovlmenu.AppendItem(addrhumb)
self.Bind(wx.EVT_MENU, self.AddRhumb, addrhumb)
-
+
+ addcmd = wx.MenuItem(ovlmenu, wx.ID_ANY, Icons["addcmd"].GetLabel())
+ addcmd.SetBitmap(Icons["addcmd"].GetBitmap(self.iconsize))
+ ovlmenu.AppendItem(addcmd)
+ self.Bind(wx.EVT_MENU, self.OnAddCommand, addcmd)
+
# Popup the menu. If an item is selected then its handler
# will be called before PopupMenu returns.
self.PopupMenu(ovlmenu)
More information about the grass-commit
mailing list