diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:50:14 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:50:14 +0200 |
commit | ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4 (patch) | |
tree | dcc7dd2ed76fd0900944c07776fcbdbcd665c020 /Application.h | |
parent | 1.5 (diff) | |
download | FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.gz FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.bz2 FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.zip |
1.6
Diffstat (limited to 'Application.h')
-rw-r--r-- | Application.h | 52 |
1 files changed, 7 insertions, 45 deletions
diff --git a/Application.h b/Application.h index f13dbe90..56298898 100644 --- a/Application.h +++ b/Application.h @@ -12,46 +12,10 @@ #include <wx/app.h> #include <wx/cmdline.h> -#include <set> #include <fstream> #include "FreeFileSync.h" #include "ui/smallDialogs.h" - -struct TranslationLine -{ - wxString original; - wxString translation; - - bool operator>(const TranslationLine& b ) const - { - return (original > b.original); - } - bool operator<(const TranslationLine& b) const - { - return (original < b.original); - } - bool operator==(const TranslationLine& b) const - { - return (original == b.original); - } -}; -typedef set<TranslationLine> Translation; - - -class CustomLocale : public wxLocale -{ -public: - CustomLocale(int language = wxLANGUAGE_ENGLISH, - int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); - - ~CustomLocale() {} - - const wxChar* GetString(const wxChar* szOrigString, const wxChar* szDomain = NULL) const; - -private: - Translation translationDB; -}; - +#include "library/misc.h" class Application : public wxApp { @@ -63,12 +27,10 @@ public: void initialize(); bool ProcessIdle(); //virtual method - friend class CommandLineStatusUpdate; - //methods for writing logs - void initLog(); - void writeLog(const wxString& logText, const wxString& problemType = wxEmptyString); - void closeLog(); + void logInit(); + void logWrite(const wxString& logText, const wxString& problemType = wxEmptyString); + void logClose(const wxString& finalText); private: void parseCommandline(); @@ -76,7 +38,7 @@ private: bool applicationRunsOnCommandLineWithoutWindows; ofstream logFile; - CustomLocale* programLanguage; + CustomLocale programLanguage; int returnValue; }; @@ -85,7 +47,7 @@ private: class CommandLineStatusUpdater : public StatusUpdater { public: - CommandLineStatusUpdater(Application* application, bool skipErr, bool silent); + CommandLineStatusUpdater(Application* application, bool continueOnError, bool silent); ~CommandLineStatusUpdater(); void updateStatusText(const wxString& text); @@ -99,7 +61,7 @@ public: private: Application* app; SyncStatus* syncStatusFrame; - bool skipErrors; + bool continueErrors; bool silentMode; wxArrayString unhandledErrors; //list of non-resolved errors |