diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:50:14 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:50:14 +0200 |
commit | ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4 (patch) | |
tree | dcc7dd2ed76fd0900944c07776fcbdbcd665c020 /ui/SyncDialog.cpp | |
parent | 1.5 (diff) | |
download | FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.gz FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.bz2 FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.zip |
1.6
Diffstat (limited to 'ui/SyncDialog.cpp')
-rw-r--r-- | ui/SyncDialog.cpp | 466 |
1 files changed, 386 insertions, 80 deletions
diff --git a/ui/SyncDialog.cpp b/ui/SyncDialog.cpp index b97badf8..c138544e 100644 --- a/ui/SyncDialog.cpp +++ b/ui/SyncDialog.cpp @@ -1,25 +1,44 @@ #include "syncDialog.h" #include "../library/globalFunctions.h" - -SyncDialog::SyncDialog(MainDialog* window) - : SyncDialogGenerated(window), mainDialog(window) +#include "../library/resources.h" +#include <wx/msgdlg.h> +#include <wx/file.h> +#include <wx/stdpaths.h> + +SyncDialog::SyncDialog(wxWindow* window, + const FileCompareResult& gridDataRef, + Configuration& config, + bool synchronizationEnabled) : + SyncDlgGenerated(window), + gridData(gridDataRef), + cfg(config) { - //make working copy of mainDialog->syncConfiguration and recycler setting - localSyncConfiguration = mainDialog->syncConfiguration; + //make working copy of mainDialog.cfg.syncConfiguration and recycler setting + localSyncConfiguration = config.syncConfiguration; + m_checkBoxUseRecycler->SetValue(cfg.useRecycleBin); + m_checkBoxContinueError->SetValue(cfg.continueOnError); - m_checkBoxUseRecycler->SetValue(mainDialog->useRecycleBin); - m_checkBoxHideErrors->SetValue(mainDialog->hideErrorMessages); + //set sync config icons + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + //update preview + 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); - //set sync config icons - updateConfigIcons(); + if (synchronizationEnabled) + m_bpButton18->Enable(); + else + { + m_bpButton18->Disable(); + m_button6->SetFocus(); + } //set radiobutton if (localSyncConfiguration.exLeftSideOnly == syncDirRight && @@ -47,99 +66,122 @@ SyncDialog::SyncDialog(MainDialog* window) SyncDialog::~SyncDialog() {} -void SyncDialog::updateConfigIcons() +void SyncDialog::updateConfigIcons(wxBitmapButton* button1, + wxBitmapButton* button2, + wxBitmapButton* button3, + wxBitmapButton* button4, + wxBitmapButton* button5, + const SyncConfiguration& syncConfig) { - if (localSyncConfiguration.exLeftSideOnly == syncDirRight) + if (syncConfig.exLeftSideOnly == syncDirRight) { - m_bpButton5->SetBitmapLabel(*GlobalResources::bitmapRightArrow); - m_bpButton5->SetToolTip(_("Copy from left to right")); + button1->SetBitmapLabel(*GlobalResources::bitmapRightArrow); + button1->SetToolTip(_("Copy from left to right")); } - else if (localSyncConfiguration.exLeftSideOnly == syncDirLeft) + else if (syncConfig.exLeftSideOnly == syncDirLeft) { - m_bpButton5->SetBitmapLabel(*GlobalResources::bitmapDelete); - m_bpButton5->SetToolTip(_("Delete files existing on left side only")); + button1->SetBitmapLabel(*GlobalResources::bitmapDelete); + button1->SetToolTip(_("Delete files/folders existing on left side only")); } - else if (localSyncConfiguration.exLeftSideOnly == syncDirNone) + else if (syncConfig.exLeftSideOnly == syncDirNone) { - m_bpButton5->SetBitmapLabel(wxNullBitmap); - m_bpButton5->SetToolTip(_("Do nothing")); + button1->SetBitmapLabel(*GlobalResources::bitmapNoArrow); + button1->SetToolTip(_("Do nothing")); } - if (localSyncConfiguration.exRightSideOnly == syncDirRight) + if (syncConfig.exRightSideOnly == syncDirRight) { - m_bpButton6->SetBitmapLabel(*GlobalResources::bitmapDelete); - m_bpButton6->SetToolTip(_("Delete files existing on right side only")); + button2->SetBitmapLabel(*GlobalResources::bitmapDelete); + button2->SetToolTip(_("Delete files/folders existing on right side only")); } - else if (localSyncConfiguration.exRightSideOnly == syncDirLeft) + else if (syncConfig.exRightSideOnly == syncDirLeft) { - m_bpButton6->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); - m_bpButton6->SetToolTip(_("Copy from right to left")); + button2->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); + button2->SetToolTip(_("Copy from right to left")); } - else if (localSyncConfiguration.exRightSideOnly == syncDirNone) + else if (syncConfig.exRightSideOnly == syncDirNone) { - m_bpButton6->SetBitmapLabel(wxNullBitmap); - m_bpButton6->SetToolTip(_("Do nothing")); + button2->SetBitmapLabel(*GlobalResources::bitmapNoArrow); + button2->SetToolTip(_("Do nothing")); } - if (localSyncConfiguration.leftNewer == syncDirRight) + if (syncConfig.leftNewer == syncDirRight) { - m_bpButton7->SetBitmapLabel(*GlobalResources::bitmapRightArrow); - m_bpButton7->SetToolTip(_("Copy from left to right overwriting")); + button3->SetBitmapLabel(*GlobalResources::bitmapRightArrow); + button3->SetToolTip(_("Copy from left to right overwriting")); } - else if (localSyncConfiguration.leftNewer == syncDirLeft) + else if (syncConfig.leftNewer == syncDirLeft) { - m_bpButton7->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); - m_bpButton7->SetToolTip(_("Copy from right to left overwriting")); + button3->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); + button3->SetToolTip(_("Copy from right to left overwriting")); } - else if (localSyncConfiguration.leftNewer == syncDirNone) + else if (syncConfig.leftNewer == syncDirNone) { - m_bpButton7->SetBitmapLabel(wxNullBitmap); - m_bpButton7->SetToolTip(_("Do nothing")); + button3->SetBitmapLabel(*GlobalResources::bitmapNoArrow); + button3->SetToolTip(_("Do nothing")); } - if (localSyncConfiguration.rightNewer == syncDirRight) + if (syncConfig.rightNewer == syncDirRight) { - m_bpButton8->SetBitmapLabel(*GlobalResources::bitmapRightArrow); - m_bpButton8->SetToolTip(_("Copy from left to right overwriting")); + button4->SetBitmapLabel(*GlobalResources::bitmapRightArrow); + button4->SetToolTip(_("Copy from left to right overwriting")); } - else if (localSyncConfiguration.rightNewer == syncDirLeft) + else if (syncConfig.rightNewer == syncDirLeft) { - m_bpButton8->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); - m_bpButton8->SetToolTip(_("Copy from right to left overwriting")); + button4->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); + button4->SetToolTip(_("Copy from right to left overwriting")); } - else if (localSyncConfiguration.rightNewer == syncDirNone) + else if (syncConfig.rightNewer == syncDirNone) { - m_bpButton8->SetBitmapLabel(wxNullBitmap); - m_bpButton8->SetToolTip(_("Do nothing")); + button4->SetBitmapLabel(*GlobalResources::bitmapNoArrow); + button4->SetToolTip(_("Do nothing")); } - if (localSyncConfiguration.different == syncDirRight) + if (syncConfig.different == syncDirRight) { - m_bpButton9->SetBitmapLabel(*GlobalResources::bitmapRightArrow); - m_bpButton9->SetToolTip(_("Copy from left to right overwriting")); + button5->SetBitmapLabel(*GlobalResources::bitmapRightArrow); + button5->SetToolTip(_("Copy from left to right overwriting")); } - else if (localSyncConfiguration.different == syncDirLeft) + else if (syncConfig.different == syncDirLeft) { - m_bpButton9->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); - m_bpButton9->SetToolTip(_("Copy from right to left overwriting")); + button5->SetBitmapLabel(*GlobalResources::bitmapLeftArrow); + button5->SetToolTip(_("Copy from right to left overwriting")); } - else if (localSyncConfiguration.different == syncDirNone) + else if (syncConfig.different == syncDirNone) { - m_bpButton9->SetBitmapLabel(wxNullBitmap); - m_bpButton9->SetToolTip(_("Do nothing")); + button5->SetBitmapLabel(*GlobalResources::bitmapNoArrow); + button5->SetToolTip(_("Do nothing")); } +} - //update preview of bytes to be transferred: - int objectsTotal = 0; - double dataTotal = 0; - FreeFileSync::calcTotalBytesToSync(objectsTotal, dataTotal, mainDialog->currentGridData, localSyncConfiguration); - - wxString objects = globalFunctions::numberToWxString(objectsTotal); - globalFunctions::includeNumberSeparator(objects); - wxString data = FreeFileSync::formatFilesizeToShortString(dataTotal); - m_textCtrl12->SetValue(objects); - m_textCtrl5->SetValue(data); +void SyncDialog::calculatePreview() +{ + //update preview of bytes to be transferred: + int objectsToCreate = 0; + int objectsToOverwrite = 0; + int objectsToDelete = 0; + double dataToProcess = 0; + FreeFileSync::calcTotalBytesToSync(objectsToCreate, + objectsToOverwrite, + objectsToDelete, + dataToProcess, + gridData, + localSyncConfiguration); + + wxString toCreate = globalFunctions::numberToWxString(objectsToCreate); + wxString toUpdate = globalFunctions::numberToWxString(objectsToOverwrite); + wxString toDelete = globalFunctions::numberToWxString(objectsToDelete); + wxString data = FreeFileSync::formatFilesizeToShortString(dataToProcess); + + globalFunctions::includeNumberSeparator(toCreate); + globalFunctions::includeNumberSeparator(toUpdate); + globalFunctions::includeNumberSeparator(toDelete); + + m_textCtrlCreate->SetValue(toCreate); + m_textCtrlUpdate->SetValue(toUpdate); + m_textCtrlDelete->SetValue(toDelete); + m_textCtrlData->SetValue(data); } @@ -158,9 +200,9 @@ void SyncDialog::OnCancel(wxCommandEvent& event) void SyncDialog::OnBack(wxCommandEvent& event) { //write configuration to main dialog - mainDialog->syncConfiguration = localSyncConfiguration; - mainDialog->useRecycleBin = m_checkBoxUseRecycler->GetValue(); - mainDialog->hideErrorMessages = m_checkBoxHideErrors->GetValue(); + cfg.syncConfiguration = localSyncConfiguration; + cfg.useRecycleBin = m_checkBoxUseRecycler->GetValue(); + cfg.continueOnError = m_checkBoxContinueError->GetValue(); EndModal(0); } @@ -168,9 +210,9 @@ void SyncDialog::OnBack(wxCommandEvent& event) void SyncDialog::OnStartSync(wxCommandEvent& event) { //write configuration to main dialog - mainDialog->syncConfiguration = localSyncConfiguration; - mainDialog->useRecycleBin = m_checkBoxUseRecycler->GetValue(); - mainDialog->hideErrorMessages = m_checkBoxHideErrors->GetValue(); + cfg.syncConfiguration = localSyncConfiguration; + cfg.useRecycleBin = m_checkBoxUseRecycler->GetValue(); + cfg.continueOnError = m_checkBoxContinueError->GetValue(); EndModal(StartSynchronizationProcess); } @@ -189,7 +231,7 @@ void SyncDialog::OnSelectRecycleBin(wxCommandEvent& event) } -void SyncDialog::OnSyncLeftToRight( wxCommandEvent& event ) +void SyncDialog::OnSyncLeftToRight(wxCommandEvent& event) { localSyncConfiguration.exLeftSideOnly = syncDirRight; localSyncConfiguration.exRightSideOnly = syncDirRight; @@ -197,14 +239,15 @@ void SyncDialog::OnSyncLeftToRight( wxCommandEvent& event ) localSyncConfiguration.rightNewer = syncDirRight; localSyncConfiguration.different = syncDirRight; - updateConfigIcons(); + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + calculatePreview(); //if event is triggered by button m_radioBtn1->SetValue(true); } -void SyncDialog::OnSyncBothSides( wxCommandEvent& event ) +void SyncDialog::OnSyncBothSides(wxCommandEvent& event) { localSyncConfiguration.exLeftSideOnly = syncDirRight; localSyncConfiguration.exRightSideOnly = syncDirLeft; @@ -212,7 +255,9 @@ void SyncDialog::OnSyncBothSides( wxCommandEvent& event ) localSyncConfiguration.rightNewer = syncDirLeft; localSyncConfiguration.different = syncDirNone; - updateConfigIcons(); + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + calculatePreview(); + //if event is triggered by button m_radioBtn2->SetValue(true); } @@ -233,7 +278,8 @@ void toggleSyncDirection(SyncDirection& current) void SyncDialog::OnExLeftSideOnly( wxCommandEvent& event ) { toggleSyncDirection(localSyncConfiguration.exLeftSideOnly); - updateConfigIcons(); + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + calculatePreview(); //set custom config button m_radioBtn3->SetValue(true); } @@ -241,7 +287,8 @@ void SyncDialog::OnExLeftSideOnly( wxCommandEvent& event ) void SyncDialog::OnExRightSideOnly( wxCommandEvent& event ) { toggleSyncDirection(localSyncConfiguration.exRightSideOnly); - updateConfigIcons(); + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + calculatePreview(); //set custom config button m_radioBtn3->SetValue(true); } @@ -249,7 +296,8 @@ void SyncDialog::OnExRightSideOnly( wxCommandEvent& event ) void SyncDialog::OnLeftNewer( wxCommandEvent& event ) { toggleSyncDirection(localSyncConfiguration.leftNewer); - updateConfigIcons(); + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + calculatePreview(); //set custom config button m_radioBtn3->SetValue(true); } @@ -257,7 +305,8 @@ void SyncDialog::OnLeftNewer( wxCommandEvent& event ) void SyncDialog::OnRightNewer( wxCommandEvent& event ) { toggleSyncDirection(localSyncConfiguration.rightNewer); - updateConfigIcons(); + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + calculatePreview(); //set custom config button m_radioBtn3->SetValue(true); } @@ -265,7 +314,264 @@ void SyncDialog::OnRightNewer( wxCommandEvent& event ) void SyncDialog::OnDifferent( wxCommandEvent& event ) { toggleSyncDirection(localSyncConfiguration.different); - updateConfigIcons(); + updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + calculatePreview(); //set custom config button m_radioBtn3->SetValue(true); } + +//################################################################################################################################### + + +BatchDialog::BatchDialog(wxWindow* window, + const Configuration& config, + const wxString& leftDir, + const wxString& rightDir) : + BatchDlgGenerated(window) +{ + //make working copy of mainDialog.cfg.syncConfiguration and recycler setting + localSyncConfiguration = config.syncConfiguration; + SyncDialog::updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); + + m_checkBoxUseRecycler->SetValue(config.useRecycleBin); + m_checkBoxContinueError->SetValue(config.continueOnError); + + switch (config.compareVar) + { + case compareByTimeAndSize: + m_radioBtnSizeDate->SetValue(true); + break; + case compareByContent: + m_radioBtnContent->SetValue(true); + break; + default: + assert (false); + } + + filterIsActive = config.filterIsActive; + updateFilterButton(); + + 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); + + m_buttonCreate->SetFocus(); +} + +BatchDialog::~BatchDialog() +{} + + +void BatchDialog::updateFilterButton() +{ + if (filterIsActive) + { + m_bpButtonFilter->SetBitmapLabel(*GlobalResources::bitmapFilterOn); + m_bpButtonFilter->SetToolTip(_("Filter active: Press again to deactivate")); + + m_textCtrlInclude->Enable(); + m_textCtrlExclude->Enable(); + } + else + { + m_bpButtonFilter->SetBitmapLabel(*GlobalResources::bitmapFilterOff); + m_bpButtonFilter->SetToolTip(_("Press button to activate filter")); + + m_textCtrlInclude->Disable(); + m_textCtrlExclude->Disable(); + } +} + + +void BatchDialog::OnExLeftSideOnly(wxCommandEvent& event) +{ + toggleSyncDirection(localSyncConfiguration.exLeftSideOnly); + SyncDialog::updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); +} + +void BatchDialog::OnExRightSideOnly(wxCommandEvent& event) +{ + toggleSyncDirection(localSyncConfiguration.exRightSideOnly); + SyncDialog::updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); +} + +void BatchDialog::OnLeftNewer(wxCommandEvent& event) +{ + toggleSyncDirection(localSyncConfiguration.leftNewer); + SyncDialog::updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); +} + +void BatchDialog::OnRightNewer(wxCommandEvent& event) +{ + toggleSyncDirection(localSyncConfiguration.rightNewer); + SyncDialog::updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); +} + +void BatchDialog::OnDifferent(wxCommandEvent& event) +{ + toggleSyncDirection(localSyncConfiguration.different); + SyncDialog::updateConfigIcons(m_bpButton5, m_bpButton6, m_bpButton7, m_bpButton8, m_bpButton9, localSyncConfiguration); +} + + +void BatchDialog::OnFilterButton(wxCommandEvent& event) +{ + filterIsActive = !filterIsActive; + updateFilterButton(); +} + + +void BatchDialog::OnSelectRecycleBin(wxCommandEvent& event) +{ + if (event.IsChecked()) + { + if (!FreeFileSync::recycleBinExists()) + { + wxMessageBox(_("It was not possible to gain access to Recycle Bin!\n\nIt's likely that you are not using Windows XP. (Probably Vista)\nIf you want this feature included, please contact the author. :)"), _("Error") , wxOK | wxICON_ERROR); + m_checkBoxUseRecycler->SetValue(false); + } + } +} + + +void BatchDialog::OnClose(wxCloseEvent& event) +{ + EndModal(0); +} + + +void BatchDialog::OnCancel(wxCommandEvent& event) +{ + EndModal(0); +} + + +void BatchDialog::OnCreateJob(wxCommandEvent& event) +{ + //get a filename +#ifdef FFS_WIN + wxString fileName = "SyncJob.cmd"; //proposal + wxFileDialog* filePicker = new wxFileDialog(this, "", "", fileName, wxString(_("Command file")) + " (*.cmd)|*.cmd", wxFD_SAVE); +#elif defined FFS_LINUX + wxString fileName = "SyncJob.sh"; //proposal + wxFileDialog* filePicker = new wxFileDialog(this, "", "", fileName, wxString(_("Shell script")) + " (*.sh)|*.sh", wxFD_SAVE); +#else + assert(false); +#endif + + if (filePicker->ShowModal() == wxID_OK) + { + fileName = filePicker->GetPath(); + if (wxFileExists(fileName)) + { + wxMessageDialog* messageDlg = new wxMessageDialog(this, wxString("\"") + fileName + "\"" + _(" already exists. Overwrite?"), _("Warning") , wxOK | wxCANCEL); + + if (messageDlg->ShowModal() != wxID_OK) + { + event.Skip(); + return; + } + } + + //assemble command line parameters + wxString outputString = parseConfiguration(); + + //write export file + wxFile output(fileName, wxFile::write); + if (output.IsOpened()) + { + output.Write(outputString); + EndModal(batchFileCreated); + } + else + wxMessageBox(wxString(_("Could not write to ")) + "\"" + fileName + "\"", _("An exception occured!"), wxOK | wxICON_ERROR); + } + +#ifdef FFS_LINUX + //for linux the batch file needs the executable flag + wxExecute(wxString("chmod +x ") + fileName); +#endif // FFS_LINUX + + event.Skip(); +} + + +wxString getFormattedSyncDirection(const SyncDirection direction) +{ + if (direction == syncDirRight) + return 'R'; + else if (direction == syncDirLeft) + return 'L'; + else if (direction == syncDirNone) + return 'N'; + else + { + assert (false); + return wxEmptyString; + } +} + + +wxString BatchDialog::parseConfiguration() +{ + wxString output; + +#ifdef FFS_LINUX + //shell script identifier + output+= "#!/bin/bash\n"; +#endif + + output+= "\"" + wxStandardPaths::Get().GetExecutablePath() + "\""; + + output+= wxString(" -") + GlobalResources::paramCompare + " "; + if (m_radioBtnSizeDate->GetValue()) + output+= GlobalResources::valueSizeDate; + else if (m_radioBtnContent->GetValue()) + output+= GlobalResources::valueContent; + else + assert(false); + + output+= wxString(" -") + GlobalResources::paramCfg + " " + + getFormattedSyncDirection(localSyncConfiguration.exLeftSideOnly) + + getFormattedSyncDirection(localSyncConfiguration.exRightSideOnly) + + getFormattedSyncDirection(localSyncConfiguration.leftNewer) + + getFormattedSyncDirection(localSyncConfiguration.rightNewer) + + getFormattedSyncDirection(localSyncConfiguration.different); + + if (filterIsActive) + { + output+= wxString(" -") + GlobalResources::paramInclude + " " + + "\"" + m_textCtrlInclude->GetValue() + "\""; + + output+= wxString(" -") + GlobalResources::paramExclude + " " + + "\"" + m_textCtrlExclude->GetValue() + "\""; + } + + if (m_checkBoxUseRecycler->GetValue()) + output+= wxString(" -") + GlobalResources::paramRecycler; + + if (m_checkBoxContinueError->GetValue()) + output+= wxString(" -") + GlobalResources::paramContinueError; + + if (m_checkBoxSilent->GetValue()) + output+= wxString(" -") + GlobalResources::paramSilent; + + output+= wxString(" ") + "\"" + m_directoryPanel1->GetValue() + "\""; + output+= wxString(" ") + "\"" + m_directoryPanel2->GetValue() + "\""; + + output+= "\n"; + + return output; +} + |