X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fded56b375bf7a4687af1cdb182899614c1b2a8..7ea515abfb0211078d9ffcd4420ef0b53f3fcabe:/wxPython/src/_extras.py diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index 1cc71d3a8b..0c6ab0c90f 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -41,6 +41,12 @@ def EVT_SIZE(win, func): def EVT_MOVE(win, func): win.Connect(-1, -1, wxEVT_MOVE, func) +def EVT_SIZING(win, func): + win.Connect(-1, -1, wxEVT_SIZING, func) + +def EVT_MOVING(win, func): + win.Connect(-1, -1, wxEVT_MOVING, func) + def EVT_CLOSE(win, func): win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) @@ -62,6 +68,9 @@ def EVT_KEY_DOWN(win, func): def EVT_KEY_UP(win, func): win.Connect(-1, -1, wxEVT_KEY_UP, func) +def EVT_HOTKEY(win, func): + win.Connect(-1, -1, wxEVT_HOTKEY, func) + def EVT_MENU_OPEN(win, func): win.Connect(-1, -1, wxEVT_MENU_OPEN, func) @@ -467,14 +476,6 @@ def EVT_COMMAND_ENTER(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_ENTER, func) -# wxNotebook events -def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func) - -def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func) - - # wxSpinButton def EVT_SPIN_UP(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) @@ -486,29 +487,6 @@ def EVT_SPIN(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) -# wxTaskBarIcon -def EVT_TASKBAR_MOVE(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func) - -def EVT_TASKBAR_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func) - -def EVT_TASKBAR_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func) - -def EVT_TASKBAR_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func) - -def EVT_TASKBAR_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func) - -def EVT_TASKBAR_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func) - -def EVT_TASKBAR_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) - - # wxSashWindow def EVT_SASH_DRAGGED(win, id, func): win.Connect(id, -1, wxEVT_SASH_DRAGGED, func) @@ -970,6 +948,18 @@ of your Mac.""" if redirect: self.RedirectStdio(filename) + # Set the default handler for SIGINT. This fixes a problem + # where if Ctrl-C is pressed in the console that started this + # app then it will not appear to do anything, (not even send + # KeyboardInterrupt???) but will later segfault on exit. By + # setting the default handler then the app will exit, as + # expected (depending on platform.) + try: + import signal + signal.signal(signal.SIGINT, signal.SIG_DFL) + except: + pass + # this initializes wxWindows and then calls our OnInit _wxStart(self.OnInit) @@ -1005,13 +995,11 @@ of your Mac.""" # change from wxPyApp_ to wxApp_ -wxApp_GetMacDefaultEncodingIsPC = wxc.wxPyApp_GetMacDefaultEncodingIsPC wxApp_GetMacSupportPCMenuShortcuts = wxc.wxPyApp_GetMacSupportPCMenuShortcuts wxApp_GetMacAboutMenuItemId = wxc.wxPyApp_GetMacAboutMenuItemId wxApp_GetMacPreferencesMenuItemId = wxc.wxPyApp_GetMacPreferencesMenuItemId wxApp_GetMacExitMenuItemId = wxc.wxPyApp_GetMacExitMenuItemId wxApp_GetMacHelpMenuTitleName = wxc.wxPyApp_GetMacHelpMenuTitleName -wxApp_SetMacDefaultEncodingIsPC = wxc.wxPyApp_SetMacDefaultEncodingIsPC wxApp_SetMacSupportPCMenuShortcuts = wxc.wxPyApp_SetMacSupportPCMenuShortcuts wxApp_SetMacAboutMenuItemId = wxc.wxPyApp_SetMacAboutMenuItemId wxApp_SetMacPreferencesMenuItemId = wxc.wxPyApp_SetMacPreferencesMenuItemId