Some Mac love, and added missing accelerator for fleet pane (set as CTRL+5)

This commit is contained in:
blitzmann
2014-04-03 19:44:03 -04:00
parent 9bbe7f7fb0
commit 23e6331909
2 changed files with 9 additions and 13 deletions

View File

@@ -364,7 +364,7 @@ class MainFrame(wx.Frame):
# Export HTML
self.Bind(wx.EVT_MENU, self.exportHtml, id=menuBar.exportHtmlId)
# Preference dialog
self.Bind(wx.EVT_MENU, self.showPreferenceDialog, id = menuBar.preferencesId)
self.Bind(wx.EVT_MENU, self.showPreferenceDialog, id=wx.ID_PREFERENCES)
# User guide
self.Bind(wx.EVT_MENU, self.goWiki, id = menuBar.wikiId)
# EVE Forums
@@ -384,6 +384,7 @@ class MainFrame(wx.Frame):
self.additionstab2 = wx.NewId()
self.additionstab3 = wx.NewId()
self.additionstab4 = wx.NewId()
self.additionstab5 = wx.NewId()
# Close Page
self.Bind(wx.EVT_MENU, self.CloseCurrentPage, id=self.closePageId)
@@ -396,6 +397,7 @@ class MainFrame(wx.Frame):
self.Bind(wx.EVT_MENU, self.AdditionsTabSelect, id = self.additionstab2)
self.Bind(wx.EVT_MENU, self.AdditionsTabSelect, id = self.additionstab3)
self.Bind(wx.EVT_MENU, self.AdditionsTabSelect, id = self.additionstab4)
self.Bind(wx.EVT_MENU, self.AdditionsTabSelect, id = self.additionstab5)
actb = [(wx.ACCEL_CTRL, ord('T'), self.addPageId),
(wx.ACCEL_CMD, ord('T'), self.addPageId),
@@ -416,10 +418,12 @@ class MainFrame(wx.Frame):
(wx.ACCEL_CTRL, ord('2'), self.additionstab2),
(wx.ACCEL_CTRL, ord('3'), self.additionstab3),
(wx.ACCEL_CTRL, ord('4'), self.additionstab4),
(wx.ACCEL_CTRL, ord('5'), self.additionstab5),
(wx.ACCEL_CMD, ord('1'), self.additionstab1),
(wx.ACCEL_CMD, ord('2'), self.additionstab2),
(wx.ACCEL_CMD, ord('3'), self.additionstab3),
(wx.ACCEL_CMD, ord('4'), self.additionstab4)
(wx.ACCEL_CMD, ord('4'), self.additionstab4),
(wx.ACCEL_CMD, ord('5'), self.additionstab5)
]
atable = wx.AcceleratorTable(actb)
self.SetAcceleratorTable(atable)
@@ -434,7 +438,8 @@ class MainFrame(wx.Frame):
selTab = 2
if event.GetId() == self.additionstab4:
selTab = 3
if event.GetId() == self.additionstab5:
selTab = 4
if selTab is not None:
self.additionsPane.notebook.SetSelection(selTab)

View File

@@ -33,7 +33,6 @@ class MainMenuBar(wx.MenuBar):
self.exportSkillsNeededId = wx.NewId()
self.importCharacterId = wx.NewId()
self.exportHtmlId = wx.NewId()
self.preferencesId = wx.NewId()
self.wikiId = wx.NewId()
self.forumId = wx.NewId()
@@ -59,7 +58,6 @@ class MainMenuBar(wx.MenuBar):
fileMenu.AppendSeparator()
fileMenu.Append(wx.ID_EXIT)
# Edit menu
editMenu = wx.Menu()
self.Append(editMenu, "&Edit")
@@ -67,7 +65,6 @@ class MainMenuBar(wx.MenuBar):
#editMenu.Append(wx.ID_UNDO)
#editMenu.Append(wx.ID_REDO)
copyText = "&To Clipboard" + ("\tCTRL+C" if 'wxMSW' in wx.PlatformInfo else "")
pasteText = "&From Clipboard" + ("\tCTRL+V" if 'wxMSW' in wx.PlatformInfo else "")
editMenu.Append(wx.ID_COPY, copyText, "Export a fit to the clipboard")
@@ -89,13 +86,9 @@ class MainMenuBar(wx.MenuBar):
graphFrameItem.SetBitmap(bitmapLoader.getBitmap("graphs_small", "icons"))
windowMenu.AppendItem(graphFrameItem)
#=======================================================================
# DISABLED FOR RC2 Release
#
preferencesItem = wx.MenuItem(windowMenu, self.preferencesId, "Preferences\tCTRL+P")
preferencesItem = wx.MenuItem(windowMenu, wx.ID_PREFERENCES, "Preferences\tCTRL+P")
preferencesItem.SetBitmap(bitmapLoader.getBitmap("preferences_small", "icons"))
windowMenu.AppendItem(preferencesItem)
#=======================================================================
# Help menu
helpMenu = wx.Menu()
@@ -108,8 +101,6 @@ class MainMenuBar(wx.MenuBar):
if config.debug:
helpMenu.Append( self.mainFrame.widgetInspectMenuID, "Open Widgets Inspect tool", "Open Widgets Inspect tool")
self.mainFrame.Bind(GE.FIT_CHANGED, self.fitChanged)
def fitChanged(self, event):