Replace all of Connect/Disconnect with Bind/Unbind.

This commit is contained in:
Jordan Woyak
2013-01-13 12:07:45 -06:00
parent 60a73bcd77
commit 70427b3f35
13 changed files with 68 additions and 119 deletions

View File

@ -56,9 +56,7 @@ void HotkeyConfigDialog::SaveButtonMapping(int Id, int Key, int Modkey)
void HotkeyConfigDialog::EndGetButtons(void)
{
wxTheApp->Disconnect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
wxKeyEventHandler(HotkeyConfigDialog::OnKeyDown),
(wxObject*)0, this);
wxTheApp->Unbind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this);
m_ButtonMappingTimer->Stop();
GetButtonWaitingTimer = 0;
GetButtonWaitingID = 0;
@ -153,9 +151,7 @@ void HotkeyConfigDialog::OnButtonClick(wxCommandEvent& event)
if (m_ButtonMappingTimer->IsRunning()) return;
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
wxKeyEventHandler(HotkeyConfigDialog::OnKeyDown),
(wxObject*)0, this);
wxTheApp->Bind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this);
// Get the button
ClickedButton = (wxButton *)event.GetEventObject();