1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-08 20:52:09 +01:00

Rewrite many calls to Connect() with Bind()...

... it's the more modern way, and does better type checking, without the
dubious casts of pointers-to-member-functions.
This commit is contained in:
Paul Licameli
2018-02-12 16:45:54 -05:00
parent bf5228267a
commit 2f3604bdea
12 changed files with 88 additions and 132 deletions

View File

@@ -125,37 +125,29 @@ void DeviceToolBar::Populate()
mHost->Connect(wxEVT_SET_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mHost->Bind(wxEVT_SET_FOCUS,
&DeviceToolBar::OnFocus,
this);
mHost->Connect(wxEVT_KILL_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mHost->Bind(wxEVT_KILL_FOCUS,
&DeviceToolBar::OnFocus,
this);
mOutput->Connect(wxEVT_SET_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mOutput->Bind(wxEVT_SET_FOCUS,
&DeviceToolBar::OnFocus,
this);
mOutput->Connect(wxEVT_KILL_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mOutput->Bind(wxEVT_KILL_FOCUS,
&DeviceToolBar::OnFocus,
this);
mInput->Connect(wxEVT_SET_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mInput->Bind(wxEVT_SET_FOCUS,
&DeviceToolBar::OnFocus,
this);
mInput->Connect(wxEVT_KILL_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mInput->Bind(wxEVT_KILL_FOCUS,
&DeviceToolBar::OnFocus,
this);
mInputChannels->Connect(wxEVT_SET_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mInputChannels->Bind(wxEVT_SET_FOCUS,
&DeviceToolBar::OnFocus,
this);
mInputChannels->Connect(wxEVT_KILL_FOCUS,
wxFocusEventHandler(DeviceToolBar::OnFocus),
NULL,
mInputChannels->Bind(wxEVT_KILL_FOCUS,
&DeviceToolBar::OnFocus,
this);
SetNames();