DolphinWX: Use a regular wxMessageBox instead of a PanicAlert for non-panic errors.

This commit is contained in:
Lioncash
2014-07-24 21:46:46 -04:00
parent a723fd39df
commit 0ed29e1fac
18 changed files with 106 additions and 89 deletions

View File

@ -8,6 +8,7 @@
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/msgdlg.h>
#include <wx/sizer.h>
#include <wx/string.h>
#include <wx/textctrl.h>
@ -50,7 +51,7 @@ void BreakPointDlg::OnOK(wxCommandEvent& event)
}
else
{
PanicAlertT("The address %s is invalid.", WxStrToStr(AddressString).c_str());
WxUtils::ShowErrorDialog(wxString::Format(_("The address %s is invalid."), WxStrToStr(AddressString).c_str()));
}
event.Skip();

View File

@ -23,6 +23,7 @@
#include "Common/IniFile.h"
#include "Core/ConfigManager.h"
#include "Core/CoreParameter.h"
#include "DolphinWX/WxUtils.h"
#include "DolphinWX/Debugger/DebuggerPanel.h"
#include "VideoCommon/Debugger.h"
#include "VideoCommon/TextureCacheBase.h"
@ -288,42 +289,42 @@ void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event)
case 2: // Pixel Shader Constants
DumpPixelShaderConstants(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
case 3: // Vertex Shader Constants
DumpVertexShaderConstants(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
case 4: // Textures
DumpTextures(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
case 5: // Frame Buffer
DumpFrameBuffer(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
case 6: // Geometry
DumpGeometry(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
case 7: // Vertex Description
DumpVertexDecl(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
case 8: // Vertex Matrices
DumpMatrices(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
case 9: // Statistics
DumpStats(dump_path);
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
break;
}
}
@ -337,7 +338,7 @@ void GFXDebuggerPanel::OnContButton(wxCommandEvent& event)
void GFXDebuggerPanel::OnClearScreenButton(wxCommandEvent& event)
{
// TODO
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
}
void GFXDebuggerPanel::OnClearTextureCacheButton(wxCommandEvent& event)
@ -348,17 +349,17 @@ void GFXDebuggerPanel::OnClearTextureCacheButton(wxCommandEvent& event)
void GFXDebuggerPanel::OnClearVertexShaderCacheButton(wxCommandEvent& event)
{
// TODO
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
}
void GFXDebuggerPanel::OnClearPixelShaderCacheButton(wxCommandEvent& event)
{
// TODO
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
}
void GFXDebuggerPanel::OnUpdateScreenButton(wxCommandEvent& event)
{
wxMessageBox(_("Not implemented"), _("Error"), wxOK);
WxUtils::ShowErrorDialog(_("Not implemented"));
GFXDebuggerUpdateScreen();
}

View File

@ -162,7 +162,7 @@ void CMemoryWindow::SetMemoryValue(wxCommandEvent& event)
{
if (!Memory::IsInitialized())
{
PanicAlertT("Cannot set uninitialized memory.");
WxUtils::ShowErrorDialog(_("Cannot set uninitialized memory."));
return;
}
@ -173,13 +173,13 @@ void CMemoryWindow::SetMemoryValue(wxCommandEvent& event)
if (!TryParse(std::string("0x") + str_addr, &addr))
{
PanicAlertT("Invalid Address: %s", str_addr.c_str());
WxUtils::ShowErrorDialog(wxString::Format(_("Invalid address: %s"), str_addr.c_str()));
return;
}
if (!TryParse(std::string("0x") + str_val, &val))
{
PanicAlertT("Invalid Value: %s", str_val.c_str());
WxUtils::ShowErrorDialog(wxString::Format(_("Invalid value: %s"), str_val.c_str()));
return;
}