From 90df5efd01782847f6427efa552b4a2a5a007413 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 17 May 2014 12:49:00 -0400 Subject: [PATCH] Get rid of old wx event type usages. Use recommended replacements --- Source/Core/DolphinWX/CheatsWindow.cpp | 22 +++--- Source/Core/DolphinWX/ConfigMain.cpp | 4 +- .../DolphinWX/Debugger/BreakpointWindow.cpp | 12 ++-- Source/Core/DolphinWX/FifoPlayerDlg.cpp | 68 +++++++++---------- Source/Core/DolphinWX/Frame.cpp | 2 +- Source/Core/DolphinWX/GeckoCodeDiag.cpp | 6 +- Source/Core/DolphinWX/HotkeyDlg.cpp | 3 +- Source/Core/DolphinWX/InputConfigDiag.cpp | 54 +++++++-------- Source/Core/DolphinWX/LogConfigWindow.cpp | 14 ++-- Source/Core/DolphinWX/NetWindow.cpp | 30 ++++---- Source/Core/DolphinWX/UDPConfigDiag.cpp | 14 ++-- Source/Core/DolphinWX/VideoConfigDiag.cpp | 18 ++--- Source/Core/DolphinWX/WiimoteConfigDiag.cpp | 24 +++---- 13 files changed, 135 insertions(+), 136 deletions(-) diff --git a/Source/Core/DolphinWX/CheatsWindow.cpp b/Source/Core/DolphinWX/CheatsWindow.cpp index c89e16ffab..e2b1167999 100644 --- a/Source/Core/DolphinWX/CheatsWindow.cpp +++ b/Source/Core/DolphinWX/CheatsWindow.cpp @@ -88,8 +88,8 @@ void wxCheatsWindow::Init_ChildControls() m_Tab_Cheats = new wxPanel(m_Notebook_Main, wxID_ANY); m_CheckListBox_CheatsList = new wxCheckListBox(m_Tab_Cheats, wxID_ANY, wxDefaultPosition, wxSize(300, 0), m_CheatStringList, wxLB_HSCROLL, wxDefaultValidator); - m_CheckListBox_CheatsList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &wxCheatsWindow::OnEvent_CheatsList_ItemSelected, this); - m_CheckListBox_CheatsList->Bind(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, &wxCheatsWindow::OnEvent_CheatsList_ItemToggled, this); + m_CheckListBox_CheatsList->Bind(wxEVT_LISTBOX, &wxCheatsWindow::OnEvent_CheatsList_ItemSelected, this); + m_CheckListBox_CheatsList->Bind(wxEVT_CHECKLISTBOX, &wxCheatsWindow::OnEvent_CheatsList_ItemToggled, this); m_Label_Codename = new wxStaticText(m_Tab_Cheats, wxID_ANY, _("Name: ")); m_GroupBox_Info = new wxStaticBox(m_Tab_Cheats, wxID_ANY, _("Code Info")); @@ -115,10 +115,10 @@ void wxCheatsWindow::Init_ChildControls() m_Tab_Log = new wxPanel(m_Notebook_Main, wxID_ANY); wxButton* const button_updatelog = new wxButton(m_Tab_Log, wxID_ANY, _("Update")); - button_updatelog->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &wxCheatsWindow::OnEvent_ButtonUpdateLog_Press, this); + button_updatelog->Bind(wxEVT_BUTTON, &wxCheatsWindow::OnEvent_ButtonUpdateLog_Press, this); m_CheckBox_LogAR = new wxCheckBox(m_Tab_Log, wxID_ANY, _("Enable AR Logging")); - m_CheckBox_LogAR->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &wxCheatsWindow::OnEvent_CheckBoxEnableLogging_StateChange, this); + m_CheckBox_LogAR->Bind(wxEVT_CHECKBOX, &wxCheatsWindow::OnEvent_CheckBoxEnableLogging_StateChange, this); m_CheckBox_LogAR->SetValue(ActionReplay::IsSelfLogging()); m_TextCtrl_Log = new wxTextCtrl(m_Tab_Log, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(100, -1), wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP); @@ -142,9 +142,9 @@ void wxCheatsWindow::Init_ChildControls() // Button Strip button_apply = new wxButton(panel, wxID_APPLY, _("Apply")); - button_apply->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &wxCheatsWindow::OnEvent_ApplyChanges_Press, this); + button_apply->Bind(wxEVT_BUTTON, &wxCheatsWindow::OnEvent_ApplyChanges_Press, this); wxButton* const button_cancel = new wxButton(panel, wxID_CANCEL, _("Cancel")); - button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &wxCheatsWindow::OnEvent_ButtonClose_Press, this); + button_cancel->Bind(wxEVT_BUTTON, &wxCheatsWindow::OnEvent_ButtonClose_Press, this); Bind(wxEVT_CLOSE_WINDOW, &wxCheatsWindow::OnEvent_Close, this); @@ -168,11 +168,11 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent) { // first scan button btnInitScan = new wxButton(this, -1, _("New Scan")); - btnInitScan->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CheatSearchTab::StartNewSearch, this); + btnInitScan->Bind(wxEVT_BUTTON, &CheatSearchTab::StartNewSearch, this); // next scan button btnNextScan = new wxButton(this, -1, _("Next Scan")); - btnNextScan->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CheatSearchTab::FilterCheatSearchResults, this); + btnNextScan->Bind(wxEVT_BUTTON, &CheatSearchTab::FilterCheatSearchResults, this); btnNextScan->Disable(); // data size radio buttons @@ -193,7 +193,7 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent) // create AR code button wxButton* const button_cheat_search_copy_address = new wxButton(this, -1, _("Create AR Code")); - button_cheat_search_copy_address->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CheatSearchTab::CreateARCode, this); + button_cheat_search_copy_address->Bind(wxEVT_BUTTON, &CheatSearchTab::CreateARCode, this); // results groupbox wxStaticBoxSizer* const sizer_cheat_search_results = new wxStaticBoxSizer(wxVERTICAL, this, _("Results")); @@ -621,8 +621,8 @@ CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address) sizer_main->Add(textctrl_value, 0, wxALL, 5); sizer_main->Add(CreateButtonSizer(wxOK | wxCANCEL | wxNO_DEFAULT), 0, wxALL, 5); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CreateCodeDialog::PressOK, this, wxID_OK); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CreateCodeDialog::PressCancel, this, wxID_CANCEL); + Bind(wxEVT_BUTTON, &CreateCodeDialog::PressOK, this, wxID_OK); + Bind(wxEVT_BUTTON, &CreateCodeDialog::PressCancel, this, wxID_CANCEL); Bind(wxEVT_CLOSE_WINDOW, &CreateCodeDialog::OnEvent_Close, this); SetSizerAndFit(sizer_main); diff --git a/Source/Core/DolphinWX/ConfigMain.cpp b/Source/Core/DolphinWX/ConfigMain.cpp index 82fd59fdeb..3598f1f2f3 100644 --- a/Source/Core/DolphinWX/ConfigMain.cpp +++ b/Source/Core/DolphinWX/ConfigMain.cpp @@ -629,7 +629,7 @@ void CConfigMain::CreateGUIControls() theme_selection->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name)); // std::function = avoid error on msvc - theme_selection->Bind(wxEVT_COMMAND_CHOICE_SELECTED, std::function([theme_selection](wxEvent&) + theme_selection->Bind(wxEVT_CHOICE, std::function([theme_selection](wxEvent&) { SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name = WxStrToStr(theme_selection->GetStringSelection()); main_frame->InitBitmaps(); @@ -662,7 +662,7 @@ void CConfigMain::CreateGUIControls() BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition, wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString); Latency = new wxSpinCtrl(AudioPage, ID_LATENCY, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 30); - Latency->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &CConfigMain::AudioSettingsChanged, this); + Latency->Bind(wxEVT_SPINCTRL, &CConfigMain::AudioSettingsChanged, this); if (Core::GetState() != Core::CORE_UNINITIALIZED) { diff --git a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp index 1fa0183cdb..5f05285161 100644 --- a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp @@ -50,26 +50,26 @@ public: m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24)); AddTool(ID_DELETE, wxT("Delete"), m_Bitmaps[Toolbar_Delete]); - Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::OnDelete, parent, ID_DELETE); + Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE); AddTool(ID_CLEAR, wxT("Clear"), m_Bitmaps[Toolbar_Delete]); - Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::OnClear, parent, ID_CLEAR); + Bind(wxEVT_TOOL, &CBreakPointWindow::OnClear, parent, ID_CLEAR); AddTool(ID_ADDBP, wxT("+BP"), m_Bitmaps[Toolbar_Add_BP]); - Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::OnAddBreakPoint, parent, ID_ADDBP); + Bind(wxEVT_TOOL, &CBreakPointWindow::OnAddBreakPoint, parent, ID_ADDBP); // Add memory breakpoints if you can use them if (Memory::AreMemoryBreakpointsActivated()) { AddTool(ID_ADDMC, wxT("+MC"), m_Bitmaps[Toolbar_Add_MC]); - Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::OnAddMemoryCheck, parent, ID_ADDMC); + Bind(wxEVT_TOOL, &CBreakPointWindow::OnAddMemoryCheck, parent, ID_ADDMC); } AddTool(ID_LOAD, wxT("Load"), m_Bitmaps[Toolbar_Delete]); - Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::LoadAll, parent, ID_LOAD); + Bind(wxEVT_TOOL, &CBreakPointWindow::LoadAll, parent, ID_LOAD); AddTool(ID_SAVE, wxT("Save"), m_Bitmaps[Toolbar_Delete]); - Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::Event_SaveAll, parent, ID_SAVE); + Bind(wxEVT_TOOL, &CBreakPointWindow::Event_SaveAll, parent, ID_SAVE); } private: diff --git a/Source/Core/DolphinWX/FifoPlayerDlg.cpp b/Source/Core/DolphinWX/FifoPlayerDlg.cpp index 0159798c1d..fc163389da 100644 --- a/Source/Core/DolphinWX/FifoPlayerDlg.cpp +++ b/Source/Core/DolphinWX/FifoPlayerDlg.cpp @@ -76,19 +76,19 @@ FifoPlayerDlg::~FifoPlayerDlg() // Disconnect Events Unbind(wxEVT_PAINT, &FifoPlayerDlg::OnPaint, this); - m_FrameFromCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameFrom, this); - m_FrameToCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameTo, this); - m_ObjectFromCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectFrom, this); - m_ObjectToCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectTo, this); - m_EarlyMemoryUpdates->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this); - m_RecordStop->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnRecordStop, this); - m_Save->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnSaveFile, this); - m_FramesToRecordCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnNumFramesToRecord, this); - m_Close->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnCloseClick, this); + m_FrameFromCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameFrom, this); + m_FrameToCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameTo, this); + m_ObjectFromCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectFrom, this); + m_ObjectToCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectTo, this); + m_EarlyMemoryUpdates->Unbind(wxEVT_CHECKBOX, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this); + m_RecordStop->Unbind(wxEVT_BUTTON, &FifoPlayerDlg::OnRecordStop, this); + m_Save->Unbind(wxEVT_BUTTON, &FifoPlayerDlg::OnSaveFile, this); + m_FramesToRecordCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnNumFramesToRecord, this); + m_Close->Unbind(wxEVT_BUTTON, &FifoPlayerDlg::OnCloseClick, this); - m_framesList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnFrameListSelectionChanged, this); - m_objectsList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectListSelectionChanged, this); - m_objectCmdList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this); + m_framesList->Unbind(wxEVT_LISTBOX, &FifoPlayerDlg::OnFrameListSelectionChanged, this); + m_objectsList->Unbind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectListSelectionChanged, this); + m_objectCmdList->Unbind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this); FifoPlayer::GetInstance().SetFrameWrittenCallback(nullptr); @@ -321,33 +321,33 @@ void FifoPlayerDlg::CreateGUIControls() // Connect Events Bind(wxEVT_PAINT, &FifoPlayerDlg::OnPaint, this); - m_FrameFromCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameFrom, this); - m_FrameToCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameTo, this); - m_ObjectFromCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectFrom, this); - m_ObjectToCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectTo, this); - m_EarlyMemoryUpdates->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this); - m_RecordStop->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnRecordStop, this); - m_Save->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnSaveFile, this); - m_FramesToRecordCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnNumFramesToRecord, this); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnCloseClick, this); + m_FrameFromCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameFrom, this); + m_FrameToCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameTo, this); + m_ObjectFromCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectFrom, this); + m_ObjectToCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectTo, this); + m_EarlyMemoryUpdates->Bind(wxEVT_CHECKBOX, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this); + m_RecordStop->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnRecordStop, this); + m_Save->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnSaveFile, this); + m_FramesToRecordCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnNumFramesToRecord, this); + Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnCloseClick, this); - m_framesList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnFrameListSelectionChanged, this); - m_objectsList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectListSelectionChanged, this); - m_objectCmdList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this); + m_framesList->Bind(wxEVT_LISTBOX, &FifoPlayerDlg::OnFrameListSelectionChanged, this); + m_objectsList->Bind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectListSelectionChanged, this); + m_objectCmdList->Bind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this); - m_beginSearch->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnBeginSearch, this); - m_findNext->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnFindNextClick, this); - m_findPrevious->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnFindPreviousClick, this); + m_beginSearch->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnBeginSearch, this); + m_findNext->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnFindNextClick, this); + m_findPrevious->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnFindPreviousClick, this); - m_searchField->Bind(wxEVT_COMMAND_TEXT_ENTER, &FifoPlayerDlg::OnBeginSearch, this); - m_searchField->Bind(wxEVT_COMMAND_TEXT_UPDATED, &FifoPlayerDlg::OnSearchFieldTextChanged, this); + m_searchField->Bind(wxEVT_TEXT_ENTER, &FifoPlayerDlg::OnBeginSearch, this); + m_searchField->Bind(wxEVT_TEXT, &FifoPlayerDlg::OnSearchFieldTextChanged, this); // Setup command copying wxAcceleratorEntry entry; entry.Set(wxACCEL_CTRL, (int)'C', wxID_COPY); wxAcceleratorTable accel(1, &entry); m_objectCmdList->SetAcceleratorTable(accel); - m_objectCmdList->Bind(wxEVT_COMMAND_MENU_SELECTED, &FifoPlayerDlg::OnObjectCmdListSelectionCopy, this, wxID_COPY); + m_objectCmdList->Bind(wxEVT_MENU, &FifoPlayerDlg::OnObjectCmdListSelectionCopy, this, wxID_COPY); Bind(RECORDING_FINISHED_EVENT, &FifoPlayerDlg::OnRecordingFinished, this); Bind(FRAME_WRITTEN_EVENT, &FifoPlayerDlg::OnFrameWritten, this); @@ -583,7 +583,7 @@ void FifoPlayerDlg::ChangeSearchResult(unsigned int result_idx) m_objectsList->SetSelection(search_results[result_idx].obj_idx); m_objectCmdList->SetSelection(search_results[result_idx].cmd_idx); - wxCommandEvent ev(wxEVT_COMMAND_LISTBOX_SELECTED); + wxCommandEvent ev(wxEVT_LISTBOX); if (prev_frame != m_framesList->GetSelection()) { ev.SetInt(m_framesList->GetSelection()); @@ -631,7 +631,7 @@ void FifoPlayerDlg::OnFrameListSelectionChanged(wxCommandEvent& event) } // Update object list - wxCommandEvent ev = wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED); + wxCommandEvent ev = wxCommandEvent(wxEVT_LISTBOX); ev.SetInt(-1); OnObjectListSelectionChanged(ev); @@ -762,7 +762,7 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event) } } // Update command list - wxCommandEvent ev = wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED); + wxCommandEvent ev = wxCommandEvent(wxEVT_LISTBOX); ev.SetInt(-1); OnObjectCmdListSelectionChanged(ev); @@ -891,7 +891,7 @@ void FifoPlayerDlg::UpdateAnalyzerGui() m_framesList->Append(wxString::Format("Frame %u", (u32)i)); } - wxCommandEvent ev = wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED); + wxCommandEvent ev = wxCommandEvent(wxEVT_LISTBOX); ev.SetInt(-1); OnFrameListSelectionChanged(ev); } diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 26627d2340..dbc1b716cf 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -966,7 +966,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event) int cmd = GetCmdForHotkey(i); if (cmd >= 0) { - wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, cmd); + wxCommandEvent evt(wxEVT_MENU, cmd); wxMenuItem *item = GetMenuBar()->FindItem(cmd); if (item && item->IsCheckable()) { diff --git a/Source/Core/DolphinWX/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/GeckoCodeDiag.cpp index 6a92db2bbd..3e91852b16 100644 --- a/Source/Core/DolphinWX/GeckoCodeDiag.cpp +++ b/Source/Core/DolphinWX/GeckoCodeDiag.cpp @@ -42,8 +42,8 @@ CodeConfigPanel::CodeConfigPanel(wxWindow* const parent) : wxPanel(parent, -1) { m_listbox_gcodes = new wxCheckListBox(this, -1); - m_listbox_gcodes->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &CodeConfigPanel::UpdateInfoBox, this); - m_listbox_gcodes->Bind(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, &CodeConfigPanel::ToggleCode, this); + m_listbox_gcodes->Bind(wxEVT_LISTBOX, &CodeConfigPanel::UpdateInfoBox, this); + m_listbox_gcodes->Bind(wxEVT_CHECKLISTBOX, &CodeConfigPanel::ToggleCode, this); m_infobox.label_name = new wxStaticText(this, -1, wxGetTranslation(wxstr_name)); m_infobox.label_creator = new wxStaticText(this, -1, wxGetTranslation(wxstr_creator)); @@ -65,7 +65,7 @@ CodeConfigPanel::CodeConfigPanel(wxWindow* const parent) wxBoxSizer* const sizer_buttons = new wxBoxSizer(wxHORIZONTAL); btn_download = new wxButton(this, -1, _("Download Codes (WiiRD Database)"), wxDefaultPosition, wxSize(128, -1)); btn_download->Enable(false); - btn_download->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CodeConfigPanel::DownloadCodes, this); + btn_download->Bind(wxEVT_BUTTON, &CodeConfigPanel::DownloadCodes, this); sizer_buttons->AddStretchSpacer(1); sizer_buttons->Add(btn_download, 1, wxEXPAND); diff --git a/Source/Core/DolphinWX/HotkeyDlg.cpp b/Source/Core/DolphinWX/HotkeyDlg.cpp index d990ac1f21..7aae86eb70 100644 --- a/Source/Core/DolphinWX/HotkeyDlg.cpp +++ b/Source/Core/DolphinWX/HotkeyDlg.cpp @@ -30,8 +30,7 @@ class wxWindow; BEGIN_EVENT_TABLE(HotkeyConfigDialog,wxDialog) - EVT_COMMAND_RANGE(0, NUM_HOTKEYS - 1, - wxEVT_COMMAND_BUTTON_CLICKED, HotkeyConfigDialog::OnButtonClick) + EVT_COMMAND_RANGE(0, NUM_HOTKEYS - 1, wxEVT_BUTTON, HotkeyConfigDialog::OnButtonClick) EVT_TIMER(wxID_ANY, HotkeyConfigDialog::OnButtonTimer) END_EVENT_TABLE() diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp index ef38ca53cb..a6aeed9f96 100644 --- a/Source/Core/DolphinWX/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/InputConfigDiag.cpp @@ -153,8 +153,8 @@ ControlDialog::ControlDialog(GamepadPage* const parent, InputPlugin& plugin, Con //device_cbox = new wxComboBox(this, -1, StrToWxStr(ref->device_qualifier.ToString()), wxDefaultPosition, wxSize(256,-1), parent->device_cbox->GetStrings(), wxTE_PROCESS_ENTER); device_cbox = new wxComboBox(this, -1, StrToWxStr(m_devq.ToString()), wxDefaultPosition, wxSize(256,-1), parent->device_cbox->GetStrings(), wxTE_PROCESS_ENTER); - device_cbox->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &ControlDialog::SetDevice, this); - device_cbox->Bind(wxEVT_COMMAND_TEXT_ENTER, &ControlDialog::SetDevice, this); + device_cbox->Bind(wxEVT_COMBOBOX, &ControlDialog::SetDevice, this); + device_cbox->Bind(wxEVT_TEXT_ENTER, &ControlDialog::SetDevice, this); wxStaticBoxSizer* const control_chooser = CreateControlChooser(parent); @@ -570,13 +570,13 @@ wxStaticBoxSizer* ControlDialog::CreateControlChooser(GamepadPage* const parent) wxButton* const clear_button = new wxButton(this, -1, _("Clear")); wxButton* const select_button = new wxButton(this, -1, _("Select")); - select_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ControlDialog::SetSelectedControl, this); + select_button->Bind(wxEVT_BUTTON, &ControlDialog::SetSelectedControl, this); wxButton* const not_button = new wxButton(this, -1, _("! NOT")); - not_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ControlDialog::AppendControl, this); + not_button->Bind(wxEVT_BUTTON, &ControlDialog::AppendControl, this); wxButton* const or_button = new wxButton(this, -1, _("| OR")); - or_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ControlDialog::AppendControl, this); + or_button->Bind(wxEVT_BUTTON, &ControlDialog::AppendControl, this); control_lbox = new wxListBox(this, -1, wxDefaultPosition, wxSize(-1, 64)); @@ -591,8 +591,8 @@ wxStaticBoxSizer* ControlDialog::CreateControlChooser(GamepadPage* const parent) wxButton* const and_button = new wxButton(this, -1, _("&& AND")); wxButton* const add_button = new wxButton(this, -1, _("+ ADD")); - and_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ControlDialog::AppendControl, this); - add_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ControlDialog::AppendControl, this); + and_button->Bind(wxEVT_BUTTON, &ControlDialog::AppendControl, this); + add_button->Bind(wxEVT_BUTTON, &ControlDialog::AppendControl, this); button_sizer->Add(and_button, 1, 0, 5); button_sizer->Add(not_button, 1, 0, 5); @@ -603,8 +603,8 @@ wxStaticBoxSizer* ControlDialog::CreateControlChooser(GamepadPage* const parent) range_slider->SetValue((int)(control_reference->range * SLIDER_TICK_COUNT)); - detect_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ControlDialog::DetectControl, this); - clear_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ControlDialog::ClearControl, this); + detect_button->Bind(wxEVT_BUTTON, &ControlDialog::DetectControl, this); + clear_button->Bind(wxEVT_BUTTON, &ControlDialog::ClearControl, this); range_slider->Bind(wxEVT_SCROLL_CHANGED, &GamepadPage::AdjustControlOption, parent); wxStaticText* const range_label = new wxStaticText(this, -1, _("Range")); @@ -763,12 +763,12 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin if (control->control_ref->is_input) { control_button->SetToolTip(_("Left-click to detect input.\nMiddle-click to clear.\nRight-click for more options.")); - control_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::DetectControl, eventsink); + control_button->Bind(wxEVT_BUTTON, &GamepadPage::DetectControl, eventsink); } else { control_button->SetToolTip(_("Left/Right-click for more options.\nMiddle-click to clear.")); - control_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::ConfigControl, eventsink); + control_button->Bind(wxEVT_BUTTON, &GamepadPage::ConfigControl, eventsink); } control_button->Bind(wxEVT_MIDDLE_DOWN, &GamepadPage::ClearControl, eventsink); @@ -801,7 +801,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin for (auto& groupSetting : group->settings) { PadSettingSpin* setting = new PadSettingSpin(parent, groupSetting.get()); - setting->wxcontrol->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &GamepadPage::AdjustSetting, eventsink); + setting->wxcontrol->Bind(wxEVT_SPINCTRL, &GamepadPage::AdjustSetting, eventsink); options.push_back(setting); szr->Add(new wxStaticText(parent, -1, wxGetTranslation(StrToWxStr(groupSetting->name)))); szr->Add(setting->wxcontrol, 0, wxLEFT, 0); @@ -822,7 +822,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin static_bitmap = new wxStaticBitmap(parent, -1, bitmap, wxDefaultPosition, wxDefaultSize, wxBITMAP_TYPE_BMP); PadSettingSpin* const threshold_cbox = new PadSettingSpin(parent, group->settings[0].get()); - threshold_cbox->wxcontrol->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &GamepadPage::AdjustSetting, eventsink); + threshold_cbox->wxcontrol->Bind(wxEVT_SPINCTRL, &GamepadPage::AdjustSetting, eventsink); threshold_cbox->wxcontrol->SetToolTip(_("Adjust the analog control pressure required to activate buttons.")); @@ -858,7 +858,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin for (auto& groupSetting : group->settings) { PadSettingSpin* setting = new PadSettingSpin(parent, groupSetting.get()); - setting->wxcontrol->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &GamepadPage::AdjustSetting, eventsink); + setting->wxcontrol->Bind(wxEVT_SPINCTRL, &GamepadPage::AdjustSetting, eventsink); options.push_back(setting); wxBoxSizer* const szr = new wxBoxSizer(wxHORIZONTAL); szr->Add(new wxStaticText(parent, -1, wxGetTranslation(StrToWxStr(groupSetting->name))), 0, wxCENTER|wxRIGHT, 3); @@ -876,8 +876,8 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin options.push_back(attachments); - attachments->wxcontrol->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &GamepadPage::AdjustSetting, eventsink); - configure_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::ConfigExtension, eventsink); + attachments->wxcontrol->Bind(wxEVT_CHOICE, &GamepadPage::AdjustSetting, eventsink); + configure_btn->Bind(wxEVT_BUTTON, &GamepadPage::ConfigExtension, eventsink); Add(attachments->wxcontrol, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND, 3); Add(configure_btn, 0, wxALL|wxEXPAND, 3); @@ -886,7 +886,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin case GROUP_TYPE_UDPWII: { wxButton* const btn = new UDPConfigButton(parent, (UDPWrapper*)group); - btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::ConfigUDPWii, eventsink); + btn->Bind(wxEVT_BUTTON, &GamepadPage::ConfigUDPWii, eventsink); Add(btn, 0, wxALL|wxEXPAND, 3); } break; @@ -896,7 +896,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin for (auto& groupSetting : group->settings) { PadSettingCheckBox* setting_cbox = new PadSettingCheckBox(parent, groupSetting->value, groupSetting->name); - setting_cbox->wxcontrol->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &GamepadPage::AdjustSetting, eventsink); + setting_cbox->wxcontrol->Bind(wxEVT_CHECKBOX, &GamepadPage::AdjustSetting, eventsink); options.push_back(setting_cbox); Add(setting_cbox->wxcontrol, 0, wxALL|wxLEFT, 5); @@ -968,9 +968,9 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i wxButton* refresh_button = new wxButton(this, -1, _("Refresh"), wxDefaultPosition, wxSize(60,-1)); - device_cbox->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &GamepadPage::SetDevice, this); - device_cbox->Bind(wxEVT_COMMAND_TEXT_ENTER, &GamepadPage::SetDevice, this); - refresh_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::RefreshDevices, this); + device_cbox->Bind(wxEVT_COMBOBOX, &GamepadPage::SetDevice, this); + device_cbox->Bind(wxEVT_TEXT_ENTER, &GamepadPage::SetDevice, this); + refresh_button->Bind(wxEVT_BUTTON, &GamepadPage::RefreshDevices, this); device_sbox->Add(device_cbox, 1, wxLEFT|wxRIGHT, 3); device_sbox->Add(refresh_button, 0, wxRIGHT|wxBOTTOM, 3); @@ -982,8 +982,8 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i clear_sbox->Add(default_button, 1, wxLEFT, 3); clear_sbox->Add(clearall_button, 1, wxRIGHT, 3); - clearall_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::ClearAll, this); - default_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::LoadDefaults, this); + clearall_button->Bind(wxEVT_BUTTON, &GamepadPage::ClearAll, this); + default_button->Bind(wxEVT_BUTTON, &GamepadPage::LoadDefaults, this); profile_cbox = new wxComboBox(this, -1, wxT(""), wxDefaultPosition, wxSize(64,-1)); @@ -991,9 +991,9 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i wxButton* const psave_btn = new wxButton(this, -1, _("Save"), wxDefaultPosition, wxSize(48,-1)); wxButton* const pdelete_btn = new wxButton(this, -1, _("Delete"), wxDefaultPosition, wxSize(60,-1)); - pload_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::LoadProfile, this); - psave_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::SaveProfile, this); - pdelete_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GamepadPage::DeleteProfile, this); + pload_btn->Bind(wxEVT_BUTTON, &GamepadPage::LoadProfile, this); + psave_btn->Bind(wxEVT_BUTTON, &GamepadPage::SaveProfile, this); + pdelete_btn->Bind(wxEVT_BUTTON, &GamepadPage::DeleteProfile, this); profile_sbox->Add(profile_cbox, 1, wxLEFT, 3); profile_sbox->Add(pload_btn, 0, wxLEFT, 3); @@ -1034,7 +1034,7 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputPlugin& plugin UpdateDeviceComboBox(); UpdateProfileComboBox(); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &InputConfigDialog::ClickSave, this, wxID_OK); + Bind(wxEVT_BUTTON, &InputConfigDialog::ClickSave, this, wxID_OK); wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL); szr->Add(m_pad_notebook, 0, wxEXPAND|wxTOP|wxLEFT|wxRIGHT, 5); diff --git a/Source/Core/DolphinWX/LogConfigWindow.cpp b/Source/Core/DolphinWX/LogConfigWindow.cpp index 84c8f026b6..6498668869 100644 --- a/Source/Core/DolphinWX/LogConfigWindow.cpp +++ b/Source/Core/DolphinWX/LogConfigWindow.cpp @@ -57,29 +57,29 @@ void LogConfigWindow::CreateGUIControls() wxLevelsUse.Add(wxLevels[i]); m_verbosity = new wxRadioBox(this, wxID_ANY, _("Verbosity"), wxDefaultPosition, wxDefaultSize, wxLevelsUse, 0, wxRA_SPECIFY_ROWS); - m_verbosity->Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &LogConfigWindow::OnVerbosityChange, this); + m_verbosity->Bind(wxEVT_RADIOBOX, &LogConfigWindow::OnVerbosityChange, this); // Options m_writeFileCB = new wxCheckBox(this, wxID_ANY, _("Write to File")); - m_writeFileCB->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &LogConfigWindow::OnWriteFileChecked, this); + m_writeFileCB->Bind(wxEVT_CHECKBOX, &LogConfigWindow::OnWriteFileChecked, this); m_writeConsoleCB = new wxCheckBox(this, wxID_ANY, _("Write to Console")); - m_writeConsoleCB->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &LogConfigWindow::OnWriteConsoleChecked, this); + m_writeConsoleCB->Bind(wxEVT_CHECKBOX, &LogConfigWindow::OnWriteConsoleChecked, this); m_writeWindowCB = new wxCheckBox(this, wxID_ANY, _("Write to Window")); - m_writeWindowCB->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &LogConfigWindow::OnWriteWindowChecked, this); + m_writeWindowCB->Bind(wxEVT_CHECKBOX, &LogConfigWindow::OnWriteWindowChecked, this); m_writeDebuggerCB = nullptr; #ifdef _MSC_VER if (IsDebuggerPresent()) { m_writeDebuggerCB = new wxCheckBox(this, wxID_ANY, _("Write to Debugger")); - m_writeDebuggerCB->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &LogConfigWindow::OnWriteDebuggerChecked, this); + m_writeDebuggerCB->Bind(wxEVT_CHECKBOX, &LogConfigWindow::OnWriteDebuggerChecked, this); } #endif wxButton *btn_toggle_all = new wxButton(this, wxID_ANY, _("Toggle All Log Types"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); - btn_toggle_all->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LogConfigWindow::OnToggleAll, this); + btn_toggle_all->Bind(wxEVT_BUTTON, &LogConfigWindow::OnToggleAll, this); m_checks = new wxCheckListBox(this, wxID_ANY); - m_checks->Bind(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, &LogConfigWindow::OnLogCheck, this); + m_checks->Bind(wxEVT_CHECKLISTBOX, &LogConfigWindow::OnLogCheck, this); for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++) m_checks->Append(StrToWxStr(m_LogManager->GetFullName((LogTypes::LOG_TYPE)i))); diff --git a/Source/Core/DolphinWX/NetWindow.cpp b/Source/Core/DolphinWX/NetWindow.cpp index e8337e7e1c..c1ca1823cf 100644 --- a/Source/Core/DolphinWX/NetWindow.cpp +++ b/Source/Core/DolphinWX/NetWindow.cpp @@ -126,7 +126,7 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl* m_connect_port_text = new wxTextCtrl(connect_tab, wxID_ANY, StrToWxStr(port)); wxButton* const connect_btn = new wxButton(connect_tab, wxID_ANY, _("Connect")); - connect_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlaySetupDiag::OnJoin, this); + connect_btn->Bind(wxEVT_BUTTON, &NetPlaySetupDiag::OnJoin, this); wxStaticText* const alert_lbl = new wxStaticText(connect_tab, wxID_ANY, _("ALERT:\n\n" @@ -169,10 +169,10 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl* m_host_port_text = new wxTextCtrl(host_tab, wxID_ANY, StrToWxStr(port)); wxButton* const host_btn = new wxButton(host_tab, wxID_ANY, _("Host")); - host_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlaySetupDiag::OnHost, this); + host_btn->Bind(wxEVT_BUTTON, &NetPlaySetupDiag::OnHost, this); m_game_lbox = new wxListBox(host_tab, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT); - m_game_lbox->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &NetPlaySetupDiag::OnHost, this); + m_game_lbox->Bind(wxEVT_LISTBOX_DCLICK, &NetPlaySetupDiag::OnHost, this); FillWithGameNames(m_game_lbox, *game_list); @@ -194,7 +194,7 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl* // bottom row wxButton* const quit_btn = new wxButton(panel, wxID_ANY, _("Quit")); - quit_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlaySetupDiag::OnQuit, this); + quit_btn->Bind(wxEVT_BUTTON, &NetPlaySetupDiag::OnQuit, this); // main sizer wxBoxSizer* const main_szr = new wxBoxSizer(wxVERTICAL); @@ -322,7 +322,7 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game wxDefaultPosition, wxDefaultSize, wxBU_LEFT); if (is_hosting) - m_game_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlayDiag::OnChangeGame, this); + m_game_btn->Bind(wxEVT_BUTTON, &NetPlayDiag::OnChangeGame, this); else m_game_btn->Disable(); @@ -334,10 +334,10 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game m_chat_msg_text = new wxTextCtrl(panel, wxID_ANY, wxEmptyString , wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER); - m_chat_msg_text->Bind(wxEVT_COMMAND_TEXT_ENTER, &NetPlayDiag::OnChat, this); + m_chat_msg_text->Bind(wxEVT_TEXT_ENTER, &NetPlayDiag::OnChat, this); wxButton* const chat_msg_btn = new wxButton(panel, wxID_ANY, _("Send")); - chat_msg_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlayDiag::OnChat, this); + chat_msg_btn->Bind(wxEVT_BUTTON, &NetPlayDiag::OnChat, this); wxBoxSizer* const chat_msg_szr = new wxBoxSizer(wxHORIZONTAL); chat_msg_szr->Add(m_chat_msg_text, 1); @@ -355,7 +355,7 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game if (is_hosting) { wxButton* const player_config_btn = new wxButton(panel, wxID_ANY, _("Configure Pads")); - player_config_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlayDiag::OnConfigPads, this); + player_config_btn->Bind(wxEVT_BUTTON, &NetPlayDiag::OnConfigPads, this); player_szr->Add(player_config_btn, 0, wxEXPAND | wxTOP, 5); } @@ -365,19 +365,19 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game // bottom crap wxButton* const quit_btn = new wxButton(panel, wxID_ANY, _("Quit")); - quit_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlayDiag::OnQuit, this); + quit_btn->Bind(wxEVT_BUTTON, &NetPlayDiag::OnQuit, this); wxBoxSizer* const bottom_szr = new wxBoxSizer(wxHORIZONTAL); if (is_hosting) { m_start_btn = new wxButton(panel, wxID_ANY, _("Start")); - m_start_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlayDiag::OnStart, this); + m_start_btn->Bind(wxEVT_BUTTON, &NetPlayDiag::OnStart, this); bottom_szr->Add(m_start_btn); bottom_szr->Add(new wxStaticText(panel, wxID_ANY, _("Buffer:")), 0, wxLEFT | wxCENTER, 5 ); wxSpinCtrl* const padbuf_spin = new wxSpinCtrl(panel, wxID_ANY, wxT("20") , wxDefaultPosition, wxSize(64, -1), wxSP_ARROW_KEYS, 0, 200, INITIAL_PAD_BUFFER_SIZE); - padbuf_spin->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &NetPlayDiag::OnAdjustBuffer, this); + padbuf_spin->Bind(wxEVT_SPINCTRL, &NetPlayDiag::OnAdjustBuffer, this); bottom_szr->Add(padbuf_spin, 0, wxCENTER); m_memcard_write = new wxCheckBox(panel, wxID_ANY, _("Write memcards (GC)")); @@ -616,12 +616,12 @@ ChangeGameDiag::ChangeGameDiag(wxWindow* const parent, const CGameListCtrl* cons , m_game_name(game_name) { m_game_lbox = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT); - m_game_lbox->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &ChangeGameDiag::OnPick, this); + m_game_lbox->Bind(wxEVT_LISTBOX_DCLICK, &ChangeGameDiag::OnPick, this); FillWithGameNames(m_game_lbox, *game_list); wxButton* const ok_btn = new wxButton(this, wxID_OK, _("Change")); - ok_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &ChangeGameDiag::OnPick, this); + ok_btn->Bind(wxEVT_BUTTON, &ChangeGameDiag::OnPick, this); wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL); szr->Add(m_game_lbox, 1, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 5); @@ -659,7 +659,7 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim 1, wxALIGN_CENTER_HORIZONTAL); m_map_cbox[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names); - m_map_cbox[i]->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &PadMapDiag::OnAdjust, this); + m_map_cbox[i]->Bind(wxEVT_CHOICE, &PadMapDiag::OnAdjust, this); if (m_mapping[i] == -1) m_map_cbox[i]->Select(0); else @@ -680,7 +680,7 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim 1, wxALIGN_CENTER_HORIZONTAL); m_map_cbox[i+4] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names); - m_map_cbox[i+4]->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &PadMapDiag::OnAdjust, this); + m_map_cbox[i+4]->Bind(wxEVT_CHOICE, &PadMapDiag::OnAdjust, this); if (m_wiimapping[i] == -1) m_map_cbox[i+4]->Select(0); else diff --git a/Source/Core/DolphinWX/UDPConfigDiag.cpp b/Source/Core/DolphinWX/UDPConfigDiag.cpp index 2ac63a711d..d1ed2da02e 100644 --- a/Source/Core/DolphinWX/UDPConfigDiag.cpp +++ b/Source/Core/DolphinWX/UDPConfigDiag.cpp @@ -38,13 +38,13 @@ UDPConfigDiag::UDPConfigDiag(wxWindow * const parent, UDPWrapper * _wrp) : port_tbox = new wxTextCtrl(this, wxID_ANY, StrToWxStr(wrp->port)); port_sizer->Add(port_tbox, 1, wxLEFT | wxEXPAND, 5); - enable->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &UDPConfigDiag::ChangeState, this); - butt->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &UDPConfigDiag::ChangeUpdateFlags, this); - accel->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &UDPConfigDiag::ChangeUpdateFlags, this); - point->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &UDPConfigDiag::ChangeUpdateFlags, this); - nun->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &UDPConfigDiag::ChangeUpdateFlags, this); - nunaccel->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &UDPConfigDiag::ChangeUpdateFlags, this); - port_tbox->Bind(wxEVT_COMMAND_TEXT_UPDATED, &UDPConfigDiag::ChangeState, this); + enable->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeState, this); + butt->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); + accel->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); + point->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); + nun->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); + nunaccel->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); + port_tbox->Bind(wxEVT_TEXT, &UDPConfigDiag::ChangeState, this); enable->SetValue(wrp->udpEn); butt->SetValue(wrp->updButt); diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index 6a035a9fb1..782e8049d4 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -51,7 +51,7 @@ SettingCheckBox::BoolSetting(wxWindow* parent, const wxString& label, const wxSt { SetToolTip(tooltip); SetValue(m_setting ^ m_reverse); - Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &SettingCheckBox::UpdateValue, this); + Bind(wxEVT_CHECKBOX, &SettingCheckBox::UpdateValue, this); } template <> @@ -62,7 +62,7 @@ SettingRadioButton::BoolSetting(wxWindow* parent, const wxString& label, const w { SetToolTip(tooltip); SetValue(m_setting ^ m_reverse); - Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &SettingRadioButton::UpdateValue, this); + Bind(wxEVT_RADIOBUTTON, &SettingRadioButton::UpdateValue, this); } SettingChoice::SettingChoice(wxWindow* parent, int &setting, const wxString& tooltip, int num, const wxString choices[], long style) @@ -71,7 +71,7 @@ SettingChoice::SettingChoice(wxWindow* parent, int &setting, const wxString& too { SetToolTip(tooltip); Select(m_setting); - Bind(wxEVT_COMMAND_CHOICE_SELECTED, &SettingChoice::UpdateValue, this); + Bind(wxEVT_CHOICE, &SettingChoice::UpdateValue, this); } void SettingChoice::UpdateValue(wxCommandEvent& ev) @@ -241,7 +241,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con } choice_backend->SetStringSelection(wxGetTranslation(StrToWxStr(g_video_backend->GetDisplayName()))); - choice_backend->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &VideoConfigDiag::Event_Backend, this); + choice_backend->Bind(wxEVT_CHOICE, &VideoConfigDiag::Event_Backend, this); szr_basic->Add(label_backend, 1, wxALIGN_CENTER_VERTICAL, 5); szr_basic->Add(choice_backend, 1, 0, 0); @@ -284,7 +284,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con wxStaticText* const label_display_resolution = new wxStaticText(page_general, wxID_ANY, _("Fullscreen resolution:")); choice_display_resolution = new wxChoice(page_general, wxID_ANY, wxDefaultPosition, wxDefaultSize, res_list); RegisterControl(choice_display_resolution, wxGetTranslation(display_res_desc)); - choice_display_resolution->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &VideoConfigDiag::Event_DisplayResolution, this); + choice_display_resolution->Bind(wxEVT_CHOICE, &VideoConfigDiag::Event_DisplayResolution, this); choice_display_resolution->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution)); @@ -413,7 +413,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con else choice_ppshader->SetStringSelection(StrToWxStr(vconfig.sPostProcessingShader)); - choice_ppshader->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &VideoConfigDiag::Event_PPShader, this); + choice_ppshader->Bind(wxEVT_CHOICE, &VideoConfigDiag::Event_PPShader, this); szr_enh->Add(new wxStaticText(page_enh, -1, _("Post-Processing Effect:")), 1, wxALIGN_CENTER_VERTICAL, 0); szr_enh->Add(choice_ppshader); @@ -478,7 +478,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con // TODO: Use wxSL_MIN_MAX_LABELS or wxSL_VALUE_LABEL with wx 2.9.1 wxSlider* const stc_slider = new wxSlider(page_hacks, wxID_ANY, 0, 0, 2, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_BOTTOM); - stc_slider->Bind(wxEVT_COMMAND_SLIDER_UPDATED, &VideoConfigDiag::Event_Stc, this); + stc_slider->Bind(wxEVT_SLIDER, &VideoConfigDiag::Event_Stc, this); RegisterControl(stc_slider, wxGetTranslation(stc_desc)); if (vconfig.iSafeTextureCache_ColorSamples == 0) stc_slider->SetValue(0); @@ -575,7 +575,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con { wxCheckBox* const cb_prog_scan = new wxCheckBox(page_advanced, wxID_ANY, _("Enable Progressive Scan")); RegisterControl(cb_prog_scan, wxGetTranslation(prog_scan_desc)); - cb_prog_scan->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &VideoConfigDiag::Event_ProgressiveScan, this); + cb_prog_scan->Bind(wxEVT_CHECKBOX, &VideoConfigDiag::Event_ProgressiveScan, this); if (Core::GetState() != Core::CORE_UNINITIALIZED) cb_prog_scan->Disable(); @@ -597,7 +597,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con } wxButton* const btn_close = new wxButton(this, wxID_OK, _("Close")); - btn_close->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &VideoConfigDiag::Event_ClickClose, this); + btn_close->Bind(wxEVT_BUTTON, &VideoConfigDiag::Event_ClickClose, this); Bind(wxEVT_CLOSE_WINDOW, &VideoConfigDiag::Event_Close, this); diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp index 191843512d..845981ea81 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp @@ -59,9 +59,9 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin wiimote_label[i] = new wxStaticText(this, wxID_ANY, str); wiimote_source_ch[i] = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, sizeof(src_choices)/sizeof(*src_choices), src_choices); - wiimote_source_ch[i]->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &WiimoteConfigDiag::SelectSource, this); + wiimote_source_ch[i]->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); wiimote_configure_bt[i] = new wxButton(this, config_bt_id, _("Configure")); - wiimote_configure_bt[i]->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &WiimoteConfigDiag::ConfigEmulatedWiimote, this); + wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::ConfigEmulatedWiimote, this); m_orig_wiimote_sources[i] = g_wiimote_sources[i]; wiimote_source_ch[i]->Select(m_orig_wiimote_sources[i]); @@ -89,7 +89,7 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, WIIMOTE_BALANCE_BOARD)); const wxString src_choices[] = { _("None"), _("Real Balance Board") }; wxChoice* bb_source = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, sizeof(src_choices)/sizeof(*src_choices), src_choices); - bb_source->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &WiimoteConfigDiag::SelectSource, this); + bb_source->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] = g_wiimote_sources[WIIMOTE_BALANCE_BOARD]; bb_source->Select(m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] ? 1 : 0); @@ -101,7 +101,7 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin // "Real wiimotes" controls wxButton* const refresh_btn = new wxButton(this, -1, _("Refresh")); - refresh_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &WiimoteConfigDiag::RefreshRealWiimotes, this); + refresh_btn->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::RefreshRealWiimotes, this); wxStaticBoxSizer* const real_wiimotes_group = new wxStaticBoxSizer(wxVERTICAL, this, _("Real Wiimotes")); @@ -112,11 +112,11 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin "You must manually connect your wiimotes.")), 0, wxALIGN_CENTER | wxALL, 5); wxCheckBox* const continuous_scanning = new wxCheckBox(this, wxID_ANY, _("Continuous Scanning")); - continuous_scanning->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &WiimoteConfigDiag::OnContinuousScanning, this); + continuous_scanning->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnContinuousScanning, this); continuous_scanning->SetValue(SConfig::GetInstance().m_WiimoteContinuousScanning); auto wiimote_speaker = new wxCheckBox(this, wxID_ANY, _("Enable Speaker Data")); - wiimote_speaker->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &WiimoteConfigDiag::OnEnableSpeaker, this); + wiimote_speaker->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnEnableSpeaker, this); wiimote_speaker->SetValue(SConfig::GetInstance().m_WiimoteEnableSpeaker); real_wiimotes_sizer->Add(continuous_scanning, 0, wxALIGN_CENTER_VERTICAL); @@ -179,10 +179,10 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin WiimoteSpkVolume->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SPKV")); WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.MOT")); - WiiSensBarPos->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &WiimoteConfigDiag::OnSensorBarPos, this); - WiiSensBarSens->Bind(wxEVT_COMMAND_SLIDER_UPDATED, &WiimoteConfigDiag::OnSensorBarSensitivity, this); - WiimoteSpkVolume->Bind(wxEVT_COMMAND_SLIDER_UPDATED, &WiimoteConfigDiag::OnSpeakerVolume, this); - WiimoteMotor->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &WiimoteConfigDiag::OnMotor, this); + WiiSensBarPos->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::OnSensorBarPos, this); + WiiSensBarSens->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSensorBarSensitivity, this); + WiimoteSpkVolume->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSpeakerVolume, this); + WiimoteMotor->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnMotor, this); // "General Settings" layout @@ -220,8 +220,8 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin main_sizer->Add(general_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); main_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &WiimoteConfigDiag::Save, this, wxID_OK); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &WiimoteConfigDiag::Cancel, this, wxID_CANCEL); + Bind(wxEVT_BUTTON, &WiimoteConfigDiag::Save, this, wxID_OK); + Bind(wxEVT_BUTTON, &WiimoteConfigDiag::Cancel, this, wxID_CANCEL); SetSizerAndFit(main_sizer); Center();