From c0fce877c478ddbf71a1b651c789e5ea00a00144 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:05:30 +0200 Subject: 3.4 --- RealtimeSync/application.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'RealtimeSync/application.cpp') diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp index 68cebae0..a48369b4 100644 --- a/RealtimeSync/application.cpp +++ b/RealtimeSync/application.cpp @@ -1,10 +1,9 @@ -/*************************************************************** - * Purpose: Code for Application Class - * Author: ZenJu (zhnmju123@gmx.de) - * Created: 2009-07-06 - * Copyright: ZenJu (http://sourceforge.net/projects/freefilesync/) - **************************************************************/ - +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * +// ************************************************************************** +// #include "application.h" #include "mainDialog.h" #include @@ -14,6 +13,7 @@ #include "xmlFreeFileSync.h" #include "../shared/standardPaths.h" #include +#include "../shared/stringConv.h" #ifdef FFS_LINUX #include @@ -41,16 +41,7 @@ void Application::OnStartApplication(wxIdleEvent& event) SetAppName(wxT("FreeFileSync")); //use a different app name, to have "GetUserDataDir()" return the same directory as for FreeFileSync #ifdef FFS_LINUX - ::gtk_rc_parse("styles.rc"); //remove inner border from bitmap buttons -#endif - - //initialize help controller - helpController.reset(new wxHelpController); - helpController->Initialize(FreeFileSync::getInstallationDir() + -#ifdef FFS_WIN - wxT("FreeFileSync.chm")); -#elif defined FFS_LINUX - wxT("Help/FreeFileSync.hhp")); + ::gtk_rc_parse(FreeFileSync::wxToZ(FreeFileSync::getResourceDir()) + "styles.rc"); //remove inner border from bitmap buttons #endif //set program language @@ -77,7 +68,7 @@ void Application::OnStartApplication(wxIdleEvent& event) GlobalResources::getInstance().load(); //loads bitmap resources on program startup - MainDialog* frame = new MainDialog(NULL, cfgFilename, *helpController); + MainDialog* frame = new MainDialog(NULL, cfgFilename); frame->SetIcon(*GlobalResources::getInstance().programIcon); //set application icon frame->Show(); } @@ -98,7 +89,7 @@ int Application::OnRun() catch (const std::exception& e) //catch all STL exceptions { //unfortunately it's not always possible to display a message box in this erroneous situation, however (non-stream) file output always works! - wxFile safeOutput(FreeFileSync::getLastErrorTxtFile(), wxFile::write); + wxFile safeOutput(FreeFileSync::getConfigDir() + wxT("LastError.txt"), wxFile::write); safeOutput.Write(wxString::FromAscii(e.what())); wxMessageBox(wxString::FromAscii(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR); -- cgit