From 90df5efd01782847f6427efa552b4a2a5a007413 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 17 May 2014 12:49:00 -0400 Subject: [PATCH 1/4] 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(); From e1359382be30bb8f61a779846c9ebc1fa72791d0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 17 May 2014 13:17:28 -0400 Subject: [PATCH 2/4] Kill off _T and wxT macros Minor other alterations that relate to above as well. Also added the PanicAlertT version of alerts for some error messages that use PanicAlert. We want the user to actually understand why the error occurred. --- Source/Core/DolphinWX/ARCodeAddEdit.cpp | 2 +- Source/Core/DolphinWX/CheatsWindow.cpp | 22 ++--- Source/Core/DolphinWX/ConfigMain.cpp | 53 +++++------ .../Core/DolphinWX/Debugger/BreakpointDlg.cpp | 6 +- .../DolphinWX/Debugger/BreakpointView.cpp | 10 +- .../DolphinWX/Debugger/BreakpointWindow.cpp | 12 +-- .../DolphinWX/Debugger/BreakpointWindow.h | 2 +- Source/Core/DolphinWX/Debugger/CodeView.cpp | 59 ++++++------ Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 11 +-- .../Debugger/CodeWindowFunctions.cpp | 20 ++-- .../DolphinWX/Debugger/DSPDebugWindow.cpp | 20 ++-- .../DolphinWX/Debugger/DSPRegisterView.cpp | 6 +- .../Core/DolphinWX/Debugger/DebuggerPanel.cpp | 2 +- .../DolphinWX/Debugger/DebuggerUIUtil.cpp | 2 +- Source/Core/DolphinWX/Debugger/JitWindow.cpp | 11 +-- .../DolphinWX/Debugger/MemoryCheckDlg.cpp | 12 +-- Source/Core/DolphinWX/Debugger/MemoryView.cpp | 50 +++++----- .../Core/DolphinWX/Debugger/MemoryWindow.cpp | 18 ++-- .../Core/DolphinWX/Debugger/RegisterView.cpp | 12 +-- Source/Core/DolphinWX/FifoPlayerDlg.cpp | 2 +- Source/Core/DolphinWX/Frame.cpp | 20 ++-- Source/Core/DolphinWX/Frame.h | 6 +- Source/Core/DolphinWX/FrameAui.cpp | 41 ++++---- Source/Core/DolphinWX/FrameTools.cpp | 58 ++++++------ Source/Core/DolphinWX/GameListCtrl.cpp | 18 ++-- Source/Core/DolphinWX/GeckoCodeDiag.cpp | 2 +- Source/Core/DolphinWX/HotkeyDlg.cpp | 2 +- Source/Core/DolphinWX/ISOProperties.cpp | 20 ++-- Source/Core/DolphinWX/InputConfigDiag.cpp | 16 ++-- .../Core/DolphinWX/InputConfigDiagBitmaps.cpp | 8 +- Source/Core/DolphinWX/LogWindow.cpp | 4 +- Source/Core/DolphinWX/Main.cpp | 22 ++--- Source/Core/DolphinWX/MemcardManager.cpp | 44 ++++----- Source/Core/DolphinWX/MemcardManager.h | 2 +- .../DolphinWX/MemoryCards/WiiSaveCrypted.cpp | 2 +- Source/Core/DolphinWX/NetWindow.cpp | 16 ++-- Source/Core/DolphinWX/PatchAddEdit.cpp | 8 +- Source/Core/DolphinWX/TASInputDlg.cpp | 82 ++++++++-------- Source/Core/DolphinWX/VideoConfigDiag.cpp | 2 +- Source/Core/DolphinWX/WXInputBase.cpp | 94 +++++++++---------- Source/Core/DolphinWX/WxUtils.cpp | 6 +- 41 files changed, 397 insertions(+), 408 deletions(-) diff --git a/Source/Core/DolphinWX/ARCodeAddEdit.cpp b/Source/Core/DolphinWX/ARCodeAddEdit.cpp index 60a3215f45..d821de79bb 100644 --- a/Source/Core/DolphinWX/ARCodeAddEdit.cpp +++ b/Source/Core/DolphinWX/ARCodeAddEdit.cpp @@ -182,7 +182,7 @@ void CARCodeAddEdit::UpdateTextCtrl(ActionReplay::ARCode arCode) if (arCode.name != "") { for (auto& op : arCode.ops) - EditCheatCode->AppendText(wxString::Format(wxT("%08X %08X\n"), op.cmd_addr, op.value)); + EditCheatCode->AppendText(wxString::Format("%08X %08X\n", op.cmd_addr, op.value)); } else { diff --git a/Source/Core/DolphinWX/CheatsWindow.cpp b/Source/Core/DolphinWX/CheatsWindow.cpp index e2b1167999..60c0d18c1d 100644 --- a/Source/Core/DolphinWX/CheatsWindow.cpp +++ b/Source/Core/DolphinWX/CheatsWindow.cpp @@ -121,7 +121,7 @@ void wxCheatsWindow::Init_ChildControls() 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); + m_TextCtrl_Log = new wxTextCtrl(m_Tab_Log, wxID_ANY, "", wxDefaultPosition, wxSize(100, -1), wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP); wxBoxSizer *HStrip1 = new wxBoxSizer(wxHORIZONTAL); HStrip1->Add(m_CheckBox_LogAR, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); @@ -203,11 +203,11 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent) // Search value radio buttons value_x_radiobtn.rad_oldvalue = new wxRadioButton(this, -1, _("Previous Value"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); - value_x_radiobtn.rad_uservalue = new wxRadioButton(this, -1, wxT("")); + value_x_radiobtn.rad_uservalue = new wxRadioButton(this, -1, ""); value_x_radiobtn.rad_oldvalue->SetValue(true); // search value textbox - textctrl_value_x = new wxTextCtrl(this, -1, wxT("0x0"), wxDefaultPosition, wxSize(96,-1)); + textctrl_value_x = new wxTextCtrl(this, -1, "0x0", wxDefaultPosition, wxSize(96,-1)); textctrl_value_x->Bind(wxEVT_SET_FOCUS, &CheatSearchTab::ApplyFocus, this); wxBoxSizer* const sizer_cheat_filter_text = new wxBoxSizer(wxHORIZONTAL); @@ -539,7 +539,7 @@ void CheatSearchTab::UpdateCheatSearchResultsList() { lbox_search_results->Clear(); - wxString count_label = _("Count:") + wxString::Format(wxT(" %lu"), + wxString count_label = _("Count:") + wxString::Format(" %lu", (unsigned long)search_results.size()); if (search_results.size() > MAX_CHEAT_SEARCH_RESULTS_DISPLAY) { @@ -566,12 +566,10 @@ void CheatSearchTab::UpdateCheatSearchResultsList() // #elseif BIG_ENDIAN // need to do some stuff in here (for 8 and 16bit) for bigendian // #endif - - static wxChar rowfmt[] = wxT("0x%08x 0x%0|x %u/%i"); - rowfmt[14] = (wxChar)(wxT('0') + search_type_size*2); + std::string rowfmt = StringFromFormat("0x%%08x 0x%%0%ux %%u/%%i", search_type_size*2); lbox_search_results->Append( - wxString::Format(rowfmt, result.address, display_value, display_value, display_value)); + wxString::Format(rowfmt.c_str(), result.address, display_value, display_value, display_value)); } } @@ -598,11 +596,11 @@ CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address) textctrl_name = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxSize(256,-1)); wxStaticText* const label_code = new wxStaticText(this, -1, _("Code: ")); - textctrl_code = new wxTextCtrl(this, -1, wxString::Format(wxT("0x%08x"), address)); + textctrl_code = new wxTextCtrl(this, -1, wxString::Format("0x%08x", address)); textctrl_code->Disable(); wxStaticText* const label_value = new wxStaticText(this, -1, _("Value: ")); - textctrl_value = new wxTextCtrl(this, -1, wxT("0")); + textctrl_value = new wxTextCtrl(this, -1, "0"); checkbox_use_hex = new wxCheckBox(this, -1, _("Use Hex")); checkbox_use_hex->SetValue(true); @@ -647,8 +645,8 @@ void CreateCodeDialog::PressOK(wxCommandEvent& ev) } //wxString full_code = textctrl_code->GetValue(); - //full_code += wxT(' '); - //full_code += wxString::Format(wxT("0x%08x"), code_value); + //full_code += ' '; + //full_code += wxString::Format("0x%08x", code_value); // create the new code ActionReplay::ARCode new_cheat; diff --git a/Source/Core/DolphinWX/ConfigMain.cpp b/Source/Core/DolphinWX/ConfigMain.cpp index 3598f1f2f3..30f812ef7a 100644 --- a/Source/Core/DolphinWX/ConfigMain.cpp +++ b/Source/Core/DolphinWX/ConfigMain.cpp @@ -121,7 +121,6 @@ static const wxLanguage langIds[] = #define EXIDEV_AM_BB_STR _trans("AM-Baseboard") #define EXIDEV_GECKO_STR "USBGecko" -#define WXSTR_TRANS(a) wxString(wxGetTranslation(wxT(a))) #ifdef WIN32 //only used with xgettext to be picked up as translatable string. //win32 does not have wx on its path, the provided wxALL_FILES @@ -268,7 +267,7 @@ void CConfigMain::InitializeGUILists() arrayStringFor_Framelimit.Add(_("Auto")); arrayStringFor_Framelimit.Add(_("Audio")); for (int i = 10; i <= 120; i += 5) // from 10 to 120 - arrayStringFor_Framelimit.Add(wxString::Format(wxT("%i"), i)); + arrayStringFor_Framelimit.Add(wxString::Format("%i", i)); // Emulator Engine for (const CPUCore& CPUCores_a : CPUCores) @@ -295,8 +294,8 @@ void CConfigMain::InitializeGUILists() arrayStringFor_WiiSensBarPos.Add(_("Top")); // Aspect ratio - arrayStringFor_WiiAspectRatio.Add(wxT("4:3")); - arrayStringFor_WiiAspectRatio.Add(wxT("16:9")); + arrayStringFor_WiiAspectRatio.Add("4:3"); + arrayStringFor_WiiAspectRatio.Add("16:9"); // Wii Language arrayStrings arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang; @@ -375,7 +374,7 @@ void CConfigMain::InitializeGUIValues() // Audio VolumeSlider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend)); VolumeSlider->SetValue(SConfig::GetInstance().m_Volume); - VolumeText->SetLabel(wxString::Format(wxT("%d %%"), SConfig::GetInstance().m_Volume)); + VolumeText->SetLabel(wxString::Format("%d %%", SConfig::GetInstance().m_Volume)); DSPThread->SetValue(startup_params.bDSPThread); DumpAudio->SetValue(SConfig::GetInstance().m_DumpAudio ? true : false); DPL2Decoder->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL); @@ -658,7 +657,7 @@ void CConfigMain::CreateGUIControls() DumpAudio = new wxCheckBox(AudioPage, ID_DUMP_AUDIO, _("Dump Audio")); DPL2Decoder = new wxCheckBox(AudioPage, ID_DPL2DECODER, _("Dolby Pro Logic II decoder")); VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE); - VolumeText = new wxStaticText(AudioPage, wxID_ANY, wxT("")); + VolumeText = new wxStaticText(AudioPage, wxID_ANY, ""); 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); @@ -709,13 +708,13 @@ void CConfigMain::CreateGUIControls() wxStaticText* GCEXIDeviceText[3]; GCEXIDeviceText[0] = TEXT_BOX(GamecubePage, _("Slot A")); GCEXIDeviceText[1] = TEXT_BOX(GamecubePage, _("Slot B")); - GCEXIDeviceText[2] = TEXT_BOX(GamecubePage, wxT("SP1")); + GCEXIDeviceText[2] = TEXT_BOX(GamecubePage, "SP1"); GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA); GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB); GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1); - GCMemcardPath[0] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTA_PATH, wxT("..."), + GCMemcardPath[0] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTA_PATH, "...", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); - GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, wxT("..."), + GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, "...", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); //SI Devices @@ -810,11 +809,11 @@ void CConfigMain::CreateGUIControls() RemoveISOPath->Enable(false); DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"), - _("All GC/Wii images (gcm, iso, wbfs, ciso, gcz)") + wxString::Format(wxT("|*.gcm;*.iso;*.wbfs;*.ciso;*.gcz|%s"), wxGetTranslation(wxALL_FILES)), + _("All GC/Wii images (gcm, iso, wbfs, ciso, gcz)") + wxString::Format("|*.gcm;*.iso;*.wbfs;*.ciso;*.gcz|%s", wxGetTranslation(wxALL_FILES)), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL); ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"), - _("apploader (.img)") + wxString::Format(wxT("|*.img|%s"), wxGetTranslation(wxALL_FILES)), + _("apploader (.img)") + wxString::Format("|*.img|%s", wxGetTranslation(wxALL_FILES)), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); NANDRoot = new wxDirPickerCtrl(PathsPage, ID_NANDROOT, wxEmptyString, _("Choose a NAND root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL); @@ -954,7 +953,7 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event) case ID_VOLUME: SConfig::GetInstance().m_Volume = VolumeSlider->GetValue(); AudioCommon::UpdateSoundStream(); - VolumeText->SetLabel(wxString::Format(wxT("%d %%"), VolumeSlider->GetValue())); + VolumeText->SetLabel(wxString::Format("%d %%", VolumeSlider->GetValue())); break; case ID_DSPTHREAD: @@ -1056,9 +1055,9 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA) std::string filename = WxStrToStr(wxFileSelector( _("Choose a file to open"), StrToWxStr(File::GetUserPath(D_GCUSER_IDX)), - isSlotA ? wxT(GC_MEMCARDA) : wxT(GC_MEMCARDB), + isSlotA ? GC_MEMCARDA : GC_MEMCARDB, wxEmptyString, - _("Gamecube Memory Cards (*.raw,*.gcp)") + wxString(wxT("|*.raw;*.gcp")))); + _("Gamecube Memory Cards (*.raw,*.gcp)") + "|*.raw;*.gcp")); if (!filename.empty()) { @@ -1112,17 +1111,17 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA) void CConfigMain::ChooseSIDevice(wxString deviceName, int deviceNum) { SIDevices tempType; - if (!deviceName.compare(WXSTR_TRANS(SIDEV_STDCONT_STR))) + if (!deviceName.compare(_(SIDEV_STDCONT_STR))) tempType = SIDEVICE_GC_CONTROLLER; - else if (!deviceName.compare(WXSTR_TRANS(SIDEV_STEERING_STR))) + else if (!deviceName.compare(_(SIDEV_STEERING_STR))) tempType = SIDEVICE_GC_STEERING; - else if (!deviceName.compare(WXSTR_TRANS(SIDEV_DANCEMAT_STR))) + else if (!deviceName.compare(_(SIDEV_DANCEMAT_STR))) tempType = SIDEVICE_DANCEMAT; - else if (!deviceName.compare(WXSTR_TRANS(SIDEV_BONGO_STR))) + else if (!deviceName.compare(_(SIDEV_BONGO_STR))) tempType = SIDEVICE_GC_TARUKONGA; - else if (!deviceName.compare(wxT(SIDEV_GBA_STR))) + else if (!deviceName.compare(SIDEV_GBA_STR)) tempType = SIDEVICE_GC_GBA; - else if (!deviceName.compare(WXSTR_TRANS(SIDEV_AM_BB_STR))) + else if (!deviceName.compare(_(SIDEV_AM_BB_STR))) tempType = SIDEVICE_AM_BASEBOARD; else tempType = SIDEVICE_NONE; @@ -1140,17 +1139,17 @@ void CConfigMain::ChooseEXIDevice(wxString deviceName, int deviceNum) { TEXIDevices tempType; - if (!deviceName.compare(WXSTR_TRANS(EXIDEV_MEMCARD_STR))) + if (!deviceName.compare(_(EXIDEV_MEMCARD_STR))) tempType = EXIDEVICE_MEMORYCARD; - else if (!deviceName.compare(WXSTR_TRANS(EXIDEV_MIC_STR))) + else if (!deviceName.compare(_(EXIDEV_MIC_STR))) tempType = EXIDEVICE_MIC; - else if (!deviceName.compare(wxT(EXIDEV_BBA_STR))) + else if (!deviceName.compare(EXIDEV_BBA_STR)) tempType = EXIDEVICE_ETH; - else if (!deviceName.compare(WXSTR_TRANS(EXIDEV_AM_BB_STR))) + else if (!deviceName.compare(_(EXIDEV_AM_BB_STR))) tempType = EXIDEVICE_AM_BASEBOARD; - else if (!deviceName.compare(wxT(EXIDEV_GECKO_STR))) + else if (!deviceName.compare(EXIDEV_GECKO_STR)) tempType = EXIDEVICE_GECKO; - else if (!deviceName.compare(WXSTR_TRANS(DEV_NONE_STR))) + else if (!deviceName.compare(_(DEV_NONE_STR))) tempType = EXIDEVICE_NONE; else tempType = EXIDEVICE_DUMMY; @@ -1199,7 +1198,7 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event) u8 country_code = GetSADRCountryCode(wii_system_lang); if (!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1)) { - PanicAlert("Failed to update country code in SYSCONF"); + PanicAlertT("Failed to update country code in SYSCONF"); } break; } diff --git a/Source/Core/DolphinWX/Debugger/BreakpointDlg.cpp b/Source/Core/DolphinWX/Debugger/BreakpointDlg.cpp index f19510b9f1..d6dff144fa 100644 --- a/Source/Core/DolphinWX/Debugger/BreakpointDlg.cpp +++ b/Source/Core/DolphinWX/Debugger/BreakpointDlg.cpp @@ -25,10 +25,10 @@ BEGIN_EVENT_TABLE(BreakPointDlg, wxDialog) END_EVENT_TABLE() BreakPointDlg::BreakPointDlg(CBreakPointWindow *_Parent) - : wxDialog(_Parent, wxID_ANY, wxT("BreakPoint")) + : wxDialog(_Parent, wxID_ANY, _("Add Breakpoint")) , Parent(_Parent) { - m_pEditAddress = new wxTextCtrl(this, wxID_ANY, wxT("80000000")); + m_pEditAddress = new wxTextCtrl(this, wxID_ANY, "80000000"); wxBoxSizer *sMainSizer = new wxBoxSizer(wxVERTICAL); sMainSizer->Add(m_pEditAddress, 0, wxEXPAND | wxALL, 5); @@ -50,7 +50,7 @@ void BreakPointDlg::OnOK(wxCommandEvent& event) } else { - PanicAlert("The address %s is invalid.", WxStrToStr(AddressString).c_str()); + PanicAlertT("The address %s is invalid.", WxStrToStr(AddressString).c_str()); } event.Skip(); diff --git a/Source/Core/DolphinWX/Debugger/BreakpointView.cpp b/Source/Core/DolphinWX/Debugger/BreakpointView.cpp index 1f5ed38e13..1d23b7ec63 100644 --- a/Source/Core/DolphinWX/Debugger/BreakpointView.cpp +++ b/Source/Core/DolphinWX/Debugger/BreakpointView.cpp @@ -36,11 +36,11 @@ void CBreakPointView::Update() { ClearAll(); - InsertColumn(0, wxT("Active")); - InsertColumn(1, wxT("Type")); - InsertColumn(2, wxT("Function")); - InsertColumn(3, wxT("Address")); - InsertColumn(4, wxT("Flags")); + InsertColumn(0, _("Active")); + InsertColumn(1, _("Type")); + InsertColumn(2, _("Function")); + InsertColumn(3, _("Address")); + InsertColumn(4, _("Flags")); char szBuffer[64]; const BreakPoints::TBreakPoints& rBreakPoints = PowerPC::breakpoints.GetBreakPoints(); diff --git a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp index 5f05285161..a25800f372 100644 --- a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp @@ -49,26 +49,26 @@ public: m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(24, 24)); m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24)); - AddTool(ID_DELETE, wxT("Delete"), m_Bitmaps[Toolbar_Delete]); + AddTool(ID_DELETE, _("Delete"), m_Bitmaps[Toolbar_Delete]); Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE); - AddTool(ID_CLEAR, wxT("Clear"), m_Bitmaps[Toolbar_Delete]); + AddTool(ID_CLEAR, _("Clear"), m_Bitmaps[Toolbar_Delete]); Bind(wxEVT_TOOL, &CBreakPointWindow::OnClear, parent, ID_CLEAR); - AddTool(ID_ADDBP, wxT("+BP"), m_Bitmaps[Toolbar_Add_BP]); + AddTool(ID_ADDBP, "+BP", m_Bitmaps[Toolbar_Add_BP]); 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]); + AddTool(ID_ADDMC, "+MC", m_Bitmaps[Toolbar_Add_MC]); Bind(wxEVT_TOOL, &CBreakPointWindow::OnAddMemoryCheck, parent, ID_ADDMC); } - AddTool(ID_LOAD, wxT("Load"), m_Bitmaps[Toolbar_Delete]); + AddTool(ID_LOAD, _("Load"), m_Bitmaps[Toolbar_Delete]); Bind(wxEVT_TOOL, &CBreakPointWindow::LoadAll, parent, ID_LOAD); - AddTool(ID_SAVE, wxT("Save"), m_Bitmaps[Toolbar_Delete]); + AddTool(ID_SAVE, _("Save"), m_Bitmaps[Toolbar_Delete]); Bind(wxEVT_TOOL, &CBreakPointWindow::Event_SaveAll, parent, ID_SAVE); } diff --git a/Source/Core/DolphinWX/Debugger/BreakpointWindow.h b/Source/Core/DolphinWX/Debugger/BreakpointWindow.h index 106ccea155..8c2ffc9a2b 100644 --- a/Source/Core/DolphinWX/Debugger/BreakpointWindow.h +++ b/Source/Core/DolphinWX/Debugger/BreakpointWindow.h @@ -25,7 +25,7 @@ public: CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id = wxID_ANY, - const wxString& title = wxT("Breakpoints"), + const wxString& title = _("Breakpoints"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxBORDER_NONE); diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp index 0d8ce7042e..968fa816f8 100644 --- a/Source/Core/DolphinWX/Debugger/CodeView.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp @@ -227,7 +227,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) #if wxUSE_CLIPBOARD case IDM_COPYADDRESS: - wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%08x"), selection))); + wxTheClipboard->SetData(new wxTextDataObject(wxString::Format("%08x", selection))); break; case IDM_COPYCODE: @@ -310,7 +310,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) Symbol *symbol = symbol_db->GetSymbolFromAddr(selection); if (symbol) { - wxTextEntryDialog input_symbol(this, StrToWxStr("Rename symbol:"), + wxTextEntryDialog input_symbol(this, _("Rename symbol:"), wxGetTextFromUserPromptStr, StrToWxStr(symbol->name)); if (input_symbol.ShowModal() == wxID_OK) @@ -339,24 +339,23 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event) // popup menu wxMenu* menu = new wxMenu; //menu->Append(IDM_GOTOINMEMVIEW, "&Goto in mem view"); - menu->Append(IDM_FOLLOWBRANCH, - StrToWxStr("&Follow branch"))->Enable(AddrToBranch(selection) ? true : false); + menu->Append(IDM_FOLLOWBRANCH, _("&Follow branch"))->Enable(AddrToBranch(selection) ? true : false); menu->AppendSeparator(); #if wxUSE_CLIPBOARD - menu->Append(IDM_COPYADDRESS, StrToWxStr("Copy &address")); - menu->Append(IDM_COPYFUNCTION, StrToWxStr("Copy &function"))->Enable(isSymbol); - menu->Append(IDM_COPYCODE, StrToWxStr("Copy &code line")); - menu->Append(IDM_COPYHEX, StrToWxStr("Copy &hex")); + menu->Append(IDM_COPYADDRESS, _("Copy &address")); + menu->Append(IDM_COPYFUNCTION, _("Copy &function"))->Enable(isSymbol); + menu->Append(IDM_COPYCODE, _("Copy &code line")); + menu->Append(IDM_COPYHEX, _("Copy &hex")); menu->AppendSeparator(); #endif - menu->Append(IDM_RENAMESYMBOL, StrToWxStr("Rename &symbol"))->Enable(isSymbol); + menu->Append(IDM_RENAMESYMBOL, _("Rename &symbol"))->Enable(isSymbol); menu->AppendSeparator(); menu->Append(IDM_RUNTOHERE, _("&Run To Here")); menu->Append(IDM_ADDFUNCTION, _("&Add function")); - menu->Append(IDM_JITRESULTS, StrToWxStr("PPC vs X86")); - menu->Append(IDM_INSERTBLR, StrToWxStr("Insert &blr")); - menu->Append(IDM_INSERTNOP, StrToWxStr("Insert &nop")); - menu->Append(IDM_PATCHALERT, StrToWxStr("Patch alert")); + menu->Append(IDM_JITRESULTS, _("PPC vs X86")); + menu->Append(IDM_INSERTBLR, _("Insert &blr")); + menu->Append(IDM_INSERTNOP, _("Insert &nop")); + menu->Append(IDM_PATCHALERT, _("Patch alert")); PopupMenu(menu); event.Skip(true); } @@ -375,12 +374,12 @@ void CCodeView::OnPaint(wxPaintEvent& event) dc.SetFont(DebuggerFont); wxCoord w,h; - dc.GetTextExtent(_T("0WJyq"),&w,&h); + dc.GetTextExtent("0WJyq", &w, &h); if (h > rowHeight) rowHeight = h; - dc.GetTextExtent(_T("W"),&w,&h); + dc.GetTextExtent("W", &w, &h); int charWidth = w; struct branch @@ -399,15 +398,15 @@ void CCodeView::OnPaint(wxPaintEvent& event) // Colors and brushes // ------------------------- dc.SetBackgroundMode(wxTRANSPARENT); // the text background - const wxChar* bgColor = _T("#ffffff"); + const wxColour bgColor = *wxWHITE; wxPen nullPen(bgColor); - wxPen currentPen(_T("#000000")); - wxPen selPen(_T("#808080")); // gray + wxPen currentPen(*wxBLACK_PEN); + wxPen selPen(*wxGREY_PEN); nullPen.SetStyle(wxTRANSPARENT); currentPen.SetStyle(wxSOLID); - wxBrush currentBrush(_T("#FFEfE8")); // light gray - wxBrush pcBrush(_T("#70FF70")); // green - wxBrush bpBrush(_T("#FF3311")); // red + wxBrush currentBrush(*wxLIGHT_GREY_BRUSH); + wxBrush pcBrush(*wxGREEN_BRUSH); + wxBrush bpBrush(*wxRED_BRUSH); wxBrush bgBrush(bgColor); wxBrush nullBrush(bgColor); @@ -429,9 +428,9 @@ void CCodeView::OnPaint(wxPaintEvent& event) int rowY1 = rc.height / 2 + rowHeight * i - rowHeight / 2; int rowY2 = rc.height / 2 + rowHeight * i + rowHeight / 2; - wxString temp = wxString::Format(_T("%08x"), address); + wxString temp = wxString::Format("%08x", address); u32 col = debugger->GetColor(address); - wxBrush rowBrush(wxColor(col >> 16, col >> 8, col)); + wxBrush rowBrush(wxColour(col >> 16, col >> 8, col)); dc.SetBrush(nullBrush); dc.SetPen(nullPen); dc.DrawRectangle(0, rowY1, 16, rowY2 - rowY1 + 2); @@ -450,9 +449,9 @@ void CCodeView::OnPaint(wxPaintEvent& event) dc.SetBrush(currentBrush); if (!plain) { - dc.SetTextForeground(_T("#600000")); // the address text is dark red + dc.SetTextForeground("#600000"); // the address text is dark red dc.DrawText(temp, 17, rowY1); - dc.SetTextForeground(_T("#000000")); + dc.SetTextForeground(*wxBLACK); } // If running @@ -495,11 +494,11 @@ void CCodeView::OnPaint(wxPaintEvent& event) branches[numBranches].srcAddr = address / align; branches[numBranches++].dst = (int)(rowY1 + ((s64)(u32)offs - (s64)(u32)address) * rowHeight / align + rowHeight / 2); sprintf(desc, "-->%s", debugger->GetDescription(offs).c_str()); - dc.SetTextForeground(_T("#600060")); // the -> arrow illustrations are purple + dc.SetTextForeground(wxTheColourDatabase->Find("PURPLE")); // the -> arrow illustrations are purple } else { - dc.SetTextForeground(_T("#000000")); + dc.SetTextForeground(*wxBLACK); } dc.DrawText(StrToWxStr(dis2), 17 + 17*charWidth, rowY1); @@ -508,9 +507,9 @@ void CCodeView::OnPaint(wxPaintEvent& event) // Show blr as its' own color if (strcmp(dis, "blr")) - dc.SetTextForeground(_T("#007000")); // dark green + dc.SetTextForeground(wxTheColourDatabase->Find("DARK GREEN")); else - dc.SetTextForeground(_T("#8000FF")); // purple + dc.SetTextForeground(wxTheColourDatabase->Find("VIOLET")); dc.DrawText(StrToWxStr(dis), 17 + (plain ? 1*charWidth : 9*charWidth), rowY1); @@ -521,7 +520,7 @@ void CCodeView::OnPaint(wxPaintEvent& event) if (!plain) { - dc.SetTextForeground(_T("#0000FF")); // blue + dc.SetTextForeground(*wxBLUE); //char temp[256]; //UnDecorateSymbolName(desc,temp,255,UNDNAME_COMPLETE); diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index 7f04c03d48..f2aa617b7b 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -365,7 +365,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam wxMenu* pCoreMenu = new wxMenu; wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _("&Interpreter core"), - StrToWxStr("This is necessary to get break points" + _("This is necessary to get break points" " and stepping to work as explained in the Developer Documentation. But it can be very" " slow, perhaps slower than 1 fps."), wxITEM_CHECK); @@ -433,7 +433,7 @@ void CCodeWindow::CreateMenuOptions(wxMenu* pMenu) boottopause->Check(bBootToPause); wxMenuItem* automaticstart = pMenu->Append(IDM_AUTOMATICSTART, _("&Automatic start"), - StrToWxStr( + _( "Automatically load the Default ISO when Dolphin starts, or the last game you loaded," " if you have not given it an elf file with the --elf command line. [This can be" " convenient if you are bug-testing with a certain game and want to rebuild" @@ -442,7 +442,7 @@ void CCodeWindow::CreateMenuOptions(wxMenu* pMenu) wxITEM_CHECK); automaticstart->Check(bAutomaticStart); - pMenu->Append(IDM_FONTPICKER, _("&Font..."), wxEmptyString, wxITEM_NORMAL); + pMenu->Append(IDM_FONTPICKER, _("&Font...")); } // CPU Mode and JIT Menu @@ -515,8 +515,7 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event) case IDM_SEARCHINSTRUCTION: { - wxString str; - str = wxGetTextFromUser(_T(""), wxT("Op?"), wxEmptyString, this); + wxString str = wxGetTextFromUser("", _("Op?"), wxEmptyString, this); for (u32 addr = 0x80000000; addr < 0x80100000; addr += 4) { const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr)); @@ -585,7 +584,7 @@ void CCodeWindow::PopulateToolbar(wxAuiToolBar* toolBar) toolBar->AddTool(IDM_GOTOPC, _("Show PC"), m_Bitmaps[Toolbar_GotoPC]); toolBar->AddTool(IDM_SETPC, _("Set PC"), m_Bitmaps[Toolbar_SetPC]); toolBar->AddSeparator(); - toolBar->AddControl(new wxTextCtrl(toolBar, IDM_ADDRBOX, _T(""))); + toolBar->AddControl(new wxTextCtrl(toolBar, IDM_ADDRBOX, "")); toolBar->Realize(); } diff --git a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp index 698265613d..1236dd84fe 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp @@ -152,7 +152,7 @@ void CCodeWindow::CreateMenuSymbols(wxMenuBar *pMenuBar) pSymbolsMenu->Append(IDM_SAVEMAPFILE, _("&Save symbol map")); pSymbolsMenu->AppendSeparator(); pSymbolsMenu->Append(IDM_SAVEMAPFILEWITHCODES, _("Save code"), - StrToWxStr("Save the entire disassembled code. This may take a several seconds" + _("Save the entire disassembled code. This may take a several seconds" " and may require between 50 and 100 MB of hard drive space. It will only save code" " that are in the first 4 MB of memory, if you are debugging a game that load .rel" " files with code to memory you may want to increase that to perhaps 8 MB, you can do" @@ -198,10 +198,10 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event) Profiler::WriteProfileResults(filename); wxFileType* filetype = nullptr; - if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("txt")))) + if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension("txt"))) { // From extension failed, trying with MIME type now - if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain")))) + if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain"))) // MIME type failed, aborting mission break; } @@ -227,7 +227,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) switch (event.GetId()) { case IDM_CLEARSYMBOLS: - if (!AskYesNo("Do you want to clear the list of symbol names?")) return; + if (!AskYesNoT("Do you want to clear the list of symbol names?")) return; g_symbolDB.Clear(); Host_NotifyMapLoaded(); break; @@ -279,7 +279,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) const wxString path = wxFileSelector( _("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString, - _T("Dolphin Symbol Rename File (*.sym)|*.sym"), + "Dolphin Symbol Rename File (*.sym)|*.sym", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); if (!path.IsEmpty()) @@ -313,7 +313,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) { wxTextEntryDialog input_prefix( this, - StrToWxStr("Only export symbols with prefix:\n(Blank for all symbols)"), + _("Only export symbols with prefix:\n(Blank for all symbols)"), wxGetTextFromUserPromptStr, wxEmptyString); @@ -322,8 +322,8 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) std::string prefix(WxStrToStr(input_prefix.GetValue())); wxString path = wxFileSelector( - _T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString, - _T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE, + _("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString, + "Dolphin Signature File (*.dsy)|*.dsy;", wxFD_SAVE, this); if (!path.IsEmpty()) { @@ -337,8 +337,8 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event) case IDM_USESIGNATUREFILE: { wxString path = wxFileSelector( - _T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString, - _T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, + _("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString, + "Dolphin Signature File (*.dsy)|*.dsy;", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); if (!path.IsEmpty()) { diff --git a/Source/Core/DolphinWX/Debugger/DSPDebugWindow.cpp b/Source/Core/DolphinWX/Debugger/DSPDebugWindow.cpp index f9fd51eec0..56b729e999 100644 --- a/Source/Core/DolphinWX/Debugger/DSPDebugWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/DSPDebugWindow.cpp @@ -57,11 +57,11 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id) m_Toolbar = new wxAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_TEXT); - m_Toolbar->AddTool(ID_RUNTOOL, wxT("Pause"), + m_Toolbar->AddTool(ID_RUNTOOL, _("Pause"), wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10,10))); - m_Toolbar->AddTool(ID_STEPTOOL, wxT("Step"), + m_Toolbar->AddTool(ID_STEPTOOL, _("Step"), wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_OTHER, wxSize(10,10))); - m_Toolbar->AddTool(ID_SHOWPCTOOL, wxT("Show PC"), + m_Toolbar->AddTool(ID_SHOWPCTOOL, _("Show PC"), wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_OTHER, wxSize(10,10))); m_Toolbar->AddSeparator(); m_Toolbar->AddControl(new wxTextCtrl(m_Toolbar, ID_ADDRBOX, wxEmptyString, @@ -81,7 +81,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id) m_CodeView->SetPlain(); code_sizer->Add(m_CodeView, 1, wxALL | wxEXPAND); code_panel->SetSizer(code_sizer); - m_MainNotebook->AddPage(code_panel, wxT("Disasm"), true); + m_MainNotebook->AddPage(code_panel, _("Disassembly"), true); wxPanel *mem_panel = new wxPanel(m_MainNotebook, wxID_ANY); wxBoxSizer *mem_sizer = new wxBoxSizer(wxVERTICAL); @@ -89,7 +89,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id) m_MemView = new CMemoryView(&debug_interface, mem_panel); mem_sizer->Add(m_MemView, 1, wxALL | wxEXPAND); mem_panel->SetSizer(mem_sizer); - m_MainNotebook->AddPage(mem_panel, wxT("Mem")); + m_MainNotebook->AddPage(mem_panel, _("Memory")); m_Regs = new DSPRegisterView(this, ID_DSP_REGS); @@ -100,14 +100,14 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id) m_mgr.AddPane(m_SymbolList, wxAuiPaneInfo(). Left().CloseButton(false). - Caption(wxT("Symbols")).Dockable(true)); + Caption(_("Symbols")).Dockable(true)); m_mgr.AddPane(m_MainNotebook, wxAuiPaneInfo(). - Name(wxT("m_MainNotebook")).Center(). + Name("m_MainNotebook").Center(). CloseButton(false).MaximizeButton(true)); m_mgr.AddPane(m_Regs, wxAuiPaneInfo().Right(). - CloseButton(false).Caption(wxT("Registers")). + CloseButton(false).Caption(_("Registers")). Dockable(true)); UpdateState(); @@ -189,14 +189,14 @@ void DSPDebuggerLLE::UpdateState() { if (DSPCore_GetState() == DSPCORE_RUNNING) { - m_Toolbar->SetToolLabel(ID_RUNTOOL, wxT("Pause")); + m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Pause")); m_Toolbar->SetToolBitmap(ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10,10))); m_Toolbar->EnableTool(ID_STEPTOOL, false); } else { - m_Toolbar->SetToolLabel(ID_RUNTOOL, wxT("Run")); + m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Run")); m_Toolbar->SetToolBitmap(ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_OTHER, wxSize(10,10))); m_Toolbar->EnableTool(ID_STEPTOOL, true); diff --git a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp index 5ef966b0fd..bb25d97fcc 100644 --- a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp +++ b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp @@ -25,7 +25,7 @@ wxString CDSPRegTable::GetValue(int row, int col) switch (col) { case 0: return StrToWxStr(pdregname(row)); - case 1: return wxString::Format(wxT("0x%04x"), DSPCore_ReadRegister(row)); + case 1: return wxString::Format("0x%04x", DSPCore_ReadRegister(row)); default: return wxEmptyString; } } @@ -56,7 +56,7 @@ wxGridCellAttr *CDSPRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKi { wxGridCellAttr *attr = new wxGridCellAttr(); - attr->SetBackgroundColour(wxColour(wxT("#FFFFFF"))); + attr->SetBackgroundColour(*wxWHITE); switch (col) { @@ -69,7 +69,7 @@ wxGridCellAttr *CDSPRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKi } if (col == 1) - attr->SetTextColour(m_CachedRegHasChanged[row] ? wxColor(wxT("#FF0000")) : wxColor(wxT("#000000"))); + attr->SetTextColour(m_CachedRegHasChanged[row] ? *wxRED : *wxBLACK); attr->IncRef(); return attr; diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 4ab8b93026..682a6733a1 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -153,7 +153,7 @@ void GFXDebuggerPanel::CreateGUIControls() m_pButtonPauseAtNextFrame = new wxButton(this, ID_PAUSE_AT_NEXT_FRAME, _("Go to Next Frame"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Next Frame")); m_pButtonCont = new wxButton(this, ID_CONT, _("Continue"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Continue")); - m_pCount = new wxTextCtrl(this, ID_COUNT, wxT("1"), wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); + m_pCount = new wxTextCtrl(this, ID_COUNT, "1", wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList")); for (int i=0; iAdd(ppc_box = new wxTextCtrl(this, IDM_PPC_BOX, _T("(ppc)"), + sizerSplit->Add(ppc_box = new wxTextCtrl(this, IDM_PPC_BOX, "(ppc)", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE), 1, wxEXPAND); - sizerSplit->Add(x86_box = new wxTextCtrl(this, IDM_X86_BOX, _T("(x86)"), + sizerSplit->Add(x86_box = new wxTextCtrl(this, IDM_X86_BOX, "(x86)", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE), 1, wxEXPAND); sizerBig->Add(block_list = new JitBlockList(this, IDM_BLOCKLIST, wxDefaultPosition, wxSize(100, 140), @@ -66,7 +66,7 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos, // sizerBig->Add(memview, 5, wxEXPAND); // sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3); sizerBig->Add(button_refresh = new wxButton(this, IDM_REFRESH_LIST, _("&Refresh"))); - // sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_ADDRBOX, _T(""))); + // sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_ADDRBOX, "")); // sizerRight->Add(new wxButton(this, IDM_SETPC, _("S&et PC"))); SetSizer(sizerBig); @@ -115,9 +115,8 @@ void CJitWindow::Compare(u32 em_address) // Do not merge this "if" with the above - block_num changes inside it. if (block_num < 0) { - ppc_box->SetValue(StrToWxStr(StringFromFormat("(non-code address: %08x)", - em_address))); - x86_box->SetValue(StrToWxStr(StringFromFormat("(no translation)"))); + ppc_box->SetValue(_(StringFromFormat("(non-code address: %08x)", em_address))); + x86_box->SetValue(_("(no translation)")); delete[] xDis; return; } diff --git a/Source/Core/DolphinWX/Debugger/MemoryCheckDlg.cpp b/Source/Core/DolphinWX/Debugger/MemoryCheckDlg.cpp index 569cd8ad0a..d5923ab7c3 100644 --- a/Source/Core/DolphinWX/Debugger/MemoryCheckDlg.cpp +++ b/Source/Core/DolphinWX/Debugger/MemoryCheckDlg.cpp @@ -23,7 +23,7 @@ #include "DolphinWX/Debugger/BreakpointWindow.h" #include "DolphinWX/Debugger/MemoryCheckDlg.h" -#define TEXT_BOX(text) new wxStaticText(this, wxID_ANY, wxT(text)) +#define TEXT_BOX(text) new wxStaticText(this, wxID_ANY, _(text)) BEGIN_EVENT_TABLE(MemoryCheckDlg, wxDialog) EVT_BUTTON(wxID_OK, MemoryCheckDlg::OnOK) @@ -33,8 +33,8 @@ MemoryCheckDlg::MemoryCheckDlg(CBreakPointWindow *parent) : wxDialog(parent, wxID_ANY, _("Memory Check")) , m_parent(parent) { - m_pEditStartAddress = new wxTextCtrl(this, wxID_ANY, wxT("")); - m_pEditEndAddress = new wxTextCtrl(this, wxID_ANY, wxT("")); + m_pEditStartAddress = new wxTextCtrl(this, wxID_ANY, ""); + m_pEditEndAddress = new wxTextCtrl(this, wxID_ANY, ""); m_pWriteFlag = new wxCheckBox(this, wxID_ANY, _("Write")); m_pWriteFlag->SetValue(true); m_pReadFlag = new wxCheckBox(this, wxID_ANY, _("Read")); @@ -43,17 +43,17 @@ MemoryCheckDlg::MemoryCheckDlg(CBreakPointWindow *parent) m_log_flag->SetValue(true); m_break_flag = new wxCheckBox(this, wxID_ANY, _("Break")); - wxStaticBoxSizer *sAddressRangeBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("Address Range")); + wxStaticBoxSizer *sAddressRangeBox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Address Range")); sAddressRangeBox->Add(TEXT_BOX("Start"), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5); sAddressRangeBox->Add(m_pEditStartAddress, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10); sAddressRangeBox->Add(TEXT_BOX("End"), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5); sAddressRangeBox->Add(m_pEditEndAddress, 1, wxALIGN_CENTER_VERTICAL); - wxStaticBoxSizer *sActionBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Action")); + wxStaticBoxSizer *sActionBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Action")); sActionBox->Add(m_pWriteFlag); sActionBox->Add(m_pReadFlag); - wxBoxSizer* sFlags = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Flags")); + wxBoxSizer* sFlags = new wxStaticBoxSizer(wxVERTICAL, this, _("Flags")); sFlags->Add(m_log_flag); sFlags->Add(m_break_flag); diff --git a/Source/Core/DolphinWX/Debugger/MemoryView.cpp b/Source/Core/DolphinWX/Debugger/MemoryView.cpp index dc2fa29e9b..8d3e0180e3 100644 --- a/Source/Core/DolphinWX/Debugger/MemoryView.cpp +++ b/Source/Core/DolphinWX/Debugger/MemoryView.cpp @@ -147,7 +147,7 @@ void CMemoryView::OnPopupMenu(wxCommandEvent& event) { #if wxUSE_CLIPBOARD case IDM_COPYADDRESS: - wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%08x"), selection))); + wxTheClipboard->SetData(new wxTextDataObject(wxString::Format("%08x", selection))); break; case IDM_COPYHEX: @@ -189,18 +189,18 @@ void CMemoryView::OnMouseDownR(wxMouseEvent& event) { // popup menu wxMenu* menu = new wxMenu; - //menu.Append(IDM_GOTOINMEMVIEW, "&Goto in mem view"); + //menu.Append(IDM_GOTOINMEMVIEW, _("&Goto in mem view")); #if wxUSE_CLIPBOARD - menu->Append(IDM_COPYADDRESS, StrToWxStr("Copy &address")); - menu->Append(IDM_COPYHEX, StrToWxStr("Copy &hex")); + menu->Append(IDM_COPYADDRESS, _("Copy &address")); + menu->Append(IDM_COPYHEX, _("Copy &hex")); #endif - menu->Append(IDM_TOGGLEMEMORY, StrToWxStr("Toggle &memory")); + menu->Append(IDM_TOGGLEMEMORY, _("Toggle &memory")); wxMenu* viewAsSubMenu = new wxMenu; - viewAsSubMenu->Append(IDM_VIEWASFP, StrToWxStr("FP value")); - viewAsSubMenu->Append(IDM_VIEWASASCII, StrToWxStr("ASCII")); - viewAsSubMenu->Append(IDM_VIEWASHEX, StrToWxStr("Hex")); - menu->AppendSubMenu(viewAsSubMenu, StrToWxStr("View As:")); + viewAsSubMenu->Append(IDM_VIEWASFP, _("FP value")); + viewAsSubMenu->Append(IDM_VIEWASASCII, "ASCII"); + viewAsSubMenu->Append(IDM_VIEWASHEX, _("Hex")); + menu->AppendSubMenu(viewAsSubMenu, _("View As:")); PopupMenu(menu); } @@ -209,14 +209,14 @@ void CMemoryView::OnPaint(wxPaintEvent& event) { wxPaintDC dc(this); wxRect rc = GetClientRect(); - wxFont hFont(_T("Courier")); + wxFont hFont("Courier"); hFont.SetFamily(wxFONTFAMILY_TELETYPE); wxCoord w,h; - dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&hFont); + dc.GetTextExtent("0WJyq", &w, &h, nullptr, nullptr, &hFont); if (h > rowHeight) rowHeight = h; - dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&DebuggerFont); + dc.GetTextExtent("0WJyq", &w, &h, nullptr, nullptr, &DebuggerFont); if (h > rowHeight) rowHeight = h; @@ -225,7 +225,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event) else dc.SetFont(DebuggerFont); - dc.GetTextExtent(_T("W"),&w,&h); + dc.GetTextExtent("W", &w, &h); int fontSize = w; int textPlacement = 17 + 9 * fontSize; @@ -233,15 +233,15 @@ void CMemoryView::OnPaint(wxPaintEvent& event) int width = rc.width; int numRows = (rc.height / rowHeight) / 2 + 2; dc.SetBackgroundMode(wxTRANSPARENT); - const wxChar* bgColor = _T("#ffffff"); + const wxColour bgColor = *wxWHITE; wxPen nullPen(bgColor); - wxPen currentPen(_T("#000000")); - wxPen selPen(_T("#808080")); // gray + wxPen currentPen(*wxBLACK_PEN); + wxPen selPen(*wxGREY_PEN); nullPen.SetStyle(wxTRANSPARENT); - wxBrush currentBrush(_T("#FFEfE8")); // light gray - wxBrush pcBrush(_T("#70FF70")); // green - wxBrush mcBrush(_T("#1133FF")); // blue + wxBrush currentBrush(*wxLIGHT_GREY_BRUSH); + wxBrush pcBrush(*wxGREEN_BRUSH); + wxBrush mcBrush(*wxBLUE_BRUSH); wxBrush bgBrush(bgColor); wxBrush nullBrush(bgColor); nullBrush.SetStyle(wxTRANSPARENT); @@ -259,9 +259,9 @@ void CMemoryView::OnPaint(wxPaintEvent& event) int rowY1 = rc.height / 2 + rowHeight * row - rowHeight / 2; int rowY2 = rc.height / 2 + rowHeight * row + rowHeight / 2; - wxString temp = wxString::Format(_T("%08x"), address); + wxString temp = wxString::Format("%08x", address); u32 col = debugger->GetColor(address); - wxBrush rowBrush(wxColor(col >> 16, col >> 8, col)); + wxBrush rowBrush(wxColour(col >> 16, col >> 8, col)); dc.SetBrush(nullBrush); dc.SetPen(nullPen); dc.DrawRectangle(0, rowY1, 16, rowY2); @@ -278,16 +278,16 @@ void CMemoryView::OnPaint(wxPaintEvent& event) dc.DrawRectangle(16, rowY1, width, rowY2 - 1); dc.SetBrush(currentBrush); - dc.SetTextForeground(_T("#600000")); + dc.SetTextForeground("#600000"); // Dark red dc.DrawText(temp, 17, rowY1); if (viewAsType != VIEWAS_HEX) { char mem[256]; debugger->GetRawMemoryString(memory, address, mem, 256); - dc.SetTextForeground(_T("#000080")); + dc.SetTextForeground(wxTheColourDatabase->Find("NAVY")); dc.DrawText(StrToWxStr(mem), 17+fontSize*(8), rowY1); - dc.SetTextForeground(_T("#000000")); + dc.SetTextForeground(*wxBLACK); } if (debugger->IsAlive()) @@ -371,7 +371,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event) if (desc[0] == 0) strcpy(desc, debugger->GetDescription(address).c_str()); - dc.SetTextForeground(_T("#0000FF")); + dc.SetTextForeground(*wxBLUE); if (strlen(desc)) dc.DrawText(StrToWxStr(desc), 17+fontSize*((8+8+8+30)*2), rowY1); diff --git a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp index 217d94ab6c..ed2fe66b45 100644 --- a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp @@ -94,8 +94,8 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id, //sizerBig->Add(sizerLeft, 1, wxEXPAND); sizerBig->Add(memview, 20, wxEXPAND); sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3); - sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_MEM_ADDRBOX, _T(""))); - sizerRight->Add(valbox = new wxTextCtrl(this, IDM_VALBOX, _T(""))); + sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_MEM_ADDRBOX, "")); + sizerRight->Add(valbox = new wxTextCtrl(this, IDM_VALBOX, "")); sizerRight->Add(new wxButton(this, IDM_SETVALBUTTON, _("Set &Value"))); sizerRight->AddSpacer(5); @@ -108,15 +108,15 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id, wxStaticBoxSizer* sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search")); sizerSearchType->Add(btnSearch = new wxButton(this, IDM_SEARCH, _("Search"))); - sizerSearchType->Add(chkAscii = new wxCheckBox(this, IDM_ASCII, _T("&Ascii "))); + sizerSearchType->Add(chkAscii = new wxCheckBox(this, IDM_ASCII, "&Ascii ")); sizerSearchType->Add(chkHex = new wxCheckBox(this, IDM_HEX, _("&Hex"))); sizerRight->Add(sizerSearchType); wxStaticBoxSizer* sizerDataTypes = new wxStaticBoxSizer(wxVERTICAL, this, _("Data Type")); sizerDataTypes->SetMinSize(74, 40); - sizerDataTypes->Add(chk8 = new wxCheckBox(this, IDM_U8, _T("&U8"))); - sizerDataTypes->Add(chk16 = new wxCheckBox(this, IDM_U16, _T("&U16"))); - sizerDataTypes->Add(chk32 = new wxCheckBox(this, IDM_U32, _T("&U32"))); + sizerDataTypes->Add(chk8 = new wxCheckBox(this, IDM_U8, "&U8")); + sizerDataTypes->Add(chk16 = new wxCheckBox(this, IDM_U16, "&U16")); + sizerDataTypes->Add(chk32 = new wxCheckBox(this, IDM_U32, "&U32")); sizerRight->Add(sizerDataTypes); SetSizer(sizerBig); chkHex->SetValue(1); //Set defaults @@ -163,13 +163,13 @@ void CMemoryWindow::SetMemoryValue(wxCommandEvent& event) if (!TryParse(std::string("0x") + str_addr, &addr)) { - PanicAlert("Invalid Address: %s", str_addr.c_str()); + PanicAlertT("Invalid Address: %s", str_addr.c_str()); return; } if (!TryParse(std::string("0x") + str_val, &val)) { - PanicAlert("Invalid Value: %s", str_val.c_str()); + PanicAlertT("Invalid Value: %s", str_val.c_str()); return; } @@ -416,7 +416,7 @@ void CMemoryWindow::onSearch(wxCommandEvent& event) //Match was found wxMessageBox(_("A match was found. Placing viewer at the offset.")); wxChar tmpwxstr[128] = {0}; - wxSprintf(tmpwxstr, _T("%08x"), i); + wxSprintf(tmpwxstr, "%08x", i); wxString tmpwx(tmpwxstr); addrbox->SetValue(tmpwx); //memview->curAddress = i; diff --git a/Source/Core/DolphinWX/Debugger/RegisterView.cpp b/Source/Core/DolphinWX/Debugger/RegisterView.cpp index 8d44cab4e6..a2338d5bd7 100644 --- a/Source/Core/DolphinWX/Debugger/RegisterView.cpp +++ b/Source/Core/DolphinWX/Debugger/RegisterView.cpp @@ -55,10 +55,10 @@ wxString CRegTable::GetValue(int row, int col) switch (col) { case 0: return StrToWxStr(GetGPRName(row)); - case 1: return wxString::Format(wxT("%08x"), GPR(row)); + case 1: return wxString::Format("%08x", GPR(row)); case 2: return StrToWxStr(GetFPRName(row)); - case 3: return wxString::Format(wxT("%016llx"), riPS0(row)); - case 4: return wxString::Format(wxT("%016llx"), riPS1(row)); + case 3: return wxString::Format("%016llx", riPS0(row)); + case 4: return wxString::Format("%016llx", riPS1(row)); default: return wxEmptyString; } } @@ -69,7 +69,7 @@ wxString CRegTable::GetValue(int row, int col) switch (col) { case 0: return StrToWxStr(special_reg_names[row - 32]); - case 1: return wxString::Format(wxT("%08x"), GetSpecialRegValue(row - 32)); + case 1: return wxString::Format("%08x", GetSpecialRegValue(row - 32)); default: return wxEmptyString; } } @@ -144,7 +144,7 @@ wxGridCellAttr *CRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind) { wxGridCellAttr *attr = new wxGridCellAttr(); - attr->SetBackgroundColour(wxColour(wxT("#FFFFFF"))); //wxWHITE + attr->SetBackgroundColour(*wxWHITE); attr->SetFont(DebuggerFont); switch (col) @@ -169,7 +169,7 @@ wxGridCellAttr *CRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind) case 4: red = row < 32 ? m_CachedFRegHasChanged[row][col-3] : false; break; } - attr->SetTextColour(red ? wxColor(wxT("#FF0000")) : wxColor(wxT("#000000"))); + attr->SetTextColour(red ? *wxRED : *wxBLACK); attr->IncRef(); return attr; } diff --git a/Source/Core/DolphinWX/FifoPlayerDlg.cpp b/Source/Core/DolphinWX/FifoPlayerDlg.cpp index fc163389da..3348769daf 100644 --- a/Source/Core/DolphinWX/FifoPlayerDlg.cpp +++ b/Source/Core/DolphinWX/FifoPlayerDlg.cpp @@ -418,7 +418,7 @@ void FifoPlayerDlg::OnSaveFile(wxCommandEvent& WXUNUSED(event)) // Wasn't able to save the file, shit's whack, yo. if (!result) - PanicAlert("Error saving file"); + PanicAlertT("Error saving file"); } } } diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index dbc1b716cf..b1c15bb874 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -354,11 +354,11 @@ CFrame::CFrame(wxFrame* parent, m_Mgr = new wxAuiManager(this, wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE); m_Mgr->AddPane(m_Panel, wxAuiPaneInfo() - .Name(_T("Pane 0")).Caption(_T("Pane 0")).PaneBorder(false) + .Name("Pane 0").Caption("Pane 0").PaneBorder(false) .CaptionVisible(false).Layer(0).Center().Show()); if (!g_pCodeWindow) m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo() - .Name(_T("Pane 1")).Caption(_("Logging")).CaptionVisible(true) + .Name("Pane 1").Caption(_("Logging")).CaptionVisible(true) .Layer(0).FloatingSize(wxSize(600, 350)).CloseButton(true).Hide()); AuiFullscreen = m_Mgr->SavePerspective(); @@ -400,7 +400,7 @@ CFrame::CFrame(wxFrame* parent, m_Mgr->Update(); #ifdef _WIN32 - SetToolTip(wxT("")); + SetToolTip(""); GetToolTip()->SetAutoPop(25000); #endif @@ -565,8 +565,8 @@ void CFrame::OnResize(wxSizeEvent& event) } // Make sure the logger pane is a sane size - if (!g_pCodeWindow && m_LogWindow && m_Mgr->GetPane(_T("Pane 1")).IsShown() && - !m_Mgr->GetPane(_T("Pane 1")).IsFloating() && + if (!g_pCodeWindow && m_LogWindow && m_Mgr->GetPane("Pane 1").IsShown() && + !m_Mgr->GetPane("Pane 1").IsFloating() && (m_LogWindow->x > GetClientRect().GetWidth() || m_LogWindow->y > GetClientRect().GetHeight())) ShowResizePane(); @@ -679,17 +679,17 @@ void CFrame::OnRenderWindowSizeRequest(int width, int height) if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && (SConfig::GetInstance().m_InterfaceLogWindow || SConfig::GetInstance().m_InterfaceLogConfigWindow) && - !m_Mgr->GetPane(wxT("Pane 1")).IsFloating()) + !m_Mgr->GetPane("Pane 1").IsFloating()) { - switch (m_Mgr->GetPane(wxT("Pane 1")).dock_direction) + switch (m_Mgr->GetPane("Pane 1").dock_direction) { case wxAUI_DOCK_LEFT: case wxAUI_DOCK_RIGHT: - log_width = m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth(); + log_width = m_Mgr->GetPane("Pane 1").rect.GetWidth(); break; case wxAUI_DOCK_TOP: case wxAUI_DOCK_BOTTOM: - log_height = m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight(); + log_height = m_Mgr->GetPane("Pane 1").rect.GetHeight(); break; } } @@ -770,7 +770,7 @@ void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event)) else { // Game started by double click - BootGame(std::string("")); + BootGame(""); } } diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index 2c98fda566..20498c7ebc 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -73,7 +73,7 @@ class CRenderFrame : public wxFrame public: CRenderFrame(wxFrame* parent, wxWindowID id = wxID_ANY, - const wxString& title = wxT("Dolphin"), + const wxString& title = "Dolphin", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE); @@ -92,7 +92,7 @@ class CFrame : public CRenderFrame public: CFrame(wxFrame* parent, wxWindowID id = wxID_ANY, - const wxString& title = wxT("Dolphin"), + const wxString& title = "Dolphin", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, bool _UseDebugger = false, @@ -243,7 +243,7 @@ private: void OnFloatingPageSize(wxSizeEvent& event); void DoFloatNotebookPage(wxWindowID Id); wxFrame * CreateParentFrame(wxWindowID Id = wxID_ANY, - const wxString& title = wxT(""), + const wxString& title = "", wxWindow * = nullptr); wxString AuiFullscreen, AuiCurrent; void AddPane(); diff --git a/Source/Core/DolphinWX/FrameAui.cpp b/Source/Core/DolphinWX/FrameAui.cpp index 22356dcf73..04efd4b7e5 100644 --- a/Source/Core/DolphinWX/FrameAui.cpp +++ b/Source/Core/DolphinWX/FrameAui.cpp @@ -49,12 +49,12 @@ void CFrame::OnManagerResize(wxAuiManagerEvent& event) { if (!g_pCodeWindow && m_LogWindow && - m_Mgr->GetPane(_T("Pane 1")).IsShown() && - !m_Mgr->GetPane(_T("Pane 1")).IsFloating()) + m_Mgr->GetPane("Pane 1").IsShown() && + !m_Mgr->GetPane("Pane 1").IsFloating()) { - m_LogWindow->x = m_Mgr->GetPane(_T("Pane 1")).rect.GetWidth(); - m_LogWindow->y = m_Mgr->GetPane(_T("Pane 1")).rect.GetHeight(); - m_LogWindow->winpos = m_Mgr->GetPane(_T("Pane 1")).dock_direction; + m_LogWindow->x = m_Mgr->GetPane("Pane 1").rect.GetWidth(); + m_LogWindow->y = m_Mgr->GetPane("Pane 1").rect.GetHeight(); + m_LogWindow->winpos = m_Mgr->GetPane("Pane 1").dock_direction; } event.Skip(); } @@ -85,7 +85,7 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event) wxMessageBox(_("At least one pane must remain open."), _("Notice"), wxOK, this); } - else if (nb->GetPageCount() != 0 && !nb->GetPageText(0).IsSameAs(wxT("<>"))) + else if (nb->GetPageCount() != 0 && !nb->GetPageText(0).IsSameAs("<>")) { wxMessageBox(_("You can't close panes that have pages in them."), _("Notice"), wxOK, this); @@ -339,7 +339,7 @@ void CFrame::OnTab(wxAuiNotebookEvent& event) if (Win && Win->IsEnabled()) { Item = new wxMenuItem(MenuPopup, i + IDM_FLOAT_LOGWINDOW - IDM_LOGWINDOW, - Win->GetName(), wxT(""), wxITEM_CHECK); + Win->GetName(), "", wxITEM_CHECK); MenuPopup->Append(Item); Item->Check(!!FindWindowById(i + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW)); } @@ -369,7 +369,7 @@ void CFrame::ShowResizePane() if (m_LogWindow->y > GetClientRect().GetHeight()) m_LogWindow->y = GetClientRect().GetHeight() / 2; - wxAuiPaneInfo &pane = m_Mgr->GetPane(wxT("Pane 1")); + wxAuiPaneInfo &pane = m_Mgr->GetPane("Pane 1"); // Hide first otherwise a resize doesn't work pane.Hide(); @@ -399,7 +399,7 @@ void CFrame::TogglePane() { if (NB->GetPageCount() == 0) { - m_Mgr->GetPane(_T("Pane 1")).Hide(); + m_Mgr->GetPane("Pane 1").Hide(); m_Mgr->Update(); } else @@ -492,12 +492,10 @@ void CFrame::OnDropDownSettingsToolbar(wxAuiToolBarEvent& event) _("Add new pane")); menuPopup->Append(Item); menuPopup->Append(new wxMenuItem(menuPopup)); - Item = new wxMenuItem(menuPopup, IDM_TAB_SPLIT, _("Tab split"), - wxT(""), wxITEM_CHECK); + Item = new wxMenuItem(menuPopup, IDM_TAB_SPLIT, _("Tab split"), "", wxITEM_CHECK); menuPopup->Append(Item); Item->Check(m_bTabSplit); - Item = new wxMenuItem(menuPopup, IDM_NO_DOCKING, _("No docking"), - wxT(""), wxITEM_CHECK); + Item = new wxMenuItem(menuPopup, IDM_NO_DOCKING, _("No docking"), "", wxITEM_CHECK); menuPopup->Append(Item); Item->Check(m_bNoDocking); @@ -539,8 +537,7 @@ void CFrame::OnDropDownToolbarItem(wxAuiToolBarEvent& event) for (u32 i = 0; i < Perspectives.size(); i++) { wxMenuItem* mItem = new wxMenuItem(menuPopup, IDM_PERSPECTIVES_0 + i, - StrToWxStr(Perspectives[i].Name), - wxT(""), wxITEM_CHECK); + StrToWxStr(Perspectives[i].Name), "", wxITEM_CHECK); menuPopup->Append(mItem); @@ -617,15 +614,15 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event) { return; } - else if (dlg.GetValue().Find(wxT(",")) != -1) + else if (dlg.GetValue().Find(",") != -1) { wxMessageBox(_("The name can not contain the character ','"), _("Notice"), wxOK, this); wxString Str = dlg.GetValue(); - Str.Replace(wxT(","), wxT(""), true); + Str.Replace(",", "", true); dlg.SetValue(Str); } - else if (dlg.GetValue().IsSameAs(wxT(""))) + else if (dlg.GetValue().IsSameAs("")) { wxMessageBox(_("The name can not be empty"), _("Notice"), wxOK, this); @@ -799,7 +796,7 @@ void CFrame::ReloadPanes() // Create new panes with notebooks for (u32 i = 0; i < Perspectives[ActivePerspective].Width.size() - 1; i++) { - wxString PaneName = wxString::Format(_T("Pane %i"), i + 1); + wxString PaneName = wxString::Format("Pane %i", i + 1); m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Hide() .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking).Position(i) .Name(PaneName).Caption(PaneName)); @@ -963,7 +960,7 @@ void CFrame::SaveIniPerspectives() void CFrame::AddPane() { int PaneNum = GetNotebookCount() + 1; - wxString PaneName = wxString::Format(_T("Pane %i"), PaneNum); + wxString PaneName = wxString::Format("Pane %i", PaneNum); m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo() .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking) .Name(PaneName).Caption(PaneName) @@ -1030,12 +1027,12 @@ void CFrame::AddRemoveBlankPage() wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window; for (u32 j = 0; j < NB->GetPageCount(); j++) { - if (NB->GetPageText(j).IsSameAs(wxT("<>")) && NB->GetPageCount() > 1) + if (NB->GetPageText(j).IsSameAs("<>") && NB->GetPageCount() > 1) NB->DeletePage(j); } if (NB->GetPageCount() == 0) - NB->AddPage(new wxPanel(this, wxID_ANY), wxT("<>"), true); + NB->AddPage(new wxPanel(this, wxID_ANY), "<>", true); } } diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 1fa071645f..999243077d 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -148,7 +148,7 @@ void CFrame::CreateMenu() fileMenu->AppendSeparator(); fileMenu->Append(IDM_BROWSE, _("&Browse for ISOs...")); fileMenu->AppendSeparator(); - fileMenu->Append(wxID_EXIT, _("E&xit") + wxString(wxT("\tAlt+F4"))); + fileMenu->Append(wxID_EXIT, _("E&xit") + wxString("\tAlt+F4")); m_MenuBar->Append(fileMenu, _("&File")); // Emulation menu @@ -176,7 +176,7 @@ void CFrame::CreateMenu() wxMenu *skippingMenu = new wxMenu; emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping")); for (int i = 0; i < 10; i++) - skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format(wxT("%i"), i), wxEmptyString, wxITEM_RADIO); + skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format("%i", i), wxEmptyString, wxITEM_RADIO); skippingMenu->Check(IDM_FRAMESKIP0 + SConfig::GetInstance().m_FrameSkip, true); Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip); @@ -237,7 +237,7 @@ void CFrame::CreateMenu() toolsMenu->Append(IDM_NETPLAY, _("Start &NetPlay")); toolsMenu->Append(IDM_MENU_INSTALLWAD, _("Install WAD")); - UpdateWiiMenuChoice(toolsMenu->Append(IDM_LOAD_WII_MENU, wxT("Dummy string to keep wxw happy"))); + UpdateWiiMenuChoice(toolsMenu->Append(IDM_LOAD_WII_MENU, "Dummy string to keep wxw happy")); toolsMenu->Append(IDM_FIFOPLAYER, _("Fifo Player")); @@ -455,9 +455,9 @@ wxString CFrame::GetMenuLabel(int Id) Label = _("Load State..."); break; - case HK_SAVE_FIRST_STATE: Label = wxString("Save Oldest State"); break; - case HK_UNDO_LOAD_STATE: Label = wxString("Undo Load State"); break; - case HK_UNDO_SAVE_STATE: Label = wxString("Undo Save State"); break; + case HK_SAVE_FIRST_STATE: Label = _("Save Oldest State"); break; + case HK_UNDO_LOAD_STATE: Label = _("Undo Load State"); break; + case HK_UNDO_SAVE_STATE: Label = _("Undo Save State"); break; default: Label = wxString::Format(_("Undefined %i"), Id); @@ -540,7 +540,7 @@ void CFrame::RecreateToolbar() PopulateToolbar(m_ToolBar); m_Mgr->AddPane(m_ToolBar, wxAuiPaneInfo(). - Name(wxT("TBMain")).Caption(wxT("TBMain")). + Name("TBMain").Caption("TBMain"). ToolbarPane().Top(). LeftDockable(false).RightDockable(false).Floatable(false)); @@ -550,14 +550,14 @@ void CFrame::RecreateToolbar() g_pCodeWindow->PopulateToolbar(m_ToolBarDebug); m_Mgr->AddPane(m_ToolBarDebug, wxAuiPaneInfo(). - Name(wxT("TBDebug")).Caption(wxT("TBDebug")). + Name("TBDebug").Caption("TBDebug"). ToolbarPane().Top(). LeftDockable(false).RightDockable(false).Floatable(false)); m_ToolBarAui = new wxAuiToolBar(this, ID_TOOLBAR_AUI, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE); PopulateToolbarAui(m_ToolBarAui); m_Mgr->AddPane(m_ToolBarAui, wxAuiPaneInfo(). - Name(wxT("TBAui")).Caption(wxT("TBAui")). + Name("TBAui").Caption("TBAui"). ToolbarPane().Top(). LeftDockable(false).RightDockable(false).Floatable(false)); } @@ -650,7 +650,7 @@ void CFrame::DoOpen(bool Boot) _("Select the file to load"), wxEmptyString, wxEmptyString, wxEmptyString, _("All GC/Wii files (elf, dol, gcm, iso, wbfs, ciso, gcz, wad)") + - wxString::Format(wxT("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad;*.dff;*.tmd|%s"), + wxString::Format("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad;*.dff;*.tmd|%s", wxGetTranslation(wxALL_FILES)), wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); @@ -748,7 +748,7 @@ void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event)) } if (Movie::BeginRecordingInput(controllers)) - BootGame(std::string("")); + BootGame(""); } void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event)) @@ -757,7 +757,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event)) _("Select The Recording File"), wxEmptyString, wxEmptyString, wxEmptyString, _("Dolphin TAS Movies (*.dtm)") + - wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)), + wxString::Format("|*.dtm|%s", wxGetTranslation(wxALL_FILES)), wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this); @@ -772,7 +772,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event)) } if (Movie::PlayInput(WxStrToStr(path))) - BootGame(std::string("")); + BootGame(""); } void CFrame::OnRecordExport(wxCommandEvent& WXUNUSED (event)) @@ -806,7 +806,7 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event)) else { // Core is uninitialized, start the game - BootGame(std::string("")); + BootGame(""); } } @@ -1143,10 +1143,10 @@ void CFrame::DoStop() m_RenderParent = nullptr; // Clean framerate indications from the status bar. - GetStatusBar()->SetStatusText(wxT(" "), 0); + GetStatusBar()->SetStatusText(" ", 0); // Clear wiimote connection status from the status bar. - GetStatusBar()->SetStatusText(wxT(" "), 1); + GetStatusBar()->SetStatusText(" ", 1); // If batch mode was specified on the command-line, exit now. if (m_bBatchMode) @@ -1176,7 +1176,7 @@ void CFrame::DoRecordingSave() _("Select The Recording File"), wxEmptyString, wxEmptyString, wxEmptyString, _("Dolphin TAS Movies (*.dtm)") + - wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)), + wxString::Format("|*.dtm|%s", wxGetTranslation(wxALL_FILES)), wxFD_SAVE | wxFD_PREVIEW | wxFD_OVERWRITE_PROMPT, this); @@ -1312,7 +1312,7 @@ void CFrame::ClearStatusBar() { if (this->GetStatusBar()->IsEnabled()) { - this->GetStatusBar()->SetStatusText(wxT(""),0); + this->GetStatusBar()->SetStatusText("", 0); } } @@ -1407,7 +1407,7 @@ void CFrame::OnInstallWAD(wxCommandEvent& event) wxString path = wxFileSelector( _("Select a Wii WAD file to install"), wxEmptyString, wxEmptyString, wxEmptyString, - _T("Wii WAD file (*.wad)|*.wad"), + "Wii WAD file (*.wad)|*.wad", wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this); fileName = WxStrToStr(path); @@ -1474,8 +1474,8 @@ void CFrame::ConnectWiimote(int wm_idx, bool connect) if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) { GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect); - wxString msg(wxString::Format(wxT("Wiimote %i %s"), wm_idx + 1, - connect ? wxT("Connected") : wxT("Disconnected"))); + wxString msg(wxString::Format(_("Wiimote %i %s"), wm_idx + 1, + connect ? _("Connected") : _("Disconnected"))); Core::DisplayMessage(WxStrToStr(msg), 3000); Host_UpdateMainFrame(); } @@ -1511,7 +1511,7 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event)) _("Select the state to load"), wxEmptyString, wxEmptyString, wxEmptyString, _("All Save States (sav, s##)") + - wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)), + wxString::Format("|*.sav;*.s??|%s", wxGetTranslation(wxALL_FILES)), wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this); @@ -1525,7 +1525,7 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event)) _("Select the state to save"), wxEmptyString, wxEmptyString, wxEmptyString, _("All Save States (sav, s##)") + - wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)), + wxString::Format("|*.sav;*.s??|%s", wxGetTranslation(wxALL_FILES)), wxFD_SAVE, this); @@ -1853,21 +1853,21 @@ void CFrame::DoToggleToolbar(bool _show) { if (_show) { - m_Mgr->GetPane(wxT("TBMain")).Show(); + m_Mgr->GetPane("TBMain").Show(); if (g_pCodeWindow) { - m_Mgr->GetPane(wxT("TBDebug")).Show(); - m_Mgr->GetPane(wxT("TBAui")).Show(); + m_Mgr->GetPane("TBDebug").Show(); + m_Mgr->GetPane("TBAui").Show(); } m_Mgr->Update(); } else { - m_Mgr->GetPane(wxT("TBMain")).Hide(); + m_Mgr->GetPane("TBMain").Hide(); if (g_pCodeWindow) { - m_Mgr->GetPane(wxT("TBDebug")).Hide(); - m_Mgr->GetPane(wxT("TBAui")).Hide(); + m_Mgr->GetPane("TBDebug").Hide(); + m_Mgr->GetPane("TBAui").Hide(); } m_Mgr->Update(); } diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index 5bfec7d936..e9de816499 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -308,8 +308,8 @@ void CGameListCtrl::Update() InitBitmaps(); // add columns - InsertColumn(COLUMN_DUMMY,_T("")); - InsertColumn(COLUMN_PLATFORM, _T("")); + InsertColumn(COLUMN_DUMMY, ""); + InsertColumn(COLUMN_PLATFORM, ""); InsertColumn(COLUMN_BANNER, _("Banner")); InsertColumn(COLUMN_TITLE, _("Title")); @@ -317,7 +317,7 @@ void CGameListCtrl::Update() // wii titles We show in the same column : company for GC games and // description for wii/wad games InsertColumn(COLUMN_NOTES, _("Notes")); - InsertColumn(COLUMN_COUNTRY, _T("")); + InsertColumn(COLUMN_COUNTRY, ""); InsertColumn(COLUMN_SIZE, _("Size")); InsertColumn(COLUMN_EMULATION_STATE, _("State")); @@ -1190,16 +1190,16 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event)) { wxString FileType; if (iso->GetPlatform() == GameListItem::WII_DISC) - FileType = _("All Wii ISO files (iso)") + wxString(wxT("|*.iso")); + FileType = _("All Wii ISO files (iso)") + "|*.iso"; else - FileType = _("All Gamecube GCM files (gcm)") + wxString(wxT("|*.gcm")); + FileType = _("All Gamecube GCM files (gcm)") + "|*.gcm"; path = wxFileSelector( _("Save decompressed GCM/ISO"), StrToWxStr(FilePath), StrToWxStr(FileName) + FileType.After('*'), wxEmptyString, - FileType + wxT("|") + wxGetTranslation(wxALL_FILES), + FileType + "|" + wxGetTranslation(wxALL_FILES), wxFD_SAVE, this); } @@ -1208,10 +1208,10 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event)) path = wxFileSelector( _("Save compressed GCM/ISO"), StrToWxStr(FilePath), - StrToWxStr(FileName) + _T(".gcz"), + StrToWxStr(FileName) + ".gcz", wxEmptyString, _("All compressed GC/Wii ISO files (gcz)") + - wxString::Format(wxT("|*.gcz|%s"), wxGetTranslation(wxALL_FILES)), + wxString::Format("|*.gcz|%s", wxGetTranslation(wxALL_FILES)), wxFD_SAVE, this); } @@ -1325,7 +1325,7 @@ void CGameListCtrl::OnDropFiles(wxDropFilesEvent& event) } if (Movie::PlayInput(WxStrToStr(file.GetFullPath()))) - main_frame->BootGame(std::string("")); + main_frame->BootGame(""); } else if (!Core::IsRunning()) { diff --git a/Source/Core/DolphinWX/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/GeckoCodeDiag.cpp index 3e91852b16..6f131e19e7 100644 --- a/Source/Core/DolphinWX/GeckoCodeDiag.cpp +++ b/Source/Core/DolphinWX/GeckoCodeDiag.cpp @@ -141,7 +141,7 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&) // add codes to info listbox for (const GeckoCode::Code& code : m_gcodes[sel].codes) { - m_infobox.listbox_codes->Append(wxString::Format(wxT("%08X %08X"), code.address, code.data)); + m_infobox.listbox_codes->Append(wxString::Format("%08X %08X", code.address, code.data)); } } else diff --git a/Source/Core/DolphinWX/HotkeyDlg.cpp b/Source/Core/DolphinWX/HotkeyDlg.cpp index 7aae86eb70..7176e4e6e9 100644 --- a/Source/Core/DolphinWX/HotkeyDlg.cpp +++ b/Source/Core/DolphinWX/HotkeyDlg.cpp @@ -160,7 +160,7 @@ void HotkeyConfigDialog::DoGetButtons(int _GetId) // Current time int TmpTime = Seconds - (GetButtonWaitingTimer / TimesPerSecond); // Update text - SetButtonText(_GetId, wxString::Format(wxT("[ %d ]"), TmpTime)); + SetButtonText(_GetId, wxString::Format("[ %d ]", TmpTime)); } // Time's up diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp index 70565d5fd8..71445c15d9 100644 --- a/Source/Core/DolphinWX/ISOProperties.cpp +++ b/Source/Core/DolphinWX/ISOProperties.cpp @@ -258,11 +258,11 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW m_Lang->Disable(); } - wxString temp = _T("0x") + StrToWxStr(OpenISO->GetMakerID()); + wxString temp = "0x" + StrToWxStr(OpenISO->GetMakerID()); m_MakerID->SetValue(temp); - m_Revision->SetValue(wxString::Format(wxT("%u"), OpenISO->GetRevision())); + m_Revision->SetValue(wxString::Format("%u", OpenISO->GetRevision())); m_Date->SetValue(StrToWxStr(OpenISO->GetApploaderDate())); - m_FST->SetValue(wxString::Format(wxT("%u"), OpenISO->GetFSTSize())); + m_FST->SetValue(wxString::Format("%u", OpenISO->GetFSTSize())); // Here we set all the info to be shown (be it SJIS or Ascii) + we set the window title if (!IsWad) @@ -677,7 +677,7 @@ void CISOProperties::OnBannerImageSave(wxCommandEvent& WXUNUSED (event)) { wxString dirHome; - wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(wxT("%s.png"), m_GameID->GetLabel().c_str()), + wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format("%s.png", m_GameID->GetLabel().c_str()), wxALL_FILES_PATTERN, wxFD_SAVE|wxFD_OVERWRITE_PROMPT); if (dialog.ShowModal() == wxID_OK) { @@ -745,7 +745,7 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event)) while (m_Treectrl->GetItemParent(m_Treectrl->GetSelection()) != m_Treectrl->GetRootItem()) { wxString temp = m_Treectrl->GetItemText(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); - File = temp + wxT(DIR_SEP_CHR) + File; + File = temp + DIR_SEP_CHR + File; m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); } @@ -818,7 +818,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde // Extraction for (u32 i = index[0]; i < index[1]; i++) { - dialog.SetTitle(wxString::Format(wxT("%s : %d%%"), dialogTitle.c_str(), + dialog.SetTitle(wxString::Format("%s : %d%%", dialogTitle.c_str(), (u32)(((float)(i - index[0]) / (float)(index[1] - index[0])) * 100))); dialog.Update(i, wxString::Format(_("Extracting %s"), StrToWxStr(fst[i]->m_FullPath))); @@ -882,7 +882,7 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event) while (m_Treectrl->GetItemParent(m_Treectrl->GetSelection()) != m_Treectrl->GetRootItem()) { wxString temp = m_Treectrl->GetItemText(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); - Directory = temp + wxT(DIR_SEP_CHR) + Directory; + Directory = temp + DIR_SEP_CHR + Directory; m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); } @@ -1164,10 +1164,10 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename) [NSString stringWithUTF8String: filename.c_str()] withApplication: @"TextEdit"]; #else - wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("ini")); + wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension("ini"); if (filetype == nullptr) // From extension failed, trying with MIME type now { - filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain")); + filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain"); if (filetype == nullptr) // MIME type failed, aborting mission { PanicAlertT("Filetype 'ini' is unknown! Will not open!"); @@ -1409,7 +1409,7 @@ void CISOProperties::ActionReplayList_Save() lines.push_back("$" + code.name); for (const ActionReplay::AREntry& op : code.ops) { - lines.push_back(WxStrToStr(wxString::Format(wxT("%08X %08X"), op.cmd_addr, op.value))); + lines.push_back(WxStrToStr(wxString::Format("%08X %08X", op.cmd_addr, op.value))); } } ++index; diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp index a6aeed9f96..8c249ea690 100644 --- a/Source/Core/DolphinWX/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/InputConfigDiag.cpp @@ -172,7 +172,7 @@ ControlDialog::ControlDialog(GamepadPage* const parent, InputPlugin& plugin, Con } ControlButton::ControlButton(wxWindow* const parent, ControllerInterface::ControlReference* const _ref, const unsigned int width, const std::string& label) -: wxButton(parent, -1, wxT(""), wxDefaultPosition, wxSize(width,20)) +: wxButton(parent, -1, "", wxDefaultPosition, wxSize(width,20)) , control_reference(_ref) { if (label.empty()) @@ -267,10 +267,10 @@ void ControlDialog::UpdateGUI() switch (control_reference->parse_error) { case EXPRESSION_PARSE_SYNTAX_ERROR: - m_error_label->SetLabel("Syntax error"); + m_error_label->SetLabel(_("Syntax error")); break; case EXPRESSION_PARSE_NO_DEVICE: - m_error_label->SetLabel("Device not found"); + m_error_label->SetLabel(_("Device not found")); break; default: m_error_label->SetLabel(""); @@ -609,8 +609,8 @@ wxStaticBoxSizer* ControlDialog::CreateControlChooser(GamepadPage* const parent) range_slider->Bind(wxEVT_SCROLL_CHANGED, &GamepadPage::AdjustControlOption, parent); wxStaticText* const range_label = new wxStaticText(this, -1, _("Range")); - m_bound_label = new wxStaticText(this, -1, wxT("")); - m_error_label = new wxStaticText(this, -1, wxT("")); + m_bound_label = new wxStaticText(this, -1, ""); + m_error_label = new wxStaticText(this, -1, ""); wxBoxSizer* const range_sizer = new wxBoxSizer(wxHORIZONTAL); range_sizer->Add(range_label, 0, wxCENTER|wxLEFT, 5); @@ -963,7 +963,7 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i wxStaticBoxSizer* const device_sbox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Device")); - device_cbox = new wxComboBox(this, -1, wxT(""), wxDefaultPosition, wxSize(64,-1)); + device_cbox = new wxComboBox(this, -1, "", wxDefaultPosition, wxSize(64,-1)); device_cbox->ToggleWindowStyle(wxTE_PROCESS_ENTER); wxButton* refresh_button = new wxButton(this, -1, _("Refresh"), wxDefaultPosition, wxSize(60,-1)); @@ -985,7 +985,7 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i 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)); + profile_cbox = new wxComboBox(this, -1, "", wxDefaultPosition, wxSize(64,-1)); wxButton* const pload_btn = new wxButton(this, -1, _("Load"), wxDefaultPosition, wxSize(48,-1)); wxButton* const psave_btn = new wxButton(this, -1, _("Save"), wxDefaultPosition, wxSize(48,-1)); @@ -1026,7 +1026,7 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputPlugin& plugin { GamepadPage* gp = new GamepadPage(m_pad_notebook, m_plugin, i, this); m_padpages.push_back(gp); - m_pad_notebook->AddPage(gp, wxString::Format(wxT("%s %u"), wxGetTranslation(StrToWxStr(m_plugin.gui_name)), 1+i)); + m_pad_notebook->AddPage(gp, wxString::Format("%s %u", wxGetTranslation(StrToWxStr(m_plugin.gui_name)), 1+i)); } m_pad_notebook->SetSelection(tab_num); diff --git a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp index e1bc6bd3f2..998758d50b 100644 --- a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp +++ b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp @@ -116,8 +116,8 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event)) if (GROUP_TYPE_STICK == g->control_group->type) { // outline and fill colors - wxBrush LightGrayBrush(_T("#dddddd")); - wxPen LightGrayPen(_T("#bfbfbf")); + wxBrush LightGrayBrush("#dddddd"); + wxPen LightGrayPen("#bfbfbf"); dc.SetBrush(LightGrayBrush); dc.SetPen(LightGrayPen); @@ -273,7 +273,7 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event)) else { unsigned char amt = 255 - g->control_group->controls[n]->control_ref->State() * 128; - dc.SetBrush(wxBrush(wxColor(amt, amt, amt))); + dc.SetBrush(wxBrush(wxColour(amt, amt, amt))); } dc.DrawRectangle(n * 12, 0, 14, 12); @@ -391,7 +391,7 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event)) // box outline // Windows XP color - dc.SetPen(wxPen(_T("#7f9db9"))); + dc.SetPen(wxPen("#7f9db9")); dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.DrawRectangle(0, 0, bitmap.GetWidth(), bitmap.GetHeight()); diff --git a/Source/Core/DolphinWX/LogWindow.cpp b/Source/Core/DolphinWX/LogWindow.cpp index 84413c9996..15be942b20 100644 --- a/Source/Core/DolphinWX/LogWindow.cpp +++ b/Source/Core/DolphinWX/LogWindow.cpp @@ -127,7 +127,7 @@ void CLogWindow::CreateGUIControls() m_FontChoice->Append(_("Selected font")); DefaultFont = GetFont(); - MonoSpaceFont.SetNativeFontInfoUserDesc(_T("lucida console windows-1252")); + MonoSpaceFont.SetNativeFontInfoUserDesc("lucida console windows-1252"); LogFont.push_back(DefaultFont); LogFont.push_back(MonoSpaceFont); LogFont.push_back(DebuggerFont); @@ -312,7 +312,7 @@ void CLogWindow::UpdateLog() break; case WARNING_LEVEL: - m_Log->SetDefaultStyle(wxTextAttr(wxColour(255, 255, 0))); // YELLOW + m_Log->SetDefaultStyle(wxTextAttr(*wxYELLOW)); break; case NOTICE_LEVEL: diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index 47e70ccb50..9a46de1963 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -215,17 +215,15 @@ bool DolphinApp::OnInit() return false; } - UseDebugger = parser.Found(wxT("debugger")); - UseLogger = parser.Found(wxT("logger")); - LoadFile = parser.Found(wxT("exec"), &FileToLoad); - BatchMode = parser.Found(wxT("batch")); - selectVideoBackend = parser.Found(wxT("video_backend"), - &videoBackendName); - selectAudioEmulation = parser.Found(wxT("audio_emulation"), - &audioEmulationName); - playMovie = parser.Found(wxT("movie"), &movieFile); + UseDebugger = parser.Found("debugger"); + UseLogger = parser.Found("logger"); + LoadFile = parser.Found("exec", &FileToLoad); + BatchMode = parser.Found("batch"); + selectVideoBackend = parser.Found("video_backend", &videoBackendName); + selectAudioEmulation = parser.Found("audio_emulation", &audioEmulationName); + playMovie = parser.Found("movie", &movieFile); - if (parser.Found(wxT("user"), &userPath)) + if (parser.Found("user", &userPath)) { File::CreateFullPath(WxStrToStr(userPath) + DIR_SEP); File::GetUserPath(D_USER_IDX, userPath.ToStdString() + DIR_SEP); @@ -426,7 +424,7 @@ void DolphinApp::InitLanguageSupport() m_locale->AddCatalogLookupPathPrefix(StrToWxStr(File::GetExeDirectory() + DIR_SEP "Languages")); #endif - m_locale->AddCatalog(wxT("dolphin-emu")); + m_locale->AddCatalog("dolphin-emu"); if (!m_locale->IsOk()) { @@ -497,7 +495,7 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style* else { wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PANIC); - event.SetString(StrToWxStr(caption) + wxT(":") + StrToWxStr(text)); + event.SetString(StrToWxStr(caption) + ":" + StrToWxStr(text)); event.SetInt(yes_no); main_frame->GetEventHandler()->AddPendingEvent(event); main_frame->panic_event.Wait(); diff --git a/Source/Core/DolphinWX/MemcardManager.cpp b/Source/Core/DolphinWX/MemcardManager.cpp index 29bede0aa5..70211ff5dc 100644 --- a/Source/Core/DolphinWX/MemcardManager.cpp +++ b/Source/Core/DolphinWX/MemcardManager.cpp @@ -34,7 +34,7 @@ #include "DolphinWX/MemcardManager.h" #include "DolphinWX/WxUtils.h" -#define ARROWS slot ? _T("") : ARROW[slot], slot ? ARROW[slot] : _T("") +#define ARROWS slot ? "" : ARROW[slot], slot ? ARROW[slot] : "" const u8 hdr[] = { 0x42,0x4D, @@ -197,7 +197,7 @@ void CMemcardManager::CreateGUIControls() { // Create the controls for both memcards - const wxChar* ARROW[2] = {_T("<-"), _T("->")}; + const char* ARROW[2] = { "<-", "->" }; m_ConvertToGci = new wxButton(this, ID_CONVERTTOGCI, _("Convert to GCI")); @@ -228,14 +228,14 @@ void CMemcardManager::CreateGUIControls() m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot, StrToWxStr(File::GetUserPath(D_GCUSER_IDX)), _("Choose a memory card:"), - _("Gamecube Memory Cards (*.raw,*.gcp)") + wxString(wxT("|*.raw;*.gcp")), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); + _("Gamecube Memory Cards (*.raw,*.gcp)") + wxString("|*.raw;*.gcp"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); m_MemcardList[slot] = new CMemcardListCtrl(this, ID_MEMCARDLIST_A + slot, wxDefaultPosition, wxSize(350,400), wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL, mcmSettings); m_MemcardList[slot]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL); - sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, _("Memory Card") + wxString::Format(wxT(" %c"), 'A' + slot)); + sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, _("Memory Card") + wxString::Format(" %c", 'A' + slot)); sMemcard[slot]->Add(m_MemcardPath[slot], 0, wxEXPAND|wxALL, 5); sMemcard[slot]->Add(m_MemcardList[slot], 1, wxEXPAND|wxALL, 5); sMemcard[slot]->Add(sPages, 0, wxEXPAND|wxALL, 1); @@ -429,7 +429,7 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot) if (slot != -1) { memoryCard[slot]->FixChecksums(); - if (!memoryCard[slot]->Save()) PanicAlert(E_SAVEFAILED); + if (!memoryCard[slot]->Save()) PanicAlertT(E_SAVEFAILED); page[slot] = FIRSTPAGE; ReloadMemcard(WxStrToStr(m_MemcardPath[slot]->GetPath()), slot); } @@ -443,7 +443,7 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot) case OUTOFBLOCKS: if (slot == -1) { - PanicAlert(E_UNK); + PanicAlertT(E_UNK); break; } PanicAlertT("Only %d blocks available", memoryCard[slot]->GetFreeBlocks()); @@ -475,14 +475,14 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot) PanicAlertT("Invalid bat.map or dir entry"); break; case WRITEFAIL: - PanicAlert(E_SAVEFAILED); + PanicAlertT(E_SAVEFAILED); break; case DELETE_FAIL: PanicAlertT("Order of files in the File Directory do not match the block order\n" "Right click and export all of the saves,\nand import the saves to a new memcard\n"); break; default: - PanicAlert(E_UNK); + PanicAlertT(E_UNK); break; } SetFocus(); @@ -523,7 +523,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event) } else { - PanicAlert(E_SAVEFAILED); + PanicAlertT(E_SAVEFAILED); } break; case ID_CONVERTTOGCI: @@ -538,16 +538,16 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event) ? StrToWxStr("") : StrToWxStr(DefaultIOPath), wxEmptyString, wxEmptyString, - _("GameCube Savegame files(*.gci;*.gcs;*.sav)") + wxString(wxT("|*.gci;*.gcs;*.sav|")) + - _("Native GCI files(*.gci)") + wxString(wxT("|*.gci|")) + - _("MadCatz Gameshark files(*.gcs)") + wxString(wxT("|*.gcs|")) + - _("Datel MaxDrive/Pro files(*.sav)") + wxString(wxT("|*.sav")), + _("GameCube Savegame files(*.gci;*.gcs;*.sav)") + wxString("|*.gci;*.gcs;*.sav|") + + _("Native GCI files(*.gci)") + wxString("|*.gci|") + + _("MadCatz Gameshark files(*.gcs)") + wxString("|*.gcs|") + + _("Datel MaxDrive/Pro files(*.sav)") + wxString("|*.sav"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); if (!fileName.empty() && !fileName2.empty()) { wxString temp2 = wxFileSelector(_("Save GCI as..."), - wxEmptyString, wxEmptyString, wxT(".gci"), - _("GCI File(*.gci)") + wxString(_T("|*.gci")), + wxEmptyString, wxEmptyString, ".gci", + _("GCI File(*.gci)") + wxString("|*.gci"), wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this); if (temp2.empty()) @@ -571,16 +571,16 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event) std::string gciFilename; if (!memoryCard[slot]->GCI_FileName(index, gciFilename)) { - PanicAlert("Invalid index"); + PanicAlertT("Invalid index"); return; } wxString fileName = wxFileSelector( _("Export save as..."), StrToWxStr(DefaultIOPath), - StrToWxStr(gciFilename), wxT(".gci"), - _("Native GCI files(*.gci)") + wxString(wxT("|*.gci|")) + - _("MadCatz Gameshark files(*.gcs)") + wxString(wxT("|*.gcs|")) + - _("Datel MaxDrive/Pro files(*.sav)") + wxString(wxT("|*.sav")), + StrToWxStr(gciFilename), ".gci", + _("Native GCI files(*.gci)") + wxString("|*.gci|") + + _("MadCatz Gameshark files(*.gcs)") + wxString("|*.gcs|") + + _("Datel MaxDrive/Pro files(*.sav)") + wxString("|*.sav"), wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this); if (fileName.length() > 0) @@ -741,11 +741,11 @@ bool CMemcardManager::ReloadMemcard(const std::string& fileName, int card) if (blocks == 0xFFFF) blocks = 0; - wxBlock.Printf(wxT("%10d"), blocks); + wxBlock.Printf("%10d", blocks); m_MemcardList[card]->SetItem(index,COLUMN_BLOCKS, wxBlock); firstblock = memoryCard[card]->DEntry_FirstBlock(fileIndex); //if (firstblock == 0xFFFF) firstblock = 3; // to make firstblock -1 - wxFirstBlock.Printf(wxT("%15d"), firstblock); + wxFirstBlock.Printf("%15d", firstblock); m_MemcardList[card]->SetItem(index, COLUMN_FIRSTBLOCK, wxFirstBlock); m_MemcardList[card]->SetItem(index, COLUMN_ICON, wxEmptyString); diff --git a/Source/Core/DolphinWX/MemcardManager.h b/Source/Core/DolphinWX/MemcardManager.h index 625a14fb6d..4005953149 100644 --- a/Source/Core/DolphinWX/MemcardManager.h +++ b/Source/Core/DolphinWX/MemcardManager.h @@ -38,7 +38,7 @@ class CMemcardManager : public wxDialog { public: - CMemcardManager(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = wxGetTranslation(wxT(MEMCARDMAN_TITLE)), + CMemcardManager(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = wxGetTranslation(MEMCARDMAN_TITLE), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MEMCARD_MANAGER_STYLE); virtual ~CMemcardManager(); diff --git a/Source/Core/DolphinWX/MemoryCards/WiiSaveCrypted.cpp b/Source/Core/DolphinWX/MemoryCards/WiiSaveCrypted.cpp index 97ffd20d19..0195e9858f 100644 --- a/Source/Core/DolphinWX/MemoryCards/WiiSaveCrypted.cpp +++ b/Source/Core/DolphinWX/MemoryCards/WiiSaveCrypted.cpp @@ -610,7 +610,7 @@ void CWiiSaveCrypted::ScanForFiles(std::string savDir, std::vector& { if ((elem.virtualName == "nocopy") || elem.virtualName == "nomove") { - PanicAlert("This save will likely require homebrew tools to copy to a real wii"); + PanicAlertT("This save will likely require homebrew tools to copy to a real Wii."); } Directories.push_back(elem.physicalName); diff --git a/Source/Core/DolphinWX/NetWindow.cpp b/Source/Core/DolphinWX/NetWindow.cpp index c1ca1823cf..bb7044e313 100644 --- a/Source/Core/DolphinWX/NetWindow.cpp +++ b/Source/Core/DolphinWX/NetWindow.cpp @@ -81,7 +81,7 @@ void FillWithGameNames(wxListBox* game_lbox, const CGameListCtrl& game_list) } NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl* const game_list) - : wxFrame(parent, wxID_ANY, wxT(NETPLAY_TITLEBAR)) + : wxFrame(parent, wxID_ANY, NETPLAY_TITLEBAR) , m_game_list(game_list) { IniFile inifile; @@ -309,7 +309,7 @@ void NetPlaySetupDiag::OnQuit(wxCommandEvent&) NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game_list, const std::string& game, const bool is_hosting) - : wxFrame(parent, wxID_ANY, wxT(NETPLAY_TITLEBAR)) + : wxFrame(parent, wxID_ANY, NETPLAY_TITLEBAR) , m_selected_game(game) , m_start_btn(nullptr) , m_game_list(game_list) @@ -375,7 +375,7 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game 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") + wxSpinCtrl* const padbuf_spin = new wxSpinCtrl(panel, wxID_ANY, "20" , wxDefaultPosition, wxSize(64, -1), wxSP_ARROW_KEYS, 0, 200, INITIAL_PAD_BUFFER_SIZE); padbuf_spin->Bind(wxEVT_SPINCTRL, &NetPlayDiag::OnAdjustBuffer, this); bottom_szr->Add(padbuf_spin, 0, wxCENTER); @@ -426,7 +426,7 @@ void NetPlayDiag::OnChat(wxCommandEvent&) if (s.Length()) { netplay_client->SendChatMessage(WxStrToStr(s)); - m_chat_text->AppendText(s.Prepend(wxT(" >> ")).Append(wxT('\n'))); + m_chat_text->AppendText(s.Prepend(" >> ").Append('\n')); m_chat_msg_text->Clear(); } } @@ -520,7 +520,7 @@ void NetPlayDiag::OnAdjustBuffer(wxCommandEvent& event) std::ostringstream ss; ss << "< Pad Buffer: " << val << " >"; netplay_client->SendChatMessage(ss.str()); - m_chat_text->AppendText(StrToWxStr(ss.str()).Append(wxT('\n'))); + m_chat_text->AppendText(StrToWxStr(ss.str()).Append('\n')); } void NetPlayDiag::OnQuit(wxCommandEvent&) @@ -574,7 +574,7 @@ void NetPlayDiag::OnThread(wxCommandEvent& event) std::string s; chat_msgs.Pop(s); //PanicAlert("message: %s", s.c_str()); - m_chat_text->AppendText(StrToWxStr(s).Append(wxT('\n'))); + m_chat_text->AppendText(StrToWxStr(s).Append('\n')); } } @@ -655,7 +655,7 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim for (unsigned int i=0; i<4; ++i) { wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL); - v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Pad ")) + (wxChar)(wxT('0')+i))), + v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Pad ")) + (wxChar)('0'+i))), 1, wxALIGN_CENTER_HORIZONTAL); m_map_cbox[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names); @@ -676,7 +676,7 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim for (unsigned int i=0; i<4; ++i) { wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL); - v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Wiimote ")) + (wxChar)(wxT('0')+i))), + v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Wiimote ")) + (wxChar)('0'+i))), 1, wxALIGN_CENTER_HORIZONTAL); m_map_cbox[i+4] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names); diff --git a/Source/Core/DolphinWX/PatchAddEdit.cpp b/Source/Core/DolphinWX/PatchAddEdit.cpp index c7e8e0677b..2dd3454d77 100644 --- a/Source/Core/DolphinWX/PatchAddEdit.cpp +++ b/Source/Core/DolphinWX/PatchAddEdit.cpp @@ -72,7 +72,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection) EditPatchName->SetValue(currentName); wxStaticText* EditPatchOffsetText = new wxStaticText(this, ID_EDITPATCH_OFFSET_TEXT, _("Offset:")); EditPatchOffset = new wxTextCtrl(this, ID_EDITPATCH_OFFSET); - EditPatchOffset->SetValue(wxString::Format(wxT("%08X"), tempEntries.at(0).address)); + EditPatchOffset->SetValue(wxString::Format("%08X", tempEntries.at(0).address)); EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT); EntrySelection->SetRange(0, (int)tempEntries.size()-1); EntrySelection->SetValue((int)tempEntries.size()-1); @@ -83,7 +83,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection) EditPatchType->SetSelection((int)tempEntries.at(0).type); wxStaticText* EditPatchValueText = new wxStaticText(this, ID_EDITPATCH_VALUE_TEXT, _("Value:")); EditPatchValue = new wxTextCtrl(this, ID_EDITPATCH_VALUE); - EditPatchValue->SetValue(wxString::Format(wxT("%0*X"), PatchEngine::GetPatchTypeCharLength(tempEntries.at(0).type), tempEntries.at(0).value)); + EditPatchValue->SetValue(wxString::Format("%0*X", PatchEngine::GetPatchTypeCharLength(tempEntries.at(0).type), tempEntries.at(0).value)); wxButton *EntryAdd = new wxButton(this, ID_ENTRY_ADD, _("Add")); EntryRemove = new wxButton(this, ID_ENTRY_REMOVE, _("Remove")); if ((int)tempEntries.size() <= 1) @@ -201,9 +201,9 @@ void CPatchAddEdit::UpdateEntryCtrls(PatchEngine::PatchEntry pE) { sbEntry->GetStaticBox()->SetLabel(wxString::Format(_("Entry %d/%d"), currentItem, (int)tempEntries.size())); - EditPatchOffset->SetValue(wxString::Format(wxT("%08X"), pE.address)); + EditPatchOffset->SetValue(wxString::Format("%08X", pE.address)); EditPatchType->SetSelection(pE.type); - EditPatchValue->SetValue(wxString::Format(wxT("%0*X"), + EditPatchValue->SetValue(wxString::Format("%0*X", PatchEngine::GetPatchTypeCharLength(pE.type), pE.value)); } diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp index 6cb9e0cd44..1d5fb83543 100644 --- a/Source/Core/DolphinWX/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/TASInputDlg.cpp @@ -67,11 +67,11 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, static_bitmap_main->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); wx_mainX_s = new wxSlider(this, ID_MAIN_X_SLIDER, 128, 0, 255); wx_mainX_s->SetMinSize(wxSize(120,-1)); - wx_mainX_t = new wxTextCtrl(this, ID_MAIN_X_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); + wx_mainX_t = new wxTextCtrl(this, ID_MAIN_X_TEXT, "128", wxDefaultPosition, wxSize(40, 20)); wx_mainX_t->SetMaxLength(3); wx_mainY_s = new wxSlider(this, ID_MAIN_Y_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_mainY_s->SetMinSize(wxSize(-1,120)); - wx_mainY_t = new wxTextCtrl(this, ID_MAIN_Y_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); + wx_mainY_t = new wxTextCtrl(this, ID_MAIN_Y_TEXT, "128", wxDefaultPosition, wxSize(40, 20)); wx_mainY_t->SetMaxLength(3); main_xslider_box->Add(wx_mainX_s, 0, wxALIGN_TOP); @@ -94,11 +94,11 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, static_bitmap_c->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); wx_cX_s = new wxSlider(this, ID_C_X_SLIDER, 128, 0, 255); wx_cX_s->SetMinSize(wxSize(120,-1)); - wx_cX_t = new wxTextCtrl(this, ID_C_X_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); + wx_cX_t = new wxTextCtrl(this, ID_C_X_TEXT, "128", wxDefaultPosition, wxSize(40, 20)); wx_cX_t->SetMaxLength(3); wx_cY_s = new wxSlider(this, ID_C_Y_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_cY_s->SetMinSize(wxSize(-1,120)); - wx_cY_t = new wxTextCtrl(this, ID_C_Y_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); + wx_cY_t = new wxTextCtrl(this, ID_C_Y_TEXT, "128", wxDefaultPosition, wxSize(40, 20)); wx_cY_t->SetMaxLength(3); c_xslider_box->Add(wx_cX_s, 0, wxALIGN_TOP); @@ -114,11 +114,11 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wx_l_s = new wxSlider(this, ID_L_SLIDER, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_l_s->SetMinSize(wxSize(-1,100)); - wx_l_t = new wxTextCtrl(this, ID_L_TEXT, wxT("0"), wxDefaultPosition, wxSize(40, 20)); + wx_l_t = new wxTextCtrl(this, ID_L_TEXT, "0", wxDefaultPosition, wxSize(40, 20)); wx_l_t->SetMaxLength(3); wx_r_s = new wxSlider(this, ID_R_SLIDER, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_r_s->SetMinSize(wxSize(-1,100)); - wx_r_t = new wxTextCtrl(this, ID_R_TEXT, wxT("0"), wxDefaultPosition, wxSize(40, 20)); + wx_r_t = new wxTextCtrl(this, ID_R_TEXT, "0", wxDefaultPosition, wxSize(40, 20)); wx_r_t->SetMaxLength(3); shoulder_box->Add(wx_l_s, 0, wxALIGN_CENTER_VERTICAL); @@ -129,28 +129,28 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wxStaticBoxSizer* const buttons_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Buttons")); wxGridSizer* const buttons_grid = new wxGridSizer(4); - wx_a_button = new wxCheckBox(this,ID_A,_T("A")); + wx_a_button = new wxCheckBox(this, ID_A, "A"); wx_a_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_a_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_b_button = new wxCheckBox(this,ID_B,_T("B")); + wx_b_button = new wxCheckBox(this, ID_B, "B"); wx_b_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_b_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_x_button = new wxCheckBox(this,ID_X,_T("X")); + wx_x_button = new wxCheckBox(this, ID_X, "X"); wx_x_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_x_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_y_button = new wxCheckBox(this,ID_Y,_T("Y")); + wx_y_button = new wxCheckBox(this, ID_Y, "Y"); wx_y_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_y_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_l_button = new wxCheckBox(this,ID_L,_T("L")); + wx_l_button = new wxCheckBox(this, ID_L, "L"); wx_l_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_l_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_r_button = new wxCheckBox(this,ID_R,_T("R")); + wx_r_button = new wxCheckBox(this, ID_R, "R"); wx_r_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_r_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_z_button = new wxCheckBox(this,ID_Z,_T("Z")); + wx_z_button = new wxCheckBox(this, ID_Z, "Z"); wx_z_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_z_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_start_button = new wxCheckBox(this,ID_START,_T("Start")); + wx_start_button = new wxCheckBox(this, ID_START, "Start"); wx_start_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_start_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); @@ -166,16 +166,16 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, wxGridSizer* const buttons_dpad = new wxGridSizer(3); - wx_up_button = new wxCheckBox(this,ID_UP,_T("Up")); + wx_up_button = new wxCheckBox(this, ID_UP, "Up"); wx_up_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_up_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_right_button = new wxCheckBox(this,ID_RIGHT,_T("Right")); + wx_right_button = new wxCheckBox(this, ID_RIGHT, "Right"); wx_right_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_right_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_down_button = new wxCheckBox(this,ID_DOWN,_T("Down")); + wx_down_button = new wxCheckBox(this, ID_DOWN, "Down"); wx_down_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_down_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); - wx_left_button = new wxCheckBox(this,ID_LEFT,_T("Left")); + wx_left_button = new wxCheckBox(this, ID_LEFT, "Left"); wx_left_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_left_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); @@ -221,12 +221,12 @@ void TASInputDlg::ResetValues() wx_l_s->SetValue(0); wx_r_s->SetValue(0); - wx_mainX_t->SetValue(wxT("128")); - wx_mainY_t->SetValue(wxT("128")); - wx_cX_t->SetValue(wxT("128")); - wx_cY_t->SetValue(wxT("128")); - wx_l_t->SetValue(wxT("0")); - wx_r_t->SetValue(wxT("0")); + wx_mainX_t->SetValue("128"); + wx_mainY_t->SetValue("128"); + wx_cX_t->SetValue("128"); + wx_cY_t->SetValue("128"); + wx_l_t->SetValue("0"); + wx_r_t->SetValue("0"); wx_up_button->SetValue(false); wx_down_button->SetValue(false); @@ -248,53 +248,53 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus) { mainX = PadStatus->stickX; mstickx = true; - wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX)); + wx_mainX_t->SetValue(wxString::Format("%i", mainX)); } else if (mstickx) { mstickx = false; mainX = 128; - wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX)); + wx_mainX_t->SetValue(wxString::Format("%i", mainX)); } if (PadStatus->stickY != 128) { mainY = PadStatus->stickY; msticky = true; - wx_mainY_t->SetValue(wxString::Format(wxT("%i"),mainY)); + wx_mainY_t->SetValue(wxString::Format("%i",mainY)); } else if (msticky) { msticky = false; mainY = 128; - wx_mainY_t->SetValue(wxString::Format(wxT("%i"), mainY)); + wx_mainY_t->SetValue(wxString::Format("%i", mainY)); } if (PadStatus->substickX != 128) { cX = PadStatus->substickX; cstickx = true; - wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX)); + wx_cX_t->SetValue(wxString::Format("%i", cX)); } else if (cstickx) { cstickx = false; cX = 128; - wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX)); + wx_cX_t->SetValue(wxString::Format("%i", cX)); } if (PadStatus->substickY != 128) { cY = PadStatus->substickY; csticky = true; - wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY)); + wx_cY_t->SetValue(wxString::Format("%i", cY)); } else if (csticky) { csticky = false; cY = 128; - wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY)); + wx_cY_t->SetValue(wxString::Format("%i", cY)); } if ((PadStatus->button & PAD_BUTTON_UP) != 0) @@ -399,14 +399,14 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus) } wx_l_s->SetValue(PadStatus->triggerLeft); - wx_l_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerLeft)); + wx_l_t->SetValue(wxString::Format("%i", PadStatus->triggerLeft)); L_cont = true; } else if (L_cont) { wx_l_button->SetValue(false); wx_l_s->SetValue(0); - wx_l_t->SetValue(wxT("0")); + wx_l_t->SetValue("0"); L_cont = false; } @@ -424,14 +424,14 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus) } wx_r_s->SetValue(PadStatus->triggerRight); - wx_r_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerRight)); + wx_r_t->SetValue(wxString::Format("%i", PadStatus->triggerRight)); R_cont = true; } else if (R_cont) { wx_r_button->SetValue(false); wx_r_s->SetValue(0); - wx_r_t->SetValue(wxT("0")); + wx_r_t->SetValue("0"); R_cont = false; } @@ -614,7 +614,7 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event) int value = ((wxSlider *) event.GetEventObject())->GetValue(); *v = (u8) value; - text->SetValue(wxString::Format(wxT("%i"), value)); + text->SetValue(wxString::Format("%i", value)); if (update == 1) { @@ -801,8 +801,8 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event) sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y)); - textX->SetValue(wxString::Format(wxT("%i"), *x)); - textY->SetValue(wxString::Format(wxT("%i"), 256 - *y)); + textX->SetValue(wxString::Format("%i", *x)); + textY->SetValue(wxString::Format("%i", 256 - *y)); sliderX->SetValue(*x); sliderY->SetValue(256 - *y); @@ -858,8 +858,8 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event) sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y)); - textX->SetValue(wxString::Format(wxT("%i"), *x)); - textY->SetValue(wxString::Format(wxT("%i"), 256 - *y)); + textX->SetValue(wxString::Format("%i", *x)); + textY->SetValue(wxString::Format("%i", 256 - *y)); sliderX->SetValue(*x); sliderY->SetValue(256 - *y); diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index 782e8049d4..26d8b6c76e 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -391,7 +391,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con // AF { - const wxString af_choices[] = {wxT("1x"), wxT("2x"), wxT("4x"), wxT("8x"), wxT("16x")}; + const wxString af_choices[] = {"1x", "2x", "4x", "8x", "16x"}; szr_enh->Add(new wxStaticText(page_enh, -1, _("Anisotropic Filtering:")), 1, wxALIGN_CENTER_VERTICAL, 0); szr_enh->Add(CreateChoice(page_enh, vconfig.iMaxAnisotropy, wxGetTranslation(af_desc), 5, af_choices)); } diff --git a/Source/Core/DolphinWX/WXInputBase.cpp b/Source/Core/DolphinWX/WXInputBase.cpp index 979c94139b..cae0cdf048 100644 --- a/Source/Core/DolphinWX/WXInputBase.cpp +++ b/Source/Core/DolphinWX/WXInputBase.cpp @@ -33,8 +33,8 @@ const wxString WXKeyToString(int keycode) case WXK_CANCEL: return _("Cancel"); case WXK_MBUTTON: return _("M Button"); case WXK_CLEAR: return _("Clear"); - case WXK_SHIFT: return wxT("Shift"); - case WXK_ALT: return wxT("Alt"); + case WXK_SHIFT: return "Shift"; + case WXK_ALT: return "Alt"; case WXK_RAW_CONTROL: return _("Control"); #ifdef __WXOSX__ case WXK_COMMAND: return _("Command"); @@ -54,46 +54,46 @@ const wxString WXKeyToString(int keycode) case WXK_SNAPSHOT: return _("Snapshot"); case WXK_INSERT: return _("Insert"); case WXK_HELP: return _("Help"); - case WXK_NUMPAD0: return wxT("NP 0"); - case WXK_NUMPAD1: return wxT("NP 1"); - case WXK_NUMPAD2: return wxT("NP 2"); - case WXK_NUMPAD3: return wxT("NP 3"); - case WXK_NUMPAD4: return wxT("NP 4"); - case WXK_NUMPAD5: return wxT("NP 5"); - case WXK_NUMPAD6: return wxT("NP 6"); - case WXK_NUMPAD7: return wxT("NP 7"); - case WXK_NUMPAD8: return wxT("NP 8"); - case WXK_NUMPAD9: return wxT("NP 9"); + case WXK_NUMPAD0: return "NP 0"; + case WXK_NUMPAD1: return "NP 1"; + case WXK_NUMPAD2: return "NP 2"; + case WXK_NUMPAD3: return "NP 3"; + case WXK_NUMPAD4: return "NP 4"; + case WXK_NUMPAD5: return "NP 5"; + case WXK_NUMPAD6: return "NP 6"; + case WXK_NUMPAD7: return "NP 7"; + case WXK_NUMPAD8: return "NP 8"; + case WXK_NUMPAD9: return "NP 9"; case WXK_MULTIPLY: return _("Multiply"); case WXK_ADD: return _("Add"); case WXK_SEPARATOR: return _("Separator"); case WXK_SUBTRACT: return _("Subtract"); case WXK_DECIMAL: return _("Decimal"); case WXK_DIVIDE: return _("Divide"); - case WXK_F1: return wxT("F1"); - case WXK_F2: return wxT("F2"); - case WXK_F3: return wxT("F3"); - case WXK_F4: return wxT("F4"); - case WXK_F5: return wxT("F5"); - case WXK_F6: return wxT("F6"); - case WXK_F7: return wxT("F7"); - case WXK_F8: return wxT("F8"); - case WXK_F9: return wxT("F9"); - case WXK_F10: return wxT("F10"); - case WXK_F11: return wxT("F11"); - case WXK_F12: return wxT("F12"); - case WXK_F13: return wxT("F13"); - case WXK_F14: return wxT("F14"); - case WXK_F15: return wxT("F15"); - case WXK_F16: return wxT("F16"); - case WXK_F17: return wxT("F17"); - case WXK_F18: return wxT("F19"); - case WXK_F19: return wxT("F20"); - case WXK_F20: return wxT("F21"); - case WXK_F21: return wxT("F22"); - case WXK_F22: return wxT("F23"); - case WXK_F23: return wxT("F24"); - case WXK_F24: return wxT("F25"); + case WXK_F1: return "F1"; + case WXK_F2: return "F2"; + case WXK_F3: return "F3"; + case WXK_F4: return "F4"; + case WXK_F5: return "F5"; + case WXK_F6: return "F6"; + case WXK_F7: return "F7"; + case WXK_F8: return "F8"; + case WXK_F9: return "F9"; + case WXK_F10: return "F10"; + case WXK_F11: return "F11"; + case WXK_F12: return "F12"; + case WXK_F13: return "F13"; + case WXK_F14: return "F14"; + case WXK_F15: return "F15"; + case WXK_F16: return "F16"; + case WXK_F17: return "F17"; + case WXK_F18: return "F19"; + case WXK_F19: return "F20"; + case WXK_F20: return "F21"; + case WXK_F21: return "F22"; + case WXK_F22: return "F23"; + case WXK_F23: return "F24"; + case WXK_F24: return "F25"; case WXK_NUMLOCK: return _("Num Lock"); case WXK_SCROLL: return _("Scroll Lock"); case WXK_PAGEUP: return _("Page Up"); @@ -101,10 +101,10 @@ const wxString WXKeyToString(int keycode) case WXK_NUMPAD_SPACE: return _("NP Space"); case WXK_NUMPAD_TAB: return _("NP Tab"); case WXK_NUMPAD_ENTER: return _("NP Enter"); - case WXK_NUMPAD_F1: return wxT("NP F1"); - case WXK_NUMPAD_F2: return wxT("NP F2"); - case WXK_NUMPAD_F3: return wxT("NP F3"); - case WXK_NUMPAD_F4: return wxT("NP F4"); + case WXK_NUMPAD_F1: return "NP F1"; + case WXK_NUMPAD_F2: return "NP F2"; + case WXK_NUMPAD_F3: return "NP F3"; + case WXK_NUMPAD_F4: return "NP F4"; case WXK_NUMPAD_HOME: return _("NP Home"); case WXK_NUMPAD_LEFT: return _("NP Left"); case WXK_NUMPAD_UP: return _("NP Up"); @@ -133,7 +133,7 @@ const wxString WXKeyToString(int keycode) return wxString((wxChar)keycode, 1); } - return wxT(""); + return ""; } const wxString WXKeymodToString(int modifier) @@ -142,18 +142,18 @@ const wxString WXKeymodToString(int modifier) if (modifier & wxMOD_META) #ifdef __APPLE__ - mods += wxT("Cmd+"); + mods += "Cmd+"; #elif defined _WIN32 - mods += wxT("Win+"); + mods += "Win+"; #else - mods += wxT("Meta+"); + mods += "Meta+"; #endif if (modifier & wxMOD_CONTROL) - mods += wxT("Ctrl+"); + mods += "Ctrl+"; if (modifier & wxMOD_ALT) - mods += wxT("Alt+"); + mods += "Alt+"; if (modifier & wxMOD_SHIFT) - mods += wxT("Shift+"); + mods += "Shift+"; return mods; } diff --git a/Source/Core/DolphinWX/WxUtils.cpp b/Source/Core/DolphinWX/WxUtils.cpp index e4ead447ee..d5e50e1ecf 100644 --- a/Source/Core/DolphinWX/WxUtils.cpp +++ b/Source/Core/DolphinWX/WxUtils.cpp @@ -35,14 +35,14 @@ void Explore(const std::string& path) wxString wxPath = StrToWxStr(path); #ifndef _WIN32 // Default to file - if (! wxPath.Contains(wxT("://"))) + if (! wxPath.Contains("://")) { - wxPath = wxT("file://") + wxPath; + wxPath = "file://" + wxPath; } #endif #ifdef __WXGTK__ - wxPath.Replace(wxT(" "), wxT("\\ ")); + wxPath.Replace(" ", "\\ "); #endif if (! ::wxLaunchDefaultBrowser(wxPath)) From 75cb8a74521a4eb5190644aefd7389d833aebf8a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 18 May 2014 10:31:39 -0400 Subject: [PATCH 3/4] Fix a typo in the JIT debugger window --- Source/Core/DolphinWX/Debugger/JitWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Debugger/JitWindow.cpp b/Source/Core/DolphinWX/Debugger/JitWindow.cpp index 4538915108..47a153a063 100644 --- a/Source/Core/DolphinWX/Debugger/JitWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/JitWindow.cpp @@ -177,7 +177,7 @@ void CJitWindow::Compare(u32 em_address) if (st.isFirstBlockOfFunction) sptr += sprintf(sptr, "(first block of function)\n"); if (st.isLastBlockOfFunction) - sptr += sprintf(sptr, "(first block of function)\n"); + sptr += sprintf(sptr, "(last block of function)\n"); sptr += sprintf(sptr, "%i estimated cycles\n", st.numCycles); From 554207a87c2e47f61d584c55ca01be3a0424606f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 18 May 2014 11:43:17 -0400 Subject: [PATCH 4/4] Remove an unnecessary null check in CodeWindow.cpp. The validity of ToolBar is checked at the beginning of the function --- Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index f2aa617b7b..b8185a85cc 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -611,7 +611,8 @@ void CCodeWindow::UpdateButtonStates() wxAuiToolBar* ToolBar = GetToolBar(); // Toolbar - if (!ToolBar) return; + if (!ToolBar) + return; if (!Initialized) { @@ -633,8 +634,7 @@ void CCodeWindow::UpdateButtonStates() } ToolBar->EnableTool(IDM_STEP, Initialized && Stepping); - - if (ToolBar) ToolBar->Realize(); + ToolBar->Realize(); // Menu bar // ------------------