Bläddra i källkod

wxGUI: move add command to the submenu

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43055 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 år sedan
förälder
incheckning
ab2e8691ff
2 ändrade filer med 7 tillägg och 6 borttagningar
  1. 0 4
      gui/wxpython/gui_modules/toolbars.py
  2. 7 2
      gui/wxpython/wxgui.py

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

@@ -1712,7 +1712,6 @@ class LayerManagerToolbar(AbstractToolbar):
         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 @@ class LayerManagerToolbar(AbstractToolbar):
             (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),

+ 7 - 2
gui/wxpython/wxgui.py

@@ -100,7 +100,7 @@ class GMFrame(wx.Frame):
     """
     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 @@ class GMFrame(wx.Frame):
         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)