30#include <wx/filename.h>
37#include "dialog_alert.h"
42static const char* kLastRunErrorMsg =
44 _(R
"( <p>The last opencpn run seems to have failed. Do <br/>
45 you want to run in safe mode without plugins and <br/>
46 other possibly problematic features? </p>
48 <p> You may consider visiting the OpenCPN-5.16 <br/>
49 <a href="http://repo.opencpn.org/known-issues-5.16.html">
50 list of known issues</a>.</p>)");
59 std::ofstream dest(path, std::ios::binary);
60 dest <<
"Internal opencpn use\n";
63 std::string title = _(
"Safe Restart").ToStdString();
64 std::string action = _(
"Safe mode start").ToStdString();
66 dlg.SetCancelLabel(_(
"Normal start").ToStdString());
67 dlg.SetDefaultButton(wxID_CANCEL);
71 std::stringstream html;
72 html <<
"<html><body>" << kLastRunErrorMsg <<
"</body></html>";
73 dlg.AddHtmlContent(html);
75 int reply = dlg.ShowModal();
A modal message dialog with confirmation button and cancel button.
Global variables reflecting command line options and arguments.
General purpose GUI support.
bool exists(const std::string &name)
std::string CheckFilePath()
Return path to file created when start is commenced and removed when completed.
void CheckLastStart()
Check if the last start failed, possibly invoke user dialog and set safe mode state.
Miscellaneous utilities, many of which string related.
Safe mode non-gui handling.