diff options
Diffstat (limited to 'RealtimeSync/application.cpp')
-rw-r--r-- | RealtimeSync/application.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp index a7aff305..af8a40a9 100644 --- a/RealtimeSync/application.cpp +++ b/RealtimeSync/application.cpp @@ -36,19 +36,20 @@ IMPLEMENT_APP(Application); namespace { +/* boost::thread::id mainThreadId = boost::this_thread::get_id(); void onTerminationRequested() { - std::wstring msg = boost::this_thread::get_id() == mainThreadId ? - L"Termination requested in main thread!\n\n" : - L"Termination requested in worker thread!\n\n"; - msg += L"Please file a bug report at: http://sourceforge.net/projects/freefilesync"; +std::wstring msg = boost::this_thread::get_id() == mainThreadId ? + L"Termination requested in main thread!\n\n" : + L"Termination requested in worker thread!\n\n"; +msg += L"Please file a bug report at: http://sourceforge.net/projects/freefilesync"; - wxSafeShowMessage(_("An exception occurred"), msg); - std::abort(); +wxSafeShowMessage(_("An exception occurred"), msg); +std::abort(); } - +*/ #ifdef _MSC_VER void crtInvalidParameterHandler(const wchar_t* expression, const wchar_t* function, const wchar_t* file, unsigned int line, uintptr_t pReserved) { assert(false); } #endif @@ -59,7 +60,7 @@ const wxEventType EVENT_ENTER_EVENT_LOOP = wxNewEventType(); bool Application::OnInit() { - std::set_terminate(onTerminationRequested); //unlike wxWidgets uncaught exception handling, this works for all worker threads + //std::set_terminate(onTerminationRequested); //unlike wxWidgets uncaught exception handling, this works for all worker threads #ifdef ZEN_WIN #ifdef _MSC_VER @@ -107,12 +108,12 @@ void Application::onEnterEventLoop(wxEvent& event) } catch (const FileError& e) { - wxMessageBox(e.toString(), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(e.toString(), L"RealtimeSync" + _("Error"), wxOK | wxICON_ERROR); //continue! } //try to set config/batch-filename set by %1 parameter - std::vector<wxString> commandArgs; + std::vector<Zstring> commandArgs; for (int i = 1; i < argc; ++i) { Zstring filename = toZ(argv[i]); @@ -125,14 +126,14 @@ void Application::onEnterEventLoop(wxEvent& event) filename += Zstr(".ffs_batch"); else { - wxMessageBox(replaceCpy(_("Cannot find file %x."), L"%x", fmtFileName(filename)), _("Error"), wxOK | wxICON_ERROR); + wxMessageBox(replaceCpy(_("Cannot open file %x."), L"%x", fmtFileName(filename)), L"RealtimeSync" + _("Error"), wxOK | wxICON_ERROR); return; } } - commandArgs.push_back(toWx(filename)); + commandArgs.push_back(filename); } - wxString cfgFilename; + Zstring cfgFilename; if (!commandArgs.empty()) cfgFilename = commandArgs[0]; |