Merge pull request #2054 from lioncash/disable

DolphinWX: Change Enable(false) calls into Disable() where possible
This commit is contained in:
Lioncash 2015-02-15 13:26:44 -05:00
commit 16a6392308
5 changed files with 25 additions and 25 deletions

View File

@ -63,7 +63,7 @@ CodeConfigPanel::CodeConfigPanel(wxWindow* const parent)
// button sizer // button sizer
wxBoxSizer* const sizer_buttons = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* const sizer_buttons = new wxBoxSizer(wxHORIZONTAL);
btn_download = new wxButton(this, wxID_ANY, _("Download Codes (WiiRD Database)"), wxDefaultPosition, wxSize(128, -1)); btn_download = new wxButton(this, wxID_ANY, _("Download Codes (WiiRD Database)"), wxDefaultPosition, wxSize(128, -1));
btn_download->Enable(false); btn_download->Disable();
btn_download->Bind(wxEVT_BUTTON, &CodeConfigPanel::DownloadCodes, this); btn_download->Bind(wxEVT_BUTTON, &CodeConfigPanel::DownloadCodes, this);
sizer_buttons->AddStretchSpacer(1); sizer_buttons->AddStretchSpacer(1);
sizer_buttons->Add(btn_download, 1, wxEXPAND); sizer_buttons->Add(btn_download, 1, wxEXPAND);

View File

@ -753,7 +753,7 @@ void CConfigMain::CreateGUIControls()
RecursiveISOPath = new wxCheckBox(PathsPage, ID_RECURSIVEISOPATH, _("Search Subfolders")); RecursiveISOPath = new wxCheckBox(PathsPage, ID_RECURSIVEISOPATH, _("Search Subfolders"));
AddISOPath = new wxButton(PathsPage, ID_ADDISOPATH, _("Add...")); AddISOPath = new wxButton(PathsPage, ID_ADDISOPATH, _("Add..."));
RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, _("Remove")); RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, _("Remove"));
RemoveISOPath->Enable(false); RemoveISOPath->Disable();
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"), DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"),
_("All GC/Wii files (elf, dol, gcm, iso, wbfs, ciso, gcz, wad)") + wxString::Format("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad|%s", wxGetTranslation(wxALL_FILES)), _("All GC/Wii files (elf, dol, gcm, iso, wbfs, ciso, gcz, wad)") + wxString::Format("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad|%s", wxGetTranslation(wxALL_FILES)),

View File

@ -223,24 +223,24 @@ void GFXDebuggerPanel::CreateGUIControls()
void GFXDebuggerPanel::OnPause() void GFXDebuggerPanel::OnPause()
{ {
m_pButtonDump->Enable(true); m_pButtonDump->Enable();
m_pDumpList->Enable(true); m_pDumpList->Enable();
m_pButtonUpdateScreen->Enable(true); m_pButtonUpdateScreen->Enable();
m_pButtonClearScreen->Enable(true); m_pButtonClearScreen->Enable();
m_pButtonClearTextureCache->Enable(true); m_pButtonClearTextureCache->Enable();
m_pButtonClearVertexShaderCache->Enable(true); m_pButtonClearVertexShaderCache->Enable();
m_pButtonClearPixelShaderCache->Enable(true); m_pButtonClearPixelShaderCache->Enable();
} }
void GFXDebuggerPanel::OnContinue() void GFXDebuggerPanel::OnContinue()
{ {
m_pButtonDump->Enable(false); m_pButtonDump->Disable();
m_pDumpList->Enable(false); m_pDumpList->Disable();
m_pButtonUpdateScreen->Enable(false); m_pButtonUpdateScreen->Disable();
m_pButtonClearScreen->Enable(false); m_pButtonClearScreen->Disable();
m_pButtonClearTextureCache->Enable(false); m_pButtonClearTextureCache->Disable();
m_pButtonClearVertexShaderCache->Enable(false); m_pButtonClearVertexShaderCache->Disable();
m_pButtonClearPixelShaderCache->Enable(false); m_pButtonClearPixelShaderCache->Disable();
} }

