6 #include <wx/filename.h>
11 #include "model/ocpn_utils.h"
13 #include "model/safe_mode.h"
17 static const int TIMEOUT_SECONDS = 15;
19 static const char* LAST_RUN_ERROR_MSG =
20 _(
"<p>The last opencpn run seems to have failed. Do you want to run\n"
21 "in safe mode without plugins and other possibly problematic\n"
22 "features?\n</p><br/></br><p>You may consider visiting the <a href=\"https://github.com/OpenCPN/OpenCPN/wiki/OpenCPN-5.8-known-issues\">list of known issues</a>.</p>");
29 std::string path = check_file_path();
30 if (!ocpn::exists(path)) {
31 std::ofstream dest(path, std::ios::binary);
32 dest <<
"Internal opencpn use" << std::endl;
36 long style = wxYES | wxNO | wxNO_DEFAULT | wxICON_QUESTION;
38 _(
"Safe restart"), TIMEOUT_SECONDS,
39 style,
false, wxDefaultPosition);
40 int reply = dlg->ShowModal();
Global variables reflecting command line options and arguments.
General purpose GUI support.
void check_last_start()
Check if the last start failed, possibly invoke user dialog and set safe mode state.