Replace all of Connect/Disconnect with Bind/Unbind.

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

View file

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