[GRASS-SVN] r43056 - in grass/branches/develbranch_6/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 11 17:35:11 EDT 2010


Author: martinl
Date: 2010-08-11 21:35:11 +0000 (Wed, 11 Aug 2010)
New Revision: 43056

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
   grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: move add command to the submenu
(merge r43055 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2010-08-11 21:33:31 UTC (rev 43055)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2010-08-11 21:35:11 UTC (rev 43056)
@@ -1563,7 +1563,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()
@@ -1602,9 +1601,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/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-08-11 21:33:31 UTC (rev 43055)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-08-11 21:35:11 UTC (rev 43056)
@@ -98,7 +98,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)
@@ -1304,7 +1304,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