diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:05:30 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:05:30 +0200 |
commit | c0fce877c478ddbf71a1b651c789e5ea00a00144 (patch) | |
tree | de01b0ae8fd296bd24fbca54a80f2f0ba071d461 /RealtimeSync/application.cpp | |
parent | 3.3 (diff) | |
download | FreeFileSync-c0fce877c478ddbf71a1b651c789e5ea00a00144.tar.gz FreeFileSync-c0fce877c478ddbf71a1b651c789e5ea00a00144.tar.bz2 FreeFileSync-c0fce877c478ddbf71a1b651c789e5ea00a00144.zip |
3.4
Diffstat (limited to 'RealtimeSync/application.cpp')
-rw-r--r-- | RealtimeSync/application.cpp | 29 |
1 files changed, 10 insertions, 19 deletions
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 <wx/event.h> @@ -14,6 +13,7 @@ #include "xmlFreeFileSync.h" #include "../shared/standardPaths.h" #include <wx/file.h> +#include "../shared/stringConv.h" #ifdef FFS_LINUX #include <gtk/gtk.h> @@ -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); |