diff options
Diffstat (limited to 'FreeFileSync/Source/RealTimeSync/application.cpp')
-rw-r--r-- | FreeFileSync/Source/RealTimeSync/application.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/FreeFileSync/Source/RealTimeSync/application.cpp b/FreeFileSync/Source/RealTimeSync/application.cpp index 735e0b8b..cc127249 100644 --- a/FreeFileSync/Source/RealTimeSync/application.cpp +++ b/FreeFileSync/Source/RealTimeSync/application.cpp @@ -65,7 +65,7 @@ bool Application::OnInit() wxToolTip::SetMaxWidth(-1); //disable tooltip wrapping -> Windows only #elif defined ZEN_LINUX - ::gtk_rc_parse((zen::getResourceDir() + "styles.gtk_rc").c_str()); //remove inner border from bitmap buttons + ::gtk_rc_parse((zen::getResourceDirPf() + "styles.gtk_rc").c_str()); //remove inner border from bitmap buttons #endif //Windows User Experience Interaction Guidelines: tool tips should have 5s timeout, info tips no timeout => compromise: @@ -74,7 +74,18 @@ bool Application::OnInit() SetAppName(L"RealTimeSync"); - initResourceImages(getResourceDir() + Zstr("Resources.zip")); + initResourceImages(getResourceDirPf() + Zstr("Resources.zip")); + + try + { + setLanguage(xmlAccess::getProgramLanguage()); //throw FileError + } + catch (const FileError& e) + { + warn_static("Bug? (exit on frame delete)") + showNotificationDialog(nullptr, DialogInfoType::ERROR2, PopupDialogCfg().setDetailInstructions(e.toString())); + //continue! + } Connect(wxEVT_QUERY_END_SESSION, wxEventHandler(Application::onQueryEndSession), nullptr, this); Connect(wxEVT_END_SESSION, wxEventHandler(Application::onQueryEndSession), nullptr, this); @@ -85,7 +96,6 @@ bool Application::OnInit() Connect(EVENT_ENTER_EVENT_LOOP, wxEventHandler(Application::onEnterEventLoop), nullptr, this); wxCommandEvent scrollEvent(EVENT_ENTER_EVENT_LOOP); AddPendingEvent(scrollEvent); - return true; //true: continue processing; false: exit immediately. } @@ -103,17 +113,6 @@ void Application::onEnterEventLoop(wxEvent& event) { Disconnect(EVENT_ENTER_EVENT_LOOP, wxEventHandler(Application::onEnterEventLoop), nullptr, this); - try - { - wxLanguage lngId = xmlAccess::getProgramLanguage(); - setLanguage(lngId); //throw FileError - } - catch (const FileError& e) - { - showNotificationDialog(nullptr, DialogInfoType::ERROR2, PopupDialogCfg().setDetailInstructions(e.toString())); - //continue! - } - //try to set config/batch- filepath set by %1 parameter std::vector<Zstring> commandArgs; for (int i = 1; i < argc; ++i) |