UI: replace wxEvtHandler::Connect with wxEvtHandler::Bind

This commit is contained in:
oltolm 2025-06-15 23:55:03 +02:00
parent bb70982685
commit a55932005c
6 changed files with 9 additions and 9 deletions

View file

@ -124,7 +124,7 @@ AudioDebuggerWindow::AudioDebuggerWindow(wxFrame& parent)
sizer->Add(voiceListbox, 1, wxEXPAND | wxBOTTOM, 0);
voiceListbox->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(AudioDebuggerWindow::OnVoiceListRightClick), NULL, this);
voiceListbox->Bind(wxEVT_RIGHT_DOWN, &AudioDebuggerWindow::OnVoiceListRightClick, this);
mainPane->SetSizer(sizer);

View file

@ -382,7 +382,7 @@ void MemorySearcherTool::OnEntryListRightClick(wxDataViewEvent& event)
//mnu.SetClientData(data);
mnu.Append(LIST_ENTRY_ADD, _("&Add new entry"))->Enable(false);
mnu.Append(LIST_ENTRY_REMOVE, _("&Remove entry"));
mnu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemorySearcherTool::OnPopupClick), nullptr, this);
mnu.Bind(wxEVT_COMMAND_MENU_SELECTED, &MemorySearcherTool::OnPopupClick, this);
PopupMenu(&mnu);
}

View file

@ -223,7 +223,7 @@ void BreakpointWindow::OnRightDown(wxMouseEvent& event)
menu.Append(MENU_ID_CREATE_MEM_BP_READ, _("Create memory breakpoint (read)"));
menu.Append(MENU_ID_CREATE_MEM_BP_WRITE, _("Create memory breakpoint (write)"));
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(BreakpointWindow::OnContextMenuClick), nullptr, this);
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &BreakpointWindow::OnContextMenuClick, this);
PopupMenu(&menu);
}
else
@ -234,7 +234,7 @@ void BreakpointWindow::OnRightDown(wxMouseEvent& event)
wxMenu menu;
menu.Append(MENU_ID_DELETE_BP, _("Delete breakpoint"));
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(BreakpointWindow::OnContextMenuClickSelected), nullptr, this);
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &BreakpointWindow::OnContextMenuClickSelected, this);
PopupMenu(&menu);
}
}

View file

@ -239,8 +239,8 @@ void HotkeySettings::CreateHotkeyRow(const wxString& label, sHotkeyCfg& cfgHotke
controllerInput->Bind(wxEVT_BUTTON, &HotkeySettings::OnControllerHotkeyInputLeftClick, this);
/* for cancelling and clearing input */
keyInput->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(HotkeySettings::OnKeyboardHotkeyInputRightClick), NULL, this);
controllerInput->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(HotkeySettings::OnControllerHotkeyInputRightClick), NULL, this);
keyInput->Bind(wxEVT_RIGHT_UP, &HotkeySettings::OnKeyboardHotkeyInputRightClick, this);
controllerInput->Bind(wxEVT_RIGHT_UP, &HotkeySettings::OnControllerHotkeyInputRightClick, this);
keyInput->SetMinSize(m_minButtonSize);
controllerInput->SetMinSize(m_minButtonSize);

View file

@ -124,7 +124,7 @@ DebugPPCThreadsWindow::DebugPPCThreadsWindow(wxFrame& parent)
sizer->Add(row, 0, wxEXPAND | wxALL, 5);
m_thread_list->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(DebugPPCThreadsWindow::OnThreadListRightClick), nullptr, this);
m_thread_list->Bind(wxEVT_RIGHT_DOWN, &DebugPPCThreadsWindow::OnThreadListRightClick, this);
SetSizer(sizer);
@ -466,7 +466,7 @@ void DebugPPCThreadsWindow::OnThreadListRightClick(wxMouseEvent& event)
menu.AppendSeparator();
menu.Append(THREADLIST_MENU_DUMP_STACK_TRACE, _("Write stack trace to log"));
menu.Append(THREADLIST_MENU_PROFILE_THREAD, _("Profile thread"));
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DebugPPCThreadsWindow::OnThreadListPopupClick), nullptr, this);
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &DebugPPCThreadsWindow::OnThreadListPopupClick, this);
PopupMenu(&menu);
}

View file

@ -124,7 +124,7 @@ TextureRelationViewerWindow::TextureRelationViewerWindow(wxFrame& parent)
sizerBottom->Add(checkboxShowViews, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM | wxTOP | wxLEFT, 10);
checkboxShowViews->SetValue(true);
textureRelationListA->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(TextureRelationViewerWindow::OnTextureListRightClick), NULL, this);
textureRelationListA->Bind(wxEVT_RIGHT_DOWN, &TextureRelationViewerWindow::OnTextureListRightClick, this);
sizer->Add(
sizerBottom,