mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #671 from lioncash/non-panic
DolphinWX: Use a regular wxMessageBox instead of a PanicAlert for non-panic errors.
This commit is contained in:
@ -642,7 +642,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
void CISOProperties::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||
{
|
||||
if (!SaveGameConfig())
|
||||
PanicAlertT("Could not save %s", GameIniFileLocal.c_str());
|
||||
WxUtils::ShowErrorDialog(wxString::Format(_("Could not save %s."), GameIniFileLocal.c_str()));
|
||||
|
||||
EndModal(bRefreshList ? wxID_OK : wxID_CANCEL);
|
||||
}
|
||||
@ -903,7 +903,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("Partition doesn't exist: %d", partitionNum);
|
||||
WxUtils::ShowErrorDialog(wxString::Format(_("Partition doesn't exist: %d"), partitionNum));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -923,7 +923,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
PanicAlertT("Failed to extract to %s!", WxStrToStr(Path).c_str());
|
||||
WxUtils::ShowErrorDialog(wxString::Format(_("Failed to extract to %s!"), WxStrToStr(Path).c_str()));
|
||||
}
|
||||
|
||||
class IntegrityCheckThread : public wxThread
|
||||
@ -1150,17 +1150,21 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
|
||||
filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain");
|
||||
if (filetype == nullptr) // MIME type failed, aborting mission
|
||||
{
|
||||
PanicAlertT("Filetype 'ini' is unknown! Will not open!");
|
||||
WxUtils::ShowErrorDialog(_("Filetype 'ini' is unknown! Will not open!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
wxString OpenCommand;
|
||||
OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
|
||||
|
||||
wxString OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
|
||||
if (OpenCommand.IsEmpty())
|
||||
PanicAlertT("Couldn't find open command for extension 'ini'!");
|
||||
{
|
||||
WxUtils::ShowErrorDialog(_("Couldn't find open command for extension 'ini'!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wxExecute(OpenCommand, wxEXEC_SYNC) == -1)
|
||||
PanicAlertT("wxExecute returned -1 on application run!");
|
||||
WxUtils::ShowErrorDialog(_("wxExecute returned -1 on application run!"));
|
||||
}
|
||||
#endif
|
||||
|
||||
bRefreshList = true; // Just in case
|
||||
|
Reference in New Issue
Block a user