diff options
-rw-r--r-- | Application.cpp | 516 | ||||
-rw-r--r-- | Application.h | 26 | ||||
-rw-r--r-- | Changelog.txt | 16 | ||||
-rw-r--r-- | FreeFileSync - ANSI.cbp | 130 | ||||
-rw-r--r-- | FreeFileSync - Unicode.cbp | 151 | ||||
-rw-r--r-- | FreeFileSync.cpp | 429 | ||||
-rw-r--r-- | FreeFileSync.h | 27 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Makefile_Win_Unicode.cmd | 5 | ||||
-rw-r--r-- | Readme.txt | 27 | ||||
-rw-r--r-- | Resources.dat | bin | 124418 -> 126988 bytes | |||
-rw-r--r-- | french.lng | 198 | ||||
-rw-r--r-- | german.lng | 116 | ||||
-rw-r--r-- | japanese.lng | 116 | ||||
-rw-r--r-- | library/globalFunctions.h | 20 | ||||
-rw-r--r-- | library/pch.h | 3 | ||||
-rw-r--r-- | library/processXml.cpp | 484 | ||||
-rw-r--r-- | library/processXml.h | 114 | ||||
-rw-r--r-- | library/resources.cpp | 241 | ||||
-rw-r--r-- | library/resources.h | 136 | ||||
-rw-r--r-- | ui/MainDialog.cpp | 1271 | ||||
-rw-r--r-- | ui/MainDialog.h | 75 | ||||
-rw-r--r-- | ui/SmallDialogs.cpp | 41 | ||||
-rw-r--r-- | ui/SyncDialog.cpp | 241 | ||||
-rw-r--r-- | ui/SyncDialog.h | 13 | ||||
-rw-r--r-- | ui/guiGenerated.cpp | 4499 | ||||
-rw-r--r-- | ui/guiGenerated.h | 1303 |
27 files changed, 5430 insertions, 4774 deletions
diff --git a/Application.cpp b/Application.cpp index 371e7107..32bbc132 100644 --- a/Application.cpp +++ b/Application.cpp @@ -11,15 +11,20 @@ #include "ui/mainDialog.h" #include <wx/stdpaths.h> #include <wx/filename.h> +#include <wx/ffile.h> #include "library/globalFunctions.h" #include <wx/msgdlg.h> +#include "library/processXml.h" +#include <wx/stopwatch.h> + +using namespace xmlAccess; + IMPLEMENT_APP(Application); bool Application::ProcessIdle() { static bool firstExecution = true; - if (firstExecution) { firstExecution = false; @@ -45,40 +50,38 @@ void Application::initialize() if (!wxSetWorkingDirectory(wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath())) throw RuntimeException(_("Could not set working directory to directory containing executable file!")); + globalResource.load(); //load image resources from file: must be called after working directory has been set + //set program language SetExitOnFrameDelete(false); //prevent messagebox from becoming top-level window programLanguage.loadLanguageFromCfg(); SetExitOnFrameDelete(true); - //activate support for .png files - wxImage::AddHandler(new wxPNGHandler); - - //load icon and animation resources (also needed for commandline: status dialog, error dialog - GlobalResources::loadResourceFiles(); - //test if ffs is to be started on UI with config file passed as commandline parameter wxString configFileForUI = FreeFileSync::FfsLastConfigFile; if (argc > 1) { - if (FreeFileSync::isFfsConfigFile(argv[1])) + XmlType xmlConfigType = xmlAccess::getXmlType(argv[1]); + if (xmlConfigType == XML_GUI_CONFIG) configFileForUI = argv[1]; - else //start in commandline mode? + else if (xmlConfigType == XML_BATCH_CONFIG) //start in commandline mode { - parseCommandline(); + runBatchMode(argv[1]); - if (applicationRunsOnCommandLineWithoutWindows) - { + if (applicationRunsInBatchWithoutWindows) ExitMainLoop(); //exit programm on next main loop iteration - return; - } - else - return; //wait for the user to close the status window + return; //program will exit automatically if a main window is present and closed + } + else + { + wxMessageBox(wxString(_("No valid configuration file specified: ")) + argv[1], _("Error"), wxOK | wxICON_ERROR); + return; } } - //start om GUI mode + //start in GUI mode MainDialog* frame = new MainDialog(NULL, configFileForUI, &programLanguage); - frame->SetIcon(*GlobalResources::programIcon); //set application icon + frame->SetIcon(*globalResource.programIcon); //set application icon frame->Show(); } @@ -100,364 +103,229 @@ int Application::OnRun() int Application::OnExit() { - GlobalResources::unloadResourceFiles(); return 0; } -SyncDirection convertCmdlineCfg(const wxString& cfg, const int i) -{ - assert (cfg.Len() == 5); - assert (0 <= i <= 4); - - switch (cfg[i]) - { - case 'L': - return SYNC_DIR_LEFT; - case 'R': - return SYNC_DIR_RIGHT; - case 'N': - return SYNC_DIR_NONE; - default: - assert(false); - return SYNC_DIR_NONE; - } -} - - -void Application::logInit() -{ - wxString tmp = wxDateTime::Now().FormatISOTime(); - tmp.Replace(wxT(":"), wxEmptyString); - wxString logfileName = wxString(wxT("FFS_")) + wxDateTime::Now().FormatISODate() + wxChar('_') + tmp + wxT(".log"); - - logFile.Open(logfileName.c_str(), wxT("w")); - if (!logFile.IsOpened()) - throw RuntimeException(_("Unable to create logfile!")); - logFile.Write(wxString(_("FreeFileSync (Date: ")) + wxDateTime::Now().FormatDate() + _(" Time: ") + wxDateTime::Now().FormatTime() + wxT(")") + wxChar('\n')); - logFile.Write(wxString(_("-------------------------------------------------")) + wxChar('\n')); - logFile.Write(wxChar('\n')); - logFile.Write(_("Log-messages:\n-------------")); - logFile.Write(wxChar('\n')); - logWrite(_("Start")); - logFile.Write(wxChar('\n')); - - totalTime.Start(); //measure total time -} - - -void Application::logWrite(const wxString& logText, const wxString& problemType) +class LogFile { - logFile.Write(wxString(wxT("[")) + wxDateTime::Now().FormatTime() + wxT("] ")); - - if (problemType != wxEmptyString) - logFile.Write(problemType + wxT(": ")); - - logFile.Write(logText + wxChar('\n')); -} - - -void Application::logClose(const wxString& finalText) -{ - logFile.Write(wxChar('\n')); - - long time = totalTime.Time(); //retrieve total time - logWrite(finalText + wxT(" (") + _("Total time: ") + (wxTimeSpan::Milliseconds(time)).Format() + wxT(")"), _("Stop")); - - //logFile.close(); <- not needed -} - - -void Application::parseCommandline() -{ - //commandline-descriptor must be initialized here AFTER the program language is set - const wxCmdLineEntryDesc cmdLineDesc [] = +public: + LogFile() { - { wxCMD_LINE_SWITCH, - wxT("h"), - wxT("help"), - _("Displays help on the command line parameters\n"), - wxCMD_LINE_VAL_NONE, - wxCMD_LINE_OPTION_HELP - }, + wxString tmp = wxDateTime::Now().FormatISOTime(); + tmp.Replace(wxT(":"), wxEmptyString); + wxString logfileName = wxString(wxT("FFS_")) + wxDateTime::Now().FormatISODate() + wxChar('_') + tmp + wxT(".log"); + logFile.Open(logfileName.c_str(), wxT("w")); + readyToWrite = logFile.IsOpened(); + if (readyToWrite) { - wxCMD_LINE_OPTION, - GlobalResources::paramCompare, - NULL, - wxString(_("Specify algorithm to test if files are equal:\n\n\t\t")) + GlobalResources::valueSizeDate + _(": check filesize and date\n\t\t") + GlobalResources::valueContent + _(": check file content\n"), - wxCMD_LINE_VAL_STRING, - wxCMD_LINE_OPTION_MANDATORY - }, - - { - wxCMD_LINE_OPTION, - GlobalResources::paramSync, - NULL, - wxString(_("Specify the sync-direction used for each type of file by a string of five chars:\n\n")) + - _("\t\tChar 1: Folders/files that exist on left side only\n") + - _("\t\tChar 2: Folders/files that exist on right side only\n") + - _("\t\tChar 3: Files that exist on both sides, left one is newer\n") + - _("\t\tChar 4: Files that exist on both sides, right one is newer\n") + - _("\t\tChar 5: Files that exist on both sides and are different\n") + - _("\n\t\tSync-direction: L: left, R: right, N: none\n"), - wxCMD_LINE_VAL_STRING, - wxCMD_LINE_OPTION_MANDATORY - }, + logFile.Write(wxString(_("FreeFileSync (Date: ")) + wxDateTime::Now().FormatDate() + _(" Time: ") + wxDateTime::Now().FormatTime() + wxT(")") + wxChar('\n')); + logFile.Write(wxString(_("-------------------------------------------------")) + wxChar('\n')); + logFile.Write(wxChar('\n')); + logFile.Write(_("Log-messages:\n-------------")); + logFile.Write(wxChar('\n')); + write(_("Start")); + logFile.Write(wxChar('\n')); + + totalTime.Start(); //measure total time + } + } - { - wxCMD_LINE_PARAM, - NULL, - NULL, - _("<left directory>"), - wxCMD_LINE_VAL_STRING - }, + ~LogFile() {} - { - wxCMD_LINE_PARAM, - NULL, - NULL, - _("<right directory>"), - wxCMD_LINE_VAL_STRING - }, + bool isOkay() + { + return readyToWrite; + } + void write(const wxString& logText, const wxString& problemType = wxEmptyString) + { + if (readyToWrite) { - wxCMD_LINE_OPTION, - GlobalResources::paramInclude, - NULL, - _("Specify names to be included separated by ';'. Wildcards '*' and '?' are supported. Default: \"*\"\n"), - wxCMD_LINE_VAL_STRING, - }, + logFile.Write(wxString(wxT("[")) + wxDateTime::Now().FormatTime() + wxT("] ")); - { - wxCMD_LINE_OPTION, - GlobalResources::paramExclude, - NULL, - _("Specify names to be excluded separated by ';'. Wildcards '*' and '?' are supported. Default: \"\"\n"), - wxCMD_LINE_VAL_STRING, - }, + if (problemType != wxEmptyString) + logFile.Write(problemType + wxT(": ")); - { - wxCMD_LINE_SWITCH, - GlobalResources::paramContinueError, - NULL, - _("If errors occur during folder comparison or synchronization they are ignored and the process continues.\n") - }, + logFile.Write(logText + wxChar('\n')); + } + } + void close(const wxString& finalText) + { + if (readyToWrite) { - wxCMD_LINE_SWITCH, - GlobalResources::paramRecycler, - NULL, - _("Move files to Recycle Bin instead of deleting or overwriting them directly.\n") - }, + logFile.Write(wxChar('\n')); - { - wxCMD_LINE_SWITCH, - GlobalResources::paramSilent, - NULL, - wxString(_("Do not show graphical status and error messages but write to a logfile instead.\n\n")) + - _("\tExamples:\n\n\t1.) FreeFileSync -comp SIZEDATE -sync RRRRR C:\\Source C:\\Target\n\t2.) FreeFileSync -comp sizedate -sync rlrln c:\\dir1 c:\\dir2 -incl *.doc\n\n") + - _("\t1: Creates a mirror backup of the left directory\n\t2: Synchronizes all *.doc files from both directories simultaneously\n\n") + - _("\tHint: You can easily generate a batch file by chosing \"Create batch job\" from the GUI menubar.\n") - }, + long time = totalTime.Time(); //retrieve total time + write(finalText + wxT(" (") + _("Total time: ") + (wxTimeSpan::Milliseconds(time)).Format() + wxT(")"), _("Stop")); - { - wxCMD_LINE_NONE + //logFile.close(); <- not needed } - }; - - //now set the parser with all MANDATORY options and parameters - wxCmdLineParser parser(cmdLineDesc, argc, argv); - parser.SetSwitchChars(wxT("-")); - if (parser.Parse() != 0) //if commandline is used incorrectly: display help dialog and exit program - return; - - //commandline parameters - wxString cmp; - wxString syncCfg; - wxString leftDir; - wxString rightDir; - wxString included; - wxString excluded; - bool continueOnError = parser.Found(GlobalResources::paramContinueError); - bool useRecycler = parser.Found(GlobalResources::paramRecycler); - bool silent = parser.Found(GlobalResources::paramSilent); + } - applicationRunsOnCommandLineWithoutWindows = silent; //this value is needed for the application to decide whether to wait for windows to close or not +private: + bool readyToWrite; + wxFFile logFile; + wxStopWatch totalTime; +}; -//check existence of all commandline parameters - if ( !parser.Found(GlobalResources::paramCompare, &cmp) || - !parser.Found(GlobalResources::paramSync, &syncCfg) || - parser.GetParamCount() != 2) +class DeleteOnExit +{ +public: + DeleteOnExit(LogFile* log) : m_log(log) {} + ~DeleteOnExit() { - parser.Usage(); - return; + if (m_log) delete m_log; } - cmp.UpperCase(); - syncCfg.UpperCase(); - leftDir = parser.GetParam(0); - rightDir = parser.GetParam(1); +private: + LogFile* m_log; +}; -//evaluate filter settings - bool filteringEnabled = false; - if (parser.Found(GlobalResources::paramInclude, &included)) - filteringEnabled = true; - else - included = wxT("*"); - if (parser.Found(GlobalResources::paramExclude, &excluded)) - filteringEnabled = true; - else - excluded = wxEmptyString; - -//until here all options and parameters have been set -//-------------------------------------------------------------------- - -//check consistency of all commandline parameters - if ((cmp != GlobalResources::valueSizeDate && cmp != GlobalResources::valueContent) || - syncCfg.Len() != 5 || - (syncCfg[0] != 'L' && syncCfg[0] != 'R' && syncCfg[0] != 'N') || - (syncCfg[1] != 'L' && syncCfg[1] != 'R' && syncCfg[1] != 'N') || - (syncCfg[2] != 'L' && syncCfg[2] != 'R' && syncCfg[2] != 'N') || - (syncCfg[3] != 'L' && syncCfg[3] != 'R' && syncCfg[3] != 'N') || - (syncCfg[4] != 'L' && syncCfg[4] != 'R' && syncCfg[4] != 'N')) - { - parser.Usage(); +void Application::runBatchMode(const wxString& filename) +{ + applicationRunsInBatchWithoutWindows = false; //default value + + //load XML settings + XmlInput inputFile(filename, XML_BATCH_CONFIG); + + if (!inputFile.loadedSuccessfully()) + { //handle error: file load + wxMessageBox(wxString(_("Could not open configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); return; } -//init logfile - if (silent) logInit(); + XmlMainConfig mainCfg; //structure to receive main settings + XmlBatchConfig batchCfg; //structure to receive batch settings + if ( inputFile.readXmlMainConfig(mainCfg) && //read main configuration settings + inputFile.readXmlBatchConfig(batchCfg)) //read GUI layout configuration + { + //all settings have been read successfully... - wxString logText; + applicationRunsInBatchWithoutWindows = batchCfg.silent; //this value is needed for the application to decide whether to wait for windows to close or not - //check if directories exist - if (!wxDirExists(FreeFileSync::getFormattedDirectoryName(leftDir))) - { - wxString errorMessage = wxString(_("Directory ")) + wxT("\"") + leftDir + wxT("\"") + _(" does not exist."); - wxString statusMessage = wxString(_("Synchronization aborted!")); - if (silent) + //format directory names + for (vector<FolderPair>::iterator i = mainCfg.directoryPairs.begin(); i != mainCfg.directoryPairs.end(); ++i) { - logWrite(errorMessage, _("Warning")); - logClose(statusMessage); + i->leftDirectory = FreeFileSync::getFormattedDirectoryName(i->leftDirectory); + i->rightDirectory = FreeFileSync::getFormattedDirectoryName(i->rightDirectory); } - else wxMessageBox(errorMessage + wxT("\n\n") + statusMessage, _("Warning"), wxICON_WARNING); - returnValue = -2; - return; - } - else if (!wxDirExists(FreeFileSync::getFormattedDirectoryName(rightDir))) - { - wxString errorMessage = wxString(_("Directory ")) + wxT("\"") + rightDir + wxT("\"") + _(" does not exist."); - wxString statusMessage = wxString(_("Synchronization aborted!")); - if (silent) - { - logWrite(errorMessage, _("Warning")); - logClose(statusMessage); + //init logfile + LogFile* log = NULL; + if (batchCfg.silent) + log = new LogFile; + DeleteOnExit dummy(log); //delete log object on exit (if not NULL) + + if (log && !log->isOkay()) + { //handle error: file load + wxMessageBox(_("Unable to create logfile!"), _("Error"), wxOK | wxICON_ERROR); + return; } - else wxMessageBox(errorMessage + wxT("\n\n") + statusMessage, _("Warning"), wxICON_WARNING); - returnValue = -2; - return; - } - //test existence of Recycle Bin - if (useRecycler) - { - if (!FreeFileSync::recycleBinExists()) + //check if directories exist + wxString errorMessage; + if (!FreeFileSync::foldersAreValidForComparison(mainCfg.directoryPairs, errorMessage)) { - wxString errorMessage = wxString(_("Unable to initialize Recycle Bin!")); - wxString statusMessage = wxString(_("Synchronization aborted!")); - if (silent) + if (batchCfg.silent) { - logWrite(errorMessage, _("Error")); - logClose(statusMessage); + log->write(errorMessage, _("Warning")); + log->close(_("Synchronization aborted!")); } - else wxMessageBox(errorMessage + wxT("\n\n") + statusMessage, _("Error"), wxICON_WARNING); + else wxMessageBox(errorMessage + wxT("\n\n") + _("Synchronization aborted!"), _("Warning"), wxICON_WARNING); returnValue = -2; return; } - } - -//until here all options and parameters are consistent -//-------------------------------------------------------------------- - CompareVariant cmpVar = CMP_BY_CONTENT; //dummy value to suppress compiler warning - SyncConfiguration syncConfiguration; - FileCompareResult currentGridData; - if (cmp == GlobalResources::valueSizeDate) - cmpVar = CMP_BY_TIME_SIZE; - else if (cmp == GlobalResources::valueContent) - cmpVar = CMP_BY_CONTENT; - else - assert (false); - - syncConfiguration.exLeftSideOnly = convertCmdlineCfg(syncCfg, 0); - syncConfiguration.exRightSideOnly = convertCmdlineCfg(syncCfg, 1); - syncConfiguration.leftNewer = convertCmdlineCfg(syncCfg, 2); - syncConfiguration.rightNewer = convertCmdlineCfg(syncCfg, 3); - syncConfiguration.different = convertCmdlineCfg(syncCfg, 4); + //test existence of Recycle Bin + if (mainCfg.cfg.useRecycleBin) + { + if (!FreeFileSync::recycleBinExists()) + { + wxString errorMessage = wxString(_("Unable to initialize Recycle Bin!")); + wxString statusMessage = wxString(_("Synchronization aborted!")); + if (batchCfg.silent) + { + log->write(errorMessage, _("Error")); + log->close(statusMessage); + } + else wxMessageBox(errorMessage + wxT("\n\n") + statusMessage, _("Error"), wxICON_WARNING); + + returnValue = -2; + return; + } + } - //begin of synchronization process (all in one try-catch block) - try - { - //class handling status updates and error messages - CommandLineStatusUpdater statusUpdater(this, continueOnError, silent); + //begin of synchronization process (all in one try-catch block) + try + { + FileCompareResult currentGridData; + //class handling status updates and error messages + BatchStatusUpdater statusUpdater(mainCfg.cfg.continueOnError, batchCfg.silent, log); //COMPARE DIRECTORIES - //unsigned int startTime = GetTickCount(); - FreeFileSync::startCompareProcess(currentGridData, - FreeFileSync::getFormattedDirectoryName(leftDir), - FreeFileSync::getFormattedDirectoryName(rightDir), - cmpVar, - &statusUpdater); - //wxMessageBox(wxString::Format(wxT("%i"), unsigned(GetTickCount()) - startTime)); + //unsigned int startTime = GetTickCount(); + FreeFileSync::startCompareProcess(currentGridData, + mainCfg.directoryPairs, + mainCfg.cfg.compareVar, + &statusUpdater); + //wxMessageBox(wxString::Format(wxT("%i"), unsigned(GetTickCount()) - startTime)); //APPLY FILTERS - if (filteringEnabled) - FreeFileSync::filterCurrentGridData(currentGridData, included, excluded); + if (mainCfg.cfg.filterIsActive) + FreeFileSync::filterCurrentGridData(currentGridData, mainCfg.cfg.includeFilter, mainCfg.cfg.excludeFilter); //check if there are files/folders to be sync'ed at all - int objectsToCreate = 0; - int objectsToOverwrite = 0; - int objectsToDelete = 0; - double dataToProcess = 0; - FreeFileSync::calcTotalBytesToSync(objectsToCreate, - objectsToOverwrite, - objectsToDelete, - dataToProcess, - currentGridData, - syncConfiguration); - if (objectsToCreate + objectsToOverwrite + objectsToDelete == 0) - { - statusUpdater.noSynchronizationNeeded(); //inform about this special case + int objectsToCreate = 0; + int objectsToOverwrite = 0; + int objectsToDelete = 0; + double dataToProcess = 0; + FreeFileSync::calcTotalBytesToSync(objectsToCreate, + objectsToOverwrite, + objectsToDelete, + dataToProcess, + currentGridData, + mainCfg.cfg.syncConfiguration); + if (objectsToCreate + objectsToOverwrite + objectsToDelete == 0) + { + statusUpdater.noSynchronizationNeeded(); //inform about this special case + + returnValue = -3; + return; + } - returnValue = -3; +//START SYNCHRONIZATION + //unsigned int startTime = GetTickCount(); + FreeFileSync::startSynchronizationProcess(currentGridData, mainCfg.cfg.syncConfiguration, &statusUpdater, mainCfg.cfg.useRecycleBin); + //wxMessageBox(wxString::Format(wxT("%i"), unsigned(GetTickCount()) - startTime)); + } + catch (AbortThisProcess& theException) //exit used by statusUpdater + { + returnValue = -4; return; } -//START SYNCHRONIZATION - //unsigned int startTime = GetTickCount(); - FreeFileSync::startSynchronizationProcess(currentGridData, syncConfiguration, &statusUpdater, useRecycler); //default: do not use recycle bin since it's not sure if its possible - //wxMessageBox(wxString::Format(wxT("%i"), unsigned(GetTickCount()) - startTime)); } - catch (AbortThisProcess& theException) //exit used by statusUpdater - { - returnValue = -4; + else + { //handle error: parsing + wxMessageBox(wxString(_("Error parsing configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); return; } - return; //exit program and skip UI dialogs + return; //exit program } //###################################################################################################### -CommandLineStatusUpdater::CommandLineStatusUpdater(Application* application, bool continueOnError, bool silent) : - app(application), +BatchStatusUpdater::BatchStatusUpdater(bool continueOnError, bool silent, LogFile* log) : + m_log(log), continueErrors(continueOnError), silentMode(silent), currentProcess(-1), @@ -471,7 +339,7 @@ CommandLineStatusUpdater::CommandLineStatusUpdater(Application* application, boo } -CommandLineStatusUpdater::~CommandLineStatusUpdater() +BatchStatusUpdater::~BatchStatusUpdater() { unsigned int failedItems = unhandledErrors.GetCount(); @@ -479,14 +347,14 @@ CommandLineStatusUpdater::~CommandLineStatusUpdater() if (silentMode) { if (abortionRequested) - app->logClose(_("Synchronization aborted!")); + m_log->close(_("Synchronization aborted!")); else if (failedItems) - app->logClose(_("Synchronization completed with errors!")); + m_log->close(_("Synchronization completed with errors!")); else { if (!synchronizationNeeded) - app->logWrite(_("Nothing to synchronize. Both directories adhere to the sync-configuration!"), _("Info")); - app->logClose(_("Synchronization completed successfully.")); + m_log->write(_("Nothing to synchronize. Both directories adhere to the sync-configuration!"), _("Info")); + m_log->close(_("Synchronization completed successfully.")); } } else @@ -528,19 +396,19 @@ CommandLineStatusUpdater::~CommandLineStatusUpdater() inline -void CommandLineStatusUpdater::updateStatusText(const wxString& text) +void BatchStatusUpdater::updateStatusText(const wxString& text) { if (silentMode) { if (currentProcess == FreeFileSync::synchronizeFilesProcess) - app->logWrite(text, _("Info")); + m_log->write(text, _("Info")); } else syncStatusFrame->setStatusText_NoUpdate(text); } -void CommandLineStatusUpdater::initNewProcess(int objectsTotal, double dataTotal, int processID) +void BatchStatusUpdater::initNewProcess(int objectsTotal, double dataTotal, int processID) { currentProcess = processID; @@ -566,7 +434,7 @@ void CommandLineStatusUpdater::initNewProcess(int objectsTotal, double dataTotal inline -void CommandLineStatusUpdater::updateProcessedData(int objectsProcessed, double dataProcessed) +void BatchStatusUpdater::updateProcessedData(int objectsProcessed, double dataProcessed) { if (!silentMode) { @@ -581,12 +449,12 @@ void CommandLineStatusUpdater::updateProcessedData(int objectsProcessed, double } -int CommandLineStatusUpdater::reportError(const wxString& text) +int BatchStatusUpdater::reportError(const wxString& text) { if (silentMode) //write error message log and abort the complete session if necessary { unhandledErrors.Add(text); - app->logWrite(text, _("Error")); + m_log->write(text, _("Error")); if (continueErrors) // <- /|\ before return, the logfile is written!!! return StatusUpdater::continueNext; @@ -633,20 +501,20 @@ int CommandLineStatusUpdater::reportError(const wxString& text) inline -void CommandLineStatusUpdater::forceUiRefresh() +void BatchStatusUpdater::forceUiRefresh() { if (!silentMode) syncStatusFrame->updateStatusDialogNow(); } -void CommandLineStatusUpdater::abortThisProcess() +void BatchStatusUpdater::abortThisProcess() { throw AbortThisProcess(); //abort can be triggered by syncStatusFrame } -void CommandLineStatusUpdater::noSynchronizationNeeded() +void BatchStatusUpdater::noSynchronizationNeeded() { synchronizationNeeded = false;; } diff --git a/Application.h b/Application.h index eb209783..e240a762 100644 --- a/Application.h +++ b/Application.h @@ -12,11 +12,9 @@ #include <wx/app.h> #include <wx/cmdline.h> -#include <wx/ffile.h> #include "FreeFileSync.h" #include "ui/smallDialogs.h" #include "library/misc.h" -#include <wx/stopwatch.h> class Application : public wxApp { @@ -26,30 +24,24 @@ public: int OnExit(); void initialize(); - bool ProcessIdle(); //virtual method - - //methods for writing logs - void logInit(); - void logWrite(const wxString& logText, const wxString& problemType = wxEmptyString); - void logClose(const wxString& finalText); + bool ProcessIdle(); //virtual method! private: - void parseCommandline(); + void runBatchMode(const wxString& filename); - bool applicationRunsOnCommandLineWithoutWindows; - wxFFile logFile; - wxStopWatch totalTime; + bool applicationRunsInBatchWithoutWindows; CustomLocale programLanguage; int returnValue; }; +class LogFile; -class CommandLineStatusUpdater : public StatusUpdater +class BatchStatusUpdater : public StatusUpdater { public: - CommandLineStatusUpdater(Application* application, bool continueOnError, bool silent); - ~CommandLineStatusUpdater(); + BatchStatusUpdater(bool continueOnError, bool silent, LogFile* log); + ~BatchStatusUpdater(); void updateStatusText(const wxString& text); void initNewProcess(int objectsTotal, double dataTotal, int processID); @@ -62,12 +54,12 @@ public: private: void abortThisProcess(); - Application* app; + LogFile* m_log; SyncStatus* syncStatusFrame; bool continueErrors; bool silentMode; - wxArrayString unhandledErrors; //list of non-resolved errors + wxArrayString unhandledErrors; //list of non-resolved errors int currentProcess; bool synchronizationNeeded; }; diff --git a/Changelog.txt b/Changelog.txt index 5e1a98b2..abad5df7 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,14 +1,24 @@ FreeFileSync ------------ +Changelog v1.11 +--------------- +Support for multiple folder pairs +Optimized performance of multiple pairs to scan each folder just once +Enhanced batch file format +New context menu option to add files, file types or directories to exclude filter +Reworked file filter dialog +Updated translation files + + Changelog v1.10 --------------- +--------------- Transformed configuration file format to XML Exchanged batch files with shell links for full Unicode support (Windows-only) -Improved Filter usage: ignore leading/trailing whitespace, upper/lower-case (Windows-only) chars +Improved filter usage: ignore leading/trailing whitespace, upper/lower-case (Windows-only) chars Removed screen-flicker when clicking on compare: Added elapsed time to compare status -Calculate height of middle grid independently from OS window layout +Calculate height of middle grid independently of OS window layout Multiple GUI improvements Added Japanese translation Updated translation files diff --git a/FreeFileSync - ANSI.cbp b/FreeFileSync - ANSI.cbp deleted file mode 100644 index 2f25d1ba..00000000 --- a/FreeFileSync - ANSI.cbp +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<CodeBlocks_project_file> - <FileVersion major="1" minor="6" /> - <Project> - <Option title="FreeFileSync" /> - <Option pch_mode="2" /> - <Option compiler="gcc" /> - <Build> - <Target title="Debug"> - <Option output="FreeFileSync" prefix_auto="1" extension_auto="1" /> - <Option object_output="obj\Debug\" /> - <Option type="0" /> - <Option compiler="gcc" /> - <Option projectLinkerOptionsRelation="2" /> - <Compiler> - <Add option="-g" /> - <Add option="-D__WXDEBUG__" /> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib\mswd" /> - </Compiler> - <ResourceCompiler> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib\mswd" /> - </ResourceCompiler> - <Linker> - <Add library="libwxmsw28d_adv.a" /> - <Add library="libwxmsw28d_core.a" /> - <Add library="libwxbase28d.a" /> - <Add library="libwxpngd.a" /> - <Add library="libwxzlibd.a" /> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib" /> - </Linker> - </Target> - <Target title="Release"> - <Option output="FreeFileSync" prefix_auto="1" extension_auto="1" /> - <Option object_output="obj\Release\" /> - <Option type="0" /> - <Option compiler="gcc" /> - <Option projectLinkerOptionsRelation="2" /> - <Compiler> - <Add option="-O2" /> - <Add option="-DNDEBUG" /> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib\msw" /> - </Compiler> - <ResourceCompiler> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib\msw" /> - </ResourceCompiler> - <Linker> - <Add option="-s" /> - <Add library="libwxmsw28_adv.a" /> - <Add library="libwxmsw28_core.a" /> - <Add library="libwxbase28.a" /> - <Add library="libwxpng.a" /> - <Add library="libwxzlib.a" /> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib" /> - </Linker> - </Target> - </Build> - <Compiler> - <Add option="-Wall" /> - <Add option="-pipe" /> - <Add option="-mthreads" /> - <Add option='[[if (PLATFORM == PLATFORM_MSW && (GetCompilerFactory().GetCompilerVersionString(_T("gcc")) >= _T("4.0.0"))) print(_T("-Wno-attributes"));]]' /> - <Add option="-D__GNUWIN32__" /> - <Add option="-D__WXMSW__" /> - <Add option="-DFFS_WIN" /> - <Add option="-DTIXML_USE_STL" /> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\include" /> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\contrib\include" /> - </Compiler> - <ResourceCompiler> - <Add directory="C:\Programme\CodeBlocks\wxWidgets\include" /> - </ResourceCompiler> - <Linker> - <Add option="-mthreads" /> - <Add library="libkernel32.a" /> - <Add library="libuser32.a" /> - <Add library="libgdi32.a" /> - <Add library="libwinspool.a" /> - <Add library="libcomdlg32.a" /> - <Add library="libadvapi32.a" /> - <Add library="libshell32.a" /> - <Add library="libole32.a" /> - <Add library="liboleaut32.a" /> - <Add library="libuuid.a" /> - <Add library="libcomctl32.a" /> - <Add library="libwsock32.a" /> - <Add library="libodbc32.a" /> - </Linker> - <Unit filename="FreeFileSync.cpp" /> - <Unit filename="FreeFileSync.h" /> - <Unit filename="WxWizFrame.fbp" /> - <Unit filename="application.cpp" /> - <Unit filename="application.h" /> - <Unit filename="library\customGrid.cpp" /> - <Unit filename="library\customGrid.h" /> - <Unit filename="library\globalFunctions.cpp" /> - <Unit filename="library\globalFunctions.h" /> - <Unit filename="library\misc.cpp" /> - <Unit filename="library\misc.h" /> - <Unit filename="library\multithreading.cpp" /> - <Unit filename="library\multithreading.h" /> - <Unit filename="library\pch.h"> - <Option weight="0" /> - </Unit> - <Unit filename="library\resources.cpp" /> - <Unit filename="library\resources.h" /> - <Unit filename="library\tinyxml\tinystr.cpp" /> - <Unit filename="library\tinyxml\tinyxml.cpp" /> - <Unit filename="library\tinyxml\tinyxmlerror.cpp" /> - <Unit filename="library\tinyxml\tinyxmlparser.cpp" /> - <Unit filename="resource.rc"> - <Option compilerVar="WINDRES" /> - </Unit> - <Unit filename="ui\guiGenerated.cpp" /> - <Unit filename="ui\guiGenerated.h" /> - <Unit filename="ui\mainDialog.cpp" /> - <Unit filename="ui\mainDialog.h" /> - <Unit filename="ui\smallDialogs.cpp" /> - <Unit filename="ui\smallDialogs.h" /> - <Unit filename="ui\syncDialog.cpp" /> - <Unit filename="ui\syncDialog.h" /> - <Extensions> - <code_completion /> - <envvars /> - <debugger /> - <wxsmith version="1"> - <gui name="wxWidgets" src="" main="" init_handlers="necessary" language="CPP" /> - </wxsmith> - </Extensions> - </Project> -</CodeBlocks_project_file> diff --git a/FreeFileSync - Unicode.cbp b/FreeFileSync - Unicode.cbp index 8c88f8b7..1197abe3 100644 --- a/FreeFileSync - Unicode.cbp +++ b/FreeFileSync - Unicode.cbp @@ -53,6 +53,29 @@ <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib" /> </Linker> </Target> + <Target title="Unit Test"> + <Option output="obj\Unit Test\Unit Test" prefix_auto="1" extension_auto="1" /> + <Option working_dir="obj\Unit Test\" /> + <Option object_output="obj\Unit Test\" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectLinkerOptionsRelation="2" /> + <Compiler> + <Add option="-g" /> + <Add option="-D__WXDEBUG__" /> + <Add directory="library\gtest" /> + <Add directory="library\gtest\include" /> + <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib\mswud" /> + </Compiler> + <Linker> + <Add library="libwxmsw28ud_adv.a" /> + <Add library="libwxmsw28ud_core.a" /> + <Add library="libwxbase28ud.a" /> + <Add library="libwxpngd.a" /> + <Add library="libwxzlibd.a" /> + <Add directory="C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib" /> + </Linker> + </Target> </Build> <Compiler> <Add option="-Wall" /> @@ -87,45 +110,129 @@ <Add library="libodbc32.a" /> </Linker> <Unit filename="FreeFileSync.cpp" /> - <Unit filename="FreeFileSync.h" /> - <Unit filename="WxWizFrame.fbp" /> - <Unit filename="application.cpp" /> - <Unit filename="application.h" /> - <Unit filename="library\customGrid.cpp" /> - <Unit filename="library\customGrid.h" /> + <Unit filename="FreeFileSync.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="WxWizFrame.fbp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="application.cpp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="application.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="library\customGrid.cpp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="library\customGrid.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> <Unit filename="library\globalFunctions.cpp" /> - <Unit filename="library\globalFunctions.h" /> - <Unit filename="library\misc.cpp" /> - <Unit filename="library\misc.h" /> + <Unit filename="library\globalFunctions.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="library\gtest\src\gtest-death-test.cc"> + <Option target="Unit Test" /> + </Unit> + <Unit filename="library\gtest\src\gtest-filepath.cc"> + <Option target="Unit Test" /> + </Unit> + <Unit filename="library\gtest\src\gtest-port.cc"> + <Option target="Unit Test" /> + </Unit> + <Unit filename="library\gtest\src\gtest-typed-test.cc"> + <Option target="Unit Test" /> + </Unit> + <Unit filename="library\gtest\src\gtest.cc"> + <Option target="Unit Test" /> + </Unit> + <Unit filename="library\gtest\src\gtest_main.cc"> + <Option target="Unit Test" /> + </Unit> + <Unit filename="library\gtest\unittest1.cpp"> + <Option target="Unit Test" /> + </Unit> + <Unit filename="library\misc.cpp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="library\misc.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> <Unit filename="library\multithreading.cpp" /> - <Unit filename="library\multithreading.h" /> + <Unit filename="library\multithreading.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> <Unit filename="library\pch.h"> <Option weight="0" /> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="library\processXml.cpp" /> + <Unit filename="library\processXml.h"> + <Option target="Debug" /> + <Option target="Release" /> </Unit> <Unit filename="library\resources.cpp" /> - <Unit filename="library\resources.h" /> + <Unit filename="library\resources.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> <Unit filename="library\tinyxml\tinystr.cpp" /> <Unit filename="library\tinyxml\tinyxml.cpp" /> <Unit filename="library\tinyxml\tinyxmlerror.cpp" /> <Unit filename="library\tinyxml\tinyxmlparser.cpp" /> <Unit filename="resource.rc"> <Option compilerVar="WINDRES" /> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\guiGenerated.cpp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\guiGenerated.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\mainDialog.cpp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\mainDialog.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\smallDialogs.cpp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\smallDialogs.h"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\syncDialog.cpp"> + <Option target="Debug" /> + <Option target="Release" /> + </Unit> + <Unit filename="ui\syncDialog.h"> + <Option target="Debug" /> + <Option target="Release" /> </Unit> - <Unit filename="ui\guiGenerated.cpp" /> - <Unit filename="ui\guiGenerated.h" /> - <Unit filename="ui\mainDialog.cpp" /> - <Unit filename="ui\mainDialog.h" /> - <Unit filename="ui\smallDialogs.cpp" /> - <Unit filename="ui\smallDialogs.h" /> - <Unit filename="ui\syncDialog.cpp" /> - <Unit filename="ui\syncDialog.h" /> <Extensions> <code_completion /> <envvars /> <debugger /> - <wxsmith version="1"> - <gui name="wxWidgets" src="" main="" init_handlers="necessary" language="CPP" /> - </wxsmith> </Extensions> </Project> </CodeBlocks_project_file> diff --git a/FreeFileSync.cpp b/FreeFileSync.cpp index 74c558b9..d0927ae8 100644 --- a/FreeFileSync.cpp +++ b/FreeFileSync.cpp @@ -7,7 +7,6 @@ #include "library/resources.h" #include <sys/stat.h> #include <wx/ffile.h> -#include "library/tinyxml/tinyxml.h" #ifdef FFS_WIN #include <windows.h> @@ -20,8 +19,7 @@ using namespace globalFunctions; -const string FreeFileSync::FfsConfigFileID = "FFS_CONFIG"; -const wxString FreeFileSync::FfsLastConfigFile = wxT("LastRun.ffs"); +const wxString FreeFileSync::FfsLastConfigFile = wxT("LastRun.ffs_gui"); inline wxString formatTime(unsigned int number) @@ -255,7 +253,88 @@ void calcTotalDataForCompare(int& objectsTotal, double& dataTotal, const FileCom } -void FreeFileSync::startCompareProcess(FileCompareResult& output, const wxString& dirLeft, const wxString& dirRight, CompareVariant cmpVar, StatusUpdater* statusUpdater) +struct DescrBufferLine +{ + wxString directoryName; + DirectoryDescrType* directoryDesc; + +#ifdef FFS_WIN + //Windows does NOT distinguish between upper/lower-case + bool operator>(const DescrBufferLine& b ) const + { + return (directoryName.CmpNoCase(b.directoryName) > 0); + } + bool operator<(const DescrBufferLine& b) const + { + return (directoryName.CmpNoCase(b.directoryName) < 0); + } + bool operator==(const DescrBufferLine& b) const + { + return (directoryName.CmpNoCase(b.directoryName) == 0); + } + +#elif defined FFS_LINUX + //Linux DOES distinguish between upper/lower-case + bool operator>(const DescrBufferLine& b ) const + { + return (directoryName.Cmp(b.directoryName) > 0); + } + bool operator<(const DescrBufferLine& b) const + { + return (directoryName.Cmp(b.directoryName) < 0); + } + bool operator==(const DescrBufferLine& b) const + { + return (directoryName.Cmp(b.directoryName) == 0); + } +#else + adapt this +#endif + +}; + + +class DirectoryDescrBuffer //buffer multiple scans of the same directories +{ +public: + ~DirectoryDescrBuffer() + { + //clean up + for (set<DescrBufferLine>::iterator i = buffer.begin(); i != buffer.end(); ++i) + delete i->directoryDesc; + } + + const DirectoryDescrType* getDirectoryDescription(const wxString& directory, StatusUpdater* statusUpdater) + { + DescrBufferLine bufferEntry; + bufferEntry.directoryName = directory; + + set<DescrBufferLine>::iterator entryFound; + if ((entryFound = buffer.find(bufferEntry)) != buffer.end()) + { + //entry found in buffer; return + return entryFound->directoryDesc; + } + else + { + //entry not found; create new one + bufferEntry.directoryDesc = new DirectoryDescrType; + FreeFileSync::generateFileAndFolderDescriptions(*bufferEntry.directoryDesc, directory, statusUpdater); + buffer.insert(bufferEntry); + + return bufferEntry.directoryDesc; + } + } + +private: + set<DescrBufferLine> buffer; +}; + + +void FreeFileSync::startCompareProcess(FileCompareResult& output, + const vector<FolderPair>& directoryPairsFormatted, + const CompareVariant cmpVar, + StatusUpdater* statusUpdater) { #ifndef __WXDEBUG__ wxLogNull dummy; //hide wxWidgets log messages in release build @@ -266,126 +345,132 @@ void FreeFileSync::startCompareProcess(FileCompareResult& output, const wxString //################################################################################################################################################ //inform about the total amount of data that will be processed from now on - statusUpdater->initNewProcess(-1, 0, FreeFileSync::scanningFilesProcess); //it's not known how many files will be scanned => -1 objects + statusUpdater->initNewProcess(-1, 0, FreeFileSync::scanningFilesProcess); //it's not known how many files will be scanned => -1 objects FileCompareResult output_tmp; //write to output not before END of process! + set<int> delayedContentCompare; //compare of file content happens AFTER finding corresponding files + //in order to separate into two processes (needed by progress indicators) + + //buffer accesses to the same directories; useful when multiple folder pairs are used + DirectoryDescrBuffer descriptionBuffer; try - { //retrieve sets of files (with description data) - DirectoryDescrType directoryLeft; - DirectoryDescrType directoryRight; + { + //process one folder pair after each other + for (vector<FolderPair>::const_iterator pair = directoryPairsFormatted.begin(); pair != directoryPairsFormatted.end(); ++pair) + { + //unsigned int startTime = GetTickCount(); - //unsigned int startTime = GetTickCount(); - generateFileAndFolderDescriptions(directoryLeft, dirLeft, statusUpdater); - generateFileAndFolderDescriptions(directoryRight, dirRight, statusUpdater); - //wxMessageBox(numberToWxString(unsigned(GetTickCount()) - startTime)); - statusUpdater->forceUiRefresh(); + //retrieve sets of files (with description data) + const DirectoryDescrType* directoryLeft = descriptionBuffer.getDirectoryDescription(pair->leftDirectory, statusUpdater); + const DirectoryDescrType* directoryRight = descriptionBuffer.getDirectoryDescription(pair->rightDirectory, statusUpdater); - FileCompareLine newline; + //wxMessageBox(numberToWxString(unsigned(GetTickCount()) - startTime)); + statusUpdater->forceUiRefresh(); - set<int> delayedContentCompare; //compare of file content happens AFTER finding corresponding files - //in order to separate into two processes (needed by progress indicators) + FileCompareLine newline; - //find files/folders that exist in left file model but not in right model - for (DirectoryDescrType::iterator i = directoryLeft.begin(); i != directoryLeft.end(); ++i) - if (directoryRight.find(*i) == directoryRight.end()) - { - newline.fileDescrLeft = *i; - newline.fileDescrRight = FileDescrLine(); - newline.fileDescrRight.directory = dirRight; - newline.cmpResult = FILE_LEFT_SIDE_ONLY; - output_tmp.push_back(newline); - } - - for (DirectoryDescrType::iterator j = directoryRight.begin(); j != directoryRight.end(); ++j) - { - DirectoryDescrType::iterator i; - - //find files/folders that exist in right file model but not in left model - if ((i = directoryLeft.find(*j)) == directoryLeft.end()) - { - newline.fileDescrLeft = FileDescrLine(); - newline.fileDescrLeft.directory = dirLeft; //directory info is needed when creating new directories - newline.fileDescrRight = *j; - newline.cmpResult = FILE_RIGHT_SIDE_ONLY; - output_tmp.push_back(newline); - } - //find files that exist in left and right file model - else - { //objType != TYPE_NOTHING - if (i->objType == TYPE_DIRECTORY && j->objType == TYPE_DIRECTORY) - { - newline.fileDescrLeft = *i; - newline.fileDescrRight = *j; - newline.cmpResult = FILE_EQUAL; - output_tmp.push_back(newline); - } - //if we have a nameclash between a file and a directory: split into separate rows - else if (i->objType != j->objType) + //find files/folders that exist in left file model but not in right model + for (DirectoryDescrType::iterator i = directoryLeft->begin(); i != directoryLeft->end(); ++i) + if (directoryRight->find(*i) == directoryRight->end()) { newline.fileDescrLeft = *i; newline.fileDescrRight = FileDescrLine(); - newline.fileDescrRight.directory = dirRight; + newline.fileDescrRight.directory = pair->rightDirectory; newline.cmpResult = FILE_LEFT_SIDE_ONLY; output_tmp.push_back(newline); + } + for (DirectoryDescrType::iterator j = directoryRight->begin(); j != directoryRight->end(); ++j) + { + DirectoryDescrType::iterator i; + + //find files/folders that exist in right file model but not in left model + if ((i = directoryLeft->find(*j)) == directoryLeft->end()) + { newline.fileDescrLeft = FileDescrLine(); - newline.fileDescrLeft.directory = dirLeft; + newline.fileDescrLeft.directory = pair->leftDirectory; //directory info is needed when creating new directories newline.fileDescrRight = *j; newline.cmpResult = FILE_RIGHT_SIDE_ONLY; output_tmp.push_back(newline); } - else if (cmpVar == CMP_BY_TIME_SIZE) - { //check files that exist in left and right model but have different properties - - //last write time may differ by up to 2 seconds (NTFS vs FAT32) - bool sameWriteTime; - if (i->lastWriteTimeRaw < j->lastWriteTimeRaw) - sameWriteTime = (j->lastWriteTimeRaw - i->lastWriteTimeRaw <= 2); - else - sameWriteTime = (i->lastWriteTimeRaw - j->lastWriteTimeRaw <= 2); - - newline.fileDescrLeft = *i; - newline.fileDescrRight = *j; - if (sameWriteTime) + //find files that exist in left and right file model + else + { //objType != TYPE_NOTHING + if (i->objType == TYPE_DIRECTORY && j->objType == TYPE_DIRECTORY) { - if (i->fileSize == j->fileSize) - newline.cmpResult = FILE_EQUAL; - else - newline.cmpResult = FILE_DIFFERENT; + newline.fileDescrLeft = *i; + newline.fileDescrRight = *j; + newline.cmpResult = FILE_EQUAL; + output_tmp.push_back(newline); } - else + //if we have a nameclash between a file and a directory: split into separate rows + else if (i->objType != j->objType) { + newline.fileDescrLeft = *i; + newline.fileDescrRight = FileDescrLine(); + newline.fileDescrRight.directory = pair->rightDirectory; + newline.cmpResult = FILE_LEFT_SIDE_ONLY; + output_tmp.push_back(newline); + + newline.fileDescrLeft = FileDescrLine(); + newline.fileDescrLeft.directory = pair->leftDirectory; + newline.fileDescrRight = *j; + newline.cmpResult = FILE_RIGHT_SIDE_ONLY; + output_tmp.push_back(newline); + } + else if (cmpVar == CMP_BY_TIME_SIZE) + { //check files that exist in left and right model but have different properties + + //last write time may differ by up to 2 seconds (NTFS vs FAT32) + bool sameWriteTime; if (i->lastWriteTimeRaw < j->lastWriteTimeRaw) - newline.cmpResult = FILE_RIGHT_NEWER; + sameWriteTime = (j->lastWriteTimeRaw - i->lastWriteTimeRaw <= 2); else - newline.cmpResult = FILE_LEFT_NEWER; - } - output_tmp.push_back(newline); - } - else if (cmpVar == CMP_BY_CONTENT) - { //check files that exist in left and right model but have different content + sameWriteTime = (i->lastWriteTimeRaw - j->lastWriteTimeRaw <= 2); - //check filesize first! - if (i->fileSize == j->fileSize) - { newline.fileDescrLeft = *i; newline.fileDescrRight = *j; - //newline.cmpResult = ...; //not yet determined + if (sameWriteTime) + { + if (i->fileSize == j->fileSize) + newline.cmpResult = FILE_EQUAL; + else + newline.cmpResult = FILE_DIFFERENT; + } + else + { + if (i->lastWriteTimeRaw < j->lastWriteTimeRaw) + newline.cmpResult = FILE_RIGHT_NEWER; + else + newline.cmpResult = FILE_LEFT_NEWER; + } output_tmp.push_back(newline); - - //compare by content is only needed if filesizes are the same - delayedContentCompare.insert(output_tmp.size() - 1); //save index of row, to calculate cmpResult later } - else - { - newline.fileDescrLeft = *i; - newline.fileDescrRight = *j; - newline.cmpResult = FILE_DIFFERENT; - output_tmp.push_back(newline); + else if (cmpVar == CMP_BY_CONTENT) + { //check files that exist in left and right model but have different content + + //check filesize first! + if (i->fileSize == j->fileSize) + { + newline.fileDescrLeft = *i; + newline.fileDescrRight = *j; + newline.cmpResult = FILE_INVALID; //not yet determined + output_tmp.push_back(newline); + + //compare by content is only needed if filesizes are the same + delayedContentCompare.insert(output_tmp.size() - 1); //save index of row, to calculate cmpResult later + } + else + { + newline.fileDescrLeft = *i; + newline.fileDescrRight = *j; + newline.cmpResult = FILE_DIFFERENT; + output_tmp.push_back(newline); + } } + else assert (false); } - else assert (false); } } @@ -662,7 +747,7 @@ public: fileOp.lpszProgressTitle = NULL; if (SHFileOperation(&fileOp //pointer to an SHFILEOPSTRUCT structure that contains information the function needs to carry out - ) != 0 || fileOp.fAnyOperationsAborted) throw FileError(wxString(_("Error moving file ")) + wxT("\"") + filename + wxT("\"") + _(" to recycle bin!")); + ) != 0 || fileOp.fAnyOperationsAborted) throw FileError(wxString(_("Error moving file to recycle bin: ")) + wxT("\"") + filename + wxT("\"")); #endif // FFS_WIN } @@ -968,6 +1053,9 @@ bool getBytesToTransfer(int& objectsToCreate, case FILE_EQUAL: return false; + default: + assert(false); + return false; }; return true; @@ -1245,12 +1333,39 @@ wxString FreeFileSync::formatFilesizeToShortString(const double filesize) } +vector<wxString> FreeFileSync::compoundStringToTable(const wxString& compoundInput, const wxChar* delimiter) +{ + wxString input(compoundInput); + vector<wxString> output; + + //make sure input ends with delimiter - no problem with empty strings here + if (!input.EndsWith(delimiter)) + input+= delimiter; + + unsigned int indexStart = 0; + unsigned int indexEnd = 0; + while ((indexEnd = input.find(delimiter, indexStart )) != string::npos) + { + if (indexStart != indexEnd) //do not add empty strings + { + wxString newEntry = input.substr(indexStart, indexEnd - indexStart); + + newEntry.Trim(true); //remove whitespace characters from right + newEntry.Trim(false); //remove whitespace characters from left + + if (!newEntry.IsEmpty()) + output.push_back(newEntry); + } + indexStart = indexEnd + 1; + } + + return output; +} + + inline void formatFilterString(wxString& filter) { - filter.Trim(true); //remove whitespace characters from right - filter.Trim(false); //remove whitespace characters from left - #ifdef FFS_WIN //Windows does NOT distinguish between upper/lower-case filter.MakeLower(); @@ -1278,48 +1393,42 @@ void formatFilenameString(wxString& filename) } -void FreeFileSync::filterCurrentGridData(FileCompareResult& currentGridData, const wxString& includeFilter, const wxString& excludeFilter) +inline +void mergeVectors(vector<wxString>& changing, const vector<wxString>& input) { - wxString includeFilterTmp(includeFilter); - wxString excludeFilterTmp(excludeFilter); + for (vector<wxString>::const_iterator i = input.begin(); i != input.end(); ++i) + changing.push_back(*i); +} - //make sure filters end with ";" - no problem with empty strings here - if (!includeFilterTmp.EndsWith(wxT(";"))) - includeFilterTmp.Append(';'); - if (!excludeFilterTmp.EndsWith(wxT(";"))) - excludeFilterTmp.Append(';'); +void FreeFileSync::filterCurrentGridData(FileCompareResult& currentGridData, const wxString& includeFilter, const wxString& excludeFilter) +{ //load filters into vectors + //delimiters may be ';' or '\n' vector<wxString> includeList; - vector<wxString> excludeList; - - unsigned int indexStart = 0; - unsigned int indexEnd = 0; - while ((indexEnd = includeFilterTmp.find(';', indexStart )) != string::npos) + vector<wxString> includePreProcessing = compoundStringToTable(includeFilter, wxT(";")); + for (vector<wxString>::const_iterator i = includePreProcessing.begin(); i != includePreProcessing.end(); ++i) { - if (indexStart != indexEnd) //do not add empty strings - { - wxString newEntry = includeFilterTmp.substr(indexStart, indexEnd - indexStart); - formatFilterString(newEntry); - includeList.push_back(newEntry); - } - indexStart = indexEnd + 1; + vector<wxString> newEntries = compoundStringToTable(*i, wxT("\n")); + mergeVectors(includeList, newEntries); } - indexStart = 0; - indexEnd = 0; - while ((indexEnd = excludeFilterTmp.find(';', indexStart )) != string::npos) + vector<wxString> excludeList; + vector<wxString> excludePreProcessing = compoundStringToTable(excludeFilter, wxT(";")); + for (vector<wxString>::const_iterator i = excludePreProcessing.begin(); i != excludePreProcessing.end(); ++i) { - if (indexStart != indexEnd) //do not add empty strings - { - wxString newEntry = excludeFilterTmp.substr(indexStart, indexEnd - indexStart); - formatFilterString(newEntry); - excludeList.push_back(newEntry); - } - indexStart = indexEnd + 1; + vector<wxString> newEntries = compoundStringToTable(*i, wxT("\n")); + mergeVectors(excludeList, newEntries); } -//########################### + //format entries + for (vector<wxString>::iterator i = includeList.begin(); i != includeList.end(); ++i) + formatFilterString(*i); + + for (vector<wxString>::iterator i = excludeList.begin(); i != excludeList.end(); ++i) + formatFilterString(*i); + +//############################################################## //filter currentGridData for (FileCompareResult::iterator i = currentGridData.begin(); i != currentGridData.end(); ++i) @@ -1394,13 +1503,16 @@ void FreeFileSync::removeFilterOnCurrentGridData(FileCompareResult& currentGridD wxString FreeFileSync::getFormattedDirectoryName(const wxString& dirname) -{ //formatting is needed since functions in FreeFileSync.cpp expect the directory to end with '\' to be able to split the relative names - //actually all it needs, is the length of the directory +{ //Formatting is needed since functions in FreeFileSync.cpp expect the directory to end with '\' to be able to split the relative names. + //Also improves usability. wxString dirnameTmp = dirname; dirnameTmp.Trim(true); //remove whitespace characters from right dirnameTmp.Trim(false); //remove whitespace characters from left + if (dirnameTmp.IsEmpty()) //an empty string is interpreted as "\"; this is not desired + return wxEmptyString; + //let wxWidgets do the directory formatting, e.g. replace '/' with '\' for Windows wxString result = wxDir(dirnameTmp).GetName(); @@ -1573,31 +1685,6 @@ void FreeFileSync::startSynchronizationProcess(FileCompareResult& grid, const Sy } -bool FreeFileSync::isFfsConfigFile(const wxString& filename) -{ - if (!wxFileExists(filename)) - return false; - - //workaround to get a FILE* from a unicode filename - wxFFile configFile(filename, wxT("rb")); - if (!configFile.IsOpened()) - return false; - - FILE* inputFile = configFile.fp(); - - TiXmlDocument doc; - if (!doc.LoadFile(inputFile)) //fails if inputFile is no proper XML - return false; - - TiXmlElement* root = doc.RootElement(); - - if (root && (root->ValueStr() == string("FreeFileSync"))) //check for FFS configuration xml - return true; - else - return false; -} - - //add(!) all files and subfolder gridlines that are dependent from the directory void FreeFileSync::addSubElements(set<int>& subElements, const FileCompareResult& grid, const FileCompareLine& relevantRow) { @@ -1674,3 +1761,35 @@ void FreeFileSync::deleteOnGridAndHD(FileCompareResult& grid, const set<int>& ro //remove deleted rows from grid removeRowsFromVector(grid, rowsToDeleteInGrid); } + + +bool FreeFileSync::foldersAreValidForComparison(const vector<FolderPair>& folderPairs, wxString& errorMessage) +{ + for (vector<FolderPair>::const_iterator i = folderPairs.begin(); i != folderPairs.end(); ++i) + { + const wxString leftFolderName = getFormattedDirectoryName(i->leftDirectory); + const wxString rightFolderName = getFormattedDirectoryName(i->rightDirectory); + + //check if folder name is empty + if (leftFolderName.IsEmpty() || rightFolderName.IsEmpty()) + { + errorMessage = _("Please fill all empty directory fields."); + return false; + } + + //check if folder exists + if (!wxDirExists(leftFolderName)) + { + errorMessage = wxString(_("Directory does not exist. Please select a new one: ")) + wxT("\"") + leftFolderName + wxT("\""); + return false; + } + if (!wxDirExists(rightFolderName)) + { + errorMessage = wxString(_("Directory does not exist. Please select a new one: ")) + wxT("\"") + rightFolderName + wxT("\""); + return false; + } + } + return true; +} + + diff --git a/FreeFileSync.h b/FreeFileSync.h index 496a6c13..c1b4fd9d 100644 --- a/FreeFileSync.h +++ b/FreeFileSync.h @@ -32,7 +32,7 @@ struct SyncConfiguration SyncDirection different; }; -struct Configuration +struct MainConfiguration { //Compare setting CompareVariant compareVar; @@ -41,12 +41,11 @@ struct Configuration //Filter setting bool filterIsActive; - bool hideFiltered; wxString includeFilter; wxString excludeFilter; //misc options - bool useRecycleBin; //use Recycle bin when deleting or overwriting files while synchronizing + bool useRecycleBin; //use Recycle bin when deleting or overwriting files while synchronizing bool continueOnError; //hides error messages during synchronization }; @@ -121,7 +120,9 @@ enum CompareFilesResult FILE_RIGHT_NEWER, FILE_LEFT_NEWER, FILE_DIFFERENT, - FILE_EQUAL + FILE_EQUAL, + + FILE_INVALID //error situation }; @@ -139,8 +140,13 @@ typedef vector<FileCompareLine> FileCompareResult; typedef int GridViewLine; -typedef vector<int> GridView; //vector of references to lines in FileCompareResult +typedef vector<GridViewLine> GridView; //vector of references to lines in FileCompareResult +struct FolderPair +{ + wxString leftDirectory; + wxString rightDirectory; +}; class GetAllFilesFull : public wxDirTraverser { @@ -190,10 +196,13 @@ void removeRowsFromVector(vector<T>& grid, const set<int>& rowsToRemove) } class RecycleBin; +class DirectoryDescrBuffer; class FreeFileSync { + friend class DirectoryDescrBuffer; + public: FreeFileSync(bool useRecycleBin); ~FreeFileSync(); @@ -204,13 +213,16 @@ public: static const int synchronizeFilesProcess = 3; //main function for compare - static void startCompareProcess(FileCompareResult& output, const wxString& dirLeft, const wxString& dirRight, CompareVariant cmpVar, StatusUpdater* statusUpdater); + static void startCompareProcess(FileCompareResult& output, const vector<FolderPair>& directoryPairsFormatted, const CompareVariant cmpVar, StatusUpdater* statusUpdater); //main function for synchronization static void startSynchronizationProcess(FileCompareResult& grid, const SyncConfiguration& config, StatusUpdater* statusUpdater, bool useRecycleBin); + static bool foldersAreValidForComparison(const vector<FolderPair>& folderPairs, wxString& errorMessage); static bool recycleBinExists(); //test existence of Recycle Bin API on current system + static vector<wxString> compoundStringToTable(const wxString& compoundInput, const wxChar* delimiter); //convert ';'-separated list into table of strings + static void deleteOnGridAndHD(FileCompareResult& grid, const set<int>& rowsToDelete, StatusUpdater* statusUpdater, bool useRecycleBin); static void addSubElements(set<int>& subElements, const FileCompareResult& grid, const FileCompareLine& relevantRow); @@ -230,9 +242,6 @@ public: static void swapGrids(FileCompareResult& grid); - static bool isFfsConfigFile(const wxString& filename); - - static const string FfsConfigFileID; static const wxString FfsLastConfigFile; static void getFileInformation(FileInfo& output, const wxString& filename); @@ -48,9 +48,11 @@ obj/tinyxmlerror.o: library/tinyxml/tinyxmlerror.cpp obj/tinyxmlparser.o: library/tinyxml/tinyxmlparser.cpp g++ $(CPPFLAGS) library/tinyxml/tinyxmlparser.cpp -o obj/tinyxmlparser.o +obj/processXml.o: library/processXml.cpp + g++ $(CPPFLAGS) library/processXml.cpp -o obj/processXml.o -FreeFileSync: obj/FreeFileSync.o obj/application.o obj/globalFunctions.o obj/guiGenerated.o obj/mainDialog.o obj/syncDialog.o obj/customGrid.o obj/resources.o obj/smallDialogs.o obj/multithreading.o obj/misc.o obj/tinyxml.o obj/tinystr.o obj/tinyxmlerror.o obj/tinyxmlparser.o - g++ $(ENDFLAGS) -o FreeFileSync obj/application.o obj/FreeFileSync.o obj/globalFunctions.o obj/guiGenerated.o obj/mainDialog.o obj/syncDialog.o obj/customGrid.o obj/resources.o obj/smallDialogs.o obj/multithreading.o obj/misc.o obj/tinyxml.o obj/tinystr.o obj/tinyxmlerror.o obj/tinyxmlparser.o +FreeFileSync: obj/FreeFileSync.o obj/application.o obj/globalFunctions.o obj/guiGenerated.o obj/mainDialog.o obj/syncDialog.o obj/customGrid.o obj/resources.o obj/smallDialogs.o obj/multithreading.o obj/misc.o obj/tinyxml.o obj/tinystr.o obj/tinyxmlerror.o obj/tinyxmlparser.o obj/processXml.o + g++ $(ENDFLAGS) -o FreeFileSync obj/application.o obj/FreeFileSync.o obj/globalFunctions.o obj/guiGenerated.o obj/mainDialog.o obj/syncDialog.o obj/customGrid.o obj/resources.o obj/smallDialogs.o obj/multithreading.o obj/misc.o obj/tinyxml.o obj/tinystr.o obj/tinyxmlerror.o obj/tinyxmlparser.o obj/processXml.o clean: diff --git a/Makefile_Win_Unicode.cmd b/Makefile_Win_Unicode.cmd index 5ec2b89d..59fde788 100644 --- a/Makefile_Win_Unicode.cmd +++ b/Makefile_Win_Unicode.cmd @@ -1,7 +1,7 @@ ::set these variables to the appropriate directories set widgets=C:\Programme\CodeBlocks\wxWidgets set widgetslib=C:\Programme\CodeBlocks\wxWidgets\lib\gcc_lib\mswu -set sources=C:\Programme\CodeBlocks\Projects\FreeFileSync +set sources=. set mingw=C:\Programme\CodeBlocks\MinGW\bin set parameters=-Wall -pipe -mthreads -D__GNUWIN32__ -DwxUSE_UNICODE -D__WXMSW__ -DFFS_WIN -O2 -DNDEBUG -DTIXML_USE_STL @@ -22,7 +22,8 @@ mingw32-g++.exe %parameters% -I%widgets%\include -I%widgets%\contrib\include -I% mingw32-g++.exe %parameters% -I%widgets%\include -I%widgets%\contrib\include -I%widgetslib% -c %sources%\library\tinyxml\tinystr.cpp -o obj\tinystr.o mingw32-g++.exe %parameters% -I%widgets%\include -I%widgets%\contrib\include -I%widgetslib% -c %sources%\library\tinyxml\tinyxmlerror.cpp -o obj\tinyxmlerror.o mingw32-g++.exe %parameters% -I%widgets%\include -I%widgets%\contrib\include -I%widgetslib% -c %sources%\library\tinyxml\tinyxmlparser.cpp -o obj\tinyxmlparser.o +mingw32-g++.exe %parameters% -I%widgets%\include -I%widgets%\contrib\include -I%widgetslib% -c %sources%\library\processXml.cpp -o obj\processXml.o windres.exe -i %sources%\resource.rc -J rc -o obj\resource.res -O coff -I%widgets%\include -I%widgetslib% -mingw32-g++.exe -L%widgets%\lib\gcc_lib -o FreeFileSync.exe obj\Application.o obj\FreeFileSync.o obj\globalFunctions.o obj\multithreading.o obj\misc.o obj\GUI_Generated.o obj\MainDialog.o obj\SyncDialog.o obj\CustomGrid.o obj\Resources.o obj\SmallDialogs.o obj\resource.res obj\tinyxml.o obj\tinystr.o obj\tinyxmlerror.o obj\tinyxmlparser.o -s -mthreads -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u -lwxpng -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows +mingw32-g++.exe -L%widgets%\lib\gcc_lib -o FreeFileSync.exe obj\Application.o obj\FreeFileSync.o obj\globalFunctions.o obj\multithreading.o obj\misc.o obj\GUI_Generated.o obj\MainDialog.o obj\SyncDialog.o obj\CustomGrid.o obj\Resources.o obj\SmallDialogs.o obj\resource.res obj\tinyxml.o obj\tinystr.o obj\tinyxmlerror.o obj\tinyxmlparser.o obj\processXml.o -s -mthreads -lwxmsw28u_adv -lwxmsw28u_core -lwxbase28u -lwxpng -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows pause
\ No newline at end of file @@ -1,5 +1,5 @@ -FreeFileSync v1.10 ------------------ +FreeFileSync v1.11 +------------------ Usage ----- @@ -17,7 +17,8 @@ Key Features 6. Algorithms coded in C++ completely. 7. Progress indicators are updated only every 100ms for optimal performance! 8. Subfolders are also synchronized, including empty folders. -9. Focus on usability: +9. Support for multiple folder pairs +10. Focus on usability: - Only necessary functionality on UI: no overloaded menus or icon jungle. - Select folders via drag & drop. - Last configuration and screen settings are saved automatically. @@ -29,16 +30,16 @@ Key Features - Status information and error reporting - Sort file-lists by name, size or date. - Display statistical data: total filesizes, amount of bytes that will be transfered with the current settings. -10. Easy configurable commandline mode for automated synchronization. -11. Support for filesizes > 4 GB. -12. Option to move files to Recycle Bin instead of deleting/overwriting them. -13. Automatically ignore directories "\RECYCLER" and "\System Volume Information" when comparing and sync'ing. (Windows only) -14. Localized English, German, French and Japanese versions available. -15. Delete before copy: Avoid disc space shortages with large sync-operations. -16. Based on wxWidgets framework => Portable to many operating systems. -17. Filter functionality to include/exclude files from synchronization (without re-compare!). -18. Include/exclude specific files from synchronization manually. -19. Create sync jobs via GUI to synchronize automatically (can be scheduled or executed directly). +11. Easy configurable commandline mode for automated synchronization. +12. Support for filesizes > 4 GB. +13. Option to move files to Recycle Bin instead of deleting/overwriting them. +14. Automatically ignore directories "\RECYCLER" and "\System Volume Information" when comparing and sync'ing. (Windows only) +15. Localized English, German, French and Japanese versions available. +16. Delete before copy: Avoid disc space shortages with large sync-operations. +17. Based on wxWidgets framework => Portable to many operating systems. +18. Filter functionality to include/exclude files from synchronization (without re-compare!). +19. Include/exclude specific files from synchronization manually. +20. Create sync jobs via GUI to synchronize automatically (can be scheduled or executed directly). Links diff --git a/Resources.dat b/Resources.dat Binary files differindex 9ec9f5d7..5ef771a2 100644 --- a/Resources.dat +++ b/Resources.dat @@ -1,3 +1,5 @@ + MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE + MinGW \t- Windows port de la GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE Time: Heure: Byte @@ -18,8 +20,6 @@ répertoires directory répertoire - does not exist. - n'existe pas. file, fichier, files, @@ -38,8 +38,6 @@ lignes sur la vue to vers - to recycle bin! - à la corbeille ! != files are different\n != les fichiers sont différents\n &Abort @@ -86,30 +84,40 @@ (-) non synchronisés\n , . +- different +- fichiers différents +- different (same date, different size) +- fichiers différents (même date, taille différente) +- equal +- fichiers identiques +- exists left only +- le fichier existe seulement à gauche +- exists right only +- le fichier existe seulement à droite +- left +- à gauche +- left newer +- fichier de gauche plus récent +- right +- à droite +- right newer +- fichier de droite plus récent +- same date (different size) +- même date (taille différente) ------------------------------------------------- ----------------------------------------------------- ---------\n -----------\n ---.-- ---.-- -Open-Source file synchronization- -Synchronisation de fichiers Open-Source- . , -1. Enter full file or directory names separated by ';'.\n2. Wildcard characters '*' and '?' are supported.\n3. Case sensitive expressions! -1. Entrer les noms complets des fichiers ou répertoires séparés par des ';'.\n2. Les caractères génériques '*' et '?' sont supportés.\n3. La distinction est faite entre majuscules et minuscules! -: check file content\n -: Contrôle le contenu du fichier\n -: check filesize and date\n\t\t -: Contrôle la taille et la date\n\t\t +1. Enter full file or directory names separated by ';' or a new line.\n2. Use wildcard characters '*' and '?'. +1. Entrez le nom complet des fichiers ou des dossier séparés par un ';' ou par un 'retour charit'.\n2. Les caractères génériques '*' et '?' sont acceptés. << left file is newer\n << le fichier de gauche est plus récent\n <Directory> <Répertoire> -<left directory> -<répertoire de gauche> -<right directory> -<répertoire de droite> <| file on left side only\n <| Le fichier existe seulement à gauche\n == files are equal\n\n @@ -126,30 +134,44 @@ About A propos de Action Action +Add folder pair +Ajout d'un couple de dossiers +Add to exclude filter: +Ajout au filtre exclure: All items have been synchronized! Tous les éléments ont été synchronisés! An error occured Une erreur s'est produite An exception occured! Une violation s'est produite! +As a result 6 different status can be returned to categorize all files: +En conclusion, 6 états différents caractérisent tous les fichiers: +As a result the files are separated into the following categories: +En conclusion, les fichiers sont répartis dans les catégories suivantes: +As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller: +Comme le nom le suggère, deux fichiers qui ont le même nom sont considérés comme identiques si, et seulement si, leur contenu est identique. Cette option est utile pour les contrôles de cohérence plutôt que pour les opérations de sauvegarde. Toutefois, les dates et heures ne sont pas du tout prises en compte.\n\nAvec cette option, l'arbre de décision est plus simple: Assemble a batch file with the following settings. To start synchronization in batch mode simply execute this file or schedule it in your operating system's task planner. Créer un fichier de commandes avec les paramètres suivants. Pour lancer la synchronisation en mode batch, exécutez ce fichier ou paramétrez-le dans le planificateur de tâches. Batch file created successfully! Fichier de commandes créé avec succès! +Big thanks for localizing FreeFileSync goes out to: +Pour les traductions de FreeFileSync, un grand merci à: Build: Créé: Choose to hide filtered files/directories from list Masquer les fichiers/répertoires filtrés Comma separated list Liste d'éléments séparés par une virgule -Command file -Fichier de commandes Compare both sides Comparer les deux listes -Compare by \"File size and date\"\n----------------------------------------\nThis variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time. Notice that the file time is allowed to deviate by up to 2 seconds. This ensures synchronization with the lower-precision file system FAT32 works correctly.\n\nWhen \"Compare\" is triggered with this option set the following decision tree is processed:\n\n -----------------\n |Decision tree|\n -----------------\n ________|___________\n | |\n file exists on both sides on one side only\n _____|______ __|___\n | | | |\nequal different left right\n _________|__________\n | | |\n left newer right newer same date\n\nAs a result 6 different status can be returned to categorize all files:\n\n- exists left only\n- exists right only\n- left newer\n- right newer\n- different filesize (but same date)\n- equal\n\n\nCompare by \"File content\"\n----------------------------------------\nAs the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:\n\n -----------------\n |Decision tree|\n -----------------\n ________|___________\n | |\n file exists on both sides on one side only\n _____|______ __|___\n | | | |\nequal different left right\n\nAs a result the files are separated into the following categories:\n\n- exists left only\n- exists right only\n- different\n- equal -Comparaison par \"taille et date\"\n---------------------------------------------------\nCette variante identifie deux fichiers identiques lorsqu'ils ont la même taille ET la même date de création. (Note : l'heure est calculée à plus ou moins 2 secondes.)\n\nLorsque \"Compare\" est lancé avec cette option, l'arbre de décision est évalué comme suit :\n\n -------------------------\n | Arbre de décision |\n -------------------------\n _______________________|___________________\n | |\n le fichier existe des 2 cotés Sur un seul côté\n __________|_____________ ____|___\n | | | |\n identique différent gauche droite\n __________________|__________________\n | | |\n plus récent à gauche plus récent à droite différents (mais même date)\n\nRésultat : 6 états permettent de différencier tous les fichiers:\n\n- existe seulement à gauche\n- existe seulement à droite\n- plus récent à gauche\n- plus récent à droite\n- différents (mais même date)\n- identiques\n\n\nComparaison du \"contenu\"\n------------------------------------\nComme indiqué, deux fichiers de même nom sont considérés comme identiques si, et seulement si, leur contenu est identique. Cette option sert plus aux contrôles de cohérence qu'aux opérations de sauvegarde. Pour cette raison, la date de la dernière modification des fichiers n'est pas pris en compte.\n\nAvec cette option, l'arbre de décision est plus simple:\n\n -------------------------\n | Arbre de décision |\n -------------------------\n __________|_____________\n | |\n le fichier existe des deux côtés seulement d'un côté\n ______|______ __|___\n | | | |\n identiques différents à gauche à droite\n\nRésultat : une répartition dans les catégories suivantes:\n\n- existe à gauche seulement\n- existe à droite seulement\n- différents\n- identiques +Compare by \"File content\" +Comparaison par \"Contenu des fichiers\" +Compare by \"File size and date\" +Comparaison par \"Date et taille des fichiers\" Compare by... Comparaison par... +Comparing content +Comparaison du contenu Comparing content of files Comparaison du contenu des fichiers en cours Comparing... @@ -190,16 +212,20 @@ Copy to clipboard\tCTRL+C Copier dans le presse-papiers\tCTRL+C Copying file Copie du fichier en cours +Could not create file +Impossible de créer le fichier +Could not open configuration file +Ipossible d'ouvrir le fichier de configuration Could not open file: Erreur lors de l'ouverture de : -Could not read configuration file -Impossible de lire le fichier de configuration Could not read language file Impossible de lire le fichier de langue Could not retrieve file info for: Erreur lors de la lecture des attributs de fichier de : Could not set working directory to directory containing executable file! Impossible de définir le répertoire de travail à partir du répertoire contenant le fichier exécutable! +Could not write configuration file +Impossible d'écrire le fichier de configuration Could not write to Erreur en écriture sur Create a batch job @@ -212,10 +238,10 @@ Current operation: Opération en cours: Custom Personnaliser +DECISION TREE +ARBRE DE DECISION Data remaining: Données restantes: -Data to compare: -Données à comparer: Data: Données: Date @@ -232,34 +258,22 @@ Deleting file Suppression du fichier Deleting folder Suppression du répertoire -Deutsch -Deutsch -Directory -Répertoire -Directory on the left does not exist. Please select a new one! -Le répertoire de gauche n'existe pas. Veuillez en choisir un autre! -Directory on the right does not exist. Please select a new one! -Le répertoire de droite n'existe pas. Veuillez en choisir un autre -Displays help on the command line parameters\n -Aide sur les paramètres de la ligne de commandes\n +Directory does not exist. Please select a new one: +Le répertoire n'existe pas. Veuillez en choisir un autre: Do not show graphical status and error messages but write to a logfile instead Ne pas afficher l'état graphique ni les messages mais les écrire sur un fichier log -Do not show graphical status and error messages but write to a logfile instead.\n\n -Ne pas afficher l'état graphique ni les messages mais les écrire sur un fichier log.\n\n Do nothing Ne rien faire Do you really want to delete the following objects(s)? Voulez-vous vraiment supprimer les objets suivants ? Do you really want to move the following objects(s) to the recycle bin? Voulez-vous vraiment envoyer les objets suivants dans la corbeille ? -Donate with Paypal -Don avec Paypal +Donate with PayPal +Faites un don avec PayPal Drag && drop Glisser && Déposer Email: Email: -English -English Error Erreur Error adapting modification time of file @@ -276,8 +290,10 @@ Error deleting directory Erreur lors de la suppression du répertoire Error deleting file Erreur lors de la suppression du fichier -Error moving file -Erreur lors du déplacement du fichier +Error moving file to recycle bin: +Erreur lors du déplacement du fichier vers la corbeille: +Error parsing configuration file +Erreur lors de l'analyse du fichier de configuration Error reading file: Erreur lors de la lecture du fichier: Error traversing directory @@ -290,8 +306,12 @@ Error when converting wxString to long Erreur de conversion (wxString en long) Error: Source directory does not exist anymore: Erreur: le répertoire source n'existe plus: +Example +Exemple Exclude Exclure +Exclude temporarily +Exclure temporairement Feedback and suggestions are welcome at: Commentaires et suggestions sont les bienvenus à: File content @@ -306,6 +326,8 @@ Files are found equal if\n - file content\nis the same. Les fichiers sont considérés comme identiques, si\n - leur contenu est identique. Files are found equal if\n - filesize\n - last write time (UTC) and date\nare the same. Les fichiers sont considérés comme identiques, si\n - leur taille\n - leur date et heure(UTC) sont identiques. +Files remaining: +Fichiers restants: Files that exist on both sides and have different content Les fichiers existent des deux côtés et ont des contenus différents Files that exist on both sides, have same date but different filesizes @@ -314,8 +336,6 @@ Files that exist on both sides, left one is newer Fichiers existants des deux côtés, celui de gauche est plus récent Files that exist on both sides, right one is newer Fichiers existants des deux côtés, celui de droite est plus récent -Files to compare: -Fichiers à comparer: Files/folders remaining: Fichiers/dossiers restants: Files/folders scanned: @@ -330,16 +350,20 @@ Filter active: Press again to deactivate Filtrage actif: Cliquez de nouveau pour le désactiver Filter files Filtrage des fichiers -Filter manually -Filtrage manuel Filter view Filtrage de la vue +Folder pair +Couple de dossiers FreeFileSync (Date: FreeFileSync (Date: FreeFileSync - Folder Comparison and Synchronization FreeFileSync - Comparaison et synchronisation de répertoires +FreeFileSync Batch Job +FreeFileSync Fichier de commandes FreeFileSync at Sourceforge FreeFileSync par Sourceforge +FreeFileSync batch file +FreeFileSync fichier de commandes FreeFileSync configuration FreeFileSync configuration Help @@ -354,12 +378,14 @@ Hints: Conseils: Homepage: Page d'accueil: -If errors occur during folder comparison or synchronization they are ignored and the process continues.\n -Si des erreurs se produisent pendant la comparaison ou la synchronisation des répertoires, elles seront ignorées et l'opération se poursuivra.\n If you like FFS: Si vous aimez FFS: Include Inclure +Include temporarily +Inclure temporairement +Include: *.doc;*.zip;*.exe\nExclude: *\\temp\\* +Inclure: *.doc;*.zip;*.exe\nExclude: *\\temp\\* Info Info Information @@ -368,22 +394,20 @@ Initialization of Recycle Bin failed! It cannot be used! Erreur lors de l'initialisation de la corbeille ! La corbeille ne peut être utilisée! It was not possible to initialize the Recycle Bin!\n\nIt's likely that you are not using Windows.\nIf you want this feature included, please contact the author. :) Impossible d'accéder à la corbeille!\n\nIl est probable que vous n'utilisez pas Windows.\nSi vous désirez utilisee cette fonctionnalité, veuillez contacter l'auteur. :) -Left directory does not exist. Please select a new one! -Le répertoire de gauche n'existe pas. Veuillez en choisir un autre! Left folder: Répertoire de gauche: Legend\n Legende\n Load configuration via...\n - this list (press DEL to delete items)\n - drag & drop to this window\n - startup parameter - +Charger la configuration via...\n - cette liste (Appuyez sur Suppr pour supprimer des éléments),\n - un glisser-déposer vers cette fenêtre,\n - les paramètres de démarrage. Load from file... - +Chargement à partir du fichier... Log-messages:\n------------- Messages log:\n--------------- Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization. Sauvegarde miroir du répertoire de gauche : Le répertoire de droite sera écrasé et exactement identique au répertoire de gauche après la synchronisation. -Move files to Recycle Bin instead of deleting or overwriting them directly.\n -Déplacer les fichiers dans la corbeille au lieu de les supprimer ou de remplacer.\n +No valid configuration file specified: +Auncun fichier de configuration valide spécifié: Not all items were synchronized! Have a look at the list. Tous les éléments n'ont pas été synchronisés! Veuillez vérifier la liste. Nothing to synchronize. Both directories adhere to the sync-configuration! @@ -396,8 +420,8 @@ Number of files that will be overwritten Nombre de fichiers qui seront remplacés One way -> Vers la droite -> -Only files/directories that pass filtering will be selected for synchronization. -Seuls les fichiers/répertoires correspondant au filtrage sont retenus pour la synchronisation. +Only files/directories that pass filtering will be selected for synchronization.\nThe filter will be applied to the full name including path prefix. +Seuls les fichiers/dossiers filtrés seront sélectionnés pour la synchronisation.\nLe filtre s'appliquera au nom complet incluant le chemin. Open synchronization dialog Ouvrir la boîte de dialogue de la synchronisation Open with Explorer\tD-Click @@ -408,10 +432,8 @@ Operation: Opération: Pause Pause -Please select both left and right directories! -Veuillez, s'il vous plaît, choisir les répertoires de droite et de gauche! -Please select directories for both sides! -Veuillez, s'il vous plaît, choisir les répertoires de droite et de gauche! +Please fill all empty directory fields. +Veuillez remplir tous les champs vides du répertoire. Press button to activate filter Cliquez pour activer le filtrage Preview @@ -422,12 +444,10 @@ Quit Quitter Relative path Chemin -Remaining time: -Temps restant: +Remove folder pair +Supprimer le couple de dossiers Result Résultat -Right directory does not exist. Please select a new one! -Le répertoire de droite n'existe pas. Veuillez en choisir un autre! Right folder: Répertoire de droite: Save current configuration to file @@ -444,8 +464,6 @@ Select variant: Choisissez une variante: Set filter for synchronization Définir le filtrage -Shell script -Shell Script Show files that are different Afficher les fichiers différents Show files that are equal @@ -462,16 +480,8 @@ Silent mode Mode silence Size Taille -Source code written completely in C++ utilizing:\n\n MinGW \t\t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE\n\n by ZenJu -Code source entièrement écrit en C++ utilisant:\n\n MinGW \t\t- Windows-Port de GNU Compiler Collection\n wxWidgets \t- Open-Source GUI-Framework\n wxFormBuilder\t- wxWidgets GUI-Builder\n CodeBlocks \t- Open-Source IDE\n\n ZenJu -Specify algorithm to test if files are equal:\n\n\t\t -Spécification de l'algorithme de contrôle de l'identité de deux fichiers:\n\n\t\t -Specify names to be excluded separated by ';'. Wildcards '*' and '?' are supported. Default: \"\"\n -Noms à exclure, séparés par des ';'. Les caractères génériques '*' et '?' sont supportés. Par défaut: \"\"\n -Specify names to be included separated by ';'. Wildcards '*' and '?' are supported. Default: \"*\"\n -Noms à inclure, séparés par des ';'.Les caractères génériques '*' et '?' sont supportés. Par défaut: \"*\"\n -Specify the sync-direction used for each type of file by a string of five chars:\n\n -Paramétrage de la synchronisation avec une chaîne de 5 caractères:\n\n +Source code written completely in C++ utilizing: +Code source écrit totalement en C++ et utilisant: Start Démarrer Start synchronization @@ -480,6 +490,8 @@ Stop Stop Swap sides Permuter les côtés +SyncJob.ffs_batch +SyncJob.ffs_batch Synchronization aborted! Synchronisation abandonnée! Synchronization completed successfully. @@ -490,16 +502,18 @@ Synchronization settings Paramétrage de la synchronisation Synchronization status Etat de la synchronisation +Synchronize all .doc, .zip and .exe files except everything from folder \"temp\". +Synchroniser tous les fichiers .doc, .zip and .exe sauf ceux du dossier \"temp\". Synchronize both sides simultaneously: Copy new or updated files in both directions. Synchronisation simultanée des deux côtés. Copie des fichiers nouveaux ou mis à jour. Synchronizing... Synchronisation en cours... -Thanks to Jean-François Hartmann for doing the French translation! -Merci à Jean-François Hartmann pour la traduction en Français! The selected file does not contain a valid configuration! Le fichier sélectionné ne contient pas de configuration valide! The selected file does not exist anymore! Le fichier sélectionné n'existe plus! +This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time. Notice that the file time is allowed to deviate by up to 2 seconds. This ensures synchronization with the lower-precision file system FAT32 works correctly. +Cette variante définit comme identiques deux fichiers de même nom lorsqu'ils ont la même taille et le même date et heure de modification. Attention : la précision de l'heure est mesurée à 2 secondes près. Cela permet d'assurer la synchronisation avec la précision du systéme de fichiers FAT32. Time elapsed: Temps écoulé: Total amount of data that will be transferred @@ -512,8 +526,6 @@ Unable to create logfile! Impossible de créer un fichier log! Unable to initialize Recycle Bin! Impossible d'initialiser la corbeille! -Unable to load Resources.dat! -Impossible de charger Resources.dat! Update: Mises à jour: Use Recycle Bin @@ -524,29 +536,19 @@ Warning Attention Warning: Synchronization failed for Attention : la synchronisation a échoué à cause de +When \"Compare\" is triggered with this option set the following decision tree is processed: +Quand \"Compare\" est lancé avec cette option, l'arbre de décision suivant est éxécuté: \n\nContinue with next object, retry or abort comparison? \n\nVoulez-vous continuer avec l'objet suivant, réessayer ou annuler la comparaison? \n\nContinue with next object, retry or abort synchronization? \n\nVoulez-vous continuer avec l'objet suivant, réessayer ou annuler la synchronisation? \n\nInformation: If you skip the error and continue or abort a re-compare will be necessary! \n\nInformation: Si vous sautez cette erreur et continuer ou si vous annulez, il sera nécessaire d'effectuer une re-comparaison! -\n\t\tSync-direction: L: left, R: right, N: none\n -\n\t\tDirection de la synchronisation: L: vers la gauche, R: vers la droite, N: ne rien faire\n -\t1: Creates a mirror backup of the left directory\n\t2: Synchronizes all *.doc files from both directories simultaneously\n\n -\t1: Crée une sauvegarde miroir du répertoire de gauche\n\t2: Synchronise tous les fichiers *.doc sur les deux répertoires\n\n -\tExamples:\n\n\t1.) FreeFileSync -cmp SIZEDATE -sync RRRRR C:\\Source C:\\Target\n\t2.) FreeFileSync -cmp sizedate -sync rlrln c:\\dir1 c:\\dir2 -incl *.doc\n\n -\tExemples :\n\n\t1.) FreeFileSync -cmp SIZEDATE -sync RRRRR C:\\Source C:\\Target\n\t2.) FreeFileSync -cmp sizedate -sync rlrln c:\\dir1 c:\\dir2 -incl *.doc\n\n -\tHint: You can easily generate a batch file by chosing \"Create batch job\" from the GUI menubar.\n - -\t\tChar 1: Folders/files that exist on left side only\n -\t\tCar 1: Dossiers/fichiers n'existant que dans le répertoire de gauche\n -\t\tChar 2: Folders/files that exist on right side only\n -\t\tCar 2: Dossiers/fichiers n'existant que dans le répertoire de droite\n -\t\tChar 3: Files that exist on both sides, left one is newer\n -\t\tCar 3: Fichiers de gauche plus récents\n -\t\tChar 4: Files that exist on both sides, right one is newer\n -\t\tCar 4: Fichiers de droite plus récents\n -\t\tChar 5: Files that exist on both sides and are different\n -\t\tCar 5: Fichiers existants des deux côtés et différents\n +different +fichiers différents +file exists on both sides +Le fichier existe des deux côtés +on one side only +Le fichier existe sur un seul côté seulement |> file on right side only\n |> Le fichier existe seulement à droite\n @@ -20,8 +20,6 @@ Verzeichnisse directory Verzeichnis - does not exist. - existiert nicht. file, Datei, files, @@ -40,8 +38,6 @@ Zeilen zur Ansicht to nach - to recycle bin! - in den Papierkorb! != files are different\n != Dateien sind verschieden\n &Abort @@ -116,20 +112,12 @@ -Open-Source Datei-Synchronisation- . , -1. Enter full file or directory names separated by ';'.\n2. Wildcard characters '*' and '?' are supported. -1. Komplette Datei- oder Verzeichnisnamen getrennt durch ';' eingeben.\n2. Die Platzhalter '*' und '?' werden unterstützt. -: check file content\n -: Prüfung auf Dateiinhalt\n -: check filesize and date\n\t\t -: Prüfung auf Dateigröße und -datum\n\t\t +1. Enter full file or directory names separated by ';' or a new line.\n2. Use wildcard characters '*' and '?'. +1. Komplette Datei- und Verzeichnisnamen getrennt durch ';' oder eine Neuzeile eingeben.\n2. Die Platzhalter '*' und '?' werden unterstützt. << left file is newer\n << linke Datei ist neuer\n <Directory> <Verzeichnis> -<left directory> -<linkes Verzeichnis> -<right directory> -<rechtes Verzeichnis> <| file on left side only\n <| Datei existiert nur links\n == files are equal\n\n @@ -146,6 +134,10 @@ About Über Action Aktion +Add folder pair +Verzeichnispaar hinzufügen +Add to exclude filter: +Über Filter ausschließen: All items have been synchronized! Alle Elemente wurden synchronisiert! An error occured @@ -226,8 +218,6 @@ Could not open configuration file Fehler beim Öffnen der Datei Could not open file: Fehler beim Öffnen der Datei: -Could not read configuration file -Fehler beim Lesen der Konfigurationsdatei Could not read language file Fehler beim Lesen der Sprachdatei Could not retrieve file info for: @@ -268,20 +258,10 @@ Deleting file Lösche Datei Deleting folder Lösche Verzeichnis -Deutsch -Deutsch -Directory -Verzeichnis -Directory on the left does not exist. Please select a new one! -Verzeichnis auf der linken Seite existiert nicht. Bitte ein anderes auswählen! -Directory on the right does not exist. Please select a new one! -Verzeichnis auf der rechten Seite existiert nicht. Bitte ein anderes auswählen! -Displays help on the command line parameters\n -Hilfe zu den Kommandozeilenparametern\n +Directory does not exist. Please select a new one: +Das Verzeichnis existiert nicht. Bitte ein anderes auswählen: Do not show graphical status and error messages but write to a logfile instead Keine graphischen Status- und Fehlermeldungen anzeigen, sondern eine Logdatei erstellen -Do not show graphical status and error messages but write to a logfile instead.\n\n -Keine graphischen Status- und Fehlermeldungen anzeigen, sondern eine Logdatei erstellen.\n\n Do nothing Nichts tun Do you really want to delete the following objects(s)? @@ -294,8 +274,6 @@ Drag && drop Drag && Drop Email: Email: -English -English Error Fehler Error adapting modification time of file @@ -312,8 +290,8 @@ Error deleting directory Fehler beim Löschen des Verzeichnisses Error deleting file Fehler beim Löschen der Datei -Error moving file -Fehler beim Verschieben der Datei +Error moving file to recycle bin: +Fehler beim Verschieben der Datei in den Papierkorb: Error parsing configuration file Fehler beim Auswerten der Konfigurationsdatei Error reading file: @@ -332,6 +310,8 @@ Example Beispiel Exclude Ausschließen +Exclude temporarily +Temporär ausschließen Feedback and suggestions are welcome at: Feedback und Vorschläge sind willkommen unter: File content @@ -370,10 +350,10 @@ Filter active: Press again to deactivate Filter aktiv: Zum Deaktivieren erneut auswählen Filter files Dateien filtern -Filter manually -Manuell filtern Filter view Ansicht filtern +Folder pair +Verzeichnispaar FreeFileSync (Date: FreeFileSync (Datum: FreeFileSync - Folder Comparison and Synchronization @@ -382,6 +362,8 @@ FreeFileSync Batch Job FreeFileSync Batchdatei FreeFileSync at Sourceforge FreeFileSync auf Sourceforge +FreeFileSync batch file +FreeFileSync Batchdatei FreeFileSync configuration FreeFileSync Konfiguration Help @@ -396,14 +378,14 @@ Hints: Tipps: Homepage: Homepage: -If errors occur during folder comparison or synchronization they are ignored and the process continues.\n -Wenn Fehler während des Vergleichs oder der Synchronisation auftreten, werden diese ignoriert und der Vorgang fortgesetzt.\n If you like FFS: FFS unterstützen: Include Einschließen -Include: *.doc;*.zip;*.exe\nExclude: *\\tempfolder\\* -Einschließen: *.doc;*.zip;*.exe\nAusschließen: *\\TempOrdner\\* +Include temporarily +Temporär einschließen +Include: *.doc;*.zip;*.exe\nExclude: *\\temp\\* +Einschließen: *.doc;*.zip;*.exe\nAusschließen: *\\temp\\* Info Info Information @@ -412,8 +394,6 @@ Initialization of Recycle Bin failed! It cannot be used! Die Initialisierung des Papierkorbs ist fehlgeschlagen! Er kann nicht verwendet werden! It was not possible to initialize the Recycle Bin!\n\nIt's likely that you are not using Windows.\nIf you want this feature included, please contact the author. :) Die Papierkorbfunktion steht nicht zur Verfügung!\n\nWahrscheinlich ist das aktuelle Betriebssystem nicht Windows.\nWenn Sie diese Funktion wirklich benötigen, kontaktieren Sie bitte den Autor. :) -Left directory does not exist. Please select a new one! -Verzeichnis auf der linken Seite existiert nicht. Bitte ein anderes auswählen! Left folder: Linker Ordner: Legend\n @@ -426,8 +406,8 @@ Log-messages:\n------------- Lognachrichten:\n--------------- Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization. Spiegel-Backup des linken Ordners erstellen: Der rechte Ordner wird dabei überschrieben und nach der Synchronisation dem linken exakt gleichen. -Move files to Recycle Bin instead of deleting or overwriting them directly.\n -Verschiebe die Dateien in den Papierkorb anstatt sie zu löschen oder zu überschreiben.\n +No valid configuration file specified: +Keine gültige Konfigurationsdatei angegeben: Not all items were synchronized! Have a look at the list. Nicht alle Objekte wurden synchronisiert! Siehe die verbliebenen Elemente im Hauptfenster. Nothing to synchronize. Both directories adhere to the sync-configuration! @@ -452,8 +432,8 @@ Operation: Vorgang: Pause Pause -Please select both left and right directories! -Bitte für beide Seiten ein Verzeichnis wählen! +Please fill all empty directory fields. +Bitte alle leeren Verzeichnisfelder füllen. Press button to activate filter Auswählen, um Filter zu aktivieren Preview @@ -464,10 +444,10 @@ Quit Beenden Relative path Relativer Pfad +Remove folder pair +Verzeichnispaar entfernen Result Ergebnis -Right directory does not exist. Please select a new one! -Verzeichnis auf der rechten Seite existiert nicht. Bitte ein anderes auswählen! Right folder: Rechter Ordner: Save current configuration to file @@ -484,10 +464,6 @@ Select variant: Variante auswählen: Set filter for synchronization Filter einstellen -Shell link -Shell Link -Shell script -Shell Skript Show files that are different Zeige unterschiedliche Dateien Show files that are equal @@ -506,14 +482,6 @@ Size Größe Source code written completely in C++ utilizing: Sourcecode komplett in C++ geschrieben mit Hilfe von: -Specify algorithm to test if files are equal:\n\n\t\t -Algorithmus wählen, um gleiche Dateien zu erkennen:\n\n\t\t -Specify names to be excluded separated by ';'. Wildcards '*' and '?' are supported. Default: \"\"\n -Auszuschließende Namen, getrennt durch ';' angeben. Platzhalter '*' und '?' werden unterstützt. Standard: \"\"\n -Specify names to be included separated by ';'. Wildcards '*' and '?' are supported. Default: \"*\"\n -Einzuschließende Namen, getrennt durch ';' angeben. Platzhalter '*' und '?' werden unterstützt. Standard: \"*\"\n -Specify the sync-direction used for each type of file by a string of five chars:\n\n -Synchronisationseinstellungen durch Zeichenkette der Länge 5 spezifizieren:\n\n Start Start Start synchronization @@ -522,10 +490,8 @@ Stop Stop Swap sides Vertausche Seiten -SyncJob.lnk -SyncJob.lnk -SyncJob.sh -SyncJob.sh +SyncJob.ffs_batch +SyncJob.ffs_batch Synchronization aborted! Synchronisation abgebrochen! Synchronization completed successfully. @@ -536,8 +502,8 @@ Synchronization settings Synchronisationseinstellungen Synchronization status Synchronisation: Status -Synchronize all .doc, .zip and .exe files except everything from folder \"tempfolder\". -Synchronisiere alle .doc, .zip und .exe Dateien mit Ausnahme des Ordners \"TempOrdner\". +Synchronize all .doc, .zip and .exe files except everything from folder \"temp\". +Synchronisiere alle .doc, .zip und .exe Dateien mit Ausnahme des Ordners \"temp\". Synchronize both sides simultaneously: Copy new or updated files in both directions. Beide Seiten gleichzeitig synchronisieren: Neue oder aktualisierte Dateien werden auf die jeweils andere Seite kopiert. Synchronizing... @@ -560,8 +526,6 @@ Unable to create logfile! Fehler beim Erstellen der Logdatei! Unable to initialize Recycle Bin! Der Papierkorb konnte nicht initialisiert werden! -Unable to load Resources.dat! -Fehler beim Laden von Resources.dat! Update: Überschreiben: Use Recycle Bin @@ -580,26 +544,6 @@ Nachdem \"Compare\" mit dieser Einstellung gestartet wurde, wird der folgende En \n\nMit nächstem Objekt fortsetzen, wiederholen oder abbrechen? \n\nInformation: If you skip the error and continue or abort a re-compare will be necessary! \n\nInformation: Wenn der Fehler nicht behoben wird, muss der Vergleich erneut gestartet werden! -\n\t\tSync-direction: L: left, R: right, N: none\n -\n\t\tSynchronisationsrichtung: L: links, R: rechts, N: nichts tun\n -\t1: Creates a mirror backup of the left directory\n\t2: Synchronizes all *.doc files from both directories simultaneously\n\n -\t1: Erzeugt ein Spiegel-Backup des linken Verzeichnisses\n\t2: Synchronisiert alle *.doc Dateien aus beiden Verzeichnissen\n\n -\tExamples:\n\n\t1.) FreeFileSync -comp SIZEDATE -sync RRRRR C:\\Source C:\\Target\n\t2.) FreeFileSync -comp sizedate -sync rlrln c:\\dir1 c:\\dir2 -incl *.doc\n\n -\tBeispiele:\n\n\t1.) FreeFileSync -comp SIZEDATE -sync RRRRR C:\\Quelle C:\\Ziel\n\t2.) FreeFileSync -comp sizedate -sync rlrln c:\\dir1 c:\\dir2 -incl *.doc\n\n -\tHint: You can easily generate a batch file by chosing \"Create batch job\" from the GUI menubar.\n -\tTipp: Eine Batchdatei kann auch über das Menü der graphischen Benutzeroberfläche unter \"Erstelle Batch-Job\" generiert werden.\n -\t\tChar 1: Folders/files that exist on left side only\n -\t\t1. Zeichen: Ordner/Dateien, die nur links existieren\n -\t\tChar 2: Folders/files that exist on right side only\n -\t\t2. Zeichen: Ordner/Dateien, die nur rechts existieren\n -\t\tChar 3: Files that exist on both sides, left one is newer\n -\t\t3. Zeichen: Dateien, die auf beiden Seiten existieren; linke Datei ist neuer\n -\t\tChar 4: Files that exist on both sides, right one is newer\n -\t\t4. Zeichen: Dateien, die auf beiden Seiten existieren; rechte Datei ist neuer\n -\t\tChar 5: Files that exist on both sides and are different\n -\t\t5. Zeichen: Dateien, die auf beiden Seiten existieren und verschieden sind\n -by ZenJu -von ZenJu different verschieden file exists on both sides diff --git a/japanese.lng b/japanese.lng index cf74e30f..56d2cd0f 100644 --- a/japanese.lng +++ b/japanese.lng @@ -20,8 +20,6 @@ ディレクトリ directory ディレクトリ - does not exist. - 存在しません file, つのファイル, files, @@ -40,8 +38,6 @@ 列を表示 to から - to recycle bin! - ゴミ箱に移動! != files are different\n != ファイルは異なっています\n &Abort @@ -109,27 +105,19 @@ - same date (different size) - 日付は同一(サイズに差異あり) ------------------------------------------------- ------------------------------------------------------ +------------------------------------------------ ---------\n -----------\n -Open-Source file synchronization- -Open-Source ファイル同期ツール- . , -1. Enter full file or directory names separated by ';'.\n2. Wildcard characters '*' and '?' are supported. -1. ファイル/ディレクトリ名を ' ; ' で区切って入力してください\n2. ワイルドカード ' * ' と ' ? ' に対応しています。 -: check file content\n -: ファイル内容を確認\n -: check filesize and date\n\t\t -: ファイルサイズと日付を確認\n\t\t +1. Enter full file or directory names separated by ';' or a new line.\n2. Use wildcard characters '*' and '?'. +完全なファイル/ディレクトリ名を ' ; ' で区切って入力してください。\n2.ワイルドカードに ' * ' と ' ? ' を使用出来ます。 << left file is newer\n << 左側の方が新しい\n <Directory> <ディレクトリ> -<left directory> -<左のディレクトリ> -<right directory> -<右のディレクトリ> <| file on left side only\n <| 左側のみに存在するファイル\n == files are equal\n\n @@ -146,6 +134,10 @@ About 情報 Action 操作 +Add folder pair +フォルダのペアを追加 +Add to exclude filter: +除外フィルターを追加 All items have been synchronized! すべてのアイテムは同期されました! An error occured @@ -226,8 +218,6 @@ Could not open configuration file 構成ファイルを開けませんでした。 Could not open file: ファイルを開けません: -Could not read configuration file -構成ファイルを読み込めません Could not read language file 言語ファイルを読み込めません Could not retrieve file info for: @@ -268,18 +258,10 @@ Deleting file ファイルを削除中 Deleting folder フォルダを削除中 -Directory -ディレクトリ -Directory on the left does not exist. Please select a new one! -左側のディレクトリには存在しません、新たに選択してください! -Directory on the right does not exist. Please select a new one! -右側のディレクトリには存在しません、新たに選択してください! -Displays help on the command line parameters\n -コマンドラインパラメータを表示\n +Directory does not exist. Please select a new one: +ディレクトリが見つかりません。 再度選択してください: Do not show graphical status and error messages but write to a logfile instead 進捗状況、及びエラーを表示しないで、代わりにログファイルに書き込む -Do not show graphical status and error messages but write to a logfile instead.\n\n -進捗状況、及びエラーを表示しないで、代わりにログファイルに書き込む.\n\n Do nothing 何もしない Do you really want to delete the following objects(s)? @@ -308,8 +290,8 @@ Error deleting directory ディレクトリの削除に失敗 Error deleting file ファイルの削除に失敗 -Error moving file -ファイルの移動に失敗 +Error moving file to recycle bin: +ファイルをゴミ箱に移動できません: Error parsing configuration file 構成ファイルの構文に誤りがあります Error reading file: @@ -328,6 +310,8 @@ Example 例 Exclude 除外 +Exclude temporarily +一時フォルダを除外 Feedback and suggestions are welcome at: フィードバック、提案など: File content @@ -366,10 +350,10 @@ Filter active: Press again to deactivate フィルター有効化: 再度押すと無効化 Filter files ファイルフィルター -Filter manually -手動フィルター Filter view 表示フィルター +Folder pair +フォルダペア FreeFileSync (Date: FreeFileSync (日付: FreeFileSync - Folder Comparison and Synchronization @@ -378,6 +362,8 @@ FreeFileSync Batch Job FreeFileSync 一括ジョブ FreeFileSync at Sourceforge FreeFileSync at Sourceforge +FreeFileSync batch file +FreeFileSync バッチファイル FreeFileSync configuration FreeFileSync 構成設定 Help @@ -392,14 +378,14 @@ Hints: ヒント: Homepage: ホームページ: -If errors occur during folder comparison or synchronization they are ignored and the process continues.\n -フォルダの比較、または同期処理中のエラーは無視して処理を続行する\n If you like FFS: FFS が気に入った場合: Include 含める -Include: *.doc;*.zip;*.exe\nExclude: *\\tempfolder\\* -含める: *.doc;*.zip;*.exe\n除外: *\\一時フォルダ\\* +Include temporarily +一時フォルダを含める +Include: *.doc;*.zip;*.exe\nExclude: *\\temp\\* +含める: *.doc;*.zip;*.exe\n除外: *\\temp\\* Info 情報 Information @@ -408,8 +394,6 @@ Initialization of Recycle Bin failed! It cannot be used! ゴミ箱の初期化に失敗しました! 使用できない状態です! It was not possible to initialize the Recycle Bin!\n\nIt's likely that you are not using Windows.\nIf you want this feature included, please contact the author. :) ゴミ箱を初期化することが出来ませんでした!\n\n使用している OS が、Windows 以外の OS です。\nこの機能を使用したい場合は、作者までご連絡ください :) -Left directory does not exist. Please select a new one! -左のディレクトリは存在しません、再選択してください! Left folder: 左側フォルダ: Legend\n @@ -419,11 +403,11 @@ Load configuration via...\n - this list (press DEL to delete items)\n - Load from file... ファイルから読み込み... Log-messages:\n------------- -ログメッセージ:\n--------------- +ログメッセージ:\n----------- Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization. 左側フォルダをミラーリングバックアップ: 同期完了後は、左側フォルダに合わせて右側フォルダは上書きされます。 -Move files to Recycle Bin instead of deleting or overwriting them directly.\n -直接上書きするか、または上書きする代わりにファイルをゴミ箱に移動する\n +No valid configuration file specified: +有効な構成ファイルが選択されていません: Not all items were synchronized! Have a look at the list. すべてのアイテムは同期されていません! 詳細はリストをご覧ください。 Nothing to synchronize. Both directories adhere to the sync-configuration! @@ -448,8 +432,8 @@ Operation: 操作: Pause 一時停止 -Please select both left and right directories! -左と右両方のディレクトリを選択してください! +Please fill all empty directory fields. +すべてのフィールドに入力してください。 Press button to activate filter ボタンをクリックで有効化 Preview @@ -460,10 +444,10 @@ Quit 終了 Relative path 相対パス +Remove folder pair +フォルダペアを除去 Result 結果 -Right directory does not exist. Please select a new one! -右側のディレクトリが存在しません。再選択してください! Right folder: 右側フォルダ: Save current configuration to file @@ -480,10 +464,6 @@ Select variant: 変数を選択: Set filter for synchronization 同期フィルターを設定 -Shell link -Shell リンク -Shell script -Shell スクリプト Show files that are different 差異のあるファイルを表示 Show files that are equal @@ -502,14 +482,6 @@ Size サイズ Source code written completely in C++ utilizing: ソースコードは C++ で書かれ、コンパイルされています: -Specify algorithm to test if files are equal:\n\n\t\t -指定したアルゴリズムで同等のファイルをテスト:\n\n\t\t -Specify names to be excluded separated by ';'. Wildcards '*' and '?' are supported. Default: \"\"\n -名前を指定する時は、 ' ; ' で区切ってください。また、デフォルトでワイルドカード ' * ' と ' ? ' に対応しています: \"\"\n -Specify names to be included separated by ';'. Wildcards '*' and '?' are supported. Default: \"*\"\n -Einzuschließende Namen, getrennt durch ';' angeben. Platzhalter '*' und '?' werden unterstützt. Standard: \"*\"\n -Specify the sync-direction used for each type of file by a string of five chars:\n\n -同期方向を指定する場合は、各ファイル形式に5 つの文字列を使用してください:\n\n Start 開始 Start synchronization @@ -518,10 +490,8 @@ Stop 停止 Swap sides パネルを入れ替え -SyncJob.lnk -SyncJob.lnk -SyncJob.sh -SyncJob.sh +SyncJob.ffs_batch +SyncJob.ffs_batch Synchronization aborted! 同期処理を中断! Synchronization completed successfully. @@ -532,8 +502,8 @@ Synchronization settings 同期処理設定 Synchronization status 同期処理: ステータス -Synchronize all .doc, .zip and .exe files except everything from folder \"tempfolder\". -.doc, .zip と .exe ファイルを除いて、\"一時フォルダ\" からすべてのファイルを同期 +Synchronize all .doc, .zip and .exe files except everything from folder \"temp\". +.doc, .zip and .exe ファイル以外を \"temp\" フォルダからすべて同期 Synchronize both sides simultaneously: Copy new or updated files in both directions. 両側を同時に処理: 両方のディレクトリのより新しいファイルをコピー Synchronizing... @@ -556,8 +526,6 @@ Unable to create logfile! ログファイルを作成出来ません! Unable to initialize Recycle Bin! ゴミ箱の初期化が出来ません! -Unable to load Resources.dat! -Resources.dat を読み込むことが出来ません! Update: アップデート: Use Recycle Bin @@ -576,26 +544,6 @@ When \"Compare\" is triggered with this option set the following decision tree i \n\n次のオブジェクトの同期を続行しますか? 中断しますか? \n\nInformation: If you skip the error and continue or abort a re-compare will be necessary! \n\nインフォメーション: エラーをスキップして続行/中断した場合、再比較を行う必要があります! -\n\t\tSync-direction: L: left, R: right, N: none\n -\n\t\t同期方向: L: 左側, R: 右側, N: なし\n -\t1: Creates a mirror backup of the left directory\n\t2: Synchronizes all *.doc files from both directories simultaneously\n\n -\t1: 左側ディレクトリのミラーバックアップを作成\n\t2: 両側ディレクトリのすべての*.doc ファイルの同期を実行\n\n -\tExamples:\n\n\t1.) FreeFileSync -comp SIZEDATE -sync RRRRR C:\\Source C:\\Target\n\t2.) FreeFileSync -comp sizedate -sync rlrln c:\\dir1 c:\\dir2 -incl *.doc\n\n -\t例:\n\n\t1.) FreeFileSync -comp SIZEDATE -sync RRRRR C:\\Source C:\\Target\n\t2.) FreeFileSync -comp sizedate -sync rlrln c:\\dir1 c:\\dir2 -incl *.doc\n\n -\tHint: You can easily generate a batch file by chosing \"Create batch job\" from the GUI menubar.\n -\tヒント: メニューバーの\"一括ジョブを作成\" を選択することで、簡単にバッチファイルを作成することができます。\n -\t\tChar 1: Folders/files that exist on left side only\n -\t\t1. 文字: 左側のみ存在するファイル/フォルダ\n -\t\tChar 2: Folders/files that exist on right side only\n -\t\t2. 文字: 右側のみ存在するファイル/フォルダ\n -\t\tChar 3: Files that exist on both sides, left one is newer\n -\t\t3. 文字: 両側にファイルが存在して、左側に、より新しいファイル\n -\t\tChar 4: Files that exist on both sides, right one is newer\n -\t\t4. 文字: 両側にファイルが存在して、右側に、より新しいファイル\n -\t\tChar 5: Files that exist on both sides and are different\n -\t\t5. 文字: 両側にファイルが存在して、異なるファイル\n\n -by ZenJu -by ZenJu different 差異あり file exists on both sides diff --git a/library/globalFunctions.h b/library/globalFunctions.h index 7f50f90a..40eba94f 100644 --- a/library/globalFunctions.h +++ b/library/globalFunctions.h @@ -19,19 +19,19 @@ namespace globalFunctions return(d<0?-d:d); } - string numberToString(const unsigned int number); //Convert number to string - string numberToString(const int number); //Convert number to string - string numberToString(const float number); //Convert number to string + string numberToString(const unsigned int number); //convert number to string + string numberToString(const int number); //convert number to string + string numberToString(const float number); //convert number to string - wxString numberToWxString(const unsigned int number); //Convert number to wxString - wxString numberToWxString(const int number); //Convert number to wxString - wxString numberToWxString(const float number); //Convert number to wxString + wxString numberToWxString(const unsigned int number); //convert number to wxString + wxString numberToWxString(const int number); //convert number to wxString + wxString numberToWxString(const float number); //convert number to wxString - int stringToInt( const string& number); //Convert String to number - double stringToDouble(const string& number); //Convert String to number + int stringToInt( const string& number); //convert String to number + double stringToDouble(const string& number); //convert String to number - int wxStringToInt( const wxString& number); //Convert wxString to number - double wxStringToDouble(const wxString& number); //Convert wxString to number + int wxStringToInt( const wxString& number); //convert wxString to number + double wxStringToDouble(const wxString& number); //convert wxString to number wxString& includeNumberSeparator(wxString& number); diff --git a/library/pch.h b/library/pch.h index 37c3383f..50f9fda3 100644 --- a/library/pch.h +++ b/library/pch.h @@ -1,7 +1,8 @@ #ifndef FFS_PRECOMPILED_HEADER #define FFS_PRECOMPILED_HEADER -DO NOT USE THIS FILE: FOR SOME REASON IT CORRUPTS COMPILATION!!! +DO NOT USE THIS FILE: +FOR SOME REASON IT CORRUPTS COMPILATION!!! //##################################################### // basic wxWidgets headers diff --git a/library/processXml.cpp b/library/processXml.cpp new file mode 100644 index 00000000..80f284c2 --- /dev/null +++ b/library/processXml.cpp @@ -0,0 +1,484 @@ +#include "processXml.h" +#include <wx/filefn.h> +#include <wx/ffile.h> +#include "globalFunctions.h" + +using namespace globalFunctions; +using namespace xmlAccess; + + +XmlType xmlAccess::getXmlType(const wxString& filename) +{ + if (!wxFileExists(filename)) + return XML_OTHER; + + //workaround to get a FILE* from a unicode filename + wxFFile configFile(filename, wxT("rb")); + if (!configFile.IsOpened()) + return XML_OTHER; + + FILE* inputFile = configFile.fp(); + + TiXmlDocument doc; + if (!doc.LoadFile(inputFile)) //fails if inputFile is no proper XML + return XML_OTHER; + + TiXmlElement* root = doc.RootElement(); + + if (!root || (root->ValueStr() != string("FreeFileSync"))) //check for FFS configuration xml + return XML_OTHER; + + const char* cfgType = root->Attribute("XmlType"); + if (!cfgType) + return XML_OTHER; + + if (string(cfgType) == "BATCH") + return XML_BATCH_CONFIG; + else if (string(cfgType) == "GUI") + return XML_GUI_CONFIG; + else + return XML_OTHER; +} + + +XmlInput::XmlInput(const wxString& fileName, const XmlType type) : + loadSuccess(false) +{ + if (!wxFileExists(fileName)) //avoid wxWidgets error message when wxFFile receives not existing file + return; + + //workaround to get a FILE* from a unicode filename + wxFFile dummyFile(fileName, wxT("rb")); + if (dummyFile.IsOpened()) + { + FILE* inputFile = dummyFile.fp(); + + TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters + + if (doc.LoadFile(inputFile)) //load XML; fails if inputFile is no proper XML + { + TiXmlElement* root = doc.RootElement(); + + if (root && (root->ValueStr() == string("FreeFileSync"))) //check for FFS configuration xml + { + const char* cfgType = root->Attribute("XmlType"); + if (cfgType) + { + if (type == XML_GUI_CONFIG) + loadSuccess = string(cfgType) == "GUI"; + else if (type == XML_BATCH_CONFIG) + loadSuccess = string(cfgType) == "BATCH"; + } + } + } + } +} + + +bool XmlInput::readXmlElementValue(string& output, const TiXmlElement* parent, const string& name) +{ + if (parent) + { + const TiXmlElement* child = parent->FirstChildElement(name); + if (child) + { + const char* text = child->GetText(); + if (text) //may be NULL!! + output = text; + else + output.clear(); + return true; + } + } + + return false; +} + + +bool XmlInput::readXmlElementValue(int& output, const TiXmlElement* parent, const string& name) +{ + string temp; + if (readXmlElementValue(temp, parent, name)) + { + output = stringToInt(temp); + return true; + } + else + return false; +} + + +bool XmlInput::readXmlElementValue(CompareVariant& output, const TiXmlElement* parent, const string& name) +{ + int dummy = 0; + if (readXmlElementValue(dummy, parent, name)) + { + output = CompareVariant(dummy); + return true; + } + else + return false; +} + + +bool XmlInput::readXmlElementValue(SyncDirection& output, const TiXmlElement* parent, const string& name) +{ + string dummy; + if (readXmlElementValue(dummy, parent, name)) + { + if (dummy == "left") + output = SYNC_DIR_LEFT; + else if (dummy == "right") + output = SYNC_DIR_RIGHT; + else //treat all other input as "none" + output = SYNC_DIR_NONE; + + return true; + } + else + return false; +} + + +bool XmlInput::readXmlElementValue(bool& output, const TiXmlElement* parent, const string& name) +{ + string dummy; + if (readXmlElementValue(dummy, parent, name)) + { + output = (dummy == "true"); + return true; + } + else + return false; +} + + +bool XmlInput::readXmlMainConfig(XmlMainConfig& outputCfg) +{ + TiXmlElement* root = doc.RootElement(); + if (!root) return false; + + TiXmlHandle hRoot(root); + + TiXmlElement* cmpSettings = hRoot.FirstChild("MainConfig").FirstChild("Comparison").ToElement(); + TiXmlElement* syncConfig = hRoot.FirstChild("MainConfig").FirstChild("Synchronization").FirstChild("Directions").ToElement(); + TiXmlElement* miscSettings = hRoot.FirstChild("MainConfig").FirstChild("Miscellaneous").ToElement(); + TiXmlElement* filter = TiXmlHandle(miscSettings).FirstChild("Filter").ToElement(); + + if (!cmpSettings || !syncConfig || !miscSettings || !filter) + return false; + + string tempString; +//########################################################### + //read compare variant + if (!readXmlElementValue(outputCfg.cfg.compareVar, cmpSettings, "Variant")) return false; + + //read folder pair(s) + TiXmlElement* folderPair = TiXmlHandle(cmpSettings).FirstChild("Folders").FirstChild("Pair").ToElement(); + + //read folder pairs + while (folderPair) + { + FolderPair newPair; + + if (!readXmlElementValue(tempString, folderPair, "Left")) return false; + newPair.leftDirectory = wxString::FromUTF8(tempString.c_str()); + + if (!readXmlElementValue(tempString, folderPair, "Right")) return false; + newPair.rightDirectory = wxString::FromUTF8(tempString.c_str()); + + outputCfg.directoryPairs.push_back(newPair); + folderPair = folderPair->NextSiblingElement(); + } + +//########################################################### + //read sync configuration + if (!readXmlElementValue(outputCfg.cfg.syncConfiguration.exLeftSideOnly, syncConfig, "LeftOnly")) return false; + if (!readXmlElementValue(outputCfg.cfg.syncConfiguration.exRightSideOnly, syncConfig, "RightOnly")) return false; + if (!readXmlElementValue(outputCfg.cfg.syncConfiguration.leftNewer, syncConfig, "LeftNewer")) return false; + if (!readXmlElementValue(outputCfg.cfg.syncConfiguration.rightNewer, syncConfig, "RightNewer")) return false; + if (!readXmlElementValue(outputCfg.cfg.syncConfiguration.different, syncConfig, "Different")) return false; +//########################################################### + //read filter settings + if (!readXmlElementValue(outputCfg.cfg.filterIsActive, filter, "Active")) return false; + + if (!readXmlElementValue(tempString, filter, "Include")) return false; + outputCfg.cfg.includeFilter = wxString::FromUTF8(tempString.c_str()); + + if (!readXmlElementValue(tempString, filter, "Exclude")) return false; + outputCfg.cfg.excludeFilter = wxString::FromUTF8(tempString.c_str()); +//########################################################### + //other + if (!readXmlElementValue(outputCfg.cfg.useRecycleBin, miscSettings, "Recycler")) return false; + if (!readXmlElementValue(outputCfg.cfg.continueOnError, miscSettings, "Continue")) return false; + + return true; +} + + +bool XmlInput::readXmlGuiConfig(XmlGuiConfig& outputCfg) +{ + TiXmlElement* root = doc.RootElement(); + if (!root) return false; + + TiXmlHandle hRoot(root); + + //read GUI layout + TiXmlElement* mainWindow = hRoot.FirstChild("GuiConfig").FirstChild("Windows").FirstChild("Main").ToElement(); + if (mainWindow) + { + if (!readXmlElementValue(outputCfg.hideFilteredElements, mainWindow, "HideFiltered")) + outputCfg.hideFilteredElements = false; + + //read application window size and position + if (!readXmlElementValue(outputCfg.widthNotMaximized, mainWindow, "Width")) + outputCfg.widthNotMaximized = -1; + if (!readXmlElementValue(outputCfg.heightNotMaximized, mainWindow, "Height")) + outputCfg.heightNotMaximized = -1; + if (!readXmlElementValue(outputCfg.posXNotMaximized, mainWindow, "PosX")) + outputCfg.posXNotMaximized = -1; + if (!readXmlElementValue(outputCfg.posYNotMaximized, mainWindow, "PosY")) + outputCfg.posYNotMaximized = -1; + if (!readXmlElementValue(outputCfg.isMaximized, mainWindow, "Maximized")) + outputCfg.isMaximized = false; + +//########################################################### + //read column widths + TiXmlElement* leftColumn = TiXmlHandle(mainWindow).FirstChild("LeftColumns").FirstChild("Width").ToElement(); + while (leftColumn) + { + const char* width = leftColumn->GetText(); + if (width) //may be NULL!! + outputCfg.columnWidthLeft.push_back(stringToInt(width)); + else + break; + + leftColumn = leftColumn->NextSiblingElement(); + } + + TiXmlElement* rightColumn = TiXmlHandle(mainWindow).FirstChild("RightColumns").FirstChild("Width").ToElement(); + while (rightColumn) + { + const char* width = rightColumn->GetText(); + if (width) //may be NULL!! + outputCfg.columnWidthRight.push_back(stringToInt(width)); + else + break; + + rightColumn = rightColumn->NextSiblingElement(); + } + } + + return true; +} + + +bool XmlInput::readXmlBatchConfig(XmlBatchConfig& outputCfg) +{ + TiXmlElement* root = doc.RootElement(); + if (!root) return false; + + TiXmlHandle hRoot(root); + + //read batch settings + TiXmlElement* batchConfig = hRoot.FirstChild("BatchConfig").ToElement(); + if (batchConfig) + { + //read application window size and position + if (!readXmlElementValue(outputCfg.silent, batchConfig, "Silent")) + outputCfg.silent = false; + } + + return true; +} + + +XmlOutput::XmlOutput(const wxString& fileName, const XmlType type) : + m_fileName(fileName) +{ + TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters + + TiXmlDeclaration* decl = new TiXmlDeclaration("1.0", "UTF-8", ""); //delete won't be necessary later; ownership passed to TiXmlDocument! + doc.LinkEndChild(decl); + + TiXmlElement* root = new TiXmlElement("FreeFileSync"); + if (type == XML_GUI_CONFIG) + root->SetAttribute("XmlType", "GUI"); //xml configuration type + else if (type == XML_BATCH_CONFIG) + root->SetAttribute("XmlType", "BATCH"); + else + assert(false); + doc.LinkEndChild(root); +} + + +bool XmlOutput::writeToFile() +{ + //workaround to get a FILE* from a unicode filename + wxFFile dummyFile(m_fileName, wxT("wb")); + if (!dummyFile.IsOpened()) + return false; + + FILE* outputFile = dummyFile.fp(); + + return doc.SaveFile(outputFile); //save XML +} + + +void XmlOutput::addXmlElement(TiXmlElement* parent, const string& name, const string& value) +{ + if (parent) + { + TiXmlElement* subElement = new TiXmlElement(name); + parent->LinkEndChild(subElement); + subElement->LinkEndChild(new TiXmlText(value)); + } +} + + +void XmlOutput::addXmlElement(TiXmlElement* parent, const string& name, const int value) +{ + addXmlElement(parent, name, numberToString(value)); +} + + +void XmlOutput::addXmlElement(TiXmlElement* parent, const string& name, const SyncDirection value) +{ + if (value == SYNC_DIR_LEFT) + addXmlElement(parent, name, string("left")); + else if (value == SYNC_DIR_RIGHT) + addXmlElement(parent, name, string("right")); + else if (value == SYNC_DIR_NONE) + addXmlElement(parent, name, string("none")); + else + assert(false); +} + + +void XmlOutput::addXmlElement(TiXmlElement* parent, const string& name, const bool value) +{ + if (value) + addXmlElement(parent, name, string("true")); + else + addXmlElement(parent, name, string("false")); +} + + +bool XmlOutput::writeXmlMainConfig(const XmlMainConfig& inputCfg) +{ + TiXmlElement* root = doc.RootElement(); + if (!root) return false; + + TiXmlElement* settings = new TiXmlElement("MainConfig"); + root->LinkEndChild(settings); + +//########################################################### + TiXmlElement* cmpSettings = new TiXmlElement("Comparison"); + settings->LinkEndChild(cmpSettings); + + //write compare algorithm + addXmlElement(cmpSettings, "Variant", inputCfg.cfg.compareVar); + + //write folder pair(s) + TiXmlElement* folders = new TiXmlElement("Folders"); + cmpSettings->LinkEndChild(folders); + + //write folder pairs + for (vector<FolderPair>::const_iterator i = inputCfg.directoryPairs.begin(); i != inputCfg.directoryPairs.end(); ++i) + { + TiXmlElement* folderPair = new TiXmlElement("Pair"); + folders->LinkEndChild(folderPair); + + addXmlElement(folderPair, "Left", string((i->leftDirectory).ToUTF8())); + addXmlElement(folderPair, "Right", string((i->rightDirectory).ToUTF8())); + } + +//########################################################### + TiXmlElement* syncSettings = new TiXmlElement("Synchronization"); + settings->LinkEndChild(syncSettings); + + //write sync configuration + TiXmlElement* syncConfig = new TiXmlElement("Directions"); + syncSettings->LinkEndChild(syncConfig); + + addXmlElement(syncConfig, "LeftOnly", inputCfg.cfg.syncConfiguration.exLeftSideOnly); + addXmlElement(syncConfig, "RightOnly", inputCfg.cfg.syncConfiguration.exRightSideOnly); + addXmlElement(syncConfig, "LeftNewer", inputCfg.cfg.syncConfiguration.leftNewer); + addXmlElement(syncConfig, "RightNewer", inputCfg.cfg.syncConfiguration.rightNewer); + addXmlElement(syncConfig, "Different", inputCfg.cfg.syncConfiguration.different); + +//########################################################### + TiXmlElement* miscSettings = new TiXmlElement("Miscellaneous"); + settings->LinkEndChild(miscSettings); + + //write filter settings + TiXmlElement* filter = new TiXmlElement("Filter"); + miscSettings->LinkEndChild(filter); + + addXmlElement(filter, "Active", inputCfg.cfg.filterIsActive); + addXmlElement(filter, "Include", string((inputCfg.cfg.includeFilter).ToUTF8())); + addXmlElement(filter, "Exclude", string((inputCfg.cfg.excludeFilter).ToUTF8())); + + //other + addXmlElement(miscSettings, "Recycler", inputCfg.cfg.useRecycleBin); + addXmlElement(miscSettings, "Continue", inputCfg.cfg.continueOnError); +//########################################################### + + return true; +} + + +bool XmlOutput::writeXmlGuiConfig(const XmlGuiConfig& inputCfg) +{ + TiXmlElement* root = doc.RootElement(); + if (!root) return false; + + TiXmlElement* guiLayout = new TiXmlElement("GuiConfig"); + root->LinkEndChild(guiLayout); + + TiXmlElement* windows = new TiXmlElement("Windows"); + guiLayout->LinkEndChild(windows); + + TiXmlElement* mainWindow = new TiXmlElement("Main"); + windows->LinkEndChild(mainWindow); + + addXmlElement(mainWindow, "HideFiltered", inputCfg.hideFilteredElements); + + //window size + addXmlElement(mainWindow, "Width", inputCfg.widthNotMaximized); + addXmlElement(mainWindow, "Height", inputCfg.heightNotMaximized); + + //window position + addXmlElement(mainWindow, "PosX", inputCfg.posXNotMaximized); + addXmlElement(mainWindow, "PosY", inputCfg.posYNotMaximized); + addXmlElement(mainWindow, "Maximized", inputCfg.isMaximized); + + //write column sizes + TiXmlElement* leftColumn = new TiXmlElement("LeftColumns"); + mainWindow->LinkEndChild(leftColumn); + + for (unsigned int i = 0; i < inputCfg.columnWidthLeft.size(); ++i) + addXmlElement(leftColumn, "Width", inputCfg.columnWidthLeft[i]); + + TiXmlElement* rightColumn = new TiXmlElement("RightColumns"); + mainWindow->LinkEndChild(rightColumn); + + for (unsigned int i = 0; i < inputCfg.columnWidthRight.size(); ++i) + addXmlElement(rightColumn, "Width", inputCfg.columnWidthRight[i]); + + return true; +} + + +bool XmlOutput::writeXmlBatchConfig(const XmlBatchConfig& inputCfg) +{ + TiXmlElement* root = doc.RootElement(); + if (!root) return false; + + TiXmlElement* batchConfig = new TiXmlElement("BatchConfig"); + root->LinkEndChild(batchConfig); + + addXmlElement(batchConfig, "Silent", inputCfg.silent); + + return true; +} diff --git a/library/processXml.h b/library/processXml.h new file mode 100644 index 00000000..d30cf49f --- /dev/null +++ b/library/processXml.h @@ -0,0 +1,114 @@ +#ifndef PROCESSXML_H_INCLUDED +#define PROCESSXML_H_INCLUDED + +#include "../FreeFileSync.h" +#include "tinyxml/tinyxml.h" + +namespace xmlAccess +{ + enum XmlType + { + XML_GUI_CONFIG, + XML_BATCH_CONFIG, + XML_OTHER + }; + + + struct XmlMainConfig + { + MainConfiguration cfg; + vector<FolderPair> directoryPairs; + }; + + + struct XmlGuiConfig + { + XmlGuiConfig() : + hideFilteredElements(false), //initialize values + widthNotMaximized(-1), + heightNotMaximized(-1), + posXNotMaximized(-1), + posYNotMaximized(-1), + isMaximized(false) {} + bool hideFilteredElements; + int widthNotMaximized; + int heightNotMaximized; + int posXNotMaximized; + int posYNotMaximized; + bool isMaximized; + vector<int> columnWidthLeft; + vector<int> columnWidthRight; + }; + + + struct XmlBatchConfig + { + XmlBatchConfig() : silent(false) {} + + bool silent; + }; + + + XmlType getXmlType(const wxString& filename); + + class XmlInput + { + public: + XmlInput(const wxString& fileName, const XmlType type); + ~XmlInput() {} + + bool loadedSuccessfully() + { + return loadSuccess; + } + + //read basic FreefileSync settings (used by commandline and GUI), return true if ALL values have been retrieved successfully + bool readXmlMainConfig(XmlMainConfig& outputCfg); + //read additional gui settings, all values retrieved are optional, so check for initial values! (== -1) + bool readXmlGuiConfig(XmlGuiConfig& outputCfg); + //read additional batch settings, all values retrieved are optional + bool readXmlBatchConfig(XmlBatchConfig& outputCfg); + + private: +//read + bool readXmlElementValue(string& output, const TiXmlElement* parent, const string& name); + bool readXmlElementValue(int& output, const TiXmlElement* parent, const string& name); + bool readXmlElementValue(CompareVariant& output, const TiXmlElement* parent, const string& name); + bool readXmlElementValue(SyncDirection& output, const TiXmlElement* parent, const string& name); + bool readXmlElementValue(bool& output, const TiXmlElement* parent, const string& name); + + TiXmlDocument doc; + bool loadSuccess; + }; + + + class XmlOutput + { + public: + XmlOutput(const wxString& fileName, const XmlType type); + ~XmlOutput() {} + + bool writeToFile(); + + //write basic FreefileSync settings (used by commandline and GUI), return true if everything was written successfully + bool writeXmlMainConfig(const XmlMainConfig& inputCfg); + //write additional gui settings + bool writeXmlGuiConfig(const XmlGuiConfig& inputCfg); + //write additional batch settings + bool writeXmlBatchConfig(const XmlBatchConfig& inputCfg); + + private: +//write + void addXmlElement(TiXmlElement* parent, const string& name, const string& value); + void addXmlElement(TiXmlElement* parent, const string& name, const int value); + void addXmlElement(TiXmlElement* parent, const string& name, const SyncDirection value); + void addXmlElement(TiXmlElement* parent, const string& name, const bool value); + + TiXmlDocument doc; + const wxString& m_fileName; + }; + +} + + +#endif // PROCESSXML_H_INCLUDED diff --git a/library/resources.cpp b/library/resources.cpp index d2dc36e8..9fce4501 100644 --- a/library/resources.cpp +++ b/library/resources.cpp @@ -6,9 +6,9 @@ #include "globalFunctions.h" #ifdef FFS_WIN -wxChar GlobalResources::fileNameSeparator = '\\'; +const wxChar GlobalResources::fileNameSeparator = '\\'; #elif defined FFS_LINUX -wxChar GlobalResources::fileNameSeparator = '/'; +const wxChar GlobalResources::fileNameSeparator = '/'; #else assert(false); #endif @@ -17,154 +17,108 @@ assert(false); const wxChar* GlobalResources::decimalPoint = wxEmptyString; const wxChar* GlobalResources::thousandsSeparator = wxEmptyString; +GlobalResources globalResource; //init resources on program startup -//command line parameters -const wxChar* GlobalResources::paramCompare = wxT("comp"); -const wxChar* GlobalResources::paramSync = wxT("sync"); -const wxChar* GlobalResources::paramInclude = wxT("incl"); -const wxChar* GlobalResources::paramExclude = wxT("excl"); -const wxChar* GlobalResources::paramContinueError = wxT("continue"); -const wxChar* GlobalResources::paramRecycler = wxT("recycler"); -const wxChar* GlobalResources::paramSilent = wxT("silent"); - -const wxChar* GlobalResources::valueSizeDate = wxT("SIZEDATE"); -const wxChar* GlobalResources::valueContent = wxT("CONTENT"); - +GlobalResources::GlobalResources() +{ + //map, allocate and initialize pictures + bitmapResource[wxT("left arrow.png")] = (bitmapArrowLeft = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("right arrow.png")] = (bitmapArrowRight = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("left arrow create.png")] = (bitmapArrowLeftCr = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("right arrow create.png")] = (bitmapArrowRightCr = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("no arrow.png")] = (bitmapArrowNone = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("start sync.png")] = (bitmapStartSync = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("start sync dis.png")] = (bitmapStartSyncDis = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("left delete.png")] = (bitmapDeleteLeft = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("right delete.png")] = (bitmapDeleteRight = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("email.png")] = (bitmapEmail = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("about.png")] = (bitmapAbout = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("website.png")] = (bitmapWebsite = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("exit.png")] = (bitmapExit = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("sync.png")] = (bitmapSync = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("compare.png")] = (bitmapCompare = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("sync disabled.png")] = (bitmapSyncDisabled = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("swap.png")] = (bitmapSwap = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("help.png")] = (bitmapHelp = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("leftOnly.png")] = (bitmapLeftOnly = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("leftNewer.png")] = (bitmapLeftNewer = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("different.png")] = (bitmapDifferent = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("rightNewer.png")] = (bitmapRightNewer = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("rightOnly.png")] = (bitmapRightOnly = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("leftOnlyDeact.png")] = (bitmapLeftOnlyDeact = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("leftNewerDeact.png")] = (bitmapLeftNewerDeact = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("differentDeact.png")] = (bitmapDifferentDeact = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("rightNewerDeact.png")] = (bitmapRightNewerDeact = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("rightOnlyDeact.png")] = (bitmapRightOnlyDeact = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("equal.png")] = (bitmapEqual = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("equalDeact.png")] = (bitmapEqualDeact = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("include.png")] = (bitmapInclude = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("exclude.png")] = (bitmapExclude = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("filter active.png")] = (bitmapFilterOn = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("filter not active.png")] = (bitmapFilterOff = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("warning.png")] = (bitmapWarning = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("small arrow up.png"]) = (bitmapSmallUp = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("small arrow down.png")] = (bitmapSmallDown = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("save.png")] = (bitmapSave = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("FFS.png")] = (bitmapFFS = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("deleteFile.png")] = (bitmapDeleteFile = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("gpl.png")] = (bitmapGPL = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusPause.png")] = (bitmapStatusPause = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusError.png")] = (bitmapStatusError = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusSuccess.png")] = (bitmapStatusSuccess = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusWarning.png")] = (bitmapStatusWarning = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusScanning.png")] = (bitmapStatusScanning = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusComparing.png")] = (bitmapStatusComparing = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusSyncing.png")] = (bitmapStatusSyncing = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("logo.png")] = (bitmapLogo = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("finished.png")] = (bitmapFinished = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("statusEdge.png")] = (bitmapStatusEdge = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("add pair.png")] = (bitmapAddFolderPair = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("remove pair.png")] = (bitmapRemoveFolderPair = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("remove pair disabl.png")] = (bitmapRemoveFolderPairD = new wxBitmap(wxNullBitmap)); + bitmapResource[wxT("link.png")] = (bitmapLink = new wxBitmap(wxNullBitmap)); + + //init all the other resource files + animationMoney = new wxAnimation(wxNullAnimation); + animationSync = new wxAnimation(wxNullAnimation); +} -map<wxString, wxBitmap*> GlobalResources::bitmapResource; -wxBitmap* GlobalResources::bitmapArrowLeft = 0; -wxBitmap* GlobalResources::bitmapArrowRight = 0; -wxBitmap* GlobalResources::bitmapArrowLeftCr = 0; -wxBitmap* GlobalResources::bitmapArrowRightCr = 0; -wxBitmap* GlobalResources::bitmapArrowNone = 0; -wxBitmap* GlobalResources::bitmapStartSync = 0; -wxBitmap* GlobalResources::bitmapStartSyncDis = 0; -wxBitmap* GlobalResources::bitmapDeleteLeft = 0; -wxBitmap* GlobalResources::bitmapDeleteRight = 0; -wxBitmap* GlobalResources::bitmapEmail = 0; -wxBitmap* GlobalResources::bitmapAbout = 0; -wxBitmap* GlobalResources::bitmapWebsite = 0; -wxBitmap* GlobalResources::bitmapExit = 0; -wxBitmap* GlobalResources::bitmapSync = 0; -wxBitmap* GlobalResources::bitmapCompare = 0; -wxBitmap* GlobalResources::bitmapSyncDisabled = 0; -wxBitmap* GlobalResources::bitmapSwap = 0; -wxBitmap* GlobalResources::bitmapHelp = 0; -wxBitmap* GlobalResources::bitmapLeftOnly = 0; -wxBitmap* GlobalResources::bitmapLeftNewer = 0; -wxBitmap* GlobalResources::bitmapDifferent = 0; -wxBitmap* GlobalResources::bitmapRightNewer = 0; -wxBitmap* GlobalResources::bitmapRightOnly = 0; -wxBitmap* GlobalResources::bitmapLeftOnlyDeact = 0; -wxBitmap* GlobalResources::bitmapLeftNewerDeact = 0; -wxBitmap* GlobalResources::bitmapDifferentDeact = 0; -wxBitmap* GlobalResources::bitmapRightNewerDeact = 0; -wxBitmap* GlobalResources::bitmapRightOnlyDeact = 0; -wxBitmap* GlobalResources::bitmapEqual = 0; -wxBitmap* GlobalResources::bitmapEqualDeact = 0; -wxBitmap* GlobalResources::bitmapInclude = 0; -wxBitmap* GlobalResources::bitmapExclude = 0; -wxBitmap* GlobalResources::bitmapFilterOn = 0; -wxBitmap* GlobalResources::bitmapFilterOff = 0; -wxBitmap* GlobalResources::bitmapWarning = 0; -wxBitmap* GlobalResources::bitmapSmallUp = 0; -wxBitmap* GlobalResources::bitmapSmallDown = 0; -wxBitmap* GlobalResources::bitmapSave = 0; -wxBitmap* GlobalResources::bitmapFFS = 0; -wxBitmap* GlobalResources::bitmapDeleteFile = 0; -wxBitmap* GlobalResources::bitmapGPL = 0; -wxBitmap* GlobalResources::bitmapStatusPause = 0; -wxBitmap* GlobalResources::bitmapStatusError = 0; -wxBitmap* GlobalResources::bitmapStatusSuccess = 0; -wxBitmap* GlobalResources::bitmapStatusWarning = 0; -wxBitmap* GlobalResources::bitmapStatusScanning = 0; -wxBitmap* GlobalResources::bitmapStatusComparing = 0; -wxBitmap* GlobalResources::bitmapStatusSyncing = 0; -wxBitmap* GlobalResources::bitmapLogo = 0; -wxBitmap* GlobalResources::bitmapFinished = 0; -wxBitmap* GlobalResources::bitmapStatusEdge = 0; +GlobalResources::~GlobalResources() +{ + //free bitmap resources + for (map<wxString, wxBitmap*>::iterator i = bitmapResource.begin(); i != bitmapResource.end(); ++i) + delete i->second; -wxAnimation* GlobalResources::animationMoney = 0; -wxAnimation* GlobalResources::animationSync = 0; -wxIcon* GlobalResources::programIcon = 0; + //free other resources + delete animationMoney; + delete animationSync; + delete programIcon; +} -void GlobalResources::loadResourceFiles() +void GlobalResources::load() { - //map, allocate and initialize pictures - bitmapResource[wxT("left arrow.png")] = (bitmapArrowLeft = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("right arrow.png")] = (bitmapArrowRight = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("left arrow create.png")] = (bitmapArrowLeftCr = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("right arrow create.png")]= (bitmapArrowRightCr = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("no arrow.png")] = (bitmapArrowNone = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("start sync.png")] = (bitmapStartSync = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("start sync dis.png")] = (bitmapStartSyncDis = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("left delete.png")] = (bitmapDeleteLeft = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("right delete.png")] = (bitmapDeleteRight = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("email.png")] = (bitmapEmail = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("about.png")] = (bitmapAbout = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("website.png")] = (bitmapWebsite = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("exit.png")] = (bitmapExit = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("sync.png")] = (bitmapSync = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("compare.png")] = (bitmapCompare = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("sync disabled.png")] = (bitmapSyncDisabled = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("swap.png")] = (bitmapSwap = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("help.png")] = (bitmapHelp = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("leftOnly.png")] = (bitmapLeftOnly = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("leftNewer.png")] = (bitmapLeftNewer = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("different.png")] = (bitmapDifferent = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("rightNewer.png")] = (bitmapRightNewer = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("rightOnly.png")] = (bitmapRightOnly = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("leftOnlyDeact.png")] = (bitmapLeftOnlyDeact = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("leftNewerDeact.png")] = (bitmapLeftNewerDeact = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("differentDeact.png")] = (bitmapDifferentDeact = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("rightNewerDeact.png")] = (bitmapRightNewerDeact = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("rightOnlyDeact.png")] = (bitmapRightOnlyDeact = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("equal.png")] = (bitmapEqual = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("equalDeact.png")] = (bitmapEqualDeact = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("include.png")] = (bitmapInclude = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("exclude.png")] = (bitmapExclude = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("filter active.png")] = (bitmapFilterOn = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("filter not active.png")] = (bitmapFilterOff = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("warning.png")] = (bitmapWarning = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("small arrow up.png"]) = (bitmapSmallUp = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("small arrow down.png")] = (bitmapSmallDown = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("save.png")] = (bitmapSave = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("FFS.png")] = (bitmapFFS = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("deleteFile.png")] = (bitmapDeleteFile = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("gpl.png")] = (bitmapGPL = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusPause.png")] = (bitmapStatusPause = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusError.png")] = (bitmapStatusError = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusSuccess.png")] = (bitmapStatusSuccess = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusWarning.png")] = (bitmapStatusWarning = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusScanning.png")] = (bitmapStatusScanning = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusComparing.png")] = (bitmapStatusComparing = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusSyncing.png")] = (bitmapStatusSyncing = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("logo.png")] = (bitmapLogo = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("finished.png")] = (bitmapFinished = new wxBitmap(wxNullBitmap)); - bitmapResource[wxT("statusEdge.png")] = (bitmapStatusEdge = new wxBitmap(wxNullBitmap)); - wxFileInputStream input(wxT("Resources.dat")); - if (!input.IsOk()) throw RuntimeException(_("Unable to load Resources.dat!")); + if (input.IsOk()) //if not... we don't want to react too harsh here + { + //activate support for .png files + wxImage::AddHandler(new wxPNGHandler); - wxZipInputStream resourceFile(input); + wxZipInputStream resourceFile(input); - wxZipEntry* entry; - map<wxString, wxBitmap*>::iterator bmp; - while ((entry = resourceFile.GetNextEntry())) - { - wxString name = entry->GetName(); + wxZipEntry* entry; + map<wxString, wxBitmap*>::iterator bmp; + while ((entry = resourceFile.GetNextEntry())) + { + wxString name = entry->GetName(); - //just to be sure: search if entry is available in map - if ((bmp = bitmapResource.find(name)) != bitmapResource.end()) - *(bmp->second) = wxBitmap(wxImage(resourceFile, wxBITMAP_TYPE_PNG)); + //just to be sure: search if entry is available in map + if ((bmp = bitmapResource.find(name)) != bitmapResource.end()) + *(bmp->second) = wxBitmap(wxImage(resourceFile, wxBITMAP_TYPE_PNG)); + } } - //load all the other resource files - animationMoney = new wxAnimation(wxNullAnimation); - animationSync = new wxAnimation(wxNullAnimation); - animationMoney->LoadFile(wxT("Resources.a01")); animationSync->LoadFile(wxT("Resources.a02")); @@ -175,16 +129,3 @@ void GlobalResources::loadResourceFiles() programIcon = new wxIcon(FreeFileSync_xpm); #endif } - - -void GlobalResources::unloadResourceFiles() -{ - //free bitmap resources - for (map<wxString, wxBitmap*>::iterator i = bitmapResource.begin(); i != bitmapResource.end(); ++i) - delete i->second; - - //free other resources - delete animationMoney; - delete animationSync; - delete programIcon; -} diff --git a/library/resources.h b/library/resources.h index 5f97e582..711c6038 100644 --- a/library/resources.h +++ b/library/resources.h @@ -11,89 +11,85 @@ using namespace std; class GlobalResources { public: - static void loadResourceFiles(); - static void unloadResourceFiles(); + GlobalResources(); + ~GlobalResources(); - static wxChar fileNameSeparator; + void load(); + + static const wxChar fileNameSeparator; //language dependent global variables: need to be initialized by CustomLocale on program startup and language switch static const wxChar* decimalPoint; static const wxChar* thousandsSeparator; - //command line parameters - static const wxChar* paramCompare; - static const wxChar* paramSync; - static const wxChar* paramInclude; - static const wxChar* paramExclude; - static const wxChar* paramContinueError; - static const wxChar* paramRecycler; - static const wxChar* paramSilent; - - static const wxChar* valueSizeDate; - static const wxChar* valueContent; - //image resource objects - static wxBitmap* bitmapArrowLeft; - static wxBitmap* bitmapArrowRight; - static wxBitmap* bitmapArrowLeftCr; - static wxBitmap* bitmapArrowRightCr; - static wxBitmap* bitmapArrowNone; - static wxBitmap* bitmapStartSync; - static wxBitmap* bitmapStartSyncDis; - static wxBitmap* bitmapDeleteLeft; - static wxBitmap* bitmapDeleteRight; - static wxBitmap* bitmapEmail; - static wxBitmap* bitmapAbout; - static wxBitmap* bitmapWebsite; - static wxBitmap* bitmapExit; - static wxBitmap* bitmapSync; - static wxBitmap* bitmapCompare; - static wxBitmap* bitmapSyncDisabled; - static wxBitmap* bitmapSwap; - static wxBitmap* bitmapHelp; - static wxBitmap* bitmapLeftOnly; - static wxBitmap* bitmapLeftNewer; - static wxBitmap* bitmapDifferent; - static wxBitmap* bitmapRightNewer; - static wxBitmap* bitmapRightOnly; - static wxBitmap* bitmapLeftOnlyDeact; - static wxBitmap* bitmapLeftNewerDeact; - static wxBitmap* bitmapDifferentDeact; - static wxBitmap* bitmapRightNewerDeact; - static wxBitmap* bitmapRightOnlyDeact; - static wxBitmap* bitmapEqual; - static wxBitmap* bitmapEqualDeact; - static wxBitmap* bitmapInclude; - static wxBitmap* bitmapExclude; - static wxBitmap* bitmapFilterOn; - static wxBitmap* bitmapFilterOff; - static wxBitmap* bitmapWarning; - static wxBitmap* bitmapSmallUp; - static wxBitmap* bitmapSmallDown; - static wxBitmap* bitmapSave; - static wxBitmap* bitmapFFS; - static wxBitmap* bitmapDeleteFile; - static wxBitmap* bitmapGPL; - static wxBitmap* bitmapStatusPause; - static wxBitmap* bitmapStatusError; - static wxBitmap* bitmapStatusSuccess; - static wxBitmap* bitmapStatusWarning; - static wxBitmap* bitmapStatusScanning; - static wxBitmap* bitmapStatusComparing; - static wxBitmap* bitmapStatusSyncing; - static wxBitmap* bitmapLogo; - static wxBitmap* bitmapFinished; - static wxBitmap* bitmapStatusEdge; + wxBitmap* bitmapArrowLeft; + wxBitmap* bitmapArrowRight; + wxBitmap* bitmapArrowLeftCr; + wxBitmap* bitmapArrowRightCr; + wxBitmap* bitmapArrowNone; + wxBitmap* bitmapStartSync; + wxBitmap* bitmapStartSyncDis; + wxBitmap* bitmapDeleteLeft; + wxBitmap* bitmapDeleteRight; + wxBitmap* bitmapEmail; + wxBitmap* bitmapAbout; + wxBitmap* bitmapWebsite; + wxBitmap* bitmapExit; + wxBitmap* bitmapSync; + wxBitmap* bitmapCompare; + wxBitmap* bitmapSyncDisabled; + wxBitmap* bitmapSwap; + wxBitmap* bitmapHelp; + wxBitmap* bitmapLeftOnly; + wxBitmap* bitmapLeftNewer; + wxBitmap* bitmapDifferent; + wxBitmap* bitmapRightNewer; + wxBitmap* bitmapRightOnly; + wxBitmap* bitmapLeftOnlyDeact; + wxBitmap* bitmapLeftNewerDeact; + wxBitmap* bitmapDifferentDeact; + wxBitmap* bitmapRightNewerDeact; + wxBitmap* bitmapRightOnlyDeact; + wxBitmap* bitmapEqual; + wxBitmap* bitmapEqualDeact; + wxBitmap* bitmapInclude; + wxBitmap* bitmapExclude; + wxBitmap* bitmapFilterOn; + wxBitmap* bitmapFilterOff; + wxBitmap* bitmapWarning; + wxBitmap* bitmapSmallUp; + wxBitmap* bitmapSmallDown; + wxBitmap* bitmapSave; + wxBitmap* bitmapFFS; + wxBitmap* bitmapDeleteFile; + wxBitmap* bitmapGPL; + wxBitmap* bitmapStatusPause; + wxBitmap* bitmapStatusError; + wxBitmap* bitmapStatusSuccess; + wxBitmap* bitmapStatusWarning; + wxBitmap* bitmapStatusScanning; + wxBitmap* bitmapStatusComparing; + wxBitmap* bitmapStatusSyncing; + wxBitmap* bitmapLogo; + wxBitmap* bitmapFinished; + wxBitmap* bitmapStatusEdge; + wxBitmap* bitmapAddFolderPair; + wxBitmap* bitmapRemoveFolderPair; + wxBitmap* bitmapRemoveFolderPairD; + wxBitmap* bitmapLink; - static wxAnimation* animationMoney; - static wxAnimation* animationSync; + wxAnimation* animationMoney; + wxAnimation* animationSync; - static wxIcon* programIcon; + wxIcon* programIcon; private: //resource mapping - static map<wxString, wxBitmap*> bitmapResource; + map<wxString, wxBitmap*> bitmapResource; }; +extern GlobalResources globalResource; //loads bitmap resources on program startup + #endif // RESOURCES_H_INCLUDED diff --git a/ui/MainDialog.cpp b/ui/MainDialog.cpp index 94ad4708..47926383 100644 --- a/ui/MainDialog.cpp +++ b/ui/MainDialog.cpp @@ -15,10 +15,11 @@ #include <wx/file.h> #include "../library/customGrid.h" #include <algorithm> -#include "../library/tinyxml/tinyxml.h" +#include "../library/processXml.h" #include <wx/msgdlg.h> using namespace globalFunctions; +using namespace xmlAccess; int leadingPanel = 0; @@ -48,7 +49,6 @@ MainDialog::MainDialog(wxFrame* frame, const wxString& cfgFileName, CustomLocale //initialize and load configuration readConfigurationFromXml(cfgFileName, true); - //readConfigurationFromHD(cfgFileName, true); leftOnlyFilesActive = true; leftNewerFilesActive = true; @@ -59,29 +59,23 @@ MainDialog::MainDialog(wxFrame* frame, const wxString& cfgFileName, CustomLocale updateViewFilterButtons(); //set icons for this dialog - m_bpButton10->SetBitmapLabel(*GlobalResources::bitmapExit); - m_bpButtonCompare->SetBitmapLabel(*GlobalResources::bitmapCompare); - m_bpButtonSync->SetBitmapLabel(*GlobalResources::bitmapSync); - m_bpButtonSwap->SetBitmapLabel(*GlobalResources::bitmapSwap); - m_bpButton14->SetBitmapLabel(*GlobalResources::bitmapHelp); - m_bpButton201->SetBitmapLabel(*GlobalResources::bitmapSave); - m_bitmap15->SetBitmap(*GlobalResources::bitmapStatusEdge); + m_bpButton10->SetBitmapLabel(*globalResource.bitmapExit); + m_bpButtonCompare->SetBitmapLabel(*globalResource.bitmapCompare); + m_bpButtonSync->SetBitmapLabel(*globalResource.bitmapSync); + m_bpButtonSwap->SetBitmapLabel(*globalResource.bitmapSwap); + m_bpButton14->SetBitmapLabel(*globalResource.bitmapHelp); + m_bpButton201->SetBitmapLabel(*globalResource.bitmapSave); + m_bpButtonAddPair->SetBitmapLabel(*globalResource.bitmapAddFolderPair); + m_bpButtonRemovePair->SetBitmapLabel(*globalResource.bitmapRemoveFolderPair); + m_bpButtonRemovePair->SetBitmapDisabled(*globalResource.bitmapRemoveFolderPairD); + m_bitmap15->SetBitmap(*globalResource.bitmapStatusEdge); //prepare drag & drop - m_panel1->SetDropTarget(new FileDropEvent(this, 1)); - m_panel2->SetDropTarget(new FileDropEvent(this, 2)); + m_panel1->SetDropTarget(new FileDropEvent(this, m_panel1)); + m_panel2->SetDropTarget(new FileDropEvent(this, m_panel2)); - //create a right-click context menu + //initialize right-click context menu; will be dynamically re-created on each R-mouse-click contextMenu = new wxMenu; - contextMenu->Append(CONTEXT_MANUAL_FILTER, _("Filter manually")); - contextMenu->Append(CONTEXT_CLIPBOARD, _("Copy to clipboard\tCTRL+C")); -#ifdef FFS_WIN - contextMenu->Append(CONTEXT_EXPLORER, _("Open with Explorer\tD-Click")); -#endif - contextMenu->AppendSeparator(); - contextMenu->Append(CONTEXT_DELETE_FILES, _("Delete files\tDEL")); - - contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::onContextMenuSelection), NULL, this); //support for CTRL + C and DEL m_grid1->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid1ButtonEvent), NULL, this); @@ -196,16 +190,20 @@ MainDialog::MainDialog(wxFrame* frame, const wxString& cfgFileName, CustomLocale m_menuItemEnglish->Check(); } - //create the compare status panel + //create the compare status panel in hidden state compareStatus = new CompareStatus(this); bSizer1->Insert(1, compareStatus, 0, wxEXPAND | wxBOTTOM, 5 ); - Layout(); //avoid screen flicker when panel is shown + Layout(); //avoid screen flicker when panel is shown later compareStatus->Hide(); //correct height of middle grid wxSize dirPickersize = sbSizer2->GetSize(); wxSize swapButtonsize = bSizer69->GetSize(); bSizer18->Insert(1, 0, dirPickersize.GetY() - swapButtonsize.GetY(), 0); + + //adjust folder pair buttons + if (additionalFolderPairs.size() <= 0) + m_bpButtonRemovePair->Disable(); } @@ -218,47 +216,7 @@ MainDialog::~MainDialog() m_grid1->setSortMarker(-1); m_grid2->setSortMarker(-1); - m_grid1->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid1ButtonEvent), NULL, this); - m_grid2->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid2ButtonEvent), NULL, this); - m_grid3->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGrid3ButtonEvent), NULL, this); - - m_grid1->Disconnect(wxEVT_KEY_DOWN, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_TOP, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_BOTTOM, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_LINEUP, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_LINEDOWN, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_PAGEUP, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_PAGEDOWN, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_THUMBTRACK, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_SCROLLWIN_THUMBRELEASE, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->Disconnect(wxEVT_GRID_LABEL_LEFT_CLICK, wxEventHandler(MainDialog::onGrid1access), NULL, this); - m_grid1->GetGridWindow()->Disconnect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::onGrid1access), NULL, this); - - m_grid2->Disconnect(wxEVT_KEY_DOWN, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_TOP, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_BOTTOM, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_LINEUP, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_LINEDOWN, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_PAGEUP, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_PAGEDOWN, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_THUMBTRACK, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_SCROLLWIN_THUMBRELEASE, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->Disconnect(wxEVT_GRID_LABEL_LEFT_CLICK, wxEventHandler(MainDialog::onGrid2access), NULL, this); - m_grid2->GetGridWindow()->Disconnect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::onGrid2access), NULL, this); - - m_grid3->Disconnect(wxEVT_KEY_DOWN, wxEventHandler(MainDialog::onGrid3access), NULL, this); - m_grid3->Disconnect(wxEVT_SCROLLWIN_LINEUP, wxEventHandler(MainDialog::onGrid3access), NULL, this); - m_grid3->Disconnect(wxEVT_SCROLLWIN_LINEDOWN, wxEventHandler(MainDialog::onGrid3access), NULL, this); - m_grid3->GetGridWindow()->Disconnect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::onGrid3access), NULL, this); - - Disconnect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleEvent), NULL, this); - m_grid3->GetGridWindow()->Disconnect(wxEVT_LEFT_UP, wxEventHandler(MainDialog::OnGrid3LeftMouseUp), NULL, this); - m_grid3->GetGridWindow()->Disconnect(wxEVT_LEFT_DOWN, wxEventHandler(MainDialog::OnGrid3LeftMouseDown), NULL, this); - - Disconnect(wxEVT_SIZE, wxEventHandler(MainDialog::onResizeMainWindow), NULL, this); - Disconnect(wxEVT_MOVE, wxEventHandler(MainDialog::onResizeMainWindow), NULL, this); - - contextMenu->Disconnect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::onContextMenuSelection), NULL, this); + //no need for event disconnect here; done automatically delete contextMenu; @@ -280,12 +238,11 @@ MainDialog::~MainDialog() //save configuration writeConfigurationToXml(FreeFileSync::FfsLastConfigFile); //don't trow exceptions in destructors - //writeConfigurationToHD(FreeFileSync::FfsLastConfigFile); if (restartOnExit) //this is needed so that restart happens AFTER configuration was written! { //create new dialog MainDialog* frame = new MainDialog(NULL, FreeFileSync::FfsLastConfigFile, programLanguage); - frame->SetIcon(*GlobalResources::programIcon); //set application icon + frame->SetIcon(*globalResource.programIcon); //set application icon frame->Show(); } } @@ -334,17 +291,17 @@ void MainDialog::enableSynchronization(bool value) if (value) { synchronizationEnabled = true; - m_bpButtonSync->SetBitmapLabel(*GlobalResources::bitmapSync); + m_bpButtonSync->SetBitmapLabel(*globalResource.bitmapSync); } else { synchronizationEnabled = false; - m_bpButtonSync->SetBitmapLabel(*GlobalResources::bitmapSyncDisabled); + m_bpButtonSync->SetBitmapLabel(*globalResource.bitmapSyncDisabled); } } -void MainDialog::filterRangeManual(const set<int>& rowsToFilterOnUI_View) +void MainDialog::filterRangeTemp(const set<int>& rowsToFilterOnUI_View) { if (rowsToFilterOnUI_View.size() > 0) { @@ -357,7 +314,7 @@ void MainDialog::filterRangeManual(const set<int>& rowsToFilterOnUI_View) if (0 <= leadingRow && leadingRow < gridSizeUI) newSelection = !currentGridData[gridRefUI[leadingRow]].selectedForSynchronization; - if (cfg.hideFiltered) + if (hideFilteredElements) assert (!newSelection); //if hidefiltered is active, there should be no filtered elements on screen => current element was filtered out @@ -384,7 +341,7 @@ void MainDialog::filterRangeManual(const set<int>& rowsToFilterOnUI_View) m_grid2->ForceRefresh(); m_grid3->ForceRefresh(); - if (cfg.hideFiltered) + if (hideFilteredElements) { Update(); //show changes resulting from ForceRefresh() @@ -414,7 +371,7 @@ void MainDialog::filterRangeManual(const set<int>& rowsToFilterOnUI_View) } //clear selection on grids - if (cfg.hideFiltered) + if (hideFilteredElements) { m_grid1->ClearSelection(); m_grid2->ClearSelection(); @@ -463,7 +420,7 @@ void MainDialog::OnIdleEvent(wxEvent& event) { //a mouse up event, but no mouse down! (e.g. when window is maximized and cursor is on grid3) filteringInitialized = false; - filterRangeManual(getSelectedRows()); + filterRangeTemp(getSelectedRows()); } } @@ -742,7 +699,7 @@ void MainDialog::openWithFileBrowser(int rowNumber, int gridNr) #ifdef FFS_WIN if (gridNr == 1) { - wxString command = wxString(wxT("explorer ")) + FreeFileSync::getFormattedDirectoryName(m_directoryPanel1->GetValue()); //default + wxString command = wxString(wxT("explorer ")) + FreeFileSync::getFormattedDirectoryName(m_directoryLeft->GetValue()); //default if (0 <= rowNumber && rowNumber < int(gridRefUI.size())) { @@ -755,7 +712,7 @@ void MainDialog::openWithFileBrowser(int rowNumber, int gridNr) } else if (gridNr == 2) { - wxString command = wxString(wxT("explorer ")) + FreeFileSync::getFormattedDirectoryName(m_directoryPanel2->GetValue()); //default + wxString command = wxString(wxT("explorer ")) + FreeFileSync::getFormattedDirectoryName(m_directoryRight->GetValue()); //default if (0 <= rowNumber && rowNumber < int(gridRefUI.size())) { @@ -820,7 +777,7 @@ void MainDialog::onResizeMainWindow(wxEvent& event) void MainDialog::onGrid1ButtonEvent(wxKeyEvent& event) { //CTRL + C || CTRL + INS - if (event.ControlDown() && event.GetKeyCode() == 67 || + if ( event.ControlDown() && event.GetKeyCode() == 67 || event.ControlDown() && event.GetKeyCode() == WXK_INSERT) copySelectionToClipboard(getSelectedRows(), 1); @@ -834,7 +791,7 @@ void MainDialog::onGrid1ButtonEvent(wxKeyEvent& event) void MainDialog::onGrid2ButtonEvent(wxKeyEvent& event) { //CTRL + C || CTRL + INS - if (event.ControlDown() && event.GetKeyCode() == 67 || + if ( event.ControlDown() && event.GetKeyCode() == 67 || event.ControlDown() && event.GetKeyCode() == WXK_INSERT) copySelectionToClipboard(getSelectedRows(), 2); @@ -848,7 +805,7 @@ void MainDialog::onGrid2ButtonEvent(wxKeyEvent& event) void MainDialog::onGrid3ButtonEvent(wxKeyEvent& event) { //CTRL + C || CTRL + INS - if (event.ControlDown() && event.GetKeyCode() == 67 || + if ( event.ControlDown() && event.GetKeyCode() == 67 || event.ControlDown() && event.GetKeyCode() == WXK_INSERT) copySelectionToClipboard(getSelectedRows(), 3); @@ -859,20 +816,115 @@ void MainDialog::onGrid3ButtonEvent(wxKeyEvent& event) } -void MainDialog::OnOpenContextMenu( wxGridEvent& event ) +inline +wxString getFilename(const FileDescrLine* fileDescr) +{ + if (!fileDescr || fileDescr->objType != TYPE_FILE) + return wxEmptyString; + else + return fileDescr->relFilename.AfterLast(GlobalResources::fileNameSeparator); +} + + +inline +wxString getFileExtension(const FileDescrLine* fileDescr) +{ + if (!fileDescr || fileDescr->objType != TYPE_FILE) + return wxEmptyString; + else + { + wxString filename = getFilename(fileDescr); + + if (filename.Find(wxChar('.')) != wxNOT_FOUND) //be careful: AfterLast will return the whole string if '.' is not found! + return filename.AfterLast(wxChar('.')); + else + return wxEmptyString; + } +} + + +inline +wxString getDirname(const FileDescrLine* fileDescr) +{ + if (!fileDescr || fileDescr->objType != TYPE_DIRECTORY) + return wxEmptyString; + else + return fileDescr->filename.AfterLast(GlobalResources::fileNameSeparator); +} + + +inline +wxString getRelativeName(const FileDescrLine* fileDescr) +{ + if (!fileDescr || fileDescr->objType == TYPE_NOTHING) + return wxEmptyString; + else + return fileDescr->relFilename; +} + + +void MainDialog::OnOpenContextMenu(wxGridEvent& event) { set<int> selection = getSelectedRows(); - //enable/disable context menu entries +//####################################################### +//re-create context menu + delete contextMenu; + contextMenu = new wxMenu; + + //dynamic filter determination if (selection.size() > 0) { - contextMenu->Enable(CONTEXT_MANUAL_FILTER, true); + const FileCompareLine& cmpLine = currentGridData[gridRefUI[*selection.begin()]]; + + if (cmpLine.selectedForSynchronization) + contextMenu->Append(CONTEXT_FILTER_TEMP, _("Exclude temporarily")); + else + contextMenu->Append(CONTEXT_FILTER_TEMP, _("Include temporarily")); + + + const FileDescrLine* fileDescr = NULL; + if (leadingPanel == 1) + fileDescr = &cmpLine.fileDescrLeft; + else if (leadingPanel == 2) + fileDescr = &cmpLine.fileDescrRight; + + exFilterCandidateExtension = getFileExtension(fileDescr); //avoid re-determination in onContextMenuSelection() + if (!exFilterCandidateExtension.IsEmpty()) + contextMenu->Append(CONTEXT_EXCLUDE_EXT, wxString(_("Add to exclude filter: ")) + wxT("*.") + exFilterCandidateExtension); + + exFilterCandidateFilename = getFilename(fileDescr); + if (!exFilterCandidateFilename.IsEmpty()) + contextMenu->Append(CONTEXT_EXCLUDE_FILE, wxString(_("Add to exclude filter: ")) + exFilterCandidateFilename); + + exFilterCandidateDirname = getDirname(fileDescr); + if (!exFilterCandidateDirname.IsEmpty()) + contextMenu->Append(CONTEXT_EXCLUDE_DIR, wxString(_("Add to exclude filter: ")) + exFilterCandidateDirname); + } + else + contextMenu->Append(CONTEXT_FILTER_TEMP, _("Exclude temporarily")); //this element should always be visible + + contextMenu->AppendSeparator(); + contextMenu->Append(CONTEXT_CLIPBOARD, _("Copy to clipboard\tCTRL+C")); +#ifdef FFS_WIN + contextMenu->Append(CONTEXT_EXPLORER, _("Open with Explorer\tD-Click")); +#endif + contextMenu->AppendSeparator(); + contextMenu->Append(CONTEXT_DELETE_FILES, _("Delete files\tDEL")); + + contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::onContextMenuSelection), NULL, this); + +//####################################################### +//enable/disable context menu entries + if (selection.size() > 0) + { + contextMenu->Enable(CONTEXT_FILTER_TEMP, true); contextMenu->Enable(CONTEXT_CLIPBOARD, true); contextMenu->Enable(CONTEXT_DELETE_FILES, true); } else { - contextMenu->Enable(CONTEXT_MANUAL_FILTER, false); + contextMenu->Enable(CONTEXT_FILTER_TEMP, false); contextMenu->Enable(CONTEXT_CLIPBOARD, false); contextMenu->Enable(CONTEXT_DELETE_FILES, false); } @@ -884,7 +936,7 @@ void MainDialog::OnOpenContextMenu( wxGridEvent& event ) contextMenu->Enable(CONTEXT_EXPLORER, false); #endif - //show context menu +//show context menu PopupMenu(contextMenu); event.Skip(); } @@ -892,21 +944,68 @@ void MainDialog::OnOpenContextMenu( wxGridEvent& event ) void MainDialog::onContextMenuSelection(wxCommandEvent& event) { - set<int> selection; + set<int> selection = getSelectedRows(); - switch (event.GetId()) + int eventId = event.GetId(); + if (eventId == CONTEXT_FILTER_TEMP) { - case CONTEXT_MANUAL_FILTER: - filterRangeManual(getSelectedRows()); - break; + filterRangeTemp(selection); + } + else if (eventId == CONTEXT_EXCLUDE_EXT) + { + if (!exFilterCandidateExtension.IsEmpty()) + { + if (!cfg.excludeFilter.IsEmpty() && !cfg.excludeFilter.EndsWith(wxT(";"))) + cfg.excludeFilter+= wxT("\n"); - case CONTEXT_CLIPBOARD: - copySelectionToClipboard(getSelectedRows(), leadingPanel); - break; + cfg.excludeFilter+= wxString(wxT("*.")) + exFilterCandidateExtension + wxT(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line + + cfg.filterIsActive = true; + updateFilterButton(m_bpButtonFilter, cfg.filterIsActive); + + FreeFileSync::filterCurrentGridData(currentGridData, cfg.includeFilter, cfg.excludeFilter); + writeGrid(currentGridData); + } + } + else if (eventId == CONTEXT_EXCLUDE_FILE) + { + if (!exFilterCandidateFilename.IsEmpty()) + { + if (!cfg.excludeFilter.IsEmpty() && !cfg.excludeFilter.EndsWith(wxT("\n"))) + cfg.excludeFilter+= wxT("\n"); + + cfg.excludeFilter+= wxString(wxT("*")) + GlobalResources::fileNameSeparator + exFilterCandidateFilename; + + cfg.filterIsActive = true; + updateFilterButton(m_bpButtonFilter, cfg.filterIsActive); - case CONTEXT_EXPLORER: - selection = getSelectedRows(); + FreeFileSync::filterCurrentGridData(currentGridData, cfg.includeFilter, cfg.excludeFilter); + writeGrid(currentGridData); + } + } + else if (eventId == CONTEXT_EXCLUDE_DIR) + { + if (!exFilterCandidateDirname.IsEmpty()) + { + if (!cfg.excludeFilter.IsEmpty() && !cfg.excludeFilter.EndsWith(wxT("\n"))) + cfg.excludeFilter+= wxT("\n"); + + cfg.excludeFilter+= wxString(wxT("*")) + GlobalResources::fileNameSeparator + exFilterCandidateDirname + wxT("\n"); + cfg.excludeFilter+= wxString(wxT("*")) + GlobalResources::fileNameSeparator + exFilterCandidateDirname + GlobalResources::fileNameSeparator + wxT("*"); + + cfg.filterIsActive = true; + updateFilterButton(m_bpButtonFilter, cfg.filterIsActive); + FreeFileSync::filterCurrentGridData(currentGridData, cfg.includeFilter, cfg.excludeFilter); + writeGrid(currentGridData); + } + } + else if (eventId == CONTEXT_CLIPBOARD) + { + copySelectionToClipboard(selection, leadingPanel); + } + else if (eventId == CONTEXT_EXPLORER) + { if (leadingPanel == 1 || leadingPanel == 2) { if (selection.size() == 1) @@ -914,59 +1013,78 @@ void MainDialog::onContextMenuSelection(wxCommandEvent& event) else if (selection.size() == 0) openWithFileBrowser(-1, leadingPanel); } - break; - - case CONTEXT_DELETE_FILES: - deleteFilesOnGrid(getSelectedRows()); - break; + } + else if (eventId == CONTEXT_DELETE_FILES) + { + deleteFilesOnGrid(selection); } event.Skip(); } -void MainDialog::OnEnterLeftDir( wxCommandEvent& event ) -{ - wxString newDir = FreeFileSync::getFormattedDirectoryName(m_directoryPanel1->GetValue()); - if (wxDirExists(newDir)) - m_dirPicker1->SetPath(newDir); - - event.Skip(); -} - - -void MainDialog::OnEnterRightDir( wxCommandEvent& event ) +void MainDialog::OnWriteDirManually(wxCommandEvent& event) { - wxString newDir = FreeFileSync::getFormattedDirectoryName(m_directoryPanel2->GetValue()); + wxString newDir = FreeFileSync::getFormattedDirectoryName(event.GetString()); if (wxDirExists(newDir)) - m_dirPicker2->SetPath(newDir); - - event.Skip(); -} - - -void MainDialog::OnDirChangedPanel1(wxFileDirPickerEvent& event) -{ - wxString newPath = m_dirPicker1->GetPath(); - - m_directoryPanel1->SetValue(newPath); - - //disable the sync button - enableSynchronization(false); - - //clear grids - currentGridData.clear(); - writeGrid(currentGridData); + { + wxObject* eventObj = event.GetEventObject(); + //first check if event comes from main folder pair + if (eventObj == (wxObject*)m_directoryLeft) + m_dirPicker1->SetPath(newDir); + else if (eventObj == (wxObject*)m_directoryRight) + m_dirPicker2->SetPath(newDir); + else + { + //check if event comes from additional pairs + for (vector<FolderPairGenerated*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + { + FolderPairGenerated* dirPair = *i; + if (eventObj == (wxObject*)(dirPair->m_directoryLeft)) + { + dirPair->m_dirPickerLeft->SetPath(newDir); + break; + } + else if (eventObj == (wxObject*)(dirPair->m_directoryRight)) + { + dirPair->m_dirPickerRight->SetPath(newDir); + break; + } + } + } + } event.Skip(); } -void MainDialog::OnDirChangedPanel2(wxFileDirPickerEvent& event) +void MainDialog::OnDirSelected(wxFileDirPickerEvent& event) { - wxString newPath = m_dirPicker2->GetPath(); + const wxString newPath = event.GetPath(); + wxObject* eventObj = event.GetEventObject(); - m_directoryPanel2->SetValue(newPath); + //first check if event comes from main folder pair + if (eventObj == (wxObject*)m_dirPicker1) + m_directoryLeft->SetValue(newPath); + else if (eventObj == (wxObject*)m_dirPicker2) + m_directoryRight->SetValue(newPath); + else //check if event comes from additional pairs + { + for (vector<FolderPairGenerated*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + { + FolderPairGenerated* dirPair = *i; + if (eventObj == (wxObject*)(dirPair->m_dirPickerLeft)) + { + dirPair->m_directoryLeft->SetValue(newPath); + break; + } + else if (eventObj == (wxObject*)(dirPair->m_dirPickerRight)) + { + dirPair->m_directoryRight->SetValue(newPath); + break; + } + } + } //disable the sync button enableSynchronization(false); @@ -982,7 +1100,7 @@ void MainDialog::OnDirChangedPanel2(wxFileDirPickerEvent& event) wxString getFormattedHistoryElement(const wxString& filename) { wxString output = wxFileName(filename).GetFullName(); - if (output.EndsWith(wxT(".ffs"))) + if (output.EndsWith(wxT(".ffs_gui"))) output = output.BeforeLast('.'); return output; } @@ -1068,9 +1186,7 @@ void onFilesDropped(const wxString& elementName, wxTextCtrl* txtCtrl, wxDirPicke bool FileDropEvent::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) { - if (filenames.IsEmpty()) - return false; - else + if (!filenames.IsEmpty()) { //disable the sync button mainDlg->enableSynchronization(false); @@ -1082,16 +1198,36 @@ bool FileDropEvent::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen const wxString droppedFileName = filenames[0]; //test if ffs config file has been dropped - if (FreeFileSync::isFfsConfigFile(droppedFileName)) + if (xmlAccess::getXmlType(droppedFileName) == XML_GUI_CONFIG) { - mainDlg->readConfigurationFromXml(droppedFileName); - mainDlg->pushStatusInformation(_("Configuration loaded!")); + if (mainDlg->readConfigurationFromXml(droppedFileName)) + mainDlg->pushStatusInformation(_("Configuration loaded!")); } - else if (targetGrid == 1) - onFilesDropped(droppedFileName, mainDlg->m_directoryPanel1, mainDlg->m_dirPicker1); - else if (targetGrid == 2) - onFilesDropped(droppedFileName, mainDlg->m_directoryPanel2, mainDlg->m_dirPicker2); + //test if main folder pair is drop target + else if (dropTarget == mainDlg->m_panel1) + onFilesDropped(droppedFileName, mainDlg->m_directoryLeft, mainDlg->m_dirPicker1); + + else if (dropTarget == mainDlg->m_panel2) + onFilesDropped(droppedFileName, mainDlg->m_directoryRight, mainDlg->m_dirPicker2); + + else //test if additional folder pairs are drop targets + { + for (vector<FolderPairGenerated*>::const_iterator i = mainDlg->additionalFolderPairs.begin(); i != mainDlg->additionalFolderPairs.end(); ++i) + { + FolderPairGenerated* dirPair = *i; + if (dropTarget == (dirPair->m_panelLeft)) + { + onFilesDropped(droppedFileName, dirPair->m_directoryLeft, dirPair->m_dirPickerLeft); + break; + } + else if (dropTarget == (dirPair->m_panelRight)) + { + onFilesDropped(droppedFileName, dirPair->m_directoryRight, dirPair->m_dirPickerRight); + break; + } + } + } } return false; } @@ -1099,9 +1235,9 @@ bool FileDropEvent::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen void MainDialog::OnSaveConfig(wxCommandEvent& event) { - wxString defaultFileName = wxT("SyncSettings.ffs"); + wxString defaultFileName = wxT("SyncSettings.ffs_gui"); - //try to use last selected configuration file as default + //try to use currently selected configuration file as default int selectedItem; if ((selectedItem = m_choiceLoad->GetSelection()) != wxNOT_FOUND) if (1 <= selectedItem && unsigned(selectedItem) < m_choiceLoad->GetCount()) @@ -1109,7 +1245,7 @@ void MainDialog::OnSaveConfig(wxCommandEvent& event) defaultFileName = cfgFileNames[selectedItem - 1]; - wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, defaultFileName, wxString(_("FreeFileSync configuration")) + wxT(" (*.ffs)|*.ffs"), wxFD_SAVE); + wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, defaultFileName, wxString(_("FreeFileSync configuration")) + wxT(" (*.ffs_gui)|*.ffs_gui"), wxFD_SAVE); if (filePicker->ShowModal() == wxID_OK) { @@ -1125,9 +1261,8 @@ void MainDialog::OnSaveConfig(wxCommandEvent& event) return; } } - writeConfigurationToXml(newFileName); - - pushStatusInformation(_("Configuration saved!")); + if (writeConfigurationToXml(newFileName)) + pushStatusInformation(_("Configuration saved!")); } } @@ -1147,7 +1282,7 @@ void MainDialog::OnLoadConfiguration(wxCommandEvent& event) switch (selectedItem) { case 0: //load config from file - filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, wxEmptyString, wxString(_("FreeFileSync configuration")) + wxT(" (*.ffs)|*.ffs"), wxFD_OPEN); + filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, wxEmptyString, wxString(_("FreeFileSync configuration")) + wxT(" (*.ffs_gui)|*.ffs_gui"), wxFD_OPEN); if (filePicker->ShowModal() == wxID_OK) newCfgFile = filePicker->GetPath(); @@ -1166,12 +1301,12 @@ void MainDialog::OnLoadConfiguration(wxCommandEvent& event) { if (!wxFileExists(newCfgFile)) wxMessageBox(_("The selected file does not exist anymore!"), _("Warning"), wxOK); - else if (!FreeFileSync::isFfsConfigFile(newCfgFile)) + else if (xmlAccess::getXmlType(newCfgFile) != XML_GUI_CONFIG) wxMessageBox(_("The selected file does not contain a valid configuration!"), _("Warning"), wxOK); else { - readConfigurationFromXml(newCfgFile); - pushStatusInformation(_("Configuration loaded!")); + if (readConfigurationFromXml(newCfgFile)) + pushStatusInformation(_("Configuration loaded!")); } } } @@ -1242,13 +1377,13 @@ void MainDialog::loadDefaultConfiguration() cfg.filterIsActive = false; //do not filter by default updateFilterButton(m_bpButtonFilter, cfg.filterIsActive); - //set status of "hide filtered items" checkbox - cfg.hideFiltered = false; //show filtered items - m_checkBoxHideFilt->SetValue(cfg.hideFiltered); - - cfg.useRecycleBin = FreeFileSync::recycleBinExists(); //set if OS supports it; else user will have to activate first and then get the error message + cfg.useRecycleBin = FreeFileSync::recycleBinExists(); //enable if OS supports it; else user will have to activate first and then get the error message cfg.continueOnError = false; + //set status of "hide filtered items" checkbox + hideFilteredElements = false; //show filtered items + m_checkBoxHideFilt->SetValue(hideFilteredElements); + widthNotMaximized = wxDefaultCoord; heightNotMaximized = wxDefaultCoord; posXNotMaximized = wxDefaultCoord; @@ -1256,558 +1391,134 @@ void MainDialog::loadDefaultConfiguration() } -inline -bool readXmlElementValue(string& output, const TiXmlElement* parent, const string& name) +bool MainDialog::readConfigurationFromXml(const wxString& filename, bool programStartup) { - if (parent) - { - const TiXmlElement* child = parent->FirstChildElement(name); - if (child) - { - const char* text = child->GetText(); - if (text) //may be NULL!! - output = text; - else - output.clear(); - return true; - } - } - - return false; -} - + //load XML + XmlInput inputFile(filename, XML_GUI_CONFIG); -inline -bool readXmlElementValue(int& output, const TiXmlElement* parent, const string& name) -{ - string temp; - if (readXmlElementValue(temp, parent, name)) - { - output = stringToInt(temp); - return true; - } - else + if (!inputFile.loadedSuccessfully()) + { //handle error: file load + if (programStartup) + loadDefaultConfiguration(); + else + wxMessageBox(wxString(_("Could not open configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); return false; -} - - -inline -bool readXmlElementValue(CompareVariant& output, const TiXmlElement* parent, const string& name) -{ - int dummy = 0; - if (readXmlElementValue(dummy, parent, name)) - { - output = CompareVariant(dummy); - return true; } - else - return false; -} - -inline -bool readXmlElementValue(SyncDirection& output, const TiXmlElement* parent, const string& name) -{ - int dummy = 0; - if (readXmlElementValue(dummy, parent, name)) + XmlMainConfig mainCfg; //structure to receive main settings + XmlGuiConfig guiCfg; //structure to receive gui settings + if ( inputFile.readXmlMainConfig(mainCfg) && //read main configuration settings + inputFile.readXmlGuiConfig(guiCfg)) //read GUI layout configuration { - output = SyncDirection(dummy); - return true; - } - else - return false; -} + //load main configuration into instance + cfg = mainCfg.cfg; + //update visible config on main window + updateCompareButtons(); + updateFilterButton(m_bpButtonFilter, cfg.filterIsActive); -inline -bool readXmlElementValue(bool& output, const TiXmlElement* parent, const string& name) -{ - int dummy = 0; - if (readXmlElementValue(dummy, parent, name)) - { - output = bool(dummy); - return true; - } - else - return false; -} + //read folder pairs, but first: clear existing pairs: + removeFolderPair(true); - -bool MainDialog::parseXmlData(TiXmlElement* root, bool programStartup) -{ - if (root && (root->ValueStr() == string("FreeFileSync"))) //check for FFS configuration xml - { - TiXmlHandle hRoot(root); - - TiXmlElement* cmpSettings = hRoot.FirstChild("settings").FirstChild("comparison").ToElement(); - TiXmlElement* syncConfig = hRoot.FirstChild("settings").FirstChild("synchronization").FirstChild("directions").ToElement(); - TiXmlElement* miscSettings = hRoot.FirstChild("settings").FirstChild("miscellaneous").ToElement(); - TiXmlElement* filter = TiXmlHandle(miscSettings).FirstChild("filter").ToElement(); - - if (cmpSettings && syncConfig && miscSettings && filter) + //set main folder pair + if (mainCfg.directoryPairs.size() > 0) { - string tempString; -//########################################################### - //read compare variant - if (!readXmlElementValue(cfg.compareVar, cmpSettings, "variant")) return false; - updateCompareButtons(); - - //read folder pair(s) - currently only one folderpair supported - TiXmlElement* folderPair = TiXmlHandle(cmpSettings).FirstChild("folders").FirstChild("pair").ToElement(); - if (!folderPair) return false; - - //read directories for comparison - if (!readXmlElementValue(tempString, folderPair, "left")) return false; - wxString leftDir = wxString::FromUTF8(tempString.c_str()); - m_directoryPanel1->SetValue(leftDir); - wxString leftDirFormatted = FreeFileSync::getFormattedDirectoryName(leftDir); + vector<FolderPair>::const_iterator i = mainCfg.directoryPairs.begin(); + + m_directoryLeft->SetValue(i->leftDirectory); + wxString leftDirFormatted = FreeFileSync::getFormattedDirectoryName(i->leftDirectory); if (wxDirExists(leftDirFormatted)) m_dirPicker1->SetPath(leftDirFormatted); - if (!readXmlElementValue(tempString, folderPair, "right")) return false; - wxString rightDir = wxString::FromUTF8(tempString.c_str()); - m_directoryPanel2->SetValue(rightDir); - wxString rightDirFormatted = FreeFileSync::getFormattedDirectoryName(rightDir); + m_directoryRight->SetValue(i->rightDirectory); + wxString rightDirFormatted = FreeFileSync::getFormattedDirectoryName(i->rightDirectory); if (wxDirExists(rightDirFormatted)) m_dirPicker2->SetPath(rightDirFormatted); -//########################################################### - //read sync configuration - if (!readXmlElementValue(cfg.syncConfiguration.exLeftSideOnly, syncConfig, "leftonly")) return false; - if (!readXmlElementValue(cfg.syncConfiguration.exRightSideOnly, syncConfig, "rightonly")) return false; - if (!readXmlElementValue(cfg.syncConfiguration.leftNewer, syncConfig, "leftnewer")) return false; - if (!readXmlElementValue(cfg.syncConfiguration.rightNewer, syncConfig, "rightnewer")) return false; - if (!readXmlElementValue(cfg.syncConfiguration.different, syncConfig, "different")) return false; -//########################################################### - //read filter settings - if (!readXmlElementValue(cfg.filterIsActive, filter, "active")) return false; - updateFilterButton(m_bpButtonFilter, cfg.filterIsActive); - - if (!readXmlElementValue(cfg.hideFiltered, filter, "hidefiltered")) return false; - m_checkBoxHideFilt->SetValue(cfg.hideFiltered); - - if (!readXmlElementValue(tempString, filter, "include")) return false; - cfg.includeFilter = wxString::FromUTF8(tempString.c_str()); - if (!readXmlElementValue(tempString, filter, "exclude")) return false; - cfg.excludeFilter = wxString::FromUTF8(tempString.c_str()); -//########################################################### - //other - if (!readXmlElementValue(cfg.useRecycleBin, miscSettings, "recycler")) return false; - if (!readXmlElementValue(cfg.continueOnError, miscSettings, "continue")) return false; - -//########################################################### - //read GUI layout (optional!) - //apply window size and position at program startup ONLY - if (programStartup) - { - TiXmlElement* mainWindow = hRoot.FirstChild("layout").FirstChild("windows").FirstChild("main").ToElement(); - if (mainWindow) - { - //read application window size and position - int widthTmp = 0; // - int heighthTmp = 0; // - int posxTmp = 0; // read all parameters "at once" - int posyTmp = 0; // - bool maximizedTmp = false; - - if ( readXmlElementValue(widthTmp, mainWindow, "width") && - readXmlElementValue(heighthTmp, mainWindow, "height") && - readXmlElementValue(posxTmp, mainWindow, "posx") && - readXmlElementValue(posyTmp, mainWindow, "posy") && - readXmlElementValue(maximizedTmp, mainWindow, "maximized")) - { - widthNotMaximized = widthTmp; - heightNotMaximized = heighthTmp; - posXNotMaximized = posxTmp; - posYNotMaximized = posyTmp; - - //apply window size and position - SetSize(posXNotMaximized, posYNotMaximized, widthNotMaximized, heightNotMaximized); - Maximize(maximizedTmp); - } -//########################################################### - //read column widths - TiXmlElement* leftColumn = TiXmlHandle(mainWindow).FirstChild("leftcolumns").FirstChild("width").ToElement(); - for (int i = 0; i < m_grid1->GetNumberCols(); ++i) - { - if (leftColumn) - { - const char* width = leftColumn->GetText(); - if (width) //may be NULL!! - m_grid1->SetColSize(i, stringToInt(width)); - leftColumn = leftColumn->NextSiblingElement(); - } - else break; - } - - TiXmlElement* rightColumn = TiXmlHandle(mainWindow).FirstChild("rightcolumns").FirstChild("width").ToElement(); - for (int i = 0; i < m_grid2->GetNumberCols(); ++i) - { - if (rightColumn) - { - const char* width = rightColumn->GetText(); - if (width) //may be NULL!! - m_grid2->SetColSize(i, stringToInt(width)); - - rightColumn = rightColumn->NextSiblingElement(); - } - else break; - } - } - } - return true; -//########################################################### + //set additional pairs + for (vector<FolderPair>::const_iterator i = mainCfg.directoryPairs.begin() + 1; i != mainCfg.directoryPairs.end(); ++i) + addFolderPair(i->leftDirectory, i->rightDirectory); } - } - return false; -} + //read GUI layout (optional!) + hideFilteredElements = guiCfg.hideFilteredElements; + m_checkBoxHideFilt->SetValue(hideFilteredElements); -void MainDialog::readConfigurationFromXml(const wxString& filename, bool programStartup) -{ - if (wxFileExists(filename)) - { //workaround to get a FILE* from a unicode filename - wxFFile dummyFile(filename, wxT("rb")); - if (dummyFile.IsOpened()) + //apply window size and position at program startup ONLY + if (programStartup) { - FILE* inputFile = dummyFile.fp(); + if ( guiCfg.widthNotMaximized != -1 && + guiCfg.heightNotMaximized != -1 && + guiCfg.posXNotMaximized != -1 && + guiCfg.posYNotMaximized != -1) + { + widthNotMaximized = guiCfg.widthNotMaximized; + heightNotMaximized = guiCfg.heightNotMaximized; + posXNotMaximized = guiCfg.posXNotMaximized; + posYNotMaximized = guiCfg.posYNotMaximized; - TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters - TiXmlDocument doc; - if ( doc.LoadFile(inputFile) && //fails if inputFile is no proper XML - parseXmlData(doc.RootElement(), programStartup)) - addCfgFileToHistory(filename); //put filename on list of last used config files - else - { //handle error: parsing - wxMessageBox(wxString(_("Error parsing configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); - if (programStartup) - loadDefaultConfiguration(); + //apply window size and position + SetSize(posXNotMaximized, posYNotMaximized, widthNotMaximized, heightNotMaximized); + Maximize(guiCfg.isMaximized); } - return; + //read column widths + for (int i = 0; i < m_grid1->GetNumberCols() && i < int(guiCfg.columnWidthLeft.size()); ++i) + m_grid1->SetColSize(i, guiCfg.columnWidthLeft[i]); + + for (int i = 0; i < m_grid2->GetNumberCols() && i < int(guiCfg.columnWidthRight.size()); ++i) + m_grid2->SetColSize(i, guiCfg.columnWidthRight[i]); } - } - //handle error: file load - if (programStartup) - loadDefaultConfiguration(); + //########################################################### + addCfgFileToHistory(filename); //put filename on list of last used config files + return true; + } else - wxMessageBox(wxString(_("Could not open configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); -} - - -void addXmlElement(TiXmlElement* parent, const string& name, const string& value) -{ - if (parent) - { - TiXmlElement* subElement = new TiXmlElement(name); - parent->LinkEndChild(subElement); - subElement->LinkEndChild(new TiXmlText(value)); + { //handle error: parsing + wxMessageBox(wxString(_("Error parsing configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); + if (programStartup) + loadDefaultConfiguration(); + return false; } } -void addXmlElement(TiXmlElement* parent, const string& name, const int value) +bool MainDialog::writeConfigurationToXml(const wxString& filename) { - addXmlElement(parent, name, numberToString(value)); -} - - -void MainDialog::writeConfigurationToXml(const wxString& filename) -{ - //workaround to get a FILE* from a unicode filename - wxFFile dummyFile(filename, wxT("wb")); - if (!dummyFile.IsOpened()) - { - wxMessageBox(wxString(_("Could not write configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); - return; - } - FILE* outputFile = dummyFile.fp(); - - TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters - TiXmlDocument xmlDoc; - TiXmlDeclaration* decl = new TiXmlDeclaration("1.0", "UTF-8", ""); //delete won't be necessary later; ownership passed to TiXmlDocument! - xmlDoc.LinkEndChild(decl); - - TiXmlElement* root = new TiXmlElement("FreeFileSync"); - xmlDoc.LinkEndChild(root); - - TiXmlElement* settings = new TiXmlElement("settings"); - root->LinkEndChild(settings); - -//########################################################### - TiXmlElement* cmpSettings = new TiXmlElement("comparison"); - settings->LinkEndChild(cmpSettings); + XmlOutput outputFile(filename, XML_GUI_CONFIG); - //write compare algorithm - addXmlElement(cmpSettings, "variant", cfg.compareVar); + //load structure with basic settings "mainCfg" + XmlMainConfig mainCfg; + mainCfg.cfg = cfg; + GetFolderPairs(mainCfg.directoryPairs); - //write folder pair(s) - TiXmlElement* folders = new TiXmlElement("folders"); - cmpSettings->LinkEndChild(folders); - - TiXmlElement* folderPair = new TiXmlElement("pair"); - folders->LinkEndChild(folderPair); - - addXmlElement(folderPair, "left", string((m_directoryPanel1->GetValue()).ToUTF8())); - addXmlElement(folderPair, "right", string((m_directoryPanel2->GetValue()).ToUTF8())); - -//########################################################### - TiXmlElement* syncSettings = new TiXmlElement("synchronization"); - settings->LinkEndChild(syncSettings); - - //write sync configuration - TiXmlElement* syncConfig = new TiXmlElement("directions"); - syncSettings->LinkEndChild(syncConfig); - - addXmlElement(syncConfig, "leftonly", cfg.syncConfiguration.exLeftSideOnly); - addXmlElement(syncConfig, "rightonly", cfg.syncConfiguration.exRightSideOnly); - addXmlElement(syncConfig, "leftnewer", cfg.syncConfiguration.leftNewer); - addXmlElement(syncConfig, "rightnewer", cfg.syncConfiguration.rightNewer); - addXmlElement(syncConfig, "different", cfg.syncConfiguration.different); - -//########################################################### - TiXmlElement* miscSettings = new TiXmlElement("miscellaneous"); - settings->LinkEndChild(miscSettings); - - //write filter settings - TiXmlElement* filter = new TiXmlElement("filter"); - miscSettings->LinkEndChild(filter); - - addXmlElement(filter, "active", cfg.filterIsActive); - addXmlElement(filter, "hidefiltered", cfg.hideFiltered); - addXmlElement(filter, "include", string((cfg.includeFilter).ToUTF8())); - addXmlElement(filter, "exclude", string((cfg.excludeFilter).ToUTF8())); - - //other - addXmlElement(miscSettings, "recycler", cfg.useRecycleBin); - addXmlElement(miscSettings, "continue", cfg.continueOnError); -//########################################################### - TiXmlElement* guiLayout = new TiXmlElement("layout"); - root->LinkEndChild(guiLayout); - - TiXmlElement* windows = new TiXmlElement("windows"); - guiLayout->LinkEndChild(windows); - - TiXmlElement* mainWindow = new TiXmlElement("main"); - windows->LinkEndChild(mainWindow); - - //window size - addXmlElement(mainWindow, "width", widthNotMaximized); - addXmlElement(mainWindow, "height", heightNotMaximized); - - //window position - addXmlElement(mainWindow, "posx", posXNotMaximized); - addXmlElement(mainWindow, "posy", posYNotMaximized); - addXmlElement(mainWindow, "maximized", IsMaximized()); - - //write column sizes - TiXmlElement* leftColumn = new TiXmlElement("leftcolumns"); - mainWindow->LinkEndChild(leftColumn); + //load structure with gui settings "guiCfg" + XmlGuiConfig guiCfg; + guiCfg.hideFilteredElements = hideFilteredElements; + guiCfg.widthNotMaximized = widthNotMaximized; + guiCfg.heightNotMaximized = heightNotMaximized; + guiCfg.posXNotMaximized = posXNotMaximized; + guiCfg.posYNotMaximized = posYNotMaximized; + guiCfg.isMaximized = IsMaximized(); for (int i = 0; i < m_grid1->GetNumberCols(); ++i) - addXmlElement(leftColumn, "width", m_grid1->GetColSize(i)); - - TiXmlElement* rightColumn = new TiXmlElement("rightcolumns"); - mainWindow->LinkEndChild(rightColumn); + guiCfg.columnWidthLeft.push_back(m_grid1->GetColSize(i)); for (int i = 0; i < m_grid2->GetNumberCols(); ++i) - addXmlElement(rightColumn, "width", m_grid2->GetColSize(i)); + guiCfg.columnWidthRight.push_back(m_grid2->GetColSize(i)); - if (!xmlDoc.SaveFile(outputFile)) + //populate and write XML tree + if ( !outputFile.writeXmlMainConfig(mainCfg) || //add basic configuration settings + !outputFile.writeXmlGuiConfig(guiCfg) || //add GUI layout configuration settings + !outputFile.writeToFile()) //save XML { wxMessageBox(wxString(_("Could not write configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); - return; - } - - //put filename on list of last used config files - addCfgFileToHistory(filename); -} - - -void MainDialog::readConfigurationFromHD(const wxString& filename, bool programStartup) -{ - assert(false); //deprecated - - char bigBuffer[10000]; - - if (wxFileExists(filename)) - { - wxFFileInputStream config(filename); - if (config.IsOk()) - { - //read FFS identifier - config.Read(bigBuffer, FreeFileSync::FfsConfigFileID.size()); - bigBuffer[FreeFileSync::FfsConfigFileID.size()] = 0; - - if (string(bigBuffer) != FreeFileSync::FfsConfigFileID) - { - wxMessageBox(_("The selected file does not contain a valid configuration!"), _("Warning"), wxOK); - return; - } - - //put filename on list of last used config files - addCfgFileToHistory(filename); - - //read sync configuration - cfg.syncConfiguration.exLeftSideOnly = SyncDirection(config.GetC()); - cfg.syncConfiguration.exRightSideOnly = SyncDirection(config.GetC()); - cfg.syncConfiguration.leftNewer = SyncDirection(config.GetC()); - cfg.syncConfiguration.rightNewer = SyncDirection(config.GetC()); - cfg.syncConfiguration.different = SyncDirection(config.GetC()); - - //read compare algorithm - cfg.compareVar = CompareVariant(config.GetC()); - updateCompareButtons(); - - //read column sizes - for (int i = 0; i < m_grid1->GetNumberCols(); ++i) - m_grid1->SetColSize(i, globalFunctions::readInt(config)); - - for (int i = 0; i < m_grid2->GetNumberCols(); ++i) - m_grid2->SetColSize(i, globalFunctions::readInt(config)); - - //read application window size and position - bool startWindowMaximized = bool(config.GetC()); - - int widthTmp = globalFunctions::readInt(config); - int heighthTmp = globalFunctions::readInt(config); - int posX_Tmp = globalFunctions::readInt(config); - int posY_Tmp = globalFunctions::readInt(config); - - //apply window size and position at program startup ONLY - if (programStartup) - { - widthNotMaximized = widthTmp; - heightNotMaximized = heighthTmp; - posXNotMaximized = posX_Tmp; - posYNotMaximized = posY_Tmp; - - //apply window size and position - SetSize(posXNotMaximized, posYNotMaximized, widthNotMaximized, heightNotMaximized); - Maximize(startWindowMaximized); - } - - //read last directory selection - int byteCount = globalFunctions::readInt(config); - config.Read(bigBuffer, byteCount); - wxString leftDir = wxString::FromUTF8(bigBuffer, byteCount); - m_directoryPanel1->SetValue(leftDir); - if (wxDirExists(leftDir)) - m_dirPicker1->SetPath(leftDir); - - byteCount = globalFunctions::readInt(config); - config.Read(bigBuffer, byteCount); - wxString rightDir = wxString::FromUTF8(bigBuffer, byteCount); - m_directoryPanel2->SetValue(rightDir); - if (wxDirExists(rightDir)) - m_dirPicker2->SetPath(rightDir); - - //read filter settings: - cfg.hideFiltered = bool(config.GetC()); - m_checkBoxHideFilt->SetValue(cfg.hideFiltered); - - cfg.filterIsActive = bool(config.GetC()); - updateFilterButton(m_bpButtonFilter, cfg.filterIsActive); - - //include - byteCount = globalFunctions::readInt(config); - config.Read(bigBuffer, byteCount); - cfg.includeFilter = wxString::FromUTF8(bigBuffer, byteCount); - - //exclude - byteCount = globalFunctions::readInt(config); - config.Read(bigBuffer, byteCount); - cfg.excludeFilter = wxString::FromUTF8(bigBuffer, byteCount); - - cfg.useRecycleBin = bool(config.GetC()); - - cfg.continueOnError = bool(config.GetC()); - - return; - } - } - - //handle error situation: - if (programStartup) - loadDefaultConfiguration(); - else - wxMessageBox(wxString(_("Could not read configuration file ")) + wxT("\"") + filename + wxT("\""), _("Error"), wxOK | wxICON_ERROR); -} - - -void MainDialog::writeConfigurationToHD(const wxString& filename) -{ - assert(false); //deprecated - - wxFFileOutputStream config(filename); - if (!config.IsOk()) - { - wxMessageBox(wxString(_("Could not write to ")) + wxT("\"") + filename + wxT("\""), _("An exception occured!"), wxOK | wxICON_ERROR); - return; + return false; } //put filename on list of last used config files addCfgFileToHistory(filename); - - //write FFS identifier - config.Write(FreeFileSync::FfsConfigFileID.c_str(), FreeFileSync::FfsConfigFileID.size()); - - //write sync configuration - config.PutC(char(cfg.syncConfiguration.exLeftSideOnly)); - config.PutC(char(cfg.syncConfiguration.exRightSideOnly)); - config.PutC(char(cfg.syncConfiguration.leftNewer)); - config.PutC(char(cfg.syncConfiguration.rightNewer)); - config.PutC(char(cfg.syncConfiguration.different)); - - //write compare algorithm - config.PutC(char(cfg.compareVar)); - - //write column sizes - for (int i = 0; i < m_grid1->GetNumberCols(); ++i) - globalFunctions::writeInt(config, m_grid1->GetColSize(i)); - - for (int i = 0; i < m_grid2->GetNumberCols(); ++i) - globalFunctions::writeInt(config, m_grid2->GetColSize(i)); - - //write application window size and position - config.PutC(char(IsMaximized())); - - //window size - globalFunctions::writeInt(config, widthNotMaximized); - globalFunctions::writeInt(config, heightNotMaximized); - - //window position - globalFunctions::writeInt(config, posXNotMaximized); - globalFunctions::writeInt(config, posYNotMaximized); - - //write last directory selection - wxCharBuffer buffer = (m_directoryPanel1->GetValue()).ToUTF8(); - int byteCount = strlen(buffer); - globalFunctions::writeInt(config, byteCount); - config.Write(buffer, byteCount); - - buffer = (m_directoryPanel2->GetValue()).ToUTF8(); - byteCount = strlen(buffer); - globalFunctions::writeInt(config, byteCount); - config.Write(buffer, byteCount); - - //write filter settings - config.PutC(char(cfg.hideFiltered)); - config.PutC(char(cfg.filterIsActive)); - - buffer = (cfg.includeFilter).ToUTF8(); - byteCount = strlen(buffer); - globalFunctions::writeInt(config, byteCount); - config.Write(buffer, byteCount); - - buffer = (cfg.excludeFilter).ToUTF8(); - byteCount = strlen(buffer); - globalFunctions::writeInt(config, byteCount); - config.Write(buffer, byteCount); - - config.PutC(char(cfg.useRecycleBin)); - - config.PutC(char(cfg.continueOnError)); + return true; } @@ -1837,9 +1548,9 @@ void MainDialog::OnFilterButton(wxCommandEvent &event) void MainDialog::OnHideFilteredButton(wxCommandEvent &event) { //toggle showing filtered rows - cfg.hideFiltered = !cfg.hideFiltered; + hideFilteredElements = !hideFilteredElements; //make sure, checkbox and "hideFiltered" are in sync - m_checkBoxHideFilt->SetValue(cfg.hideFiltered); + m_checkBoxHideFilt->SetValue(hideFilteredElements); writeGrid(currentGridData); @@ -1929,34 +1640,34 @@ void MainDialog::OnEqualFiles(wxCommandEvent& event) void MainDialog::updateViewFilterButtons() { if (leftOnlyFilesActive) - m_bpButtonLeftOnly->SetBitmapLabel(*GlobalResources::bitmapLeftOnly); + m_bpButtonLeftOnly->SetBitmapLabel(*globalResource.bitmapLeftOnly); else - m_bpButtonLeftOnly->SetBitmapLabel(*GlobalResources::bitmapLeftOnlyDeact); + m_bpButtonLeftOnly->SetBitmapLabel(*globalResource.bitmapLeftOnlyDeact); if (leftNewerFilesActive) - m_bpButtonLeftNewer->SetBitmapLabel(*GlobalResources::bitmapLeftNewer); + m_bpButtonLeftNewer->SetBitmapLabel(*globalResource.bitmapLeftNewer); else - m_bpButtonLeftNewer->SetBitmapLabel(*GlobalResources::bitmapLeftNewerDeact); + m_bpButtonLeftNewer->SetBitmapLabel(*globalResource.bitmapLeftNewerDeact); if (equalFilesActive) - m_bpButtonEqual->SetBitmapLabel(*GlobalResources::bitmapEqual); + m_bpButtonEqual->SetBitmapLabel(*globalResource.bitmapEqual); else - m_bpButtonEqual->SetBitmapLabel(*GlobalResources::bitmapEqualDeact); + m_bpButtonEqual->SetBitmapLabel(*globalResource.bitmapEqualDeact); if (differentFilesActive) - m_bpButtonDifferent->SetBitmapLabel(*GlobalResources::bitmapDifferent); + m_bpButtonDifferent->SetBitmapLabel(*globalResource.bitmapDifferent); else - m_bpButtonDifferent->SetBitmapLabel(*GlobalResources::bitmapDifferentDeact); + m_bpButtonDifferent->SetBitmapLabel(*globalResource.bitmapDifferentDeact); if (rightNewerFilesActive) - m_bpButtonRightNewer->SetBitmapLabel(*GlobalResources::bitmapRightNewer); + m_bpButtonRightNewer->SetBitmapLabel(*globalResource.bitmapRightNewer); else - m_bpButtonRightNewer->SetBitmapLabel(*GlobalResources::bitmapRightNewerDeact); + m_bpButtonRightNewer->SetBitmapLabel(*globalResource.bitmapRightNewerDeact); if (rightOnlyFilesActive) - m_bpButtonRightOnly->SetBitmapLabel(*GlobalResources::bitmapRightOnly); + m_bpButtonRightOnly->SetBitmapLabel(*globalResource.bitmapRightOnly); else - m_bpButtonRightOnly->SetBitmapLabel(*GlobalResources::bitmapRightOnlyDeact); + m_bpButtonRightOnly->SetBitmapLabel(*globalResource.bitmapRightOnlyDeact); } @@ -1964,12 +1675,12 @@ void MainDialog::updateFilterButton(wxBitmapButton* filterButton, bool isActive) { if (isActive) { - filterButton->SetBitmapLabel(*GlobalResources::bitmapFilterOn); + filterButton->SetBitmapLabel(*globalResource.bitmapFilterOn); filterButton->SetToolTip(_("Filter active: Press again to deactivate")); } else { - filterButton->SetBitmapLabel(*GlobalResources::bitmapFilterOff); + filterButton->SetBitmapLabel(*globalResource.bitmapFilterOff); filterButton->SetToolTip(_("Press button to activate filter")); } } @@ -1998,27 +1709,60 @@ void MainDialog::updateCompareButtons() } -void MainDialog::OnCompare(wxCommandEvent &event) +void MainDialog::GetFolderPairs(vector<FolderPair>& output, bool formatted) { - if (m_directoryPanel1->GetValue().IsEmpty() || m_directoryPanel2->GetValue().IsEmpty()) + output.clear(); + + //add main pair + FolderPair newPair; + if (formatted) { - wxMessageBox(_("Please select both left and right directories!"), _("Information")); - return; + newPair.leftDirectory = FreeFileSync::getFormattedDirectoryName(m_directoryLeft->GetValue()); + newPair.rightDirectory = FreeFileSync::getFormattedDirectoryName(m_directoryRight->GetValue()); } + else + { + newPair.leftDirectory = m_directoryLeft->GetValue(); + newPair.rightDirectory = m_directoryRight->GetValue(); + } + output.push_back(newPair); - clearStatusBar(); - - //check if directories exist (if loaded by config file) - if (!wxDirExists(FreeFileSync::getFormattedDirectoryName(m_directoryPanel1->GetValue()))) + //add additional pairs + for (vector<FolderPairGenerated*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) { - wxMessageBox(_("Directory on the left does not exist. Please select a new one!"), _("Warning"), wxICON_WARNING); - return; + FolderPairGenerated* dirPair = *i; + if (formatted) + { + newPair.leftDirectory = FreeFileSync::getFormattedDirectoryName(dirPair->m_directoryLeft->GetValue()); + newPair.rightDirectory = FreeFileSync::getFormattedDirectoryName(dirPair->m_directoryRight->GetValue()); + } + else + { + newPair.leftDirectory = dirPair->m_directoryLeft->GetValue(); + newPair.rightDirectory = dirPair->m_directoryRight->GetValue(); + } + + output.push_back(newPair); } - else if (!wxDirExists(FreeFileSync::getFormattedDirectoryName(m_directoryPanel2->GetValue()))) +} + + +void MainDialog::OnCompare(wxCommandEvent &event) +{ + //assemble vector of formatted folder pairs + vector<FolderPair> directoryPairsFormatted; + GetFolderPairs(directoryPairsFormatted, true); + + //check if folders are valid + wxString errorMessage; + if (!FreeFileSync::foldersAreValidForComparison(directoryPairsFormatted, errorMessage)) { - wxMessageBox(_("Directory on the right does not exist. Please select a new one!"), _("Warning"), wxICON_WARNING); + wxMessageBox(errorMessage, _("Warning")); return; } +//---------------------------------------------- + + clearStatusBar(); wxBeginBusyCursor(); @@ -2030,8 +1774,7 @@ void MainDialog::OnCompare(wxCommandEvent &event) //unsigned int startTime3 = GetTickCount(); FreeFileSync::startCompareProcess(currentGridData, - FreeFileSync::getFormattedDirectoryName(m_directoryPanel1->GetValue()), - FreeFileSync::getFormattedDirectoryName(m_directoryPanel2->GetValue()), + directoryPairsFormatted, cfg.compareVar, &statusUpdater); //wxMessageBox(numberToWxString(unsigned(GetTickCount()) - startTime3)); @@ -2053,13 +1796,11 @@ void MainDialog::OnCompare(wxCommandEvent &event) if (aborted) { //disable the sync button enableSynchronization(false); - m_bpButtonCompare->SetFocus(); } else { //once compare is finished enable the sync button enableSynchronization(true); - m_bpButtonSync->SetFocus(); } @@ -2359,9 +2100,9 @@ void MainDialog::OnSortLeftGrid(wxGridEvent& event) //set sort direction indicator on UI if (sortAscending) - m_grid1->setSortMarker(currentSortColumn, GlobalResources::bitmapSmallUp); + m_grid1->setSortMarker(currentSortColumn, globalResource.bitmapSmallUp); else - m_grid1->setSortMarker(currentSortColumn, GlobalResources::bitmapSmallDown); + m_grid1->setSortMarker(currentSortColumn, globalResource.bitmapSmallDown); m_grid2->setSortMarker(-1); } event.Skip(); @@ -2387,9 +2128,9 @@ void MainDialog::OnSortRightGrid(wxGridEvent& event) //set sort direction indicator on UI m_grid1->setSortMarker(-1); if (sortAscending) - m_grid2->setSortMarker(currentSortColumn, GlobalResources::bitmapSmallUp); + m_grid2->setSortMarker(currentSortColumn, globalResource.bitmapSmallUp); else - m_grid2->setSortMarker(currentSortColumn, GlobalResources::bitmapSmallDown); + m_grid2->setSortMarker(currentSortColumn, globalResource.bitmapSmallDown); } event.Skip(); } @@ -2397,10 +2138,19 @@ void MainDialog::OnSortRightGrid(wxGridEvent& event) void MainDialog::OnSwapDirs( wxCommandEvent& event ) { - //swap directory names - wxString tmp = m_directoryPanel1->GetValue(); - m_directoryPanel1->SetValue(m_directoryPanel2->GetValue()); - m_directoryPanel2->SetValue(tmp); + //swap directory names : main pair + wxString tmp = m_directoryLeft->GetValue(); + m_directoryLeft->SetValue(m_directoryRight->GetValue()); + m_directoryRight->SetValue(tmp); + + //additional pairs + for (vector<FolderPairGenerated*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + { + FolderPairGenerated* dirPair = *i; + tmp = dirPair->m_directoryLeft->GetValue(); + dirPair->m_directoryLeft->SetValue(dirPair->m_directoryRight->GetValue()); + dirPair->m_directoryRight->SetValue(tmp); + } //swap grid information FreeFileSync::swapGrids(currentGridData); @@ -2535,7 +2285,7 @@ void MainDialog::mapGridDataToUI(GridView& output, const FileCompareResult& file { output.clear(); - //show only those view filter buttons that really need to be displayed + //only show those view filter buttons that really need to be displayed bool leftOnly, rightOnly, leftNewer, rightNewer, different, equal; leftOnly = rightOnly = leftNewer = rightNewer = different = equal = false; @@ -2574,7 +2324,7 @@ void MainDialog::mapGridDataToUI(GridView& output, const FileCompareResult& file } //hide filtered row, if corresponding option is set - if (cfg.hideFiltered && !i->selectedForSynchronization) + if (hideFilteredElements && !i->selectedForSynchronization) continue; output.push_back(currentRow); @@ -2623,6 +2373,103 @@ void MainDialog::mapGridDataToUI(GridView& output, const FileCompareResult& file //sorting is expensive: do performance measurements before implementing here! } + + +void MainDialog::OnAddFolderPair(wxCommandEvent& event) +{ + addFolderPair(wxEmptyString, wxEmptyString); + event.Skip(); +} + + +void MainDialog::OnRemoveFolderPair(wxCommandEvent& event) +{ + removeFolderPair(); + event.Skip(); +} + + +void MainDialog::addFolderPair(const wxString& leftDir, const wxString& rightDir) +{ + //add new folder pair + FolderPairGenerated* newPair = new FolderPairGenerated(m_scrolledWindowFolderPairs); + newPair->m_bitmap23->SetBitmap(*globalResource.bitmapLink); + + bSizerFolderPairs->Insert(0, newPair, 0, wxEXPAND, 5); + additionalFolderPairs.push_back(newPair); + + //set size of scrolled window + wxSize pairSize = newPair->GetSize(); + int additionalRows = additionalFolderPairs.size(); + if (additionalRows <= 3) //up to 3 additional pairs shall be shown + m_scrolledWindowFolderPairs->SetMinSize(wxSize( -1, pairSize.GetHeight() * additionalRows)); + else //adjust scrollbars + m_scrolledWindowFolderPairs->Fit(); + + //adjust remove button + if (additionalRows > 0) + m_bpButtonRemovePair->Enable(); + + m_scrolledWindowFolderPairs->Layout(); + bSizer1->Layout(); + m_bpButtonSwap->Refresh(); + + //register events + newPair->m_dirPickerLeft->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(MainDialog::OnDirSelected), NULL, this); + newPair->m_dirPickerRight->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(MainDialog::OnDirSelected), NULL, this); + + newPair->m_directoryLeft->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(MainDialog::OnWriteDirManually), NULL, this ); + newPair->m_directoryRight->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(MainDialog::OnWriteDirManually), NULL, this ); + + //prepare drag & drop + newPair->m_panelLeft->SetDropTarget(new FileDropEvent(this, newPair->m_panelLeft)); + newPair->m_panelRight->SetDropTarget(new FileDropEvent(this, newPair->m_panelRight)); + + //insert directory names if provided + newPair->m_directoryLeft->SetValue(leftDir); + wxString leftDirFormatted = FreeFileSync::getFormattedDirectoryName(leftDir); + if (wxDirExists(leftDirFormatted)) + newPair->m_dirPickerLeft->SetPath(leftDirFormatted); + + newPair->m_directoryRight->SetValue(rightDir); + wxString rightDirFormatted = FreeFileSync::getFormattedDirectoryName(rightDir); + if (wxDirExists(rightDirFormatted)) + newPair->m_dirPickerRight->SetPath(rightDirFormatted); +} + + +void MainDialog::removeFolderPair(bool removeAll) +{ + if (additionalFolderPairs.size() > 0) + { + wxSize pairSize; + do + { //remove folder pairs from window + FolderPairGenerated* pairToDelete = additionalFolderPairs.back(); + pairSize = pairToDelete->GetSize(); + + bSizerFolderPairs->Detach(pairToDelete); //Remove does not work on Window*, so do it manually + pairToDelete->Destroy(); // + additionalFolderPairs.pop_back(); //remove last element in vector + } + while (removeAll && additionalFolderPairs.size() > 0); + + //set size of scrolled window + int additionalRows = additionalFolderPairs.size(); + if (additionalRows <= 3) //up to 3 additional pairs shall be shown + m_scrolledWindowFolderPairs->SetMinSize(wxSize( -1, pairSize.GetHeight() * additionalRows)); + //adjust scrollbars (do not put in else clause) + m_scrolledWindowFolderPairs->Fit(); + + //adjust remove button + if (additionalRows <= 0) + m_bpButtonRemovePair->Disable(); + + m_scrolledWindowFolderPairs->Layout(); + bSizer1->Layout(); + } +} + //######################################################################################################## @@ -2655,6 +2502,7 @@ CompareStatusUpdater::CompareStatusUpdater(MainDialog* dlg) : mainDialog->m_choiceLoad->Disable(); mainDialog->m_bpButton10->Disable(); mainDialog->m_bpButton14->Disable(); + mainDialog->m_scrolledWindowFolderPairs->Disable(); mainDialog->m_menubar1->EnableTop(0, false); mainDialog->m_menubar1->EnableTop(1, false); mainDialog->m_menubar1->EnableTop(2, false); @@ -2673,6 +2521,7 @@ CompareStatusUpdater::CompareStatusUpdater(MainDialog* dlg) : //updateUiNow(); mainDialog->bSizer1->Layout(); //both sizers need to recalculate! mainDialog->bSizer6->Layout(); + mainDialog->Refresh(); } @@ -2701,6 +2550,7 @@ CompareStatusUpdater::~CompareStatusUpdater() mainDialog->m_choiceLoad->Enable(); mainDialog->m_bpButton10->Enable(); mainDialog->m_bpButton14->Enable(); + mainDialog->m_scrolledWindowFolderPairs->Enable(); mainDialog->m_menubar1->EnableTop(0, true); mainDialog->m_menubar1->EnableTop(1, true); mainDialog->m_menubar1->EnableTop(2, true); @@ -2984,7 +2834,10 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) void MainDialog::OnMenuBatchJob(wxCommandEvent& event) { - BatchDialog* batchDlg = new BatchDialog(this, cfg, m_directoryPanel1->GetValue(), m_directoryPanel2->GetValue()); + vector<FolderPair> folderPairs; + GetFolderPairs(folderPairs); + + BatchDialog* batchDlg = new BatchDialog(this, cfg, folderPairs); if (batchDlg->ShowModal() == BatchDialog::batchFileCreated) pushStatusInformation(_("Batch file created successfully!")); diff --git a/ui/MainDialog.h b/ui/MainDialog.h index 4bf5504c..908434ea 100644 --- a/ui/MainDialog.h +++ b/ui/MainDialog.h @@ -25,13 +25,16 @@ using namespace std; //IDs for context menu items enum ContextItem { - CONTEXT_MANUAL_FILTER = 10, + CONTEXT_FILTER_TEMP = 10, + CONTEXT_EXCLUDE_EXT, + CONTEXT_EXCLUDE_FILE, + CONTEXT_EXCLUDE_DIR, CONTEXT_CLIPBOARD, CONTEXT_EXPLORER, CONTEXT_DELETE_FILES }; -extern int leadingPanel; +extern int leadingPanel; //better keep this an int! event.GetEventObject() does NOT always return m_grid1, m_grid2, m_grid3! class CompareStatusUpdater; class FileDropEvent; @@ -47,16 +50,10 @@ public: ~MainDialog(); private: + //configuration load/save void loadDefaultConfiguration(); - - void readConfigurationFromXml(const wxString& filename, bool programStartup = false); - bool parseXmlData(TiXmlElement* root, bool programStartup); - void writeConfigurationToXml(const wxString& filename); - - //deprecated - void readConfigurationFromHD(const wxString& filename, bool programStartup = false); - void writeConfigurationToHD(const wxString& filename); - // + bool readConfigurationFromXml(const wxString& filename, bool programStartup = false); + bool writeConfigurationToXml(const wxString& filename); void updateViewFilterButtons(); void updateFilterButton(wxBitmapButton* filterButton, bool isActive); @@ -64,6 +61,9 @@ private: void addCfgFileToHistory(const wxString& filename); + void addFolderPair(const wxString& leftDir, const wxString& rightDir); + void removeFolderPair(bool removeAll = false); + //main method for putting gridData on UI: maps data respecting current view settings void writeGrid(const FileCompareResult& gridData, bool useUI_GridCache = false); void mapGridDataToUI(GridView& output, const FileCompareResult& fileCmpResult); @@ -71,7 +71,7 @@ private: //context menu functions set<int> getSelectedRows(); - void filterRangeManual(const set<int>& rowsToFilterOnUI_View); + void filterRangeTemp(const set<int>& rowsToFilterOnUI_View); void copySelectionToClipboard(const set<int>& selectedRows, int selectedGrid); void openWithFileBrowser(int rowNumber, int gridNr); void deleteFilesOnGrid(const set<int>& rowsToDeleteOnUI); @@ -93,10 +93,8 @@ private: void onGrid3ButtonEvent(wxKeyEvent& event); void OnOpenContextMenu(wxGridEvent& event); - void OnEnterLeftDir(wxCommandEvent& event); - void OnEnterRightDir(wxCommandEvent& event); - void OnDirChangedPanel1(wxFileDirPickerEvent& event); - void OnDirChangedPanel2(wxFileDirPickerEvent& event); + void OnWriteDirManually(wxCommandEvent& event); + void OnDirSelected(wxFileDirPickerEvent& event); //manual filtering of rows: void OnGridSelectCell(wxGridEvent& event); @@ -117,7 +115,6 @@ private: void OnRightOnlyFiles( wxCommandEvent& event); void OnEqualFiles( wxCommandEvent& event); - void OnBatchJob( wxCommandEvent& event); void OnSaveConfig( wxCommandEvent& event); void OnLoadConfiguration( wxCommandEvent& event); void OnChoiceKeyEvent( wxKeyEvent& event ); @@ -136,6 +133,9 @@ private: void OnClose( wxCloseEvent& event); void OnQuit( wxCommandEvent& event); + void OnAddFolderPair( wxCommandEvent& event); + void OnRemoveFolderPair( wxCommandEvent& event); + //menu events void OnMenuExportFileList( wxCommandEvent& event); void OnMenuBatchJob( wxCommandEvent& event); @@ -157,7 +157,24 @@ private: //UI view of currentGridData GridView gridRefUI; - Configuration cfg; +//------------------------------------- + //functional configuration + MainConfiguration cfg; + + //folder pairs: + //m_directoryLeft, m_directoryRight + vector<FolderPairGenerated*> additionalFolderPairs; //additional pairs to the standard pair + + //gui settings + int widthNotMaximized; + int heightNotMaximized; + int posXNotMaximized; + int posYNotMaximized; + bool hideFilteredElements; +//------------------------------------- + + //convenience method to get all folder pairs (unformatted) + void GetFolderPairs(vector<FolderPair>& output, bool formatted = false); //UI View Filter settings bool leftOnlyFilesActive; @@ -167,12 +184,6 @@ private: bool rightNewerFilesActive; bool rightOnlyFilesActive; - //ui settings - int widthNotMaximized; - int heightNotMaximized; - int posXNotMaximized; - int posYNotMaximized; - //*********************************************** wxMenu* contextMenu; @@ -190,10 +201,14 @@ private: vector<wxString> cfgFileNames; static const int CfgHistroyLength = 10; - //variables for manual filtering of m_grid3 + //variables for filtering of m_grid3 bool filteringInitialized; bool filteringPending; + wxString exFilterCandidateExtension; + wxString exFilterCandidateFilename; + wxString exFilterCandidateDirname; + bool synchronizationEnabled; //determines whether synchronization should be allowed bool restartOnExit; //restart dialog on exit (currently used, when language is changed) @@ -207,12 +222,10 @@ private: class FileDropEvent : public wxFileDropTarget { public: - FileDropEvent(MainDialog* dlg, int grid) : + FileDropEvent(MainDialog* dlg, const wxPanel* obj) : mainDlg(dlg), - targetGrid(grid) - { - assert(grid == 1 || grid == 2); - } + dropTarget(obj) + {} ~FileDropEvent() {} @@ -221,7 +234,7 @@ public: private: MainDialog* mainDlg; - int targetGrid; + const wxPanel* dropTarget; }; //###################################################################################### diff --git a/ui/SmallDialogs.cpp b/ui/SmallDialogs.cpp index dfd16108..fd09e17a 100644 --- a/ui/SmallDialogs.cpp +++ b/ui/SmallDialogs.cpp @@ -8,10 +8,10 @@ using namespace globalFunctions; AboutDlg::AboutDlg(wxWindow* window) : AboutDlgGenerated(window) { - m_bitmap9->SetBitmap(*GlobalResources::bitmapWebsite); - m_bitmap10->SetBitmap(*GlobalResources::bitmapEmail); - m_bitmap11->SetBitmap(*GlobalResources::bitmapLogo); - m_bitmap13->SetBitmap(*GlobalResources::bitmapGPL); + m_bitmap9->SetBitmap(*globalResource.bitmapWebsite); + m_bitmap10->SetBitmap(*globalResource.bitmapEmail); + m_bitmap11->SetBitmap(*globalResource.bitmapLogo); + m_bitmap13->SetBitmap(*globalResource.bitmapGPL); //build information wxString build = wxString(wxT("(")) + _("Build: ") + __TDATE__; @@ -23,7 +23,7 @@ AboutDlg::AboutDlg(wxWindow* window) : AboutDlgGenerated(window) build+= + wxT(")"); m_build->SetLabel(build); - m_animationControl1->SetAnimation(*GlobalResources::animationMoney); + m_animationControl1->SetAnimation(*globalResource.animationMoney); m_animationControl1->Play(); //Note: The animation is created hidden(!) to not disturb constraint based window creation; m_animationControl1->Show(); // @@ -106,14 +106,16 @@ FilterDlg::FilterDlg(wxWindow* window, wxString& filterIncl, wxString& filterExc excludeFilter(filterExcl) { - m_bitmap8->SetBitmap(*GlobalResources::bitmapInclude); - m_bitmap9->SetBitmap(*GlobalResources::bitmapExclude); - m_bpButtonHelp->SetBitmapLabel(*GlobalResources::bitmapHelp); + m_bitmap8->SetBitmap(*globalResource.bitmapInclude); + m_bitmap9->SetBitmap(*globalResource.bitmapExclude); + m_bpButtonHelp->SetBitmapLabel(*globalResource.bitmapHelp); m_textCtrlInclude->SetValue(includeFilter); m_textCtrlExclude->SetValue(excludeFilter); m_panel13->Hide(); + m_button10->SetFocus(); + Fit(); } @@ -125,6 +127,7 @@ void FilterDlg::OnHelp(wxCommandEvent& event) m_bpButtonHelp->Hide(); m_panel13->Show(); Fit(); + Refresh(); event.Skip(); } @@ -168,7 +171,7 @@ DeleteDialog::DeleteDialog(const wxString& headerText, const wxString& messageTe { m_staticTextHeader->SetLabel(headerText); m_textCtrlMessage->SetValue(messageText); - m_bitmap12->SetBitmap(*GlobalResources::bitmapDeleteFile); + m_bitmap12->SetBitmap(*globalResource.bitmapDeleteFile); m_buttonOK->SetFocus(); } @@ -197,7 +200,7 @@ ErrorDlg::ErrorDlg(const wxString messageText, bool& continueError) : ErrorDlgGenerated(0), continueOnError(continueError) { - m_bitmap10->SetBitmap(*GlobalResources::bitmapWarning); + m_bitmap10->SetBitmap(*globalResource.bitmapWarning); m_textCtrl8->SetValue(messageText); m_buttonContinue->SetFocus(); @@ -339,7 +342,7 @@ SyncStatus::SyncStatus(StatusUpdater* updater, wxWindow* parentWindow) : totalObjects(0), processPaused(false) { - m_animationControl1->SetAnimation(*GlobalResources::animationSync); + m_animationControl1->SetAnimation(*globalResource.animationSync); m_animationControl1->Play(); //initialize gauge @@ -432,37 +435,37 @@ void SyncStatus::setCurrentStatus(SyncStatusID id) switch (id) { case ABORTED: - m_bitmapStatus->SetBitmap(*GlobalResources::bitmapStatusError); + m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusError); m_staticTextStatus->SetLabel(_("Aborted")); break; case FINISHED_WITH_SUCCESS: - m_bitmapStatus->SetBitmap(*GlobalResources::bitmapStatusSuccess); + m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusSuccess); m_staticTextStatus->SetLabel(_("Completed")); break; case FINISHED_WITH_ERROR: - m_bitmapStatus->SetBitmap(*GlobalResources::bitmapStatusWarning); + m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusWarning); m_staticTextStatus->SetLabel(_("Completed")); break; case PAUSE: - m_bitmapStatus->SetBitmap(*GlobalResources::bitmapStatusPause); + m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusPause); m_staticTextStatus->SetLabel(_("Pause")); break; case SCANNING: - m_bitmapStatus->SetBitmap(*GlobalResources::bitmapStatusComparing); + m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusComparing); m_staticTextStatus->SetLabel(_("Scanning...")); break; case COMPARING: - m_bitmapStatus->SetBitmap(*GlobalResources::bitmapStatusComparing); + m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusComparing); m_staticTextStatus->SetLabel(_("Comparing...")); break; case SYNCHRONIZING: - m_bitmapStatus->SetBitmap(*GlobalResources::bitmapStatusSyncing); + m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusSyncing); m_staticTextStatus->SetLabel(_("Synchronizing...")); break; } @@ -483,7 +486,7 @@ void SyncStatus::processHasFinished(SyncStatusID id) //essential to call this in m_buttonOK->SetFocus(); m_animationControl1->Stop(); - //m_animationControl1->SetInactiveBitmap(*GlobalResources::bitmapFinished); + //m_animationControl1->SetInactiveBitmap(*globalResource.bitmapFinished); m_animationControl1->Hide(); updateStatusDialogNow(); //keep this sequence to avoid display distortion, if e.g. only 1 item is sync'ed diff --git a/ui/SyncDialog.cpp b/ui/SyncDialog.cpp index 6d838f05..ad1c1a21 100644 --- a/ui/SyncDialog.cpp +++ b/ui/SyncDialog.cpp @@ -1,19 +1,18 @@ #include "syncDialog.h" #include "../library/globalFunctions.h" #include "../library/resources.h" +#include "../library/processXml.h" #include <wx/msgdlg.h> #include <wx/stdpaths.h> #include <wx/ffile.h> -#ifdef FFS_WIN -#include <windows.h> -#include <shlobj.h> -#endif // FFS_WIN using namespace std; +using namespace xmlAccess; + SyncDialog::SyncDialog(wxWindow* window, const FileCompareResult& gridDataRef, - Configuration& config, + MainConfiguration& config, bool synchronizationEnabled) : SyncDlgGenerated(window), gridData(gridDataRef), @@ -30,13 +29,13 @@ SyncDialog::SyncDialog(wxWindow* window, calculatePreview(); //set icons for this dialog - m_bpButton18->SetBitmapLabel(*GlobalResources::bitmapStartSync); - m_bpButton18->SetBitmapDisabled(*GlobalResources::bitmapStartSyncDis); - m_bitmap13->SetBitmap(*GlobalResources::bitmapLeftOnlyDeact); - m_bitmap14->SetBitmap(*GlobalResources::bitmapRightOnlyDeact); - m_bitmap15->SetBitmap(*GlobalResources::bitmapLeftNewerDeact); - m_bitmap16->SetBitmap(*GlobalResources::bitmapRightNewerDeact); - m_bitmap17->SetBitmap(*GlobalResources::bitmapDifferentDeact); + m_bpButton18->SetBitmapLabel(*globalResource.bitmapStartSync); + m_bpButton18->SetBitmapDisabled(*globalResource.bitmapStartSyncDis); + m_bitmap13->SetBitmap(*globalResource.bitmapLeftOnlyDeact); + m_bitmap14->SetBitmap(*globalResource.bitmapRightOnlyDeact); + m_bitmap15->SetBitmap(*globalResource.bitmapLeftNewerDeact); + m_bitmap16->SetBitmap(*globalResource.bitmapRightNewerDeact); + m_bitmap17->SetBitmap(*globalResource.bitmapDifferentDeact); if (synchronizationEnabled) m_bpButton18->Enable(); @@ -84,81 +83,81 @@ void SyncDialog::updateConfigIcons(wxBitmapButton* button1, { if (syncConfig.exLeftSideOnly == SYNC_DIR_RIGHT) { - button1->SetBitmapLabel(*GlobalResources::bitmapArrowRightCr); + button1->SetBitmapLabel(*globalResource.bitmapArrowRightCr); button1->SetToolTip(_("Copy from left to right")); } else if (syncConfig.exLeftSideOnly == SYNC_DIR_LEFT) { - button1->SetBitmapLabel(*GlobalResources::bitmapDeleteLeft); + button1->SetBitmapLabel(*globalResource.bitmapDeleteLeft); button1->SetToolTip(_("Delete files/folders existing on left side only")); } else if (syncConfig.exLeftSideOnly == SYNC_DIR_NONE) { - button1->SetBitmapLabel(*GlobalResources::bitmapArrowNone); + button1->SetBitmapLabel(*globalResource.bitmapArrowNone); button1->SetToolTip(_("Do nothing")); } if (syncConfig.exRightSideOnly == SYNC_DIR_RIGHT) { - button2->SetBitmapLabel(*GlobalResources::bitmapDeleteRight); + button2->SetBitmapLabel(*globalResource.bitmapDeleteRight); button2->SetToolTip(_("Delete files/folders existing on right side only")); } else if (syncConfig.exRightSideOnly == SYNC_DIR_LEFT) { - button2->SetBitmapLabel(*GlobalResources::bitmapArrowLeftCr); + button2->SetBitmapLabel(*globalResource.bitmapArrowLeftCr); button2->SetToolTip(_("Copy from right to left")); } else if (syncConfig.exRightSideOnly == SYNC_DIR_NONE) { - button2->SetBitmapLabel(*GlobalResources::bitmapArrowNone); + button2->SetBitmapLabel(*globalResource.bitmapArrowNone); button2->SetToolTip(_("Do nothing")); } if (syncConfig.leftNewer == SYNC_DIR_RIGHT) { - button3->SetBitmapLabel(*GlobalResources::bitmapArrowRight); + button3->SetBitmapLabel(*globalResource.bitmapArrowRight); button3->SetToolTip(_("Copy from left to right overwriting")); } else if (syncConfig.leftNewer == SYNC_DIR_LEFT) { - button3->SetBitmapLabel(*GlobalResources::bitmapArrowLeft); + button3->SetBitmapLabel(*globalResource.bitmapArrowLeft); button3->SetToolTip(_("Copy from right to left overwriting")); } else if (syncConfig.leftNewer == SYNC_DIR_NONE) { - button3->SetBitmapLabel(*GlobalResources::bitmapArrowNone); + button3->SetBitmapLabel(*globalResource.bitmapArrowNone); button3->SetToolTip(_("Do nothing")); } if (syncConfig.rightNewer == SYNC_DIR_RIGHT) { - button4->SetBitmapLabel(*GlobalResources::bitmapArrowRight); + button4->SetBitmapLabel(*globalResource.bitmapArrowRight); button4->SetToolTip(_("Copy from left to right overwriting")); } else if (syncConfig.rightNewer == SYNC_DIR_LEFT) { - button4->SetBitmapLabel(*GlobalResources::bitmapArrowLeft); + button4->SetBitmapLabel(*globalResource.bitmapArrowLeft); button4->SetToolTip(_("Copy from right to left overwriting")); } else if (syncConfig.rightNewer == SYNC_DIR_NONE) { - button4->SetBitmapLabel(*GlobalResources::bitmapArrowNone); + button4->SetBitmapLabel(*globalResource.bitmapArrowNone); button4->SetToolTip(_("Do nothing")); } if (syncConfig.different == SYNC_DIR_RIGHT) { - button5->SetBitmapLabel(*GlobalResources::bitmapArrowRight); + button5->SetBitmapLabel(*globalResource.bitmapArrowRight); button5->SetToolTip(_("Copy from left to right overwriting")); } else if (syncConfig.different == SYNC_DIR_LEFT) { - button5->SetBitmapLabel(*GlobalResources::bitmapArrowLeft); + button5->SetBitmapLabel(*globalResource.bitmapArrowLeft); button5->SetToolTip(_("Copy from right to left overwriting")); } else if (syncConfig.different == SYNC_DIR_NONE) { - button5->SetBitmapLabel(*GlobalResources::bitmapArrowNone); + button5->SetBitmapLabel(*globalResource.bitmapArrowNone); button5->SetToolTip(_("Do nothing")); } } @@ -349,9 +348,8 @@ void SyncDialog::OnDifferent( wxCommandEvent& event ) BatchDialog::BatchDialog(wxWindow* window, - const Configuration& config, - const wxString& leftDir, - const wxString& rightDir) : + const MainConfiguration& config, + const vector<FolderPair>& folderPairs) : BatchDlgGenerated(window) { //make working copy of mainDialog.cfg.syncConfiguration and recycler setting @@ -381,18 +379,40 @@ BatchDialog::BatchDialog(wxWindow* window, m_textCtrlInclude->SetValue(config.includeFilter); m_textCtrlExclude->SetValue(config.excludeFilter); - m_directoryPanel1->SetValue(leftDir); - m_directoryPanel2->SetValue(rightDir); - //set icons for this dialog - m_bitmap13->SetBitmap(*GlobalResources::bitmapLeftOnlyDeact); - m_bitmap14->SetBitmap(*GlobalResources::bitmapRightOnlyDeact); - m_bitmap15->SetBitmap(*GlobalResources::bitmapLeftNewerDeact); - m_bitmap16->SetBitmap(*GlobalResources::bitmapRightNewerDeact); - m_bitmap17->SetBitmap(*GlobalResources::bitmapDifferentDeact); - m_bitmap8->SetBitmap(*GlobalResources::bitmapInclude); - m_bitmap9->SetBitmap(*GlobalResources::bitmapExclude); + //add folder pairs + int scrWindowHeight = 0; + for (vector<FolderPair>::const_iterator i = folderPairs.begin(); i != folderPairs.end(); ++i) + { + BatchFolderPairGenerated* newPair = new BatchFolderPairGenerated(m_scrolledWindow6); + newPair->m_directoryLeft->SetValue(i->leftDirectory); + newPair->m_directoryRight->SetValue(i->rightDirectory); + + bSizerFolderPairs->Insert(0, newPair, 0, wxEXPAND, 5); + localFolderPairs.push_back(newPair); + if (i == folderPairs.begin()) + scrWindowHeight = newPair->GetSize().GetHeight(); + } + //set size of scrolled window + int pairCount = min(localFolderPairs.size(), size_t(3)); //up to 3 additional pairs shall be shown + m_scrolledWindow6->SetMinSize(wxSize( -1, scrWindowHeight * pairCount)); + + m_scrolledWindow6->Fit(); + m_scrolledWindow6->Layout(); + + + //set icons for this dialog + m_bitmap13->SetBitmap(*globalResource.bitmapLeftOnlyDeact); + m_bitmap14->SetBitmap(*globalResource.bitmapRightOnlyDeact); + m_bitmap15->SetBitmap(*globalResource.bitmapLeftNewerDeact); + m_bitmap16->SetBitmap(*globalResource.bitmapRightNewerDeact); + m_bitmap17->SetBitmap(*globalResource.bitmapDifferentDeact); + m_bitmap8->SetBitmap(*globalResource.bitmapInclude); + m_bitmap9->SetBitmap(*globalResource.bitmapExclude); + + Fit(); + Centre(); m_buttonCreate->SetFocus(); } @@ -404,7 +424,7 @@ void BatchDialog::updateFilterButton() { if (filterIsActive) { - m_bpButtonFilter->SetBitmapLabel(*GlobalResources::bitmapFilterOn); + m_bpButtonFilter->SetBitmapLabel(*globalResource.bitmapFilterOn); m_bpButtonFilter->SetToolTip(_("Filter active: Press again to deactivate")); m_textCtrlInclude->Enable(); @@ -412,7 +432,7 @@ void BatchDialog::updateFilterButton() } else { - m_bpButtonFilter->SetBitmapLabel(*GlobalResources::bitmapFilterOff); + m_bpButtonFilter->SetBitmapLabel(*globalResource.bitmapFilterOff); m_bpButtonFilter->SetToolTip(_("Press button to activate filter")); m_textCtrlInclude->Disable(); @@ -504,34 +524,9 @@ void BatchDialog::OnCancel(wxCommandEvent& event) void BatchDialog::OnCreateBatchJob(wxCommandEvent& event) { - if (m_directoryPanel1->GetValue().IsEmpty() || m_directoryPanel2->GetValue().IsEmpty()) - { - wxMessageBox(_("Please select both left and right directories!"), _("Information")); - return; - } - - //check if directories exist if loaded by config file - if (!wxDirExists(FreeFileSync::getFormattedDirectoryName(m_directoryPanel1->GetValue()))) - { - wxMessageBox(_("Left directory does not exist. Please select a new one!"), _("Warning"), wxICON_WARNING); - return; - } - else if (!wxDirExists(FreeFileSync::getFormattedDirectoryName(m_directoryPanel2->GetValue()))) - { - wxMessageBox(_("Right directory does not exist. Please select a new one!"), _("Warning"), wxICON_WARNING); - return; - } - //get a filename -#ifdef FFS_WIN - wxString fileName = _("SyncJob.lnk"); //proposal - wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, fileName, wxString(_("Shell link")) + wxT(" (*.lnk)|*.lnk"), wxFD_SAVE); -#elif defined FFS_LINUX - wxString fileName = _("SyncJob.sh"); //proposal - wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, fileName, wxString(_("Shell script")) + wxT(" (*.sh)|*.sh"), wxFD_SAVE); -#else - assert(false); -#endif + wxString fileName = _("SyncJob.ffs_batch"); //proposal + wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, fileName, wxString(_("FreeFileSync batch file")) + wxT(" (*.ffs_batch)|*.ffs_batch"), wxFD_SAVE); if (filePicker->ShowModal() == wxID_OK) { @@ -553,69 +548,55 @@ void BatchDialog::OnCreateBatchJob(wxCommandEvent& event) } -wxString getFormattedSyncDirection(const SyncDirection direction) -{ - if (direction == SYNC_DIR_RIGHT) - return wxChar('R'); - else if (direction == SYNC_DIR_LEFT) - return wxChar('L'); - else if (direction == SYNC_DIR_NONE) - return wxChar('N'); - else - { - assert (false); - return wxEmptyString; - } -} - - -wxString BatchDialog::getCommandlineArguments() +bool BatchDialog::createBatchFile(const wxString& filename) { - wxString output; + XmlOutput outputFile(filename, XML_BATCH_CONFIG); - output+= wxString(wxT("-")) + GlobalResources::paramCompare + wxT(" "); + //load structure with basic settings "mainCfg" + XmlMainConfig mainCfg; if (m_radioBtnSizeDate->GetValue()) - output+= GlobalResources::valueSizeDate; + mainCfg.cfg.compareVar = CMP_BY_TIME_SIZE; else if (m_radioBtnContent->GetValue()) - output+= GlobalResources::valueContent; + mainCfg.cfg.compareVar = CMP_BY_CONTENT; else - assert(false); + return false; - output+= wxString(wxT(" -")) + GlobalResources::paramSync + wxT(" ") + - getFormattedSyncDirection(localSyncConfiguration.exLeftSideOnly) + - getFormattedSyncDirection(localSyncConfiguration.exRightSideOnly) + - getFormattedSyncDirection(localSyncConfiguration.leftNewer) + - getFormattedSyncDirection(localSyncConfiguration.rightNewer) + - getFormattedSyncDirection(localSyncConfiguration.different); + mainCfg.cfg.syncConfiguration = localSyncConfiguration; + mainCfg.cfg.filterIsActive = filterIsActive; + mainCfg.cfg.includeFilter = m_textCtrlInclude->GetValue(); + mainCfg.cfg.excludeFilter = m_textCtrlExclude->GetValue(); + mainCfg.cfg.useRecycleBin = m_checkBoxUseRecycler->GetValue(); + mainCfg.cfg.continueOnError = m_checkBoxContinueError->GetValue(); - if (filterIsActive) + for (unsigned int i = 0; i < localFolderPairs.size(); ++i) { - output+= wxString(wxT(" -")) + GlobalResources::paramInclude + wxT(" ") + - wxT("\"") + m_textCtrlInclude->GetValue() + wxT("\""); + FolderPair newPair; + newPair.leftDirectory = localFolderPairs[i]->m_directoryLeft->GetValue(); + newPair.rightDirectory = localFolderPairs[i]->m_directoryRight->GetValue(); - output+= wxString(wxT(" -")) + GlobalResources::paramExclude + wxT(" ") + - wxT("\"") + m_textCtrlExclude->GetValue() + wxT("\""); + mainCfg.directoryPairs.push_back(newPair); } - if (m_checkBoxUseRecycler->GetValue()) - output+= wxString(wxT(" -")) + GlobalResources::paramRecycler; + //load structure with batch settings "batchCfg" + XmlBatchConfig batchCfg; + batchCfg.silent = m_checkBoxSilent->GetValue(); - if (m_checkBoxContinueError->GetValue()) - output+= wxString(wxT(" -")) + GlobalResources::paramContinueError; - - if (m_checkBoxSilent->GetValue()) - output+= wxString(wxT(" -")) + GlobalResources::paramSilent; - - wxString leftDir = FreeFileSync::getFormattedDirectoryName(m_directoryPanel1->GetValue()); - wxString rightDir = FreeFileSync::getFormattedDirectoryName(m_directoryPanel2->GetValue()); - - output+= wxString(wxT(" \"")) + wxDir(leftDir).GetName() + wxT("\""); //directory WITHOUT trailing path separator - output+= wxString(wxT(" \"")) + wxDir(rightDir).GetName() + wxT("\""); //needed since e.g. "C:\" isn't parsed correctly by commandline - - return output; + //populate and write XML tree + if ( !outputFile.writeXmlMainConfig(mainCfg) || //add basic configuration settings + !outputFile.writeXmlBatchConfig(batchCfg) || //add batch configuration settings + !outputFile.writeToFile()) //save XML + return false; + else + return true; } +/* +#ifdef FFS_WIN +#include <windows.h> +#include <shlobj.h> +#endif // FFS_WIN + template <typename T> struct CleanUp { @@ -677,29 +658,5 @@ bool BatchDialog::createBatchFile(const wxString& filename) return false; return true; - -//############################################################################ -#elif defined FFS_LINUX - //create shell script - wxFFile output(filename, wxT("w")); - if (output.IsOpened()) - { - wxString outputString; - outputString+= wxT("#!/bin/bash\n"); //shell script identifier - outputString+= wxString(wxT("\"")) + wxStandardPaths::Get().GetExecutablePath() + wxT("\" "); - outputString+= getCommandlineArguments() + wxT("\n"); - - if (!output.Write(outputString)) - return false; - - //for linux the batch file needs the executable flag - output.Close(); - wxExecute(wxString(wxT("chmod +x ")) + filename); - return true; - } - else - return false; -#else - adapt this! -#endif // FFS_LINUX } +*/ diff --git a/ui/SyncDialog.h b/ui/SyncDialog.h index bf2da634..de00539e 100644 --- a/ui/SyncDialog.h +++ b/ui/SyncDialog.h @@ -9,7 +9,7 @@ class SyncDialog: public SyncDlgGenerated public: SyncDialog(wxWindow* window, const FileCompareResult& gridDataRef, - Configuration& config, + MainConfiguration& config, bool synchronizationEnabled); ~SyncDialog(); @@ -47,7 +47,7 @@ private: //temporal copy of maindialog.cfg.syncConfiguration SyncConfiguration localSyncConfiguration; const FileCompareResult& gridData; - Configuration& cfg; + MainConfiguration& cfg; }; @@ -55,9 +55,8 @@ class BatchDialog: public BatchDlgGenerated { public: BatchDialog(wxWindow* window, - const Configuration& config, - const wxString& leftDir, - const wxString& rightDir); + const MainConfiguration& config, + const vector<FolderPair>& folderPairs); ~BatchDialog(); @@ -79,10 +78,12 @@ private: void OnCreateBatchJob( wxCommandEvent& event); void updateFilterButton(); - wxString getCommandlineArguments(); + bool createBatchFile(const wxString& filename); SyncConfiguration localSyncConfiguration; + vector<BatchFolderPairGenerated*> localFolderPairs; + bool filterIsActive; }; diff --git a/ui/guiGenerated.cpp b/ui/guiGenerated.cpp index 59362a9a..06f82d9f 100644 --- a/ui/guiGenerated.cpp +++ b/ui/guiGenerated.cpp @@ -13,1042 +13,1161 @@ GuiGenerated::GuiGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - m_menubar1 = new wxMenuBar( 0 ); - m_menu1 = new wxMenu(); - wxMenuItem* m_menuItem4; - m_menuItem4 = new wxMenuItem( m_menu1, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("CTRL-Q"), wxEmptyString, wxITEM_NORMAL ); - m_menu1->Append( m_menuItem4 ); - - m_menubar1->Append( m_menu1, _("&File") ); - - m_menu3 = new wxMenu(); - wxMenuItem* m_menuItem5; - m_menuItem5 = new wxMenuItem( m_menu3, wxID_ANY, wxString( _("&Export file list") ) , wxEmptyString, wxITEM_NORMAL ); - m_menu3->Append( m_menuItem5 ); - - m_menu31 = new wxMenu(); - m_menuItemEnglish = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("English") ) , wxEmptyString, wxITEM_RADIO ); - m_menu31->Append( m_menuItemEnglish ); - - m_menuItemGerman = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("Deutsch") ) , wxEmptyString, wxITEM_RADIO ); - m_menu31->Append( m_menuItemGerman ); - - m_menuItemFrench = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("Français") ) , wxEmptyString, wxITEM_RADIO ); - m_menu31->Append( m_menuItemFrench ); - - m_menuItemJapanese = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("日本語") ) , wxEmptyString, wxITEM_RADIO ); - m_menu31->Append( m_menuItemJapanese ); - - m_menu3->Append( -1, _("&Language"), m_menu31 ); - - m_menu3->AppendSeparator(); - - wxMenuItem* m_menuItem7; - m_menuItem7 = new wxMenuItem( m_menu3, wxID_ANY, wxString( _("&Create batch job") ) , wxEmptyString, wxITEM_NORMAL ); - m_menu3->Append( m_menuItem7 ); - - m_menubar1->Append( m_menu3, _("&Advanced") ); - - m_menu2 = new wxMenu(); - wxMenuItem* m_menuItem3; - m_menuItem3 = new wxMenuItem( m_menu2, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); - m_menu2->Append( m_menuItem3 ); - - m_menubar1->Append( m_menu2, _("&Help") ); - - this->SetMenuBar( m_menubar1 ); - - bSizer1 = new wxBoxSizer( wxVERTICAL ); - - m_panel71 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel71->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); - - bSizer6 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer6->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer30; - bSizer30 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonCompare = new wxBitmapButton( m_panel71, wxID_OK, wxNullBitmap, wxDefaultPosition, wxSize( 190,37 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - m_bpButtonCompare->SetDefault(); - m_bpButtonCompare->SetToolTip( _("Compare both sides") ); - - m_bpButtonCompare->SetToolTip( _("Compare both sides") ); - - bSizer30->Add( m_bpButtonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonAbort = new wxButton( m_panel71, wxID_CANCEL, _("Abort"), wxDefaultPosition, wxSize( 190,37 ), 0 ); - m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Tahoma") ) ); - m_buttonAbort->Enable( false ); - m_buttonAbort->Hide(); - - bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); - - bSizer6->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer55; - bSizer55 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer6; - sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( m_panel71, wxID_ANY, _("Compare by...") ), wxHORIZONTAL ); - - wxBoxSizer* bSizer45; - bSizer45 = new wxBoxSizer( wxVERTICAL ); - - m_radioBtnSizeDate = new wxRadioButton( m_panel71, wxID_ANY, _("File size and date"), wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnSizeDate->SetValue( true ); - m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - filesize\n - last write time (UTC) and date\nare the same.") ); - - bSizer45->Add( m_radioBtnSizeDate, 0, 0, 5 ); - - m_radioBtnContent = new wxRadioButton( m_panel71, wxID_ANY, _("File content"), wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same.") ); - - bSizer45->Add( m_radioBtnContent, 0, wxTOP, 5 ); - - sbSizer6->Add( bSizer45, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton14 = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButton14->SetToolTip( _("Help") ); - - m_bpButton14->SetToolTip( _("Help") ); - - sbSizer6->Add( m_bpButton14, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL, 2 ); - - - bSizer55->Add( 0, 4, 0, 0, 5 ); - - bSizer6->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer6->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer56; - bSizer56 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer9; - sbSizer9 = new wxStaticBoxSizer( new wxStaticBox( m_panel71, wxID_ANY, _("Filter files") ), wxHORIZONTAL ); - - m_bpButtonFilter = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - sbSizer9->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - wxBoxSizer* bSizer23; - bSizer23 = new wxBoxSizer( wxVERTICAL ); - - m_hyperlinkCfgFilter = new wxHyperlinkCtrl( m_panel71, wxID_ANY, _("Configure filter..."), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - - m_hyperlinkCfgFilter->SetNormalColour( wxColour( 0, 0, 255 ) ); - m_hyperlinkCfgFilter->SetVisitedColour( wxColour( 0, 0, 255 ) ); - m_hyperlinkCfgFilter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); - - bSizer23->Add( m_hyperlinkCfgFilter, 0, wxALL, 5 ); - - m_checkBoxHideFilt = new wxCheckBox( m_panel71, wxID_ANY, _("Hide filtered items"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxHideFilt->SetToolTip( _("Choose to hide filtered files/directories from list") ); - - bSizer23->Add( m_checkBoxHideFilt, 0, 0, 5 ); - - sbSizer9->Add( bSizer23, 0, 0, 5 ); - - bSizer56->Add( sbSizer9, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer56->Add( 0, 4, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer6->Add( bSizer56, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonSync = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 190,37 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - m_bpButtonSync->SetToolTip( _("Open synchronization dialog") ); - - m_bpButtonSync->SetToolTip( _("Open synchronization dialog") ); - - bSizer6->Add( m_bpButtonSync, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - - bSizer6->Add( 15, 0, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel71->SetSizer( bSizer6 ); - m_panel71->Layout(); - bSizer6->Fit( m_panel71 ); - bSizer1->Add( m_panel71, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer2; - bSizer2 = new wxBoxSizer( wxHORIZONTAL ); - - m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_panel1, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); - - m_directoryPanel1 = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer2->Add( m_directoryPanel1, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPicker1 = new wxDirPickerCtrl( m_panel1, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST ); - sbSizer2->Add( m_dirPicker1, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer7->Add( sbSizer2, 0, wxEXPAND, 5 ); - - m_grid1 = new CustomGrid( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_grid1->CreateGrid( 15, 4 ); - m_grid1->EnableEditing( false ); - m_grid1->EnableGridLines( true ); - m_grid1->EnableDragGridSize( true ); - m_grid1->SetMargins( 0, 0 ); - - // Columns - m_grid1->SetColSize( 0, 138 ); - m_grid1->SetColSize( 1, 118 ); - m_grid1->SetColSize( 2, 67 ); - m_grid1->SetColSize( 3, 113 ); - m_grid1->EnableDragColMove( false ); - m_grid1->EnableDragColSize( true ); - m_grid1->SetColLabelSize( 20 ); - m_grid1->SetColLabelValue( 0, _("Filename") ); - m_grid1->SetColLabelValue( 1, _("Relative path") ); - m_grid1->SetColLabelValue( 2, _("Size") ); - m_grid1->SetColLabelValue( 3, _("Date") ); - m_grid1->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - - // Rows - m_grid1->EnableDragRowSize( false ); - m_grid1->SetRowLabelSize( 38 ); - m_grid1->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_grid1->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - bSizer7->Add( m_grid1, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); - - m_panel1->SetSizer( bSizer7 ); - m_panel1->Layout(); - bSizer7->Fit( m_panel1 ); - bSizer2->Add( m_panel1, 1, wxEXPAND, 5 ); - - m_panel3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizer18 = new wxBoxSizer( wxVERTICAL ); - - bSizer69 = new wxBoxSizer( wxVERTICAL ); - - m_bpButtonSwap = new wxBitmapButton( m_panel3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - m_bpButtonSwap->SetToolTip( _("Swap sides") ); - - m_bpButtonSwap->SetToolTip( _("Swap sides") ); - - bSizer69->Add( m_bpButtonSwap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); - - bSizer18->Add( bSizer69, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_grid3 = new CustomGrid( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_grid3->CreateGrid( 15, 1 ); - m_grid3->EnableEditing( false ); - m_grid3->EnableGridLines( true ); - m_grid3->EnableDragGridSize( false ); - m_grid3->SetMargins( 0, 0 ); - - // Columns - m_grid3->SetColSize( 0, 45 ); - m_grid3->EnableDragColMove( false ); - m_grid3->EnableDragColSize( false ); - m_grid3->SetColLabelSize( 20 ); - m_grid3->SetColLabelValue( 0, _("Filter") ); - m_grid3->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Rows - m_grid3->EnableDragRowSize( false ); - m_grid3->SetRowLabelSize( 0 ); - m_grid3->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_grid3->SetDefaultCellFont( wxFont( 12, 74, 90, 92, false, wxT("Arial") ) ); - m_grid3->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - bSizer18->Add( m_grid3, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - m_panel3->SetSizer( bSizer18 ); - m_panel3->Layout(); - bSizer18->Fit( m_panel3 ); - bSizer2->Add( m_panel3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_panel2 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer3; - sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); - - m_directoryPanel2 = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer3->Add( m_directoryPanel2, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPicker2 = new wxDirPickerCtrl( m_panel2, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST ); - sbSizer3->Add( m_dirPicker2, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer10->Add( sbSizer3, 0, wxEXPAND, 5 ); - - m_grid2 = new CustomGrid( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_grid2->CreateGrid( 15, 4 ); - m_grid2->EnableEditing( false ); - m_grid2->EnableGridLines( true ); - m_grid2->EnableDragGridSize( true ); - m_grid2->SetMargins( 0, 0 ); - - // Columns - m_grid2->SetColSize( 0, 138 ); - m_grid2->SetColSize( 1, 118 ); - m_grid2->SetColSize( 2, 67 ); - m_grid2->SetColSize( 3, 113 ); - m_grid2->EnableDragColMove( false ); - m_grid2->EnableDragColSize( true ); - m_grid2->SetColLabelSize( 20 ); - m_grid2->SetColLabelValue( 0, _("Filename") ); - m_grid2->SetColLabelValue( 1, _("Relative path") ); - m_grid2->SetColLabelValue( 2, _("Size") ); - m_grid2->SetColLabelValue( 3, _("Date") ); - m_grid2->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - - // Rows - m_grid2->EnableDragRowSize( false ); - m_grid2->SetRowLabelSize( 38 ); - m_grid2->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_grid2->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - bSizer10->Add( m_grid2, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); - - m_panel2->SetSizer( bSizer10 ); - m_panel2->Layout(); - bSizer10->Fit( m_panel2 ); - bSizer2->Add( m_panel2, 1, wxEXPAND, 5 ); - - bSizer1->Add( bSizer2, 1, wxEXPAND, 5 ); - - m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizer3 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer58; - bSizer58 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer16; - sbSizer16 = new wxStaticBoxSizer( new wxStaticBox( m_panel4, wxID_ANY, _("Configuration") ), wxHORIZONTAL ); - - m_bpButton201 = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButton201->SetToolTip( _("Save current configuration to file") ); - - m_bpButton201->SetToolTip( _("Save current configuration to file") ); - - sbSizer16->Add( m_bpButton201, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - wxString m_choiceLoadChoices[] = { _("Load from file...") }; - int m_choiceLoadNChoices = sizeof( m_choiceLoadChoices ) / sizeof( wxString ); - m_choiceLoad = new wxChoice( m_panel4, wxID_ANY, wxDefaultPosition, wxSize( 140,-1 ), m_choiceLoadNChoices, m_choiceLoadChoices, 0 ); - m_choiceLoad->SetSelection( 0 ); - m_choiceLoad->SetToolTip( _("Load configuration via...\n - this list (press DEL to delete items)\n - drag & drop to this window\n - startup parameter") ); - - sbSizer16->Add( m_choiceLoad, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer58->Add( sbSizer16, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - - bSizer58->Add( 0, 4, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer3->Add( bSizer58, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel12 = new wxPanel( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer64; - bSizer64 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer31; - sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( m_panel12, wxID_ANY, _("Filter view") ), wxHORIZONTAL ); - - sbSizer31->SetMinSize( wxSize( 100,-1 ) ); - - sbSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bpButtonLeftOnly = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonLeftOnly->SetToolTip( _("Show files that exist on left side only") ); - - m_bpButtonLeftOnly->SetToolTip( _("Show files that exist on left side only") ); - - sbSizer31->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLeftNewer = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonLeftNewer->SetToolTip( _("Show files that are newer on left") ); - - m_bpButtonLeftNewer->SetToolTip( _("Show files that are newer on left") ); - - sbSizer31->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonEqual = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonEqual->SetToolTip( _("Show files that are equal") ); - - m_bpButtonEqual->SetToolTip( _("Show files that are equal") ); - - sbSizer31->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonDifferent = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonDifferent->SetToolTip( _("Show files that are different") ); - - m_bpButtonDifferent->SetToolTip( _("Show files that are different") ); - - sbSizer31->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonRightNewer = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonRightNewer->SetToolTip( _("Show files that are newer on right") ); - - m_bpButtonRightNewer->SetToolTip( _("Show files that are newer on right") ); - - sbSizer31->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonRightOnly = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonRightOnly->SetToolTip( _("Show files that exist on right side only") ); - - m_bpButtonRightOnly->SetToolTip( _("Show files that exist on right side only") ); - - sbSizer31->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - sbSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer64->Add( sbSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panel12->SetSizer( bSizer64 ); - m_panel12->Layout(); - bSizer64->Fit( m_panel12 ); - bSizer3->Add( m_panel12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 4 ); - - wxBoxSizer* bSizer66; - bSizer66 = new wxBoxSizer( wxVERTICAL ); - - m_bpButton10 = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW ); - m_bpButton10->SetToolTip( _("Quit") ); - - m_bpButton10->SetToolTip( _("Quit") ); - - bSizer66->Add( m_bpButton10, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - bSizer3->Add( bSizer66, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel4->SetSizer( bSizer3 ); - m_panel4->Layout(); - bSizer3->Fit( m_panel4 ); - bSizer1->Add( m_panel4, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_panel7 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer451; - bSizer451 = new wxBoxSizer( wxHORIZONTAL ); - - bSizer451->SetMinSize( wxSize( -1,22 ) ); - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatusLeft = new wxStaticText( m_panel7, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeft->Wrap( -1 ); - bSizer53->Add( m_staticTextStatusLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer451->Add( bSizer53, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticline9 = new wxStaticLine( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); - - - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatusMiddle = new wxStaticText( m_panel7, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusMiddle->Wrap( -1 ); - bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticline10 = new wxStaticLine( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); - - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatusRight = new wxStaticText( m_panel7, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRight->Wrap( -1 ); - bSizer52->Add( m_staticTextStatusRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer50; - bSizer50 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer50->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap15 = new wxStaticBitmap( m_panel7, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); - bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 2 ); - - bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); - - bSizer451->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel7->SetSizer( bSizer451 ); - m_panel7->Layout(); - bSizer451->Fit( m_panel7 ); - bSizer1->Add( m_panel7, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - this->SetSizer( bSizer1 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GuiGenerated::OnClose ) ); - this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuQuit ) ); - this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuExportFileList ) ); - this->Connect( m_menuItemEnglish->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangEnglish ) ); - this->Connect( m_menuItemGerman->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangGerman ) ); - this->Connect( m_menuItemFrench->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangFrench ) ); - this->Connect( m_menuItemJapanese->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangJapanese ) ); - this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuBatchJob ) ); - this->Connect( m_menuItem3->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuAbout ) ); - m_bpButtonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnCompare ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbortCompare ), NULL, this ); - m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByTimeSize ), NULL, this ); - m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByContent ), NULL, this ); - m_bpButton14->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnShowHelpDialog ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnFilterButton ), NULL, this ); - m_hyperlinkCfgFilter->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GuiGenerated::OnConfigureFilter ), NULL, this ); - m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GuiGenerated::OnHideFilteredButton ), NULL, this ); - m_bpButtonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSync ), NULL, this ); - m_directoryPanel1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterLeftDir ), NULL, this ); - m_dirPicker1->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel1 ), NULL, this ); - m_grid1->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnLeftGridDoubleClick ), NULL, this ); - m_grid1->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); - m_grid1->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortLeftGrid ), NULL, this ); - m_bpButtonSwap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSwapDirs ), NULL, this ); - m_grid3->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); - m_directoryPanel2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterRightDir ), NULL, this ); - m_dirPicker2->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel2 ), NULL, this ); - m_grid2->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnRightGridDoubleClick ), NULL, this ); - m_grid2->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); - m_grid2->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortRightGrid ), NULL, this ); - m_bpButton201->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSaveConfig ), NULL, this ); - m_choiceLoad->Connect( wxEVT_CHAR, wxKeyEventHandler( GuiGenerated::OnChoiceKeyEvent ), NULL, this ); - m_choiceLoad->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GuiGenerated::OnLoadConfiguration ), NULL, this ); - m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftOnlyFiles ), NULL, this ); - m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftNewerFiles ), NULL, this ); - m_bpButtonEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnEqualFiles ), NULL, this ); - m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnDifferentFiles ), NULL, this ); - m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightNewerFiles ), NULL, this ); - m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightOnlyFiles ), NULL, this ); - m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnQuit ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + m_menubar1 = new wxMenuBar( 0 ); + m_menu1 = new wxMenu(); + wxMenuItem* m_menuItem4; + m_menuItem4 = new wxMenuItem( m_menu1, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("CTRL-Q"), wxEmptyString, wxITEM_NORMAL ); + m_menu1->Append( m_menuItem4 ); + + m_menubar1->Append( m_menu1, _("&File") ); + + m_menu3 = new wxMenu(); + wxMenuItem* m_menuItem5; + m_menuItem5 = new wxMenuItem( m_menu3, wxID_ANY, wxString( _("&Export file list") ) , wxEmptyString, wxITEM_NORMAL ); + m_menu3->Append( m_menuItem5 ); + + m_menu31 = new wxMenu(); + m_menuItemEnglish = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("English") ) , wxEmptyString, wxITEM_RADIO ); + m_menu31->Append( m_menuItemEnglish ); + + m_menuItemGerman = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("Deutsch") ) , wxEmptyString, wxITEM_RADIO ); + m_menu31->Append( m_menuItemGerman ); + + m_menuItemFrench = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("Français") ) , wxEmptyString, wxITEM_RADIO ); + m_menu31->Append( m_menuItemFrench ); + + m_menuItemJapanese = new wxMenuItem( m_menu31, wxID_ANY, wxString( _("日本語") ) , wxEmptyString, wxITEM_RADIO ); + m_menu31->Append( m_menuItemJapanese ); + + m_menu3->Append( -1, _("&Language"), m_menu31 ); + + m_menu3->AppendSeparator(); + + wxMenuItem* m_menuItem7; + m_menuItem7 = new wxMenuItem( m_menu3, wxID_ANY, wxString( _("&Create batch job") ) , wxEmptyString, wxITEM_NORMAL ); + m_menu3->Append( m_menuItem7 ); + + m_menubar1->Append( m_menu3, _("&Advanced") ); + + m_menu2 = new wxMenu(); + wxMenuItem* m_menuItem3; + m_menuItem3 = new wxMenuItem( m_menu2, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menu2->Append( m_menuItem3 ); + + m_menubar1->Append( m_menu2, _("&Help") ); + + this->SetMenuBar( m_menubar1 ); + + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_panel71 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel71->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); + + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer6->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer30; + bSizer30 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonCompare = new wxBitmapButton( m_panel71, wxID_OK, wxNullBitmap, wxDefaultPosition, wxSize( 190,37 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + m_bpButtonCompare->SetDefault(); + m_bpButtonCompare->SetToolTip( _("Compare both sides") ); + + m_bpButtonCompare->SetToolTip( _("Compare both sides") ); + + bSizer30->Add( m_bpButtonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonAbort = new wxButton( m_panel71, wxID_CANCEL, _("Abort"), wxDefaultPosition, wxSize( 190,37 ), 0 ); + m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Tahoma") ) ); + m_buttonAbort->Enable( false ); + m_buttonAbort->Hide(); + + bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); + + bSizer6->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer55; + bSizer55 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer6; + sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( m_panel71, wxID_ANY, _("Compare by...") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer45; + bSizer45 = new wxBoxSizer( wxVERTICAL ); + + m_radioBtnSizeDate = new wxRadioButton( m_panel71, wxID_ANY, _("File size and date"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnSizeDate->SetValue( true ); + m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - filesize\n - last write time (UTC) and date\nare the same.") ); + + bSizer45->Add( m_radioBtnSizeDate, 0, 0, 5 ); + + m_radioBtnContent = new wxRadioButton( m_panel71, wxID_ANY, _("File content"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same.") ); + + bSizer45->Add( m_radioBtnContent, 0, wxTOP, 5 ); + + sbSizer6->Add( bSizer45, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton14 = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton14->SetToolTip( _("Help") ); + + m_bpButton14->SetToolTip( _("Help") ); + + sbSizer6->Add( m_bpButton14, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL, 2 ); + + + bSizer55->Add( 0, 4, 0, 0, 5 ); + + bSizer6->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer6->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer56; + bSizer56 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer9; + sbSizer9 = new wxStaticBoxSizer( new wxStaticBox( m_panel71, wxID_ANY, _("Filter files") ), wxHORIZONTAL ); + + m_bpButtonFilter = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + sbSizer9->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + wxBoxSizer* bSizer23; + bSizer23 = new wxBoxSizer( wxVERTICAL ); + + m_hyperlinkCfgFilter = new wxHyperlinkCtrl( m_panel71, wxID_ANY, _("Configure filter..."), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + + m_hyperlinkCfgFilter->SetNormalColour( wxColour( 0, 0, 255 ) ); + m_hyperlinkCfgFilter->SetVisitedColour( wxColour( 0, 0, 255 ) ); + m_hyperlinkCfgFilter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); + + bSizer23->Add( m_hyperlinkCfgFilter, 0, wxALL, 5 ); + + m_checkBoxHideFilt = new wxCheckBox( m_panel71, wxID_ANY, _("Hide filtered items"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxHideFilt->SetToolTip( _("Choose to hide filtered files/directories from list") ); + + bSizer23->Add( m_checkBoxHideFilt, 0, 0, 5 ); + + sbSizer9->Add( bSizer23, 0, 0, 5 ); + + bSizer56->Add( sbSizer9, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer56->Add( 0, 4, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer6->Add( bSizer56, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonSync = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 190,37 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + m_bpButtonSync->SetToolTip( _("Open synchronization dialog") ); + + m_bpButtonSync->SetToolTip( _("Open synchronization dialog") ); + + bSizer6->Add( m_bpButtonSync, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + bSizer6->Add( 15, 0, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel71->SetSizer( bSizer6 ); + m_panel71->Layout(); + bSizer6->Fit( m_panel71 ); + bSizer1->Add( m_panel71, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_scrolledWindowFolderPairs = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL ); + m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 ); + m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) ); + + bSizerFolderPairs = new wxBoxSizer( wxVERTICAL ); + + m_scrolledWindowFolderPairs->SetSizer( bSizerFolderPairs ); + m_scrolledWindowFolderPairs->Layout(); + bSizerFolderPairs->Fit( m_scrolledWindowFolderPairs ); + bSizer1->Add( m_scrolledWindowFolderPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_panel1, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + + m_directoryLeft = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer2->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPicker1 = new wxDirPickerCtrl( m_panel1, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST ); + sbSizer2->Add( m_dirPicker1, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer7->Add( sbSizer2, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_grid1 = new CustomGrid( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_grid1->CreateGrid( 15, 4 ); + m_grid1->EnableEditing( false ); + m_grid1->EnableGridLines( true ); + m_grid1->EnableDragGridSize( true ); + m_grid1->SetMargins( 0, 0 ); + + // Columns + m_grid1->SetColSize( 0, 138 ); + m_grid1->SetColSize( 1, 118 ); + m_grid1->SetColSize( 2, 67 ); + m_grid1->SetColSize( 3, 113 ); + m_grid1->EnableDragColMove( false ); + m_grid1->EnableDragColSize( true ); + m_grid1->SetColLabelSize( 20 ); + m_grid1->SetColLabelValue( 0, _("Filename") ); + m_grid1->SetColLabelValue( 1, _("Relative path") ); + m_grid1->SetColLabelValue( 2, _("Size") ); + m_grid1->SetColLabelValue( 3, _("Date") ); + m_grid1->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + + // Rows + m_grid1->EnableDragRowSize( false ); + m_grid1->SetRowLabelSize( 38 ); + m_grid1->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_grid1->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + bSizer7->Add( m_grid1, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); + + m_panel1->SetSizer( bSizer7 ); + m_panel1->Layout(); + bSizer7->Fit( m_panel1 ); + bSizer2->Add( m_panel1, 1, wxEXPAND, 5 ); + + m_panel3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizer18 = new wxBoxSizer( wxVERTICAL ); + + bSizer69 = new wxBoxSizer( wxVERTICAL ); + + m_bpButtonSwap = new wxBitmapButton( m_panel3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + m_bpButtonSwap->SetToolTip( _("Swap sides") ); + + m_bpButtonSwap->SetToolTip( _("Swap sides") ); + + bSizer69->Add( m_bpButtonSwap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + + bSizer18->Add( bSizer69, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_grid3 = new CustomGrid( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_grid3->CreateGrid( 15, 1 ); + m_grid3->EnableEditing( false ); + m_grid3->EnableGridLines( true ); + m_grid3->EnableDragGridSize( false ); + m_grid3->SetMargins( 0, 0 ); + + // Columns + m_grid3->SetColSize( 0, 45 ); + m_grid3->EnableDragColMove( false ); + m_grid3->EnableDragColSize( false ); + m_grid3->SetColLabelSize( 20 ); + m_grid3->SetColLabelValue( 0, _("Filter") ); + m_grid3->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_grid3->EnableDragRowSize( false ); + m_grid3->SetRowLabelSize( 0 ); + m_grid3->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_grid3->SetDefaultCellFont( wxFont( 12, 74, 90, 92, false, wxT("Arial") ) ); + m_grid3->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + bSizer18->Add( m_grid3, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_panel3->SetSizer( bSizer18 ); + m_panel3->Layout(); + bSizer18->Fit( m_panel3 ); + bSizer2->Add( m_panel3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_panel2 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer77; + bSizer77 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer781; + bSizer781 = new wxBoxSizer( wxVERTICAL ); + + + bSizer781->Add( 0, 3, 0, 0, 5 ); + + m_bpButtonAddPair = new wxBitmapButton( m_panel2, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 18,21 ), wxBU_AUTODRAW ); + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + bSizer781->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panel2, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 18,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer781->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer77->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer3; + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + + m_directoryRight = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer3->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPicker2 = new wxDirPickerCtrl( m_panel2, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST ); + sbSizer3->Add( m_dirPicker2, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer77->Add( sbSizer3, 1, wxRIGHT|wxLEFT, 5 ); + + bSizer10->Add( bSizer77, 0, wxEXPAND, 5 ); + + m_grid2 = new CustomGrid( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_grid2->CreateGrid( 15, 4 ); + m_grid2->EnableEditing( false ); + m_grid2->EnableGridLines( true ); + m_grid2->EnableDragGridSize( true ); + m_grid2->SetMargins( 0, 0 ); + + // Columns + m_grid2->SetColSize( 0, 138 ); + m_grid2->SetColSize( 1, 118 ); + m_grid2->SetColSize( 2, 67 ); + m_grid2->SetColSize( 3, 113 ); + m_grid2->EnableDragColMove( false ); + m_grid2->EnableDragColSize( true ); + m_grid2->SetColLabelSize( 20 ); + m_grid2->SetColLabelValue( 0, _("Filename") ); + m_grid2->SetColLabelValue( 1, _("Relative path") ); + m_grid2->SetColLabelValue( 2, _("Size") ); + m_grid2->SetColLabelValue( 3, _("Date") ); + m_grid2->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + + // Rows + m_grid2->EnableDragRowSize( false ); + m_grid2->SetRowLabelSize( 38 ); + m_grid2->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_grid2->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + bSizer10->Add( m_grid2, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); + + m_panel2->SetSizer( bSizer10 ); + m_panel2->Layout(); + bSizer10->Fit( m_panel2 ); + bSizer2->Add( m_panel2, 1, wxEXPAND, 5 ); + + bSizer1->Add( bSizer2, 1, wxEXPAND, 5 ); + + m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer58; + bSizer58 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer16; + sbSizer16 = new wxStaticBoxSizer( new wxStaticBox( m_panel4, wxID_ANY, _("Configuration") ), wxHORIZONTAL ); + + m_bpButton201 = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton201->SetToolTip( _("Save current configuration to file") ); + + m_bpButton201->SetToolTip( _("Save current configuration to file") ); + + sbSizer16->Add( m_bpButton201, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + wxString m_choiceLoadChoices[] = { _("Load from file...") }; + int m_choiceLoadNChoices = sizeof( m_choiceLoadChoices ) / sizeof( wxString ); + m_choiceLoad = new wxChoice( m_panel4, wxID_ANY, wxDefaultPosition, wxSize( 140,-1 ), m_choiceLoadNChoices, m_choiceLoadChoices, 0 ); + m_choiceLoad->SetSelection( 0 ); + m_choiceLoad->SetToolTip( _("Load configuration via...\n - this list (press DEL to delete items)\n - drag & drop to this window\n - startup parameter") ); + + sbSizer16->Add( m_choiceLoad, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer58->Add( sbSizer16, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + bSizer58->Add( 0, 4, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer3->Add( bSizer58, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel12 = new wxPanel( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer64; + bSizer64 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer31; + sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( m_panel12, wxID_ANY, _("Filter view") ), wxHORIZONTAL ); + + sbSizer31->SetMinSize( wxSize( 100,-1 ) ); + + sbSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bpButtonLeftOnly = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonLeftOnly->SetToolTip( _("Show files that exist on left side only") ); + + m_bpButtonLeftOnly->SetToolTip( _("Show files that exist on left side only") ); + + sbSizer31->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLeftNewer = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonLeftNewer->SetToolTip( _("Show files that are newer on left") ); + + m_bpButtonLeftNewer->SetToolTip( _("Show files that are newer on left") ); + + sbSizer31->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonEqual = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonEqual->SetToolTip( _("Show files that are equal") ); + + m_bpButtonEqual->SetToolTip( _("Show files that are equal") ); + + sbSizer31->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonDifferent = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonDifferent->SetToolTip( _("Show files that are different") ); + + m_bpButtonDifferent->SetToolTip( _("Show files that are different") ); + + sbSizer31->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonRightNewer = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonRightNewer->SetToolTip( _("Show files that are newer on right") ); + + m_bpButtonRightNewer->SetToolTip( _("Show files that are newer on right") ); + + sbSizer31->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonRightOnly = new wxBitmapButton( m_panel12, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonRightOnly->SetToolTip( _("Show files that exist on right side only") ); + + m_bpButtonRightOnly->SetToolTip( _("Show files that exist on right side only") ); + + sbSizer31->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer64->Add( sbSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_panel12->SetSizer( bSizer64 ); + m_panel12->Layout(); + bSizer64->Fit( m_panel12 ); + bSizer3->Add( m_panel12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 4 ); + + wxBoxSizer* bSizer66; + bSizer66 = new wxBoxSizer( wxVERTICAL ); + + m_bpButton10 = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW ); + m_bpButton10->SetToolTip( _("Quit") ); + + m_bpButton10->SetToolTip( _("Quit") ); + + bSizer66->Add( m_bpButton10, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); + + bSizer3->Add( bSizer66, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel4->SetSizer( bSizer3 ); + m_panel4->Layout(); + bSizer3->Fit( m_panel4 ); + bSizer1->Add( m_panel4, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_panel7 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer451; + bSizer451 = new wxBoxSizer( wxHORIZONTAL ); + + bSizer451->SetMinSize( wxSize( -1,22 ) ); + wxBoxSizer* bSizer53; + bSizer53 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusLeft = new wxStaticText( m_panel7, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeft->Wrap( -1 ); + bSizer53->Add( m_staticTextStatusLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer451->Add( bSizer53, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticline9 = new wxStaticLine( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusMiddle = new wxStaticText( m_panel7, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusMiddle->Wrap( -1 ); + bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline10 = new wxStaticLine( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); + + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusRight = new wxStaticText( m_panel7, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRight->Wrap( -1 ); + bSizer52->Add( m_staticTextStatusRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer50; + bSizer50 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer50->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap15 = new wxStaticBitmap( m_panel7, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); + bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 2 ); + + bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + + bSizer451->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel7->SetSizer( bSizer451 ); + m_panel7->Layout(); + bSizer451->Fit( m_panel7 ); + bSizer1->Add( m_panel7, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GuiGenerated::OnClose ) ); + this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuQuit ) ); + this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuExportFileList ) ); + this->Connect( m_menuItemEnglish->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangEnglish ) ); + this->Connect( m_menuItemGerman->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangGerman ) ); + this->Connect( m_menuItemFrench->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangFrench ) ); + this->Connect( m_menuItemJapanese->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangJapanese ) ); + this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuBatchJob ) ); + this->Connect( m_menuItem3->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuAbout ) ); + m_bpButtonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnCompare ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbortCompare ), NULL, this ); + m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByTimeSize ), NULL, this ); + m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByContent ), NULL, this ); + m_bpButton14->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnShowHelpDialog ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnFilterButton ), NULL, this ); + m_hyperlinkCfgFilter->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GuiGenerated::OnConfigureFilter ), NULL, this ); + m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GuiGenerated::OnHideFilteredButton ), NULL, this ); + m_bpButtonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSync ), NULL, this ); + m_directoryLeft->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnWriteDirManually ), NULL, this ); + m_dirPicker1->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirSelected ), NULL, this ); + m_grid1->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnLeftGridDoubleClick ), NULL, this ); + m_grid1->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); + m_grid1->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortLeftGrid ), NULL, this ); + m_bpButtonSwap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSwapDirs ), NULL, this ); + m_grid3->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); + m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRemoveFolderPair ), NULL, this ); + m_directoryRight->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnWriteDirManually ), NULL, this ); + m_dirPicker2->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirSelected ), NULL, this ); + m_grid2->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnRightGridDoubleClick ), NULL, this ); + m_grid2->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); + m_grid2->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortRightGrid ), NULL, this ); + m_bpButton201->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSaveConfig ), NULL, this ); + m_choiceLoad->Connect( wxEVT_CHAR, wxKeyEventHandler( GuiGenerated::OnChoiceKeyEvent ), NULL, this ); + m_choiceLoad->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GuiGenerated::OnLoadConfiguration ), NULL, this ); + m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftOnlyFiles ), NULL, this ); + m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftNewerFiles ), NULL, this ); + m_bpButtonEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnEqualFiles ), NULL, this ); + m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnDifferentFiles ), NULL, this ); + m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightNewerFiles ), NULL, this ); + m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightOnlyFiles ), NULL, this ); + m_bpButton10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnQuit ), NULL, this ); } GuiGenerated::~GuiGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GuiGenerated::OnClose ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuQuit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuExportFileList ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangEnglish ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangGerman ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangFrench ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangJapanese ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuBatchJob ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuAbout ) ); - m_bpButtonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnCompare ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbortCompare ), NULL, this ); - m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByTimeSize ), NULL, this ); - m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByContent ), NULL, this ); - m_bpButton14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnShowHelpDialog ), NULL, this ); - m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnFilterButton ), NULL, this ); - m_hyperlinkCfgFilter->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GuiGenerated::OnConfigureFilter ), NULL, this ); - m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GuiGenerated::OnHideFilteredButton ), NULL, this ); - m_bpButtonSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSync ), NULL, this ); - m_directoryPanel1->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterLeftDir ), NULL, this ); - m_dirPicker1->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel1 ), NULL, this ); - m_grid1->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnLeftGridDoubleClick ), NULL, this ); - m_grid1->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); - m_grid1->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortLeftGrid ), NULL, this ); - m_bpButtonSwap->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSwapDirs ), NULL, this ); - m_grid3->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); - m_directoryPanel2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnEnterRightDir ), NULL, this ); - m_dirPicker2->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirChangedPanel2 ), NULL, this ); - m_grid2->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnRightGridDoubleClick ), NULL, this ); - m_grid2->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); - m_grid2->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortRightGrid ), NULL, this ); - m_bpButton201->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSaveConfig ), NULL, this ); - m_choiceLoad->Disconnect( wxEVT_CHAR, wxKeyEventHandler( GuiGenerated::OnChoiceKeyEvent ), NULL, this ); - m_choiceLoad->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GuiGenerated::OnLoadConfiguration ), NULL, this ); - m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftOnlyFiles ), NULL, this ); - m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftNewerFiles ), NULL, this ); - m_bpButtonEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnEqualFiles ), NULL, this ); - m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnDifferentFiles ), NULL, this ); - m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightNewerFiles ), NULL, this ); - m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightOnlyFiles ), NULL, this ); - m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnQuit ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GuiGenerated::OnClose ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuQuit ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuExportFileList ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangEnglish ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangGerman ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangFrench ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuLangJapanese ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuBatchJob ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GuiGenerated::OnMenuAbout ) ); + m_bpButtonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnCompare ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAbortCompare ), NULL, this ); + m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByTimeSize ), NULL, this ); + m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( GuiGenerated::OnCompareByContent ), NULL, this ); + m_bpButton14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnShowHelpDialog ), NULL, this ); + m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnFilterButton ), NULL, this ); + m_hyperlinkCfgFilter->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( GuiGenerated::OnConfigureFilter ), NULL, this ); + m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GuiGenerated::OnHideFilteredButton ), NULL, this ); + m_bpButtonSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSync ), NULL, this ); + m_directoryLeft->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnWriteDirManually ), NULL, this ); + m_dirPicker1->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirSelected ), NULL, this ); + m_grid1->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnLeftGridDoubleClick ), NULL, this ); + m_grid1->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); + m_grid1->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortLeftGrid ), NULL, this ); + m_bpButtonSwap->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSwapDirs ), NULL, this ); + m_grid3->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); + m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRemoveFolderPair ), NULL, this ); + m_directoryRight->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GuiGenerated::OnWriteDirManually ), NULL, this ); + m_dirPicker2->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( GuiGenerated::OnDirSelected ), NULL, this ); + m_grid2->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( GuiGenerated::OnRightGridDoubleClick ), NULL, this ); + m_grid2->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( GuiGenerated::OnOpenContextMenu ), NULL, this ); + m_grid2->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( GuiGenerated::OnSortRightGrid ), NULL, this ); + m_bpButton201->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnSaveConfig ), NULL, this ); + m_choiceLoad->Disconnect( wxEVT_CHAR, wxKeyEventHandler( GuiGenerated::OnChoiceKeyEvent ), NULL, this ); + m_choiceLoad->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GuiGenerated::OnLoadConfiguration ), NULL, this ); + m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftOnlyFiles ), NULL, this ); + m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnLeftNewerFiles ), NULL, this ); + m_bpButtonEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnEqualFiles ), NULL, this ); + m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnDifferentFiles ), NULL, this ); + m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightNewerFiles ), NULL, this ); + m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnRightOnlyFiles ), NULL, this ); + m_bpButton10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GuiGenerated::OnQuit ), NULL, this ); +} + +FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* bSizer74; + bSizer74 = new wxBoxSizer( wxHORIZONTAL ); + + m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxStaticBoxSizer* sbSizer21; + sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panelLeft, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + + m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer21->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new wxDirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST ); + sbSizer21->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelLeft->SetSizer( sbSizer21 ); + m_panelLeft->Layout(); + sbSizer21->Fit( m_panelLeft ); + bSizer74->Add( m_panelLeft, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer78; + bSizer78 = new wxBoxSizer( wxVERTICAL ); + + + bSizer78->Add( 0, 12, 0, 0, 5 ); + + m_bitmap23 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 52,17 ), 0 ); + m_bitmap23->SetToolTip( _("Folder pair") ); + + bSizer78->Add( m_bitmap23, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer74->Add( bSizer78, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxStaticBoxSizer* sbSizer23; + sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( m_panelRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + + m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer23->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new wxDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DIR_MUST_EXIST ); + sbSizer23->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelRight->SetSizer( sbSizer23 ); + m_panelRight->Layout(); + sbSizer23->Fit( m_panelRight ); + bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + this->SetSizer( bSizer74 ); + this->Layout(); + bSizer74->Fit( this ); +} + +FolderPairGenerated::~FolderPairGenerated() +{ } BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer54; - bSizer54 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer69; - bSizer69 = new wxBoxSizer( wxVERTICAL ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Create a batch job"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer69->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer69->Add( 0, 5, 0, 0, 5 ); - - m_staticText54 = new wxStaticText( this, wxID_ANY, _("Assemble a batch file with the following settings. To start synchronization in batch mode simply execute this file or schedule it in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText54->Wrap( 380 ); - m_staticText54->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Tahoma") ) ); - - bSizer69->Add( m_staticText54, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer69->Add( 0, 5, 0, 0, 5 ); - - m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP, 5 ); - - m_staticText531 = new wxStaticText( this, wxID_ANY, _("Configuration overview:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText531->Wrap( -1 ); - m_staticText531->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Arial Black") ) ); - - bSizer69->Add( m_staticText531, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxStaticBoxSizer* sbSizer20; - sbSizer20 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - wxFlexGridSizer* fgSizer9; - fgSizer9 = new wxFlexGridSizer( 2, 2, 5, 5 ); - fgSizer9->AddGrowableCol( 1 ); - fgSizer9->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText53 = new wxStaticText( this, wxID_ANY, _("Left folder:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText53->Wrap( -1 ); - m_staticText53->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer9->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_directoryPanel1 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer9->Add( m_directoryPanel1, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText541 = new wxStaticText( this, wxID_ANY, _("Right folder:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText541->Wrap( -1 ); - m_staticText541->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer9->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_directoryPanel2 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer9->Add( m_directoryPanel2, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - sbSizer20->Add( fgSizer9, 0, wxEXPAND, 5 ); - - bSizer69->Add( sbSizer20, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - wxBoxSizer* bSizer67; - bSizer67 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer57; - bSizer57 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer71; - bSizer71 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer721; - bSizer721 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer6; - sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxVERTICAL ); - - m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, _("File size and date"), wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnSizeDate->SetValue( true ); - m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - filesize\n - last write time (UTC) and date\nare the same.") ); - - sbSizer6->Add( m_radioBtnSizeDate, 0, 0, 5 ); - - m_radioBtnContent = new wxRadioButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same.") ); - - sbSizer6->Add( m_radioBtnContent, 0, wxTOP, 5 ); - - bSizer721->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer721->Add( 0, 10, 1, 0, 5 ); - - wxBoxSizer* bSizer38; - bSizer38 = new wxBoxSizer( wxVERTICAL ); - - m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxUseRecycler->SetToolTip( _("Use Recycle Bin when deleting or overwriting files during synchronization") ); - - bSizer38->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_checkBoxContinueError = new wxCheckBox( this, wxID_ANY, _("Continue on error"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxContinueError->SetToolTip( _("Hides error messages during synchronization:\nThey are collected and shown as a list at the end of the process") ); - - bSizer38->Add( m_checkBoxContinueError, 0, wxALL, 5 ); - - m_checkBoxSilent = new wxCheckBox( this, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxSilent->SetToolTip( _("Do not show graphical status and error messages but write to a logfile instead") ); - - bSizer38->Add( m_checkBoxSilent, 0, wxALL, 5 ); - - bSizer721->Add( bSizer38, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer721->Add( 0, 10, 1, 0, 5 ); - - bSizer71->Add( bSizer721, 0, wxEXPAND, 5 ); - - - bSizer71->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bpButtonFilter = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - bSizer71->Add( m_bpButtonFilter, 0, wxALIGN_BOTTOM|wxRIGHT, 5 ); - - bSizer57->Add( bSizer71, 0, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer8; - sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - wxBoxSizer* bSizer671; - bSizer671 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer681; - bSizer681 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - bSizer681->Add( m_bitmap8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - m_staticText15->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer681->Add( m_staticText15, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer671->Add( bSizer681, 1, wxEXPAND, 5 ); - - m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 250,-1 ), 0 ); - bSizer671->Add( m_textCtrlInclude, 0, wxALL, 5 ); - - sbSizer8->Add( bSizer671, 0, 0, 5 ); - - - sbSizer8->Add( 0, 10, 0, 0, 5 ); - - wxBoxSizer* bSizer691; - bSizer691 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - bSizer70->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - m_staticText16->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer70->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer691->Add( bSizer70, 1, wxEXPAND, 5 ); - - m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 250,-1 ), 0 ); - bSizer691->Add( m_textCtrlExclude, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer8->Add( bSizer691, 0, 0, 5 ); - - bSizer57->Add( sbSizer8, 0, 0, 5 ); - - bSizer67->Add( bSizer57, 0, 0, 5 ); - - - bSizer67->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxStaticBoxSizer* sbSizer61; - sbSizer61 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); - - wxGridSizer* gSizer3; - gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); - - m_staticText211 = new wxStaticText( this, wxID_ANY, _("Result"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText211->Wrap( -1 ); - m_staticText211->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - gSizer3->Add( m_staticText211, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText311 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText311->Wrap( -1 ); - m_staticText311->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - gSizer3->Add( m_staticText311, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer61->Add( gSizer3, 0, wxEXPAND, 5 ); - - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizer61->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxGridSizer* gSizer1; - gSizer1 = new wxGridSizer( 5, 2, 0, 5 ); - - m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap13->SetToolTip( _("Files/folders that exist on left side only") ); - - gSizer1->Add( m_bitmap13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton5 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap14 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap14->SetToolTip( _("Files/folders that exist on right side only") ); - - gSizer1->Add( m_bitmap14, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton6 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap15 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap15->SetToolTip( _("Files that exist on both sides, left one is newer") ); - - gSizer1->Add( m_bitmap15, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton7 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap16 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap16->SetToolTip( _("Files that exist on both sides, right one is newer") ); - - gSizer1->Add( m_bitmap16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton8 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap17 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap17->SetToolTip( _("dummy") ); - - gSizer1->Add( m_bitmap17, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton9 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer61->Add( gSizer1, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bSizer67->Add( sbSizer61, 0, 0, 5 ); - - bSizer69->Add( bSizer67, 0, wxALL, 5 ); - - m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline9, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer68; - bSizer68 = new wxBoxSizer( wxHORIZONTAL ); - - m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button6->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonCreate = new wxButton( this, wxID_ANY, _("&Create"), wxDefaultPosition, wxSize( 120,35 ), 0 ); - m_buttonCreate->SetDefault(); - m_buttonCreate->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer68->Add( m_buttonCreate, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer69->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer54->Add( bSizer69, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer54 ); - this->Layout(); - bSizer54->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); - m_directoryPanel1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnEnterLeftDir ), NULL, this ); - m_directoryPanel2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnEnterRightDir ), NULL, this ); - m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); - m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); - m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSelectRecycleBin ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnFilterButton ), NULL, this ); - m_bpButton5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButton6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButton7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButton8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButton9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnDifferent ), NULL, this ); - m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); - m_buttonCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCreateBatchJob ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer54; + bSizer54 = new wxBoxSizer( wxVERTICAL ); + + bSizer69 = new wxBoxSizer( wxVERTICAL ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Create a batch job"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer69->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer69->Add( 0, 5, 0, 0, 5 ); + + m_staticText54 = new wxStaticText( this, wxID_ANY, _("Assemble a batch file with the following settings. To start synchronization in batch mode simply execute this file or schedule it in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText54->Wrap( 380 ); + m_staticText54->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Tahoma") ) ); + + bSizer69->Add( m_staticText54, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer69->Add( 0, 5, 0, 0, 5 ); + + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP, 5 ); + + m_staticText531 = new wxStaticText( this, wxID_ANY, _("Configuration overview:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText531->Wrap( -1 ); + m_staticText531->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Arial Black") ) ); + + bSizer69->Add( m_staticText531, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_scrolledWindow6 = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWindow6->SetScrollRate( 5, 5 ); + bSizerFolderPairs = new wxBoxSizer( wxVERTICAL ); + + m_scrolledWindow6->SetSizer( bSizerFolderPairs ); + m_scrolledWindow6->Layout(); + bSizerFolderPairs->Fit( m_scrolledWindow6 ); + bSizer69->Add( m_scrolledWindow6, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + wxBoxSizer* bSizer67; + bSizer67 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer57; + bSizer57 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer71; + bSizer71 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer721; + bSizer721 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer6; + sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxVERTICAL ); + + m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, _("File size and date"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnSizeDate->SetValue( true ); + m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - filesize\n - last write time (UTC) and date\nare the same.") ); + + sbSizer6->Add( m_radioBtnSizeDate, 0, 0, 5 ); + + m_radioBtnContent = new wxRadioButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same.") ); + + sbSizer6->Add( m_radioBtnContent, 0, wxTOP, 5 ); + + bSizer721->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer721->Add( 0, 10, 1, 0, 5 ); + + wxBoxSizer* bSizer38; + bSizer38 = new wxBoxSizer( wxVERTICAL ); + + m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxUseRecycler->SetToolTip( _("Use Recycle Bin when deleting or overwriting files during synchronization") ); + + bSizer38->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_checkBoxContinueError = new wxCheckBox( this, wxID_ANY, _("Continue on error"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxContinueError->SetToolTip( _("Hides error messages during synchronization:\nThey are collected and shown as a list at the end of the process") ); + + bSizer38->Add( m_checkBoxContinueError, 0, wxALL, 5 ); + + m_checkBoxSilent = new wxCheckBox( this, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxSilent->SetToolTip( _("Do not show graphical status and error messages but write to a logfile instead") ); + + bSizer38->Add( m_checkBoxSilent, 0, wxALL, 5 ); + + bSizer721->Add( bSizer38, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer721->Add( 0, 10, 1, 0, 5 ); + + bSizer71->Add( bSizer721, 0, wxEXPAND, 5 ); + + + bSizer71->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bpButtonFilter = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + bSizer71->Add( m_bpButtonFilter, 0, wxALIGN_BOTTOM|wxRIGHT, 5 ); + + bSizer57->Add( bSizer71, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer8; + sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxBoxSizer* bSizer671; + bSizer671 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer681; + bSizer681 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + bSizer681->Add( m_bitmap8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer681->Add( m_staticText15, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer671->Add( bSizer681, 1, wxEXPAND, 5 ); + + m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 250,-1 ), wxTE_MULTILINE ); + bSizer671->Add( m_textCtrlInclude, 0, wxALL|wxEXPAND, 5 ); + + sbSizer8->Add( bSizer671, 0, 0, 5 ); + + + sbSizer8->Add( 0, 10, 0, 0, 5 ); + + wxBoxSizer* bSizer691; + bSizer691 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + bSizer70->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + m_staticText16->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer70->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer691->Add( bSizer70, 1, wxEXPAND, 5 ); + + m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 250,-1 ), wxTE_MULTILINE ); + bSizer691->Add( m_textCtrlExclude, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer8->Add( bSizer691, 0, 0, 5 ); + + bSizer57->Add( sbSizer8, 0, 0, 5 ); + + bSizer67->Add( bSizer57, 0, 0, 5 ); + + + bSizer67->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxStaticBoxSizer* sbSizer61; + sbSizer61 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); + + wxGridSizer* gSizer3; + gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); + + m_staticText211 = new wxStaticText( this, wxID_ANY, _("Result"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText211->Wrap( -1 ); + m_staticText211->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + gSizer3->Add( m_staticText211, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText311 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText311->Wrap( -1 ); + m_staticText311->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + gSizer3->Add( m_staticText311, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer61->Add( gSizer3, 0, wxEXPAND, 5 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + sbSizer61->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 5, 2, 0, 5 ); + + m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap13->SetToolTip( _("Files/folders that exist on left side only") ); + + gSizer1->Add( m_bitmap13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton5 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap14 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap14->SetToolTip( _("Files/folders that exist on right side only") ); + + gSizer1->Add( m_bitmap14, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton6 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap15 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap15->SetToolTip( _("Files that exist on both sides, left one is newer") ); + + gSizer1->Add( m_bitmap15, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton7 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap16 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap16->SetToolTip( _("Files that exist on both sides, right one is newer") ); + + gSizer1->Add( m_bitmap16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton8 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap17 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap17->SetToolTip( _("dummy") ); + + gSizer1->Add( m_bitmap17, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton9 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer61->Add( gSizer1, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bSizer67->Add( sbSizer61, 0, 0, 5 ); + + bSizer69->Add( bSizer67, 0, wxALL, 5 ); + + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer69->Add( m_staticline9, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer68; + bSizer68 = new wxBoxSizer( wxHORIZONTAL ); + + m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button6->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonCreate = new wxButton( this, wxID_ANY, _("&Create"), wxDefaultPosition, wxSize( 120,35 ), 0 ); + m_buttonCreate->SetDefault(); + m_buttonCreate->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer68->Add( m_buttonCreate, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer69->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer54->Add( bSizer69, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer54 ); + this->Layout(); + bSizer54->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); + m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); + m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); + m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSelectRecycleBin ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnFilterButton ), NULL, this ); + m_bpButton5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButton6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButton7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButton8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButton9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnDifferent ), NULL, this ); + m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); + m_buttonCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCreateBatchJob ), NULL, this ); } BatchDlgGenerated::~BatchDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); - m_directoryPanel1->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnEnterLeftDir ), NULL, this ); - m_directoryPanel2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnEnterRightDir ), NULL, this ); - m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); - m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); - m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSelectRecycleBin ), NULL, this ); - m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnFilterButton ), NULL, this ); - m_bpButton5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButton6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButton7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButton8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButton9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnDifferent ), NULL, this ); - m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); - m_buttonCreate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCreateBatchJob ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); + m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); + m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeCompareVar ), NULL, this ); + m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSelectRecycleBin ), NULL, this ); + m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnFilterButton ), NULL, this ); + m_bpButton5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButton6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButton7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButton8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButton9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnDifferent ), NULL, this ); + m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); + m_buttonCreate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCreateBatchJob ), NULL, this ); +} + +BatchFolderPairGenerated::BatchFolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxStaticBoxSizer* sbSizer20; + sbSizer20 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer9; + fgSizer9 = new wxFlexGridSizer( 2, 2, 5, 5 ); + fgSizer9->AddGrowableCol( 1 ); + fgSizer9->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText53 = new wxStaticText( this, wxID_ANY, _("Left folder:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText53->Wrap( -1 ); + m_staticText53->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer9->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_directoryLeft = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer9->Add( m_directoryLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText541 = new wxStaticText( this, wxID_ANY, _("Right folder:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText541->Wrap( -1 ); + m_staticText541->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer9->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_directoryRight = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer9->Add( m_directoryRight, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer20->Add( fgSizer9, 0, wxEXPAND, 5 ); + + this->SetSizer( sbSizer20 ); + this->Layout(); + sbSizer20->Fit( this ); + + // Connect Events + m_directoryLeft->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchFolderPairGenerated::OnEnterLeftDir ), NULL, this ); + m_directoryRight->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchFolderPairGenerated::OnEnterRightDir ), NULL, this ); +} + +BatchFolderPairGenerated::~BatchFolderPairGenerated() +{ + // Disconnect Events + m_directoryLeft->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchFolderPairGenerated::OnEnterLeftDir ), NULL, this ); + m_directoryRight->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchFolderPairGenerated::OnEnterRightDir ), NULL, this ); } CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { - wxBoxSizer* bSizer40; - bSizer40 = new wxBoxSizer( wxVERTICAL ); - - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer10; - sbSizer10 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); - - m_staticText321 = new wxStaticText( this, wxID_ANY, _("Files/folders scanned:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText321->Wrap( -1 ); - m_staticText321->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - sbSizer10->Add( m_staticText321, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); - - m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextScanned->Wrap( -1 ); - m_staticTextScanned->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - sbSizer10->Add( m_staticTextScanned, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer42->Add( sbSizer10, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comparing content") ), wxVERTICAL ); - - wxFlexGridSizer* fgSizer8; - fgSizer8 = new wxFlexGridSizer( 2, 2, 3, 0 ); - fgSizer8->SetFlexibleDirection( wxBOTH ); - fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText46 = new wxStaticText( this, wxID_ANY, _("Files remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText46->Wrap( -1 ); - m_staticText46->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - fgSizer8->Add( m_staticText46, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticTextFilesToCompare = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextFilesToCompare->Wrap( -1 ); - m_staticTextFilesToCompare->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer8->Add( m_staticTextFilesToCompare, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText32 = new wxStaticText( this, wxID_ANY, _("Data remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText32->Wrap( -1 ); - m_staticText32->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - fgSizer8->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticTextDataToCompare = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataToCompare->Wrap( -1 ); - m_staticTextDataToCompare->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer8->Add( m_staticTextDataToCompare, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer13->Add( fgSizer8, 0, 0, 5 ); - - bSizer42->Add( sbSizer13, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer131; - sbSizer131 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); - - m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText37->Wrap( -1 ); - m_staticText37->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - sbSizer131->Add( m_staticText37, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - sbSizer131->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer42->Add( sbSizer131, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 ); - - wxBoxSizer* bSizer48; - bSizer48 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText30->Wrap( -1 ); - m_staticText30->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlFilename = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - m_textCtrlFilename->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer48->Add( m_textCtrlFilename, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer40->Add( bSizer48, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); - bSizer40->Add( m_gauge2, 0, wxALL|wxEXPAND, 5 ); - - this->SetSizer( bSizer40 ); - this->Layout(); - bSizer40->Fit( this ); + wxBoxSizer* bSizer40; + bSizer40 = new wxBoxSizer( wxVERTICAL ); + + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer10; + sbSizer10 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); + + m_staticText321 = new wxStaticText( this, wxID_ANY, _("Files/folders scanned:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText321->Wrap( -1 ); + m_staticText321->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + sbSizer10->Add( m_staticText321, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); + + m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextScanned->Wrap( -1 ); + m_staticTextScanned->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + sbSizer10->Add( m_staticTextScanned, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer42->Add( sbSizer10, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comparing content") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer8; + fgSizer8 = new wxFlexGridSizer( 2, 2, 3, 0 ); + fgSizer8->SetFlexibleDirection( wxBOTH ); + fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText46 = new wxStaticText( this, wxID_ANY, _("Files remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText46->Wrap( -1 ); + m_staticText46->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + fgSizer8->Add( m_staticText46, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextFilesToCompare = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFilesToCompare->Wrap( -1 ); + m_staticTextFilesToCompare->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer8->Add( m_staticTextFilesToCompare, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText32 = new wxStaticText( this, wxID_ANY, _("Data remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText32->Wrap( -1 ); + m_staticText32->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + fgSizer8->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextDataToCompare = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataToCompare->Wrap( -1 ); + m_staticTextDataToCompare->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer8->Add( m_staticTextDataToCompare, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer13->Add( fgSizer8, 0, 0, 5 ); + + bSizer42->Add( sbSizer13, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer131; + sbSizer131 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); + + m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText37->Wrap( -1 ); + m_staticText37->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + sbSizer131->Add( m_staticText37, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + sbSizer131->Add( m_staticTextTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer42->Add( sbSizer131, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 ); + + wxBoxSizer* bSizer48; + bSizer48 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText30->Wrap( -1 ); + m_staticText30->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlFilename = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + m_textCtrlFilename->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer48->Add( m_textCtrlFilename, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer40->Add( bSizer48, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); + bSizer40->Add( m_gauge2, 0, wxALL|wxEXPAND, 5 ); + + this->SetSizer( bSizer40 ); + this->Layout(); + bSizer40->Fit( this ); } CompareStatusGenerated::~CompareStatusGenerated() @@ -1057,1226 +1176,1226 @@ CompareStatusGenerated::~CompareStatusGenerated() SyncDlgGenerated::SyncDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer181; - bSizer181 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer29; - bSizer29 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer201; - bSizer201 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButton18 = new wxBitmapButton( this, wxID_OK, wxNullBitmap, wxDefaultPosition, wxSize( 140,58 ), wxBU_AUTODRAW ); - m_bpButton18->SetDefault(); - m_bpButton18->SetToolTip( _("Start synchronization") ); - - m_bpButton18->SetToolTip( _("Start synchronization") ); - - bSizer201->Add( m_bpButton18, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer201->Add( 18, 0, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer38; - bSizer38 = new wxBoxSizer( wxVERTICAL ); - - m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxUseRecycler->SetToolTip( _("Use Recycle Bin when deleting or overwriting files during synchronization") ); - - bSizer38->Add( m_checkBoxUseRecycler, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_checkBoxContinueError = new wxCheckBox( this, wxID_ANY, _("Continue on error"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxContinueError->SetToolTip( _("Hides error messages during synchronization:\nThey are collected and shown as a list at the end of the process") ); - - bSizer38->Add( m_checkBoxContinueError, 0, wxALL, 5 ); - - bSizer201->Add( bSizer38, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer29->Add( bSizer201, 1, 0, 5 ); - - - bSizer29->Add( 0, 5, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer7; - sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_staticText1 = new wxStaticText( this, wxID_ANY, _("Select variant:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1->Wrap( -1 ); - m_staticText1->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - sbSizer7->Add( m_staticText1, 0, wxALL, 5 ); - - wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 3, 3, 8, 5 ); - fgSizer1->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_radioBtn1 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtn1->SetValue( true ); - m_radioBtn1->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer1->Add( m_radioBtn1, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonOneWay = new wxButton( this, wxID_ANY, _("One way ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOneWay->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8->Wrap( 300 ); - fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_radioBtn2 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtn2->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer1->Add( m_radioBtn2, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonTwoWay = new wxButton( this, wxID_ANY, _("Two way <->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonTwoWay->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer1->Add( m_buttonTwoWay, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText10 = new wxStaticText( this, wxID_ANY, _("Synchronize both sides simultaneously: Copy new or updated files in both directions."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText10->Wrap( 300 ); - fgSizer1->Add( m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_radioBtn3 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtn3->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer1->Add( m_radioBtn3, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer65; - bSizer65 = new wxBoxSizer( wxVERTICAL ); - - - bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText23 = new wxStaticText( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE|wxSTATIC_BORDER ); - m_staticText23->Wrap( -1 ); - m_staticText23->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer65->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); - - fgSizer1->Add( bSizer65, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText9->Wrap( 300 ); - fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - sbSizer7->Add( fgSizer1, 0, 0, 5 ); - - bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 ); - - - bSizer29->Add( 0, 5, 0, 0, 5 ); - - wxBoxSizer* bSizer291; - bSizer291 = new wxBoxSizer( wxHORIZONTAL ); - - m_button6 = new wxButton( this, wxID_ANY, _("&Back"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_button6->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer291->Add( m_button6, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_button16 = new wxButton( this, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); - bSizer291->Add( m_button16, 0, wxALIGN_BOTTOM, 5 ); - - - bSizer291->Add( 20, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - wxStaticBoxSizer* sbSizer16; - sbSizer16 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Preview") ), wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer5; - fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 ); - fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText37 = new wxStaticText( this, wxID_ANY, _("Create:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText37->Wrap( -1 ); - m_staticText37->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - m_staticText37->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_staticText37, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlCreate = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlCreate->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); - m_textCtrlCreate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText14 = new wxStaticText( this, wxID_ANY, _("Delete:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText14->Wrap( -1 ); - m_staticText14->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - m_staticText14->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_staticText14, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlDelete = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlDelete->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); - m_textCtrlDelete->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer16->Add( fgSizer5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - wxFlexGridSizer* fgSizer6; - fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 ); - fgSizer6->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText42 = new wxStaticText( this, wxID_ANY, _("Update:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText42->Wrap( -1 ); - m_staticText42->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - m_staticText42->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer6->Add( m_staticText42, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlUpdate = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlUpdate->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); - m_textCtrlUpdate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer6->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText43 = new wxStaticText( this, wxID_ANY, _("Data:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText43->Wrap( -1 ); - m_staticText43->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - m_staticText43->SetToolTip( _("Total amount of data that will be transferred") ); - - fgSizer6->Add( m_staticText43, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); - m_textCtrlData->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); - m_textCtrlData->SetBackgroundColour( wxColour( 222, 222, 236 ) ); - m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); - - fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer16->Add( fgSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer291->Add( sbSizer16, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer29->Add( bSizer291, 0, wxEXPAND, 5 ); - - bSizer181->Add( bSizer29, 0, 0, 5 ); - - - bSizer181->Add( 10, 0, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer6; - sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); - - wxGridSizer* gSizer3; - gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); - - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Result"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - m_staticText21->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText31->Wrap( -1 ); - m_staticText31->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer6->Add( gSizer3, 0, wxEXPAND, 5 ); - - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizer6->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxGridSizer* gSizer1; - gSizer1 = new wxGridSizer( 5, 2, 0, 5 ); - - m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap13->SetToolTip( _("Files/folders that exist on left side only") ); - - gSizer1->Add( m_bitmap13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton5 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap14 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap14->SetToolTip( _("Files/folders that exist on right side only") ); - - gSizer1->Add( m_bitmap14, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton6 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap15 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap15->SetToolTip( _("Files that exist on both sides, left one is newer") ); - - gSizer1->Add( m_bitmap15, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton7 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap16 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap16->SetToolTip( _("Files that exist on both sides, right one is newer") ); - - gSizer1->Add( m_bitmap16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton8 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap17 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap17->SetToolTip( _("dummy") ); - - gSizer1->Add( m_bitmap17, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButton9 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - gSizer1->Add( m_bpButton9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer6->Add( gSizer1, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bSizer181->Add( sbSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 5 ); - - bSizer7->Add( bSizer181, 0, wxALL, 5 ); - - this->SetSizer( bSizer7 ); - this->Layout(); - bSizer7->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncDlgGenerated::OnClose ) ); - m_bpButton18->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnStartSync ), NULL, this ); - m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSelectRecycleBin ), NULL, this ); - m_radioBtn1->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_radioBtn2->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); - m_buttonTwoWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); - m_radioBtn3->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncCostum ), NULL, this ); - m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnBack ), NULL, this ); - m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnCancel ), NULL, this ); - m_bpButton5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButton6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButton7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButton8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButton9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnDifferent ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer29; + bSizer29 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer201; + bSizer201 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButton18 = new wxBitmapButton( this, wxID_OK, wxNullBitmap, wxDefaultPosition, wxSize( 140,58 ), wxBU_AUTODRAW ); + m_bpButton18->SetDefault(); + m_bpButton18->SetToolTip( _("Start synchronization") ); + + m_bpButton18->SetToolTip( _("Start synchronization") ); + + bSizer201->Add( m_bpButton18, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer201->Add( 18, 0, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer38; + bSizer38 = new wxBoxSizer( wxVERTICAL ); + + m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxUseRecycler->SetToolTip( _("Use Recycle Bin when deleting or overwriting files during synchronization") ); + + bSizer38->Add( m_checkBoxUseRecycler, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBoxContinueError = new wxCheckBox( this, wxID_ANY, _("Continue on error"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxContinueError->SetToolTip( _("Hides error messages during synchronization:\nThey are collected and shown as a list at the end of the process") ); + + bSizer38->Add( m_checkBoxContinueError, 0, wxALL, 5 ); + + bSizer201->Add( bSizer38, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer29->Add( bSizer201, 1, 0, 5 ); + + + bSizer29->Add( 0, 5, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer7; + sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Select variant:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + m_staticText1->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + sbSizer7->Add( m_staticText1, 0, wxALL, 5 ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 3, 3, 8, 5 ); + fgSizer1->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_radioBtn1 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtn1->SetValue( true ); + m_radioBtn1->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer1->Add( m_radioBtn1, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonOneWay = new wxButton( this, wxID_ANY, _("One way ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOneWay->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder: Right folder will be overwritten and exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8->Wrap( 300 ); + fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_radioBtn2 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtn2->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer1->Add( m_radioBtn2, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonTwoWay = new wxButton( this, wxID_ANY, _("Two way <->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonTwoWay->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer1->Add( m_buttonTwoWay, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText10 = new wxStaticText( this, wxID_ANY, _("Synchronize both sides simultaneously: Copy new or updated files in both directions."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText10->Wrap( 300 ); + fgSizer1->Add( m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_radioBtn3 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtn3->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer1->Add( m_radioBtn3, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer65; + bSizer65 = new wxBoxSizer( wxVERTICAL ); + + + bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText23 = new wxStaticText( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE|wxSTATIC_BORDER ); + m_staticText23->Wrap( -1 ); + m_staticText23->SetFont( wxFont( 11, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer65->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); + + fgSizer1->Add( bSizer65, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( 300 ); + fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + sbSizer7->Add( fgSizer1, 0, 0, 5 ); + + bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 ); + + + bSizer29->Add( 0, 5, 0, 0, 5 ); + + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxHORIZONTAL ); + + m_button6 = new wxButton( this, wxID_ANY, _("&Back"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_button6->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer291->Add( m_button6, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_button16 = new wxButton( this, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); + bSizer291->Add( m_button16, 0, wxALIGN_BOTTOM, 5 ); + + + bSizer291->Add( 20, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxStaticBoxSizer* sbSizer16; + sbSizer16 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Preview") ), wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer5; + fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 ); + fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText37 = new wxStaticText( this, wxID_ANY, _("Create:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText37->Wrap( -1 ); + m_staticText37->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + m_staticText37->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_staticText37, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlCreate = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlCreate->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); + m_textCtrlCreate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, _("Delete:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + m_staticText14->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + m_staticText14->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer5->Add( m_staticText14, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlDelete = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlDelete->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); + m_textCtrlDelete->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer5->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer16->Add( fgSizer5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxFlexGridSizer* fgSizer6; + fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 ); + fgSizer6->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText42 = new wxStaticText( this, wxID_ANY, _("Update:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText42->Wrap( -1 ); + m_staticText42->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + m_staticText42->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer6->Add( m_staticText42, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlUpdate = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlUpdate->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); + m_textCtrlUpdate->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer6->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText43 = new wxStaticText( this, wxID_ANY, _("Data:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText43->Wrap( -1 ); + m_staticText43->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + m_staticText43->SetToolTip( _("Total amount of data that will be transferred") ); + + fgSizer6->Add( m_staticText43, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY ); + m_textCtrlData->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); + m_textCtrlData->SetBackgroundColour( wxColour( 222, 222, 236 ) ); + m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); + + fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer16->Add( fgSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer291->Add( sbSizer16, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + bSizer29->Add( bSizer291, 0, wxEXPAND, 5 ); + + bSizer181->Add( bSizer29, 0, 0, 5 ); + + + bSizer181->Add( 10, 0, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer6; + sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); + + wxGridSizer* gSizer3; + gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Result"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + m_staticText21->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText31->Wrap( -1 ); + m_staticText31->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer6->Add( gSizer3, 0, wxEXPAND, 5 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + sbSizer6->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 5, 2, 0, 5 ); + + m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap13->SetToolTip( _("Files/folders that exist on left side only") ); + + gSizer1->Add( m_bitmap13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton5 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap14 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap14->SetToolTip( _("Files/folders that exist on right side only") ); + + gSizer1->Add( m_bitmap14, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton6 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap15 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap15->SetToolTip( _("Files that exist on both sides, left one is newer") ); + + gSizer1->Add( m_bitmap15, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton7 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap16 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap16->SetToolTip( _("Files that exist on both sides, right one is newer") ); + + gSizer1->Add( m_bitmap16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton8 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap17 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + m_bitmap17->SetToolTip( _("dummy") ); + + gSizer1->Add( m_bitmap17, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButton9 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + gSizer1->Add( m_bpButton9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer6->Add( gSizer1, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bSizer181->Add( sbSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 5 ); + + bSizer7->Add( bSizer181, 0, wxALL, 5 ); + + this->SetSizer( bSizer7 ); + this->Layout(); + bSizer7->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncDlgGenerated::OnClose ) ); + m_bpButton18->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnStartSync ), NULL, this ); + m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSelectRecycleBin ), NULL, this ); + m_radioBtn1->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_radioBtn2->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); + m_buttonTwoWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); + m_radioBtn3->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncCostum ), NULL, this ); + m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnBack ), NULL, this ); + m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnCancel ), NULL, this ); + m_bpButton5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButton6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButton7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButton8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButton9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnDifferent ), NULL, this ); } SyncDlgGenerated::~SyncDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncDlgGenerated::OnClose ) ); - m_bpButton18->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnStartSync ), NULL, this ); - m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSelectRecycleBin ), NULL, this ); - m_radioBtn1->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_radioBtn2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); - m_buttonTwoWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); - m_radioBtn3->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncCostum ), NULL, this ); - m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnBack ), NULL, this ); - m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnCancel ), NULL, this ); - m_bpButton5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButton6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButton7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButton8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButton9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnDifferent ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncDlgGenerated::OnClose ) ); + m_bpButton18->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnStartSync ), NULL, this ); + m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSelectRecycleBin ), NULL, this ); + m_radioBtn1->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_radioBtn2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); + m_buttonTwoWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnSyncBothSides ), NULL, this ); + m_radioBtn3->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncDlgGenerated::OnSyncCostum ), NULL, this ); + m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnBack ), NULL, this ); + m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnCancel ), NULL, this ); + m_bpButton5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButton6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButton7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButton8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButton9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncDlgGenerated::OnDifferent ), NULL, this ); } SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer27; - bSizer27 = new wxBoxSizer( wxVERTICAL ); - - - bSizer27->Add( 0, 15, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer37; - bSizer37 = new wxBoxSizer( wxHORIZONTAL ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Synchronization status"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer37->Add( m_panel8, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( 45,45 )); - bSizer37->Add( m_animationControl1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer27->Add( bSizer37, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer42; - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bitmapStatus = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); - bSizer42->Add( m_bitmapStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatus->Wrap( -1 ); - m_staticTextStatus->SetFont( wxFont( 14, 74, 93, 90, false, wxT("Tahoma") ) ); - - bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer27->Add( bSizer42, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer31 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Current operation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - m_staticText21->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer31->Add( m_staticText21, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText55->Wrap( -1 ); - m_staticText55->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - - bSizer31->Add( m_staticText55, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - - m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer31->Add( m_staticTextTimeElapsed, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer27->Add( bSizer31, 0, wxEXPAND, 5 ); - - m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer27->Add( m_textCtrlInfo, 3, wxALL|wxEXPAND, 5 ); - - m_gauge1 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); - bSizer27->Add( m_gauge1, 0, wxALL|wxEXPAND, 5 ); - - bSizer28 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer33; - bSizer33 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText25 = new wxStaticText( this, wxID_ANY, _("Files/folders remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText25->Wrap( -1 ); - m_staticText25->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - - bSizer33->Add( m_staticText25, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_staticTextRemainingObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticTextRemainingObj->Wrap( -1 ); - m_staticTextRemainingObj->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer33->Add( m_staticTextRemainingObj, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer28->Add( bSizer33, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer28->Add( 0, 0, 1, 0, 5 ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonOK->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - m_buttonOK->Hide(); - - bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonPause->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonAbort->SetDefault(); - m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer28->Add( 0, 0, 1, 0, 5 ); - - wxBoxSizer* bSizer32; - bSizer32 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText26 = new wxStaticText( this, wxID_ANY, _("Data remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText26->Wrap( -1 ); - m_staticText26->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - - bSizer32->Add( m_staticText26, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataRemaining->Wrap( -1 ); - m_staticTextDataRemaining->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer32->Add( m_staticTextDataRemaining, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer28->Add( bSizer32, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer27->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - - bSizer27->Add( 0, 5, 0, wxEXPAND, 5 ); - - this->SetSizer( bSizer27 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); - m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer27; + bSizer27 = new wxBoxSizer( wxVERTICAL ); + + + bSizer27->Add( 0, 15, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer37; + bSizer37 = new wxBoxSizer( wxHORIZONTAL ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Synchronization status"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer37->Add( m_panel8, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( 45,45 )); + bSizer37->Add( m_animationControl1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer27->Add( bSizer37, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer42; + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bitmapStatus = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); + bSizer42->Add( m_bitmapStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatus->Wrap( -1 ); + m_staticTextStatus->SetFont( wxFont( 14, 74, 93, 90, false, wxT("Tahoma") ) ); + + bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer27->Add( bSizer42, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer31 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Current operation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + m_staticText21->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer31->Add( m_staticText21, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText55->Wrap( -1 ); + m_staticText55->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + + bSizer31->Add( m_staticText55, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer31->Add( m_staticTextTimeElapsed, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer27->Add( bSizer31, 0, wxEXPAND, 5 ); + + m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlInfo->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer27->Add( m_textCtrlInfo, 3, wxALL|wxEXPAND, 5 ); + + m_gauge1 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); + bSizer27->Add( m_gauge1, 0, wxALL|wxEXPAND, 5 ); + + bSizer28 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer33; + bSizer33 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText25 = new wxStaticText( this, wxID_ANY, _("Files/folders remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText25->Wrap( -1 ); + m_staticText25->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + + bSizer33->Add( m_staticText25, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_staticTextRemainingObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextRemainingObj->Wrap( -1 ); + m_staticTextRemainingObj->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer33->Add( m_staticTextRemainingObj, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer28->Add( bSizer33, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer28->Add( 0, 0, 1, 0, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonOK->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + m_buttonOK->Hide(); + + bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonPause->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonAbort->SetDefault(); + m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer28->Add( 0, 0, 1, 0, 5 ); + + wxBoxSizer* bSizer32; + bSizer32 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText26 = new wxStaticText( this, wxID_ANY, _("Data remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText26->Wrap( -1 ); + m_staticText26->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + + bSizer32->Add( m_staticText26, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataRemaining->Wrap( -1 ); + m_staticTextDataRemaining->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer32->Add( m_staticTextDataRemaining, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer28->Add( bSizer32, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer27->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + + bSizer27->Add( 0, 5, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer27 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); + m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); } SyncStatusDlgGenerated::~SyncStatusDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); - m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); + m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); } HelpDlgGenerated::HelpDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer20; - bSizer20 = new wxBoxSizer( wxVERTICAL ); - - - bSizer20->Add( 0, 10, 0, wxEXPAND, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer72->Add( 20, 0, 0, 0, 5 ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - - bSizer72->Add( 20, 0, 0, 0, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer20->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer20->Add( 0, 5, 0, wxEXPAND, 5 ); - - m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_scrolledWindow1 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); - m_scrolledWindow1->SetScrollRate( 5, 5 ); - m_scrolledWindow1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxVERTICAL ); - - m_staticText59 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("Compare by \"File size and date\""), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText59->Wrap( 500 ); - m_staticText59->SetFont( wxFont( 10, 74, 90, 92, true, wxT("Tahoma") ) ); - - bSizer70->Add( m_staticText59, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText60 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time. Notice that the file time is allowed to deviate by up to 2 seconds. This ensures synchronization with the lower-precision file system FAT32 works correctly."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText60->Wrap( 500 ); - bSizer70->Add( m_staticText60, 0, wxALL, 5 ); - - m_staticText61 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("When \"Compare\" is triggered with this option set the following decision tree is processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText61->Wrap( 500 ); - bSizer70->Add( m_staticText61, 0, wxALL, 5 ); - - m_treeCtrl1 = new wxTreeCtrl( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxSize( -1,180 ), wxTR_DEFAULT_STYLE ); - m_treeCtrl1->SetBackgroundColour( wxColour( 237, 236, 235 ) ); - - bSizer70->Add( m_treeCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_staticText63 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("As a result 6 different status can be returned to categorize all files:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText63->Wrap( 500 ); - bSizer70->Add( m_staticText63, 0, wxALL, 5 ); - - m_staticText75 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText75->Wrap( -1 ); - bSizer70->Add( m_staticText75, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText76 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- left newer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText76->Wrap( -1 ); - bSizer70->Add( m_staticText76, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText77 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- right newer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText77->Wrap( -1 ); - bSizer70->Add( m_staticText77, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText78 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- different (same date, different size)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText78->Wrap( -1 ); - bSizer70->Add( m_staticText78, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText79 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText79->Wrap( -1 ); - bSizer70->Add( m_staticText79, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText80 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText80->Wrap( -1 ); - bSizer70->Add( m_staticText80, 0, wxRIGHT|wxLEFT, 5 ); - - m_scrolledWindow1->SetSizer( bSizer70 ); - m_scrolledWindow1->Layout(); - bSizer70->Fit( m_scrolledWindow1 ); - m_notebook1->AddPage( m_scrolledWindow1, _("File size and date"), true ); - m_scrolledWindow5 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_scrolledWindow5->SetScrollRate( 5, 5 ); - m_scrolledWindow5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); - - wxBoxSizer* bSizer74; - bSizer74 = new wxBoxSizer( wxVERTICAL ); - - m_staticText65 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("Compare by \"File content\""), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText65->Wrap( 500 ); - m_staticText65->SetFont( wxFont( 10, 74, 90, 92, true, wxT("Tahoma") ) ); - - bSizer74->Add( m_staticText65, 0, wxALL, 5 ); - - m_staticText66 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText66->Wrap( 500 ); - bSizer74->Add( m_staticText66, 0, wxALL, 5 ); - - m_treeCtrl2 = new wxTreeCtrl( m_scrolledWindow5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE ); - m_treeCtrl2->SetBackgroundColour( wxColour( 237, 236, 235 ) ); - m_treeCtrl2->SetMinSize( wxSize( -1,130 ) ); - - bSizer74->Add( m_treeCtrl2, 0, wxALL|wxEXPAND, 5 ); - - m_staticText69 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText69->Wrap( 500 ); - bSizer74->Add( m_staticText69, 0, wxALL, 5 ); - - m_staticText81 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText81->Wrap( -1 ); - bSizer74->Add( m_staticText81, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText82 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- different"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText82->Wrap( -1 ); - bSizer74->Add( m_staticText82, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText83 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText83->Wrap( -1 ); - bSizer74->Add( m_staticText83, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText84 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - bSizer74->Add( m_staticText84, 0, wxRIGHT|wxLEFT, 5 ); - - m_scrolledWindow5->SetSizer( bSizer74 ); - m_scrolledWindow5->Layout(); - bSizer74->Fit( m_scrolledWindow5 ); - m_notebook1->AddPage( m_scrolledWindow5, _("File content"), false ); - - bSizer20->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 ); - - m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_button8->SetDefault(); - m_button8->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer20->Add( m_button8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer20 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); - m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxVERTICAL ); + + + bSizer20->Add( 0, 10, 0, wxEXPAND, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer72->Add( 20, 0, 0, 0, 5 ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + + bSizer72->Add( 20, 0, 0, 0, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer20->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer20->Add( 0, 5, 0, wxEXPAND, 5 ); + + m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_scrolledWindow1 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); + m_scrolledWindow1->SetScrollRate( 5, 5 ); + m_scrolledWindow1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxVERTICAL ); + + m_staticText59 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("Compare by \"File size and date\""), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText59->Wrap( 500 ); + m_staticText59->SetFont( wxFont( 10, 74, 90, 92, true, wxT("Tahoma") ) ); + + bSizer70->Add( m_staticText59, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText60 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time. Notice that the file time is allowed to deviate by up to 2 seconds. This ensures synchronization with the lower-precision file system FAT32 works correctly."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText60->Wrap( 500 ); + bSizer70->Add( m_staticText60, 0, wxALL, 5 ); + + m_staticText61 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("When \"Compare\" is triggered with this option set the following decision tree is processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText61->Wrap( 500 ); + bSizer70->Add( m_staticText61, 0, wxALL, 5 ); + + m_treeCtrl1 = new wxTreeCtrl( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxSize( -1,180 ), wxTR_DEFAULT_STYLE ); + m_treeCtrl1->SetBackgroundColour( wxColour( 237, 236, 235 ) ); + + bSizer70->Add( m_treeCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticText63 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("As a result 6 different status can be returned to categorize all files:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText63->Wrap( 500 ); + bSizer70->Add( m_staticText63, 0, wxALL, 5 ); + + m_staticText75 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText75->Wrap( -1 ); + bSizer70->Add( m_staticText75, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText76 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- left newer"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText76->Wrap( -1 ); + bSizer70->Add( m_staticText76, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText77 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- right newer"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText77->Wrap( -1 ); + bSizer70->Add( m_staticText77, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText78 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- different (same date, different size)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText78->Wrap( -1 ); + bSizer70->Add( m_staticText78, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText79 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText79->Wrap( -1 ); + bSizer70->Add( m_staticText79, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText80 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText80->Wrap( -1 ); + bSizer70->Add( m_staticText80, 0, wxRIGHT|wxLEFT, 5 ); + + m_scrolledWindow1->SetSizer( bSizer70 ); + m_scrolledWindow1->Layout(); + bSizer70->Fit( m_scrolledWindow1 ); + m_notebook1->AddPage( m_scrolledWindow1, _("File size and date"), true ); + m_scrolledWindow5 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWindow5->SetScrollRate( 5, 5 ); + m_scrolledWindow5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); + + wxBoxSizer* bSizer74; + bSizer74 = new wxBoxSizer( wxVERTICAL ); + + m_staticText65 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("Compare by \"File content\""), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText65->Wrap( 500 ); + m_staticText65->SetFont( wxFont( 10, 74, 90, 92, true, wxT("Tahoma") ) ); + + bSizer74->Add( m_staticText65, 0, wxALL, 5 ); + + m_staticText66 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText66->Wrap( 500 ); + bSizer74->Add( m_staticText66, 0, wxALL, 5 ); + + m_treeCtrl2 = new wxTreeCtrl( m_scrolledWindow5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE ); + m_treeCtrl2->SetBackgroundColour( wxColour( 237, 236, 235 ) ); + m_treeCtrl2->SetMinSize( wxSize( -1,130 ) ); + + bSizer74->Add( m_treeCtrl2, 0, wxALL|wxEXPAND, 5 ); + + m_staticText69 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText69->Wrap( 500 ); + bSizer74->Add( m_staticText69, 0, wxALL, 5 ); + + m_staticText81 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( -1 ); + bSizer74->Add( m_staticText81, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText82 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- different"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText82->Wrap( -1 ); + bSizer74->Add( m_staticText82, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText83 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + bSizer74->Add( m_staticText83, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText84 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText84->Wrap( -1 ); + bSizer74->Add( m_staticText84, 0, wxRIGHT|wxLEFT, 5 ); + + m_scrolledWindow5->SetSizer( bSizer74 ); + m_scrolledWindow5->Layout(); + bSizer74->Fit( m_scrolledWindow5 ); + m_notebook1->AddPage( m_scrolledWindow5, _("File content"), false ); + + bSizer20->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 ); + + m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_button8->SetDefault(); + m_button8->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer20->Add( m_button8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer20 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); + m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); } HelpDlgGenerated::~HelpDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); - m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); + m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); } AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer31; - bSizer31 = new wxBoxSizer( wxVERTICAL ); - - - bSizer31->Add( 0, 5, 0, 0, 5 ); - - m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) ); - - wxBoxSizer* bSizer36; - bSizer36 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 ); - bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel5->SetSizer( bSizer36 ); - m_panel5->Layout(); - bSizer36->Fit( m_panel5 ); - bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("-Open-Source file synchronization-"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - m_staticText15->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer31->Add( m_staticText15, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_build->Wrap( -1 ); - m_build->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer31->Add( 0, 10, 0, 0, 5 ); - - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxVERTICAL ); - - m_scrolledWindow4 = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); - m_scrolledWindow4->SetScrollRate( 5, 5 ); - m_scrolledWindow4->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - m_scrolledWindow4->SetMinSize( wxSize( -1,125 ) ); - - wxBoxSizer* bSizer73; - bSizer73 = new wxBoxSizer( wxVERTICAL ); - - m_staticText72 = new wxStaticText( m_scrolledWindow4, wxID_ANY, _("Source code written completely in C++ utilizing:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText72->Wrap( -1 ); - m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer73->Add( m_staticText72, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText73 = new wxStaticText( m_scrolledWindow4, wxID_ANY, _(" MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText73->Wrap( -1 ); - bSizer73->Add( m_staticText73, 0, wxALL|wxEXPAND, 5 ); - - m_staticText74 = new wxStaticText( m_scrolledWindow4, wxID_ANY, _("- ZenJu -"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText74->Wrap( -1 ); - m_staticText74->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); - - bSizer73->Add( m_staticText74, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_scrolledWindow4->SetSizer( bSizer73 ); - m_scrolledWindow4->Layout(); - bSizer73->Fit( m_scrolledWindow4 ); - bSizer53->Add( m_scrolledWindow4, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 10 ); - - m_scrolledWindow3 = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); - m_scrolledWindow3->SetScrollRate( 5, 5 ); - m_scrolledWindow3->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - m_scrolledWindow3->SetMinSize( wxSize( -1,70 ) ); - m_scrolledWindow3->SetMaxSize( wxSize( -1,100 ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText54 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Big thanks for localizing FreeFileSync goes out to:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText54->Wrap( -1 ); - m_staticText54->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer72->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); - - wxFlexGridSizer* fgSizer9; - fgSizer9 = new wxFlexGridSizer( 2, 2, 5, 20 ); - fgSizer9->SetFlexibleDirection( wxBOTH ); - fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText68 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Jean-François Hartmann"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText68->Wrap( -1 ); - fgSizer9->Add( m_staticText68, 0, 0, 5 ); - - m_staticText69 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Français"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText69->Wrap( -1 ); - fgSizer9->Add( m_staticText69, 0, 0, 5 ); - - m_staticText70 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Tilt"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText70->Wrap( -1 ); - fgSizer9->Add( m_staticText70, 0, 0, 5 ); - - m_staticText71 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("日本語"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText71->Wrap( -1 ); - fgSizer9->Add( m_staticText71, 0, 0, 5 ); - - bSizer72->Add( fgSizer9, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); - - m_scrolledWindow3->SetSizer( bSizer72 ); - m_scrolledWindow3->Layout(); - bSizer72->Fit( m_scrolledWindow3 ); - bSizer53->Add( m_scrolledWindow3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 30 ); - - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxStaticBoxSizer* sbSizer7; - sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_staticText131 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome at:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText131->Wrap( -1 ); - m_staticText131->SetFont( wxFont( 11, 74, 93, 92, false, wxT("Tahoma") ) ); - - sbSizer7->Add( m_staticText131, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer31->Add( sbSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - wxFlexGridSizer* fgSizer2; - fgSizer2 = new wxFlexGridSizer( 3, 3, 0, 0 ); - fgSizer2->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - fgSizer2->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_staticText11 = new wxStaticText( this, wxID_ANY, _("Homepage:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - m_staticText11->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer2->Add( m_staticText11, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("FreeFileSync at Sourceforge"), wxT("http://sourceforge.net/projects/freefilesync/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") ); - - fgSizer2->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - fgSizer2->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_staticText13 = new wxStaticText( this, wxID_ANY, _("Email:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13->Wrap( -1 ); - m_staticText13->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer2->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("zhnmju123@gmx.de"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - fgSizer2->Add( m_hyperlink2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation); - m_animationControl1->Hide(); - - fgSizer2->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_staticText151 = new wxStaticText( this, wxID_ANY, _("If you like FFS:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText151->Wrap( -1 ); - m_staticText151->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer2->Add( m_staticText151, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("Donate with PayPal"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - fgSizer2->Add( m_hyperlink3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer31->Add( fgSizer2, 0, wxLEFT|wxEXPAND, 10 ); - - m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxStaticBoxSizer* sbSizer14; - sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Published under the GNU General Public License:") ), wxHORIZONTAL ); - - - sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 88,31 ), 0 ); - sbSizer14->Add( m_bitmap13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - sbSizer14->Add( m_hyperlink5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer31->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_button8->SetDefault(); - m_button8->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer31->Add( m_button8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - this->SetSizer( bSizer31 ); - this->Layout(); - bSizer31->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); - m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer31; + bSizer31 = new wxBoxSizer( wxVERTICAL ); + + + bSizer31->Add( 0, 5, 0, 0, 5 ); + + m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) ); + + wxBoxSizer* bSizer36; + bSizer36 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 ); + bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel5->SetSizer( bSizer36 ); + m_panel5->Layout(); + bSizer36->Fit( m_panel5 ); + bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("-Open-Source file synchronization-"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer31->Add( m_staticText15, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_build->Wrap( -1 ); + m_build->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer31->Add( 0, 10, 0, 0, 5 ); + + wxBoxSizer* bSizer53; + bSizer53 = new wxBoxSizer( wxVERTICAL ); + + m_scrolledWindow4 = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); + m_scrolledWindow4->SetScrollRate( 5, 5 ); + m_scrolledWindow4->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_scrolledWindow4->SetMinSize( wxSize( -1,125 ) ); + + wxBoxSizer* bSizer73; + bSizer73 = new wxBoxSizer( wxVERTICAL ); + + m_staticText72 = new wxStaticText( m_scrolledWindow4, wxID_ANY, _("Source code written completely in C++ utilizing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText72->Wrap( -1 ); + m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer73->Add( m_staticText72, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText73 = new wxStaticText( m_scrolledWindow4, wxID_ANY, _(" MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText73->Wrap( -1 ); + bSizer73->Add( m_staticText73, 0, wxALL|wxEXPAND, 5 ); + + m_staticText74 = new wxStaticText( m_scrolledWindow4, wxID_ANY, _("- ZenJu -"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText74->Wrap( -1 ); + m_staticText74->SetFont( wxFont( 10, 74, 93, 90, false, wxT("Tahoma") ) ); + + bSizer73->Add( m_staticText74, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_scrolledWindow4->SetSizer( bSizer73 ); + m_scrolledWindow4->Layout(); + bSizer73->Fit( m_scrolledWindow4 ); + bSizer53->Add( m_scrolledWindow4, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 10 ); + + m_scrolledWindow3 = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); + m_scrolledWindow3->SetScrollRate( 5, 5 ); + m_scrolledWindow3->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + m_scrolledWindow3->SetMinSize( wxSize( -1,70 ) ); + m_scrolledWindow3->SetMaxSize( wxSize( -1,100 ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText54 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Big thanks for localizing FreeFileSync goes out to:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText54->Wrap( -1 ); + m_staticText54->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer72->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); + + wxFlexGridSizer* fgSizer9; + fgSizer9 = new wxFlexGridSizer( 2, 2, 5, 20 ); + fgSizer9->SetFlexibleDirection( wxBOTH ); + fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText68 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Jean-François Hartmann"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText68->Wrap( -1 ); + fgSizer9->Add( m_staticText68, 0, 0, 5 ); + + m_staticText69 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Français"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText69->Wrap( -1 ); + fgSizer9->Add( m_staticText69, 0, 0, 5 ); + + m_staticText70 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Tilt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText70->Wrap( -1 ); + fgSizer9->Add( m_staticText70, 0, 0, 5 ); + + m_staticText71 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("日本語"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText71->Wrap( -1 ); + fgSizer9->Add( m_staticText71, 0, 0, 5 ); + + bSizer72->Add( fgSizer9, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); + + m_scrolledWindow3->SetSizer( bSizer72 ); + m_scrolledWindow3->Layout(); + bSizer72->Fit( m_scrolledWindow3 ); + bSizer53->Add( m_scrolledWindow3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 30 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer31->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxStaticBoxSizer* sbSizer7; + sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + m_staticText131 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome at:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText131->Wrap( -1 ); + m_staticText131->SetFont( wxFont( 11, 74, 93, 92, false, wxT("Tahoma") ) ); + + sbSizer7->Add( m_staticText131, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer31->Add( sbSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 3, 3, 0, 0 ); + fgSizer2->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + fgSizer2->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_staticText11 = new wxStaticText( this, wxID_ANY, _("Homepage:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + m_staticText11->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer2->Add( m_staticText11, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("FreeFileSync at Sourceforge"), wxT("http://sourceforge.net/projects/freefilesync/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") ); + + fgSizer2->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + fgSizer2->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_staticText13 = new wxStaticText( this, wxID_ANY, _("Email:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + m_staticText13->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer2->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("zhnmju123@gmx.de"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + fgSizer2->Add( m_hyperlink2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_animationControl1 = new wxAnimationCtrl(this, wxID_ANY, wxNullAnimation); + m_animationControl1->Hide(); + + fgSizer2->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_staticText151 = new wxStaticText( this, wxID_ANY, _("If you like FFS:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText151->Wrap( -1 ); + m_staticText151->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer2->Add( m_staticText151, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("Donate with PayPal"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + fgSizer2->Add( m_hyperlink3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer31->Add( fgSizer2, 0, wxLEFT|wxEXPAND, 10 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer31->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxStaticBoxSizer* sbSizer14; + sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Published under the GNU General Public License:") ), wxHORIZONTAL ); + + + sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 88,31 ), 0 ); + sbSizer14->Add( m_bitmap13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + sbSizer14->Add( m_hyperlink5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer31->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_button8->SetDefault(); + m_button8->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer31->Add( m_button8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + this->SetSizer( bSizer31 ); + this->Layout(); + bSizer31->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); + m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); } AboutDlgGenerated::~AboutDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); - m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); + m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); } ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - m_checkBoxContinueError = new wxCheckBox( this, wxID_ANY, _("Continue on next errors"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBoxContinueError->SetToolTip( _("Hide further error messages during the current process and continue") ); - - bSizer24->Add( m_checkBoxContinueError, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonContinue = new wxButton( this, wxID_OK, _("&Continue"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonContinue->SetDefault(); - m_buttonContinue->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer25->Add( m_buttonContinue, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonRetry->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer25->Add( m_buttonAbort, 0, wxALL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); - m_buttonContinue->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), NULL, this ); - m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer26; + bSizer26 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrl8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + m_checkBoxContinueError = new wxCheckBox( this, wxID_ANY, _("Continue on next errors"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBoxContinueError->SetToolTip( _("Hide further error messages during the current process and continue") ); + + bSizer24->Add( m_checkBoxContinueError, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonContinue = new wxButton( this, wxID_OK, _("&Continue"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonContinue->SetDefault(); + m_buttonContinue->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer25->Add( m_buttonContinue, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonRetry->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer25->Add( m_buttonAbort, 0, wxALL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); + m_buttonContinue->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), NULL, this ); + m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); } ErrorDlgGenerated::~ErrorDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); - m_buttonContinue->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), NULL, this ); - m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); + m_buttonContinue->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnContinue ), NULL, this ); + m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); } DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer41; - bSizer41 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - m_staticTextHeader->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer41->Add( m_staticTextHeader, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer24->Add( bSizer41, 0, wxEXPAND, 5 ); - - m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlMessage->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); - - bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonCancel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer25->Add( m_buttonCancel, 0, wxALL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer41; + bSizer41 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + m_staticTextHeader->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer41->Add( m_staticTextHeader, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer24->Add( bSizer41, 0, wxEXPAND, 5 ); + + m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlMessage->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); + + bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonCancel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer25->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); } DeleteDlgGenerated::~DeleteDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); + m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); } FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer21; - bSizer21 = new wxBoxSizer( wxVERTICAL ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Set filter for synchronization"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer21->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10 ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that pass filtering will be selected for synchronization.\nThe filter will be applied to the full name including path prefix."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText44->Wrap( 400 ); - bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer21->Add( 0, 5, 0, 0, 5 ); - - m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer69; - bSizer69 = new wxBoxSizer( wxVERTICAL ); - - m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxVERTICAL ); - - m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText45->Wrap( -1 ); - m_staticText45->SetFont( wxFont( 10, 74, 90, 92, true, wxT("Tahoma") ) ); - - bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 ); - - m_staticText18 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter full file or directory names separated by ';'.\n2. Wildcard characters '*' and '?' are supported."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText18->Wrap( -1 ); - bSizer52->Add( m_staticText18, 0, wxBOTTOM, 5 ); - - bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxStaticBoxSizer* sbSizer21; - sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL ); - - wxBoxSizer* bSizer66; - bSizer66 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: *\\tempfolder\\*"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText181->Wrap( -1 ); - bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything from folder \"tempfolder\"."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1811->Wrap( 250 ); - m_staticText1811->SetFont( wxFont( 8, 74, 93, 90, false, wxT("Tahoma") ) ); - - bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_panel13->SetSizer( bSizer69 ); - m_panel13->Layout(); - bSizer69->Fit( m_panel13 ); - bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 5 ); - - wxStaticBoxSizer* sbSizer8; - sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - wxFlexGridSizer* fgSizer3; - fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer3->SetFlexibleDirection( wxBOTH ); - fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - m_staticText15->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer3->Add( m_staticText15, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - fgSizer3->Add( m_bitmap8, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,-1 ), 0 ); - fgSizer3->Add( m_textCtrlInclude, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer8->Add( fgSizer3, 0, 0, 5 ); - - wxFlexGridSizer* fgSizer4; - fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer4->SetFlexibleDirection( wxBOTH ); - fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - m_staticText16->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - fgSizer4->Add( m_staticText16, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - fgSizer4->Add( m_bitmap9, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,-1 ), 0 ); - fgSizer4->Add( m_textCtrlExclude, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer8->Add( fgSizer4, 0, 0, 5 ); - - bSizer21->Add( sbSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - bSizer21->Add( 0, 0, 0, 0, 5 ); - - wxBoxSizer* bSizer22; - bSizer22 = new wxBoxSizer( wxHORIZONTAL ); - - m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button9->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); - - bSizer22->Add( m_button9, 0, wxALL, 5 ); - - - bSizer22->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_button17 = new wxButton( this, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); - bSizer22->Add( m_button17, 0, wxALIGN_BOTTOM, 5 ); - - m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button10->SetDefault(); - m_button10->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizer22->Add( m_button10, 0, wxALL, 5 ); - - bSizer21->Add( bSizer22, 0, wxEXPAND|wxTOP, 5 ); - - this->SetSizer( bSizer21 ); - this->Layout(); - bSizer21->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); - m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); - m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnOK ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer21; + bSizer21 = new wxBoxSizer( wxVERTICAL ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Set filter for synchronization"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer21->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10 ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that pass filtering will be selected for synchronization.\nThe filter will be applied to the full name including path prefix."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText44->Wrap( 400 ); + bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + m_bpButtonHelp->SetToolTip( _("Help") ); + + bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer21->Add( 0, 5, 0, 0, 5 ); + + m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer69; + bSizer69 = new wxBoxSizer( wxVERTICAL ); + + m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxVERTICAL ); + + m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText45->Wrap( -1 ); + m_staticText45->SetFont( wxFont( 10, 74, 90, 92, true, wxT("Tahoma") ) ); + + bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 ); + + m_staticText18 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter full file or directory names separated by ';' or a new line.\n2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText18->Wrap( -1 ); + bSizer52->Add( m_staticText18, 0, wxBOTTOM, 5 ); + + bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxStaticBoxSizer* sbSizer21; + sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL ); + + wxBoxSizer* bSizer66; + bSizer66 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: *\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText181->Wrap( -1 ); + bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything from folder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1811->Wrap( 250 ); + m_staticText1811->SetFont( wxFont( 8, 74, 93, 90, false, wxT("Tahoma") ) ); + + bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_panel13->SetSizer( bSizer69 ); + m_panel13->Layout(); + bSizer69->Fit( m_panel13 ); + bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 5 ); + + wxStaticBoxSizer* sbSizer8; + sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer3; + fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer3->SetFlexibleDirection( wxBOTH ); + fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer3->Add( m_staticText15, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + fgSizer3->Add( m_bitmap8, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,-1 ), wxTE_MULTILINE ); + fgSizer3->Add( m_textCtrlInclude, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer8->Add( fgSizer3, 0, 0, 5 ); + + wxFlexGridSizer* fgSizer4; + fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer4->SetFlexibleDirection( wxBOTH ); + fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + m_staticText16->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + fgSizer4->Add( m_staticText16, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + fgSizer4->Add( m_bitmap9, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 400,-1 ), wxTE_MULTILINE ); + fgSizer4->Add( m_textCtrlExclude, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer8->Add( fgSizer4, 0, 0, 5 ); + + bSizer21->Add( sbSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + bSizer21->Add( 0, 0, 0, 0, 5 ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxHORIZONTAL ); + + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); + + bSizer22->Add( m_button9, 0, wxALL, 5 ); + + + bSizer22->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_button17 = new wxButton( this, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); + bSizer22->Add( m_button17, 0, wxALIGN_BOTTOM, 5 ); + + m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button10->SetDefault(); + m_button10->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizer22->Add( m_button10, 0, wxALL, 5 ); + + bSizer21->Add( bSizer22, 0, wxEXPAND|wxTOP, 5 ); + + this->SetSizer( bSizer21 ); + this->Layout(); + bSizer21->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); + m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); + m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); + m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnOK ), NULL, this ); } FilterDlgGenerated::~FilterDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); - m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); - m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnOK ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); + m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); + m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); + m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnOK ), NULL, this ); } diff --git a/ui/guiGenerated.h b/ui/guiGenerated.h index 47ce567c..7df68fd7 100644 --- a/ui/guiGenerated.h +++ b/ui/guiGenerated.h @@ -29,6 +29,7 @@ class CustomGrid; #include <wx/hyperlink.h> #include <wx/checkbox.h> #include <wx/panel.h> +#include <wx/scrolwin.h> #include <wx/textctrl.h> #include <wx/filepicker.h> #include <wx/grid.h> @@ -41,7 +42,6 @@ class CustomGrid; #include <wx/gauge.h> #include <wx/animate.h> #include <wx/treectrl.h> -#include <wx/scrolwin.h> #include <wx/notebook.h> /////////////////////////////////////////////////////////////////////////// @@ -50,561 +50,862 @@ class CustomGrid; /////////////////////////////////////////////////////////////////////////////// /// Class GuiGenerated /////////////////////////////////////////////////////////////////////////////// -class GuiGenerated : public wxFrame +class GuiGenerated : public wxFrame +{ +private: + +protected: + wxMenuBar* m_menubar1; + wxMenu* m_menu1; + wxMenu* m_menu3; + wxMenu* m_menu31; + wxMenuItem* m_menuItemEnglish; + wxMenuItem* m_menuItemGerman; + wxMenuItem* m_menuItemFrench; + wxMenuItem* m_menuItemJapanese; + wxMenu* m_menu2; + wxBoxSizer* bSizer1; + wxPanel* m_panel71; + wxBoxSizer* bSizer6; + + wxBitmapButton* m_bpButtonCompare; + wxButton* m_buttonAbort; + wxRadioButton* m_radioBtnSizeDate; + wxRadioButton* m_radioBtnContent; + wxBitmapButton* m_bpButton14; + + + wxBitmapButton* m_bpButtonFilter; + wxHyperlinkCtrl* m_hyperlinkCfgFilter; + wxCheckBox* m_checkBoxHideFilt; + + wxBitmapButton* m_bpButtonSync; + + wxScrolledWindow* m_scrolledWindowFolderPairs; + wxBoxSizer* bSizerFolderPairs; + wxPanel* m_panel1; + wxStaticBoxSizer* sbSizer2; + wxTextCtrl* m_directoryLeft; + wxDirPickerCtrl* m_dirPicker1; + CustomGrid* m_grid1; + wxPanel* m_panel3; + wxBoxSizer* bSizer18; + wxBoxSizer* bSizer69; + wxBitmapButton* m_bpButtonSwap; + CustomGrid* m_grid3; + wxPanel* m_panel2; + + wxBitmapButton* m_bpButtonAddPair; + wxBitmapButton* m_bpButtonRemovePair; + wxTextCtrl* m_directoryRight; + wxDirPickerCtrl* m_dirPicker2; + CustomGrid* m_grid2; + wxPanel* m_panel4; + wxBoxSizer* bSizer3; + wxBitmapButton* m_bpButton201; + wxChoice* m_choiceLoad; + + wxPanel* m_panel12; + + wxBitmapButton* m_bpButtonLeftOnly; + wxBitmapButton* m_bpButtonLeftNewer; + wxBitmapButton* m_bpButtonEqual; + wxBitmapButton* m_bpButtonDifferent; + wxBitmapButton* m_bpButtonRightNewer; + wxBitmapButton* m_bpButtonRightOnly; + + wxBitmapButton* m_bpButton10; + wxPanel* m_panel7; + + wxStaticText* m_staticTextStatusLeft; + + wxStaticLine* m_staticline9; + + wxStaticText* m_staticTextStatusMiddle; + + wxStaticLine* m_staticline10; + + wxStaticText* m_staticTextStatusRight; + + wxStaticBitmap* m_bitmap15; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnMenuQuit( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnMenuExportFileList( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnMenuLangEnglish( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnMenuLangGerman( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnMenuLangFrench( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnMenuLangJapanese( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnMenuBatchJob( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnMenuAbout( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCompare( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnAbortCompare( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCompareByTimeSize( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCompareByContent( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnShowHelpDialog( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnFilterButton( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnConfigureFilter( wxHyperlinkEvent& event ) + { + event.Skip(); + } + virtual void OnHideFilteredButton( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnSync( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnWriteDirManually( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnDirSelected( wxFileDirPickerEvent& event ) + { + event.Skip(); + } + virtual void OnLeftGridDoubleClick( wxGridEvent& event ) + { + event.Skip(); + } + virtual void OnOpenContextMenu( wxGridEvent& event ) + { + event.Skip(); + } + virtual void OnSortLeftGrid( wxGridEvent& event ) + { + event.Skip(); + } + virtual void OnSwapDirs( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnAddFolderPair( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnRemoveFolderPair( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnRightGridDoubleClick( wxGridEvent& event ) + { + event.Skip(); + } + virtual void OnSortRightGrid( wxGridEvent& event ) + { + event.Skip(); + } + virtual void OnSaveConfig( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnChoiceKeyEvent( wxKeyEvent& event ) + { + event.Skip(); + } + virtual void OnLoadConfiguration( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnLeftOnlyFiles( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnLeftNewerFiles( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnEqualFiles( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnDifferentFiles( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnRightNewerFiles( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnRightOnlyFiles( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnQuit( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + GuiGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FreeFileSync - Folder Comparison and Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + ~GuiGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class FolderPairGenerated +/////////////////////////////////////////////////////////////////////////////// +class FolderPairGenerated : public wxPanel { - private: - - protected: - wxMenuBar* m_menubar1; - wxMenu* m_menu1; - wxMenu* m_menu3; - wxMenu* m_menu31; - wxMenuItem* m_menuItemEnglish; - wxMenuItem* m_menuItemGerman; - wxMenuItem* m_menuItemFrench; - wxMenuItem* m_menuItemJapanese; - wxMenu* m_menu2; - wxBoxSizer* bSizer1; - wxPanel* m_panel71; - wxBoxSizer* bSizer6; - - wxBitmapButton* m_bpButtonCompare; - wxButton* m_buttonAbort; - wxRadioButton* m_radioBtnSizeDate; - wxRadioButton* m_radioBtnContent; - wxBitmapButton* m_bpButton14; - - - wxBitmapButton* m_bpButtonFilter; - wxHyperlinkCtrl* m_hyperlinkCfgFilter; - wxCheckBox* m_checkBoxHideFilt; - - wxBitmapButton* m_bpButtonSync; - - wxPanel* m_panel1; - wxStaticBoxSizer* sbSizer2; - wxTextCtrl* m_directoryPanel1; - wxDirPickerCtrl* m_dirPicker1; - CustomGrid* m_grid1; - wxPanel* m_panel3; - wxBoxSizer* bSizer18; - wxBoxSizer* bSizer69; - wxBitmapButton* m_bpButtonSwap; - CustomGrid* m_grid3; - wxPanel* m_panel2; - wxTextCtrl* m_directoryPanel2; - wxDirPickerCtrl* m_dirPicker2; - CustomGrid* m_grid2; - wxPanel* m_panel4; - wxBoxSizer* bSizer3; - wxBitmapButton* m_bpButton201; - wxChoice* m_choiceLoad; - - wxPanel* m_panel12; - - wxBitmapButton* m_bpButtonLeftOnly; - wxBitmapButton* m_bpButtonLeftNewer; - wxBitmapButton* m_bpButtonEqual; - wxBitmapButton* m_bpButtonDifferent; - wxBitmapButton* m_bpButtonRightNewer; - wxBitmapButton* m_bpButtonRightOnly; - - wxBitmapButton* m_bpButton10; - wxPanel* m_panel7; - - wxStaticText* m_staticTextStatusLeft; - - wxStaticLine* m_staticline9; - - wxStaticText* m_staticTextStatusMiddle; - - wxStaticLine* m_staticline10; - - wxStaticText* m_staticTextStatusRight; - - wxStaticBitmap* m_bitmap15; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnMenuQuit( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuExportFileList( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuLangEnglish( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuLangGerman( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuLangFrench( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuLangJapanese( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuBatchJob( wxCommandEvent& event ){ event.Skip(); } - virtual void OnMenuAbout( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCompare( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAbortCompare( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCompareByTimeSize( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCompareByContent( wxCommandEvent& event ){ event.Skip(); } - virtual void OnShowHelpDialog( wxCommandEvent& event ){ event.Skip(); } - virtual void OnFilterButton( wxCommandEvent& event ){ event.Skip(); } - virtual void OnConfigureFilter( wxHyperlinkEvent& event ){ event.Skip(); } - virtual void OnHideFilteredButton( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSync( wxCommandEvent& event ){ event.Skip(); } - virtual void OnEnterLeftDir( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDirChangedPanel1( wxFileDirPickerEvent& event ){ event.Skip(); } - virtual void OnLeftGridDoubleClick( wxGridEvent& event ){ event.Skip(); } - virtual void OnOpenContextMenu( wxGridEvent& event ){ event.Skip(); } - virtual void OnSortLeftGrid( wxGridEvent& event ){ event.Skip(); } - virtual void OnSwapDirs( wxCommandEvent& event ){ event.Skip(); } - virtual void OnEnterRightDir( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDirChangedPanel2( wxFileDirPickerEvent& event ){ event.Skip(); } - virtual void OnRightGridDoubleClick( wxGridEvent& event ){ event.Skip(); } - virtual void OnSortRightGrid( wxGridEvent& event ){ event.Skip(); } - virtual void OnSaveConfig( wxCommandEvent& event ){ event.Skip(); } - virtual void OnChoiceKeyEvent( wxKeyEvent& event ){ event.Skip(); } - virtual void OnLoadConfiguration( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftOnlyFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftNewerFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnEqualFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDifferentFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRightNewerFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRightOnlyFiles( wxCommandEvent& event ){ event.Skip(); } - virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); } - - - public: - GuiGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FreeFileSync - Folder Comparison and Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 933,612 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - ~GuiGenerated(); - +private: + +protected: + + +public: + wxPanel* m_panelLeft; + wxTextCtrl* m_directoryLeft; + wxDirPickerCtrl* m_dirPickerLeft; + wxStaticBitmap* m_bitmap23; + wxPanel* m_panelRight; + wxTextCtrl* m_directoryRight; + wxDirPickerCtrl* m_dirPickerRight; + FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~FolderPairGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class BatchDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class BatchDlgGenerated : public wxDialog +class BatchDlgGenerated : public wxDialog { - private: - - protected: - wxPanel* m_panel8; - wxStaticText* m_staticText56; - - wxStaticText* m_staticText54; - - wxStaticLine* m_staticline10; - wxStaticText* m_staticText531; - wxStaticText* m_staticText53; - wxTextCtrl* m_directoryPanel1; - wxStaticText* m_staticText541; - wxTextCtrl* m_directoryPanel2; - wxRadioButton* m_radioBtnSizeDate; - wxRadioButton* m_radioBtnContent; - - wxCheckBox* m_checkBoxUseRecycler; - wxCheckBox* m_checkBoxContinueError; - wxCheckBox* m_checkBoxSilent; - - - wxBitmapButton* m_bpButtonFilter; - wxStaticBitmap* m_bitmap8; - wxStaticText* m_staticText15; - wxTextCtrl* m_textCtrlInclude; - - wxStaticBitmap* m_bitmap9; - wxStaticText* m_staticText16; - wxTextCtrl* m_textCtrlExclude; - - wxStaticText* m_staticText211; - wxStaticText* m_staticText311; - wxStaticLine* m_staticline3; - wxStaticBitmap* m_bitmap13; - wxBitmapButton* m_bpButton5; - wxStaticBitmap* m_bitmap14; - wxBitmapButton* m_bpButton6; - wxStaticBitmap* m_bitmap15; - wxBitmapButton* m_bpButton7; - wxStaticBitmap* m_bitmap16; - wxBitmapButton* m_bpButton8; - wxStaticBitmap* m_bitmap17; - wxBitmapButton* m_bpButton9; - wxStaticLine* m_staticline9; - wxButton* m_button6; - wxButton* m_buttonCreate; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnEnterLeftDir( wxCommandEvent& event ){ event.Skip(); } - virtual void OnEnterRightDir( wxCommandEvent& event ){ event.Skip(); } - virtual void OnChangeCompareVar( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSelectRecycleBin( wxCommandEvent& event ){ event.Skip(); } - virtual void OnFilterButton( wxCommandEvent& event ){ event.Skip(); } - virtual void OnExLeftSideOnly( wxCommandEvent& event ){ event.Skip(); } - virtual void OnExRightSideOnly( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftNewer( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRightNewer( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDifferent( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCreateBatchJob( wxCommandEvent& event ){ event.Skip(); } - - - public: - BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~BatchDlgGenerated(); - +private: + +protected: + wxBoxSizer* bSizer69; + wxPanel* m_panel8; + wxStaticText* m_staticText56; + + wxStaticText* m_staticText54; + + wxStaticLine* m_staticline10; + wxStaticText* m_staticText531; + wxScrolledWindow* m_scrolledWindow6; + wxBoxSizer* bSizerFolderPairs; + wxRadioButton* m_radioBtnSizeDate; + wxRadioButton* m_radioBtnContent; + + wxCheckBox* m_checkBoxUseRecycler; + wxCheckBox* m_checkBoxContinueError; + wxCheckBox* m_checkBoxSilent; + + + wxBitmapButton* m_bpButtonFilter; + wxStaticBitmap* m_bitmap8; + wxStaticText* m_staticText15; + wxTextCtrl* m_textCtrlInclude; + + wxStaticBitmap* m_bitmap9; + wxStaticText* m_staticText16; + wxTextCtrl* m_textCtrlExclude; + + wxStaticText* m_staticText211; + wxStaticText* m_staticText311; + wxStaticLine* m_staticline3; + wxStaticBitmap* m_bitmap13; + wxBitmapButton* m_bpButton5; + wxStaticBitmap* m_bitmap14; + wxBitmapButton* m_bpButton6; + wxStaticBitmap* m_bitmap15; + wxBitmapButton* m_bpButton7; + wxStaticBitmap* m_bitmap16; + wxBitmapButton* m_bpButton8; + wxStaticBitmap* m_bitmap17; + wxBitmapButton* m_bpButton9; + wxStaticLine* m_staticline9; + wxButton* m_button6; + wxButton* m_buttonCreate; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnChangeCompareVar( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnSelectRecycleBin( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnFilterButton( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnExLeftSideOnly( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnExRightSideOnly( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnLeftNewer( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnRightNewer( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnDifferent( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCancel( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCreateBatchJob( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~BatchDlgGenerated(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class BatchFolderPairGenerated +/////////////////////////////////////////////////////////////////////////////// +class BatchFolderPairGenerated : public wxPanel +{ +private: + +protected: + wxStaticText* m_staticText53; + wxStaticText* m_staticText541; + + // Virtual event handlers, overide them in your derived class + virtual void OnEnterLeftDir( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnEnterRightDir( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + wxTextCtrl* m_directoryLeft; + wxTextCtrl* m_directoryRight; + BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~BatchFolderPairGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class CompareStatusGenerated /////////////////////////////////////////////////////////////////////////////// -class CompareStatusGenerated : public wxPanel +class CompareStatusGenerated : public wxPanel { - private: - - protected: - wxBoxSizer* bSizer42; - wxStaticText* m_staticText321; - wxStaticText* m_staticTextScanned; - - wxStaticBoxSizer* sbSizer13; - wxStaticText* m_staticText46; - wxStaticText* m_staticTextFilesToCompare; - wxStaticText* m_staticText32; - wxStaticText* m_staticTextDataToCompare; - - wxStaticText* m_staticText37; - wxStaticText* m_staticTextTimeElapsed; - wxStaticText* m_staticText30; - wxTextCtrl* m_textCtrlFilename; - wxGauge* m_gauge2; - - public: - CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~CompareStatusGenerated(); - +private: + +protected: + wxBoxSizer* bSizer42; + wxStaticText* m_staticText321; + wxStaticText* m_staticTextScanned; + + wxStaticBoxSizer* sbSizer13; + wxStaticText* m_staticText46; + wxStaticText* m_staticTextFilesToCompare; + wxStaticText* m_staticText32; + wxStaticText* m_staticTextDataToCompare; + + wxStaticText* m_staticText37; + wxStaticText* m_staticTextTimeElapsed; + wxStaticText* m_staticText30; + wxTextCtrl* m_textCtrlFilename; + wxGauge* m_gauge2; + +public: + CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~CompareStatusGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class SyncDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class SyncDlgGenerated : public wxDialog +class SyncDlgGenerated : public wxDialog { - private: - - protected: - wxBitmapButton* m_bpButton18; - - wxCheckBox* m_checkBoxUseRecycler; - wxCheckBox* m_checkBoxContinueError; - - wxStaticText* m_staticText1; - wxRadioButton* m_radioBtn1; - wxButton* m_buttonOneWay; - wxStaticText* m_staticText8; - wxRadioButton* m_radioBtn2; - wxButton* m_buttonTwoWay; - wxStaticText* m_staticText10; - wxRadioButton* m_radioBtn3; - - wxStaticText* m_staticText23; - - wxStaticText* m_staticText9; - - wxButton* m_button6; - wxButton* m_button16; - - wxStaticText* m_staticText37; - wxTextCtrl* m_textCtrlCreate; - wxStaticText* m_staticText14; - wxTextCtrl* m_textCtrlDelete; - wxStaticText* m_staticText42; - wxTextCtrl* m_textCtrlUpdate; - wxStaticText* m_staticText43; - wxTextCtrl* m_textCtrlData; - - wxStaticText* m_staticText21; - wxStaticText* m_staticText31; - wxStaticLine* m_staticline3; - wxStaticBitmap* m_bitmap13; - wxBitmapButton* m_bpButton5; - wxStaticBitmap* m_bitmap14; - wxBitmapButton* m_bpButton6; - wxStaticBitmap* m_bitmap15; - wxBitmapButton* m_bpButton7; - wxStaticBitmap* m_bitmap16; - wxBitmapButton* m_bpButton8; - wxStaticBitmap* m_bitmap17; - wxBitmapButton* m_bpButton9; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnStartSync( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSelectRecycleBin( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncLeftToRight( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncBothSides( wxCommandEvent& event ){ event.Skip(); } - virtual void OnSyncCostum( wxCommandEvent& event ){ event.Skip(); } - virtual void OnBack( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } - virtual void OnExLeftSideOnly( wxCommandEvent& event ){ event.Skip(); } - virtual void OnExRightSideOnly( wxCommandEvent& event ){ event.Skip(); } - virtual void OnLeftNewer( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRightNewer( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDifferent( wxCommandEvent& event ){ event.Skip(); } - - - public: - SyncDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~SyncDlgGenerated(); - +private: + +protected: + wxBitmapButton* m_bpButton18; + + wxCheckBox* m_checkBoxUseRecycler; + wxCheckBox* m_checkBoxContinueError; + + wxStaticText* m_staticText1; + wxRadioButton* m_radioBtn1; + wxButton* m_buttonOneWay; + wxStaticText* m_staticText8; + wxRadioButton* m_radioBtn2; + wxButton* m_buttonTwoWay; + wxStaticText* m_staticText10; + wxRadioButton* m_radioBtn3; + + wxStaticText* m_staticText23; + + wxStaticText* m_staticText9; + + wxButton* m_button6; + wxButton* m_button16; + + wxStaticText* m_staticText37; + wxTextCtrl* m_textCtrlCreate; + wxStaticText* m_staticText14; + wxTextCtrl* m_textCtrlDelete; + wxStaticText* m_staticText42; + wxTextCtrl* m_textCtrlUpdate; + wxStaticText* m_staticText43; + wxTextCtrl* m_textCtrlData; + + wxStaticText* m_staticText21; + wxStaticText* m_staticText31; + wxStaticLine* m_staticline3; + wxStaticBitmap* m_bitmap13; + wxBitmapButton* m_bpButton5; + wxStaticBitmap* m_bitmap14; + wxBitmapButton* m_bpButton6; + wxStaticBitmap* m_bitmap15; + wxBitmapButton* m_bpButton7; + wxStaticBitmap* m_bitmap16; + wxBitmapButton* m_bpButton8; + wxStaticBitmap* m_bitmap17; + wxBitmapButton* m_bpButton9; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnStartSync( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnSelectRecycleBin( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnSyncLeftToRight( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnSyncBothSides( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnSyncCostum( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnBack( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCancel( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnExLeftSideOnly( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnExRightSideOnly( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnLeftNewer( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnRightNewer( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnDifferent( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + SyncDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~SyncDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class SyncStatusDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class SyncStatusDlgGenerated : public wxDialog +class SyncStatusDlgGenerated : public wxDialog { - private: - - protected: - - wxPanel* m_panel8; - wxStaticText* m_staticText56; - wxAnimationCtrl* m_animationControl1; - - wxStaticBitmap* m_bitmapStatus; - wxStaticText* m_staticTextStatus; - - wxBoxSizer* bSizer31; - wxStaticText* m_staticText21; - - wxStaticText* m_staticText55; - wxStaticText* m_staticTextTimeElapsed; - wxTextCtrl* m_textCtrlInfo; - wxBoxSizer* bSizer28; - wxStaticText* m_staticText25; - wxStaticText* m_staticTextRemainingObj; - - wxButton* m_buttonOK; - wxButton* m_buttonPause; - wxButton* m_buttonAbort; - - wxStaticText* m_staticText26; - wxStaticText* m_staticTextDataRemaining; - - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPause( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } - - - public: - wxGauge* m_gauge1; - SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 614,371 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~SyncStatusDlgGenerated(); - +private: + +protected: + + wxPanel* m_panel8; + wxStaticText* m_staticText56; + wxAnimationCtrl* m_animationControl1; + + wxStaticBitmap* m_bitmapStatus; + wxStaticText* m_staticTextStatus; + + wxBoxSizer* bSizer31; + wxStaticText* m_staticText21; + + wxStaticText* m_staticText55; + wxStaticText* m_staticTextTimeElapsed; + wxTextCtrl* m_textCtrlInfo; + wxBoxSizer* bSizer28; + wxStaticText* m_staticText25; + wxStaticText* m_staticTextRemainingObj; + + wxButton* m_buttonOK; + wxButton* m_buttonPause; + wxButton* m_buttonAbort; + + wxStaticText* m_staticText26; + wxStaticText* m_staticTextDataRemaining; + + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnOkay( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnPause( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnAbort( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + wxGauge* m_gauge1; + SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 614,371 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~SyncStatusDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class HelpDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class HelpDlgGenerated : public wxDialog +class HelpDlgGenerated : public wxDialog { - private: - - protected: - - wxPanel* m_panel8; - - wxStaticText* m_staticText56; - - - wxNotebook* m_notebook1; - wxScrolledWindow* m_scrolledWindow1; - wxStaticText* m_staticText59; - wxStaticText* m_staticText60; - wxStaticText* m_staticText61; - wxTreeCtrl* m_treeCtrl1; - wxStaticText* m_staticText63; - wxStaticText* m_staticText75; - wxStaticText* m_staticText76; - wxStaticText* m_staticText77; - wxStaticText* m_staticText78; - wxStaticText* m_staticText79; - wxStaticText* m_staticText80; - wxScrolledWindow* m_scrolledWindow5; - wxStaticText* m_staticText65; - wxStaticText* m_staticText66; - wxTreeCtrl* m_treeCtrl2; - wxStaticText* m_staticText69; - wxStaticText* m_staticText81; - wxStaticText* m_staticText82; - wxStaticText* m_staticText83; - wxStaticText* m_staticText84; - wxButton* m_button8; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } - - - public: - HelpDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 565,501 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~HelpDlgGenerated(); - +private: + +protected: + + wxPanel* m_panel8; + + wxStaticText* m_staticText56; + + + wxNotebook* m_notebook1; + wxScrolledWindow* m_scrolledWindow1; + wxStaticText* m_staticText59; + wxStaticText* m_staticText60; + wxStaticText* m_staticText61; + wxTreeCtrl* m_treeCtrl1; + wxStaticText* m_staticText63; + wxStaticText* m_staticText75; + wxStaticText* m_staticText76; + wxStaticText* m_staticText77; + wxStaticText* m_staticText78; + wxStaticText* m_staticText79; + wxStaticText* m_staticText80; + wxScrolledWindow* m_scrolledWindow5; + wxStaticText* m_staticText65; + wxStaticText* m_staticText66; + wxTreeCtrl* m_treeCtrl2; + wxStaticText* m_staticText69; + wxStaticText* m_staticText81; + wxStaticText* m_staticText82; + wxStaticText* m_staticText83; + wxStaticText* m_staticText84; + wxButton* m_button8; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnOK( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + HelpDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 565,501 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~HelpDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class AboutDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class AboutDlgGenerated : public wxDialog +class AboutDlgGenerated : public wxDialog { - private: - - protected: - - wxPanel* m_panel5; - wxStaticBitmap* m_bitmap11; - wxStaticText* m_staticText15; - wxStaticText* m_build; - - wxScrolledWindow* m_scrolledWindow4; - wxStaticText* m_staticText72; - wxStaticText* m_staticText73; - wxStaticText* m_staticText74; - wxScrolledWindow* m_scrolledWindow3; - wxStaticText* m_staticText54; - wxStaticText* m_staticText68; - wxStaticText* m_staticText69; - wxStaticText* m_staticText70; - wxStaticText* m_staticText71; - wxStaticLine* m_staticline3; - wxStaticText* m_staticText131; - wxStaticBitmap* m_bitmap9; - wxStaticText* m_staticText11; - wxHyperlinkCtrl* m_hyperlink1; - wxStaticBitmap* m_bitmap10; - wxStaticText* m_staticText13; - wxHyperlinkCtrl* m_hyperlink2; - wxAnimationCtrl* m_animationControl1; - wxStaticText* m_staticText151; - wxHyperlinkCtrl* m_hyperlink3; - wxStaticLine* m_staticline2; - - wxStaticBitmap* m_bitmap13; - wxHyperlinkCtrl* m_hyperlink5; - - wxButton* m_button8; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } - - - public: - AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~AboutDlgGenerated(); - +private: + +protected: + + wxPanel* m_panel5; + wxStaticBitmap* m_bitmap11; + wxStaticText* m_staticText15; + wxStaticText* m_build; + + wxScrolledWindow* m_scrolledWindow4; + wxStaticText* m_staticText72; + wxStaticText* m_staticText73; + wxStaticText* m_staticText74; + wxScrolledWindow* m_scrolledWindow3; + wxStaticText* m_staticText54; + wxStaticText* m_staticText68; + wxStaticText* m_staticText69; + wxStaticText* m_staticText70; + wxStaticText* m_staticText71; + wxStaticLine* m_staticline3; + wxStaticText* m_staticText131; + wxStaticBitmap* m_bitmap9; + wxStaticText* m_staticText11; + wxHyperlinkCtrl* m_hyperlink1; + wxStaticBitmap* m_bitmap10; + wxStaticText* m_staticText13; + wxHyperlinkCtrl* m_hyperlink2; + wxAnimationCtrl* m_animationControl1; + wxStaticText* m_staticText151; + wxHyperlinkCtrl* m_hyperlink3; + wxStaticLine* m_staticline2; + + wxStaticBitmap* m_bitmap13; + wxHyperlinkCtrl* m_hyperlink5; + + wxButton* m_button8; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnOK( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~AboutDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class ErrorDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class ErrorDlgGenerated : public wxDialog +class ErrorDlgGenerated : public wxDialog { - private: - - protected: - - wxStaticBitmap* m_bitmap10; - wxTextCtrl* m_textCtrl8; - - wxCheckBox* m_checkBoxContinueError; - - wxButton* m_buttonContinue; - wxButton* m_buttonRetry; - wxButton* m_buttonAbort; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnContinue( wxCommandEvent& event ){ event.Skip(); } - virtual void OnRetry( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ){ event.Skip(); } - - - public: - ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("An error occured"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 445,293 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~ErrorDlgGenerated(); - +private: + +protected: + + wxStaticBitmap* m_bitmap10; + wxTextCtrl* m_textCtrl8; + + wxCheckBox* m_checkBoxContinueError; + + wxButton* m_buttonContinue; + wxButton* m_buttonRetry; + wxButton* m_buttonAbort; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnContinue( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnRetry( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnAbort( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("An error occured"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 445,293 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~ErrorDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class DeleteDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class DeleteDlgGenerated : public wxDialog +class DeleteDlgGenerated : public wxDialog { - private: - - protected: - - - wxStaticBitmap* m_bitmap12; - wxStaticText* m_staticTextHeader; - - wxTextCtrl* m_textCtrlMessage; - wxButton* m_buttonOK; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } - - - public: - DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DeleteDlgGenerated(); - +private: + +protected: + + + wxStaticBitmap* m_bitmap12; + wxStaticText* m_staticTextHeader; + + wxTextCtrl* m_textCtrlMessage; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnOK( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCancel( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DeleteDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class FilterDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class FilterDlgGenerated : public wxDialog +class FilterDlgGenerated : public wxDialog { - private: - - protected: - wxPanel* m_panel8; - wxStaticText* m_staticText56; - wxStaticText* m_staticText44; - wxBitmapButton* m_bpButtonHelp; - - wxPanel* m_panel13; - wxStaticLine* m_staticline10; - wxStaticText* m_staticText45; - wxStaticText* m_staticText18; - wxStaticText* m_staticText181; - wxStaticText* m_staticText1811; - - wxStaticText* m_staticText15; - wxStaticBitmap* m_bitmap8; - wxTextCtrl* m_textCtrlInclude; - - wxStaticText* m_staticText16; - wxStaticBitmap* m_bitmap9; - wxTextCtrl* m_textCtrlExclude; - - wxButton* m_button9; - - wxButton* m_button17; - wxButton* m_button10; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnHelp( wxCommandEvent& event ){ event.Skip(); } - virtual void OnDefault( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ){ event.Skip(); } - virtual void OnOK( wxCommandEvent& event ){ event.Skip(); } - - - public: - FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~FilterDlgGenerated(); - +private: + +protected: + wxPanel* m_panel8; + wxStaticText* m_staticText56; + wxStaticText* m_staticText44; + wxBitmapButton* m_bpButtonHelp; + + wxPanel* m_panel13; + wxStaticLine* m_staticline10; + wxStaticText* m_staticText45; + wxStaticText* m_staticText18; + wxStaticText* m_staticText181; + wxStaticText* m_staticText1811; + + wxStaticText* m_staticText15; + wxStaticBitmap* m_bitmap8; + wxTextCtrl* m_textCtrlInclude; + + wxStaticText* m_staticText16; + wxStaticBitmap* m_bitmap9; + wxTextCtrl* m_textCtrlExclude; + + wxButton* m_button9; + + wxButton* m_button17; + wxButton* m_button10; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) + { + event.Skip(); + } + virtual void OnHelp( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnDefault( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnCancel( wxCommandEvent& event ) + { + event.Skip(); + } + virtual void OnOK( wxCommandEvent& event ) + { + event.Skip(); + } + + +public: + FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~FilterDlgGenerated(); + }; #endif //__guiGenerated__ |