Use Bind() instead of Connect() in wxWidgets code

Use more modern function which allows to avoid wxXXXEventHandler()
macros use.

No real changes.
This commit is contained in:
Vadim Zeitlin
2018-05-28 22:10:56 +02:00
parent 8c8ff2c24d
commit d4f380e16e
48 changed files with 168 additions and 363 deletions

View File

@@ -256,8 +256,7 @@ wxTaskBarIcon::~wxTaskBarIcon()
{
if (m_iconWnd)
{
m_iconWnd->Disconnect(wxEVT_DESTROY,
wxWindowDestroyEventHandler(wxTaskBarIcon::OnDestroy), NULL, this);
m_iconWnd->Unbind(wxEVT_DESTROY, &wxTaskBarIcon::OnDestroy, this);
RemoveIcon();
}
}
@@ -290,9 +289,7 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
m_iconWnd = new wxTaskBarIconArea(this, bmp);
if (m_iconWnd->IsOk())
{
m_iconWnd->Connect(wxEVT_DESTROY,
wxWindowDestroyEventHandler(wxTaskBarIcon::OnDestroy),
NULL, this);
m_iconWnd->Bind(wxEVT_DESTROY, &wxTaskBarIcon::OnDestroy, this);
m_iconWnd->Show();
}
else