Add CTRL+<space> accelerator to toggle between ship & market browser
This commit is contained in:
@@ -246,19 +246,27 @@ class MainFrame(wx.Frame):
|
||||
self.Bind(wx.EVT_MENU, self.exportToClipboard, id=wx.ID_COPY)
|
||||
|
||||
addTabId = wx.NewId()
|
||||
toggleShipMarketId = wx.NewId()
|
||||
# Close Tab
|
||||
self.Bind(wx.EVT_MENU, self.CloseCurrentFit, id=wx.ID_CLOSE)
|
||||
self.Bind(wx.EVT_MENU,self.HAddTab, id = addTabId)
|
||||
self.Bind(wx.EVT_MENU,self.toggleShipMarket, id = toggleShipMarketId)
|
||||
|
||||
actb = [(wx.ACCEL_CTRL, ord('T'), addTabId),
|
||||
(wx.ACCEL_CMD, ord('T'), addTabId),
|
||||
(wx.ACCEL_CTRL, ord("W"), wx.ID_CLOSE),
|
||||
(wx.ACCEL_CMD, ord("W"), wx.ID_CLOSE)]
|
||||
(wx.ACCEL_CMD, ord("W"), wx.ID_CLOSE),
|
||||
(wx.ACCEL_CTRL, ord(" "), toggleShipMarketId),
|
||||
(wx.ACCEL_CMD, ord(" "), toggleShipMarketId)]
|
||||
atable = wx.AcceleratorTable(actb)
|
||||
self.SetAcceleratorTable(atable)
|
||||
|
||||
def HAddTab(self,event):
|
||||
self.fitMultiSwitch.AddTab()
|
||||
|
||||
def toggleShipMarket(self, event):
|
||||
sel = self.notebookBrowsers.GetSelection()
|
||||
self.notebookBrowsers.SetSelection(0 if sel == 1 else 1)
|
||||
|
||||
def clipboardEft(self):
|
||||
sFit = service.Fit.getInstance()
|
||||
|
||||
Reference in New Issue
Block a user