diff --git a/gui/Gui/Attackwindow.py b/gui/Gui/Attackwindow.py index 39b9f06..24962cc 100644 --- a/gui/Gui/Attackwindow.py +++ b/gui/Gui/Attackwindow.py @@ -248,6 +248,13 @@ class AttackWindow(wx.Frame): # reasons. self.fit = False + aTable = wx.AcceleratorTable([ + (wx.ACCEL_CTRL, ord('W'), wx.ID_CLOSE), + (wx.ACCEL_NORMAL, wx.WXK_ESCAPE, wx.ID_CLOSE), + ]) + self.SetAcceleratorTable(aTable) + self.Bind(wx.EVT_CLOSE, self.onCloseWindow) + self.Bind(wx.EVT_MENU, self.onCloseWindow, id=wx.ID_CLOSE) self.CreateInteriorWindowComponents() Icon.ScytherIcon(self) @@ -326,5 +333,8 @@ class AttackWindow(wx.Frame): self.update(True) self.Refresh() + def onCloseWindow(self,evt): + self.Destroy() + #--------------------------------------------------------------------------- # vim: set ts=4 sw=4 et list lcs=tab\:>-: diff --git a/gui/Gui/Mainwindow.py b/gui/Gui/Mainwindow.py index 70ce112..ff927b1 100644 --- a/gui/Gui/Mainwindow.py +++ b/gui/Gui/Mainwindow.py @@ -84,6 +84,7 @@ class MainWindow(wx.Frame): aTable = wx.AcceleratorTable([ (wx.ACCEL_CTRL, ord('Q'), wx.ID_EXIT), + (wx.ACCEL_CTRL, ord('W'), wx.ID_EXIT), (wx.ACCEL_NORMAL, wx.WXK_F1, ID_VERIFY), (wx.ACCEL_NORMAL, wx.WXK_F2, diff --git a/gui/Gui/Scytherthread.py b/gui/Gui/Scytherthread.py index 2cd5d1a..5691c44 100644 --- a/gui/Gui/Scytherthread.py +++ b/gui/Gui/Scytherthread.py @@ -263,7 +263,14 @@ class ResultWindow(wx.Frame): self.parent = parent self.thread = None + aTable = wx.AcceleratorTable([ + (wx.ACCEL_CTRL, ord('W'), wx.ID_CLOSE), + (wx.ACCEL_NORMAL, wx.WXK_ESCAPE, wx.ID_CLOSE), + ]) + self.SetAcceleratorTable(aTable) self.Bind(wx.EVT_CLOSE, self.onCloseWindow) + self.Bind(wx.EVT_MENU, self.onCloseWindow, id=wx.ID_CLOSE) + self.CreateStatusBar() self.BuildTable()