View File

@ -507,8 +507,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
EditPatch = new wxButton(m_PatchPage, ID_EDITPATCH, _("Edit...")); EditPatch = new wxButton(m_PatchPage, ID_EDITPATCH, _("Edit..."));
wxButton* const AddPatch = new wxButton(m_PatchPage, ID_ADDPATCH, _("Add...")); wxButton* const AddPatch = new wxButton(m_PatchPage, ID_ADDPATCH, _("Add..."));
RemovePatch = new wxButton(m_PatchPage, ID_REMOVEPATCH, _("Remove")); RemovePatch = new wxButton(m_PatchPage, ID_REMOVEPATCH, _("Remove"));
EditPatch->Enable(false); EditPatch->Disable();
RemovePatch->Enable(false); RemovePatch->Disable();
wxBoxSizer* sPatchPage = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sPatchPage = new wxBoxSizer(wxVERTICAL);
sPatches->Add(Patches, 1, wxEXPAND|wxALL, 0); sPatches->Add(Patches, 1, wxEXPAND|wxALL, 0);
@ -528,8 +528,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
EditCheat = new wxButton(m_CheatPage, ID_EDITCHEAT, _("Edit...")); EditCheat = new wxButton(m_CheatPage, ID_EDITCHEAT, _("Edit..."));
wxButton * const AddCheat = new wxButton(m_CheatPage, ID_ADDCHEAT, _("Add...")); wxButton * const AddCheat = new wxButton(m_CheatPage, ID_ADDCHEAT, _("Add..."));
RemoveCheat = new wxButton(m_CheatPage, ID_REMOVECHEAT, _("Remove")); RemoveCheat = new wxButton(m_CheatPage, ID_REMOVECHEAT, _("Remove"));
EditCheat->Enable(false); EditCheat->Disable();
RemoveCheat->Enable(false); RemoveCheat->Disable();
wxBoxSizer* sCheatPage = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sCheatPage = new wxBoxSizer(wxVERTICAL);
sCheats->Add(Cheats, 1, wxEXPAND|wxALL, 0); sCheats->Add(Cheats, 1, wxEXPAND|wxALL, 0);
@ -1420,8 +1420,8 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
Patches->Clear(); Patches->Clear();
PatchList_Load(); PatchList_Load();
EditPatch->Enable(false); EditPatch->Disable();
RemovePatch->Enable(false); RemovePatch->Disable();
} }
void CISOProperties::ActionReplayList_Load() void CISOProperties::ActionReplayList_Load()
@ -1500,8 +1500,8 @@ void CISOProperties::ActionReplayButtonClicked(wxCommandEvent& event)
Cheats->Clear(); Cheats->Clear();
ActionReplayList_Load(); ActionReplayList_Load();
EditCheat->Enable(false); EditCheat->Disable();
RemoveCheat->Enable(false); RemoveCheat->Disable();
} }
void CISOProperties::OnChangeBannerLang(wxCommandEvent& event) void CISOProperties::OnChangeBannerLang(wxCommandEvent& event)

View File

@ -202,7 +202,7 @@ void PostProcessingConfigDiag::ConfigGrouping::GenerateUI(PostProcessingConfigDi
wxTextCtrl* text_ctrl = new wxTextCtrl(parent, wxID_ANY, string_value); wxTextCtrl* text_ctrl = new wxTextCtrl(parent, wxID_ANY, string_value);
// Disable the textctrl, it's only there to show the absolute value from the slider // Disable the textctrl, it's only there to show the absolute value from the slider
text_ctrl->Enable(false); text_ctrl->Disable();
// wxWidget takes over the pointer provided to it in the event handler. // wxWidget takes over the pointer provided to it in the event handler.
// This won't be a memory leak, it'll be destroyed on dialog close. // This won't be a memory leak, it'll be destroyed on dialog close.