summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/MainDialog.cpp975
-rw-r--r--ui/MainDialog.h99
-rw-r--r--ui/SmallDialogs.cpp157
-rw-r--r--ui/SmallDialogs.h28
-rw-r--r--ui/SyncDialog.cpp136
-rw-r--r--ui/batchStatusHandler.cpp14
-rw-r--r--ui/gridView.cpp34
-rw-r--r--ui/gridView.h3
-rw-r--r--ui/guiGenerated.cpp546
-rw-r--r--ui/guiGenerated.h142
-rw-r--r--ui/guiStatusHandler.cpp6
-rw-r--r--ui/sorting.h18
12 files changed, 1210 insertions, 948 deletions
diff --git a/ui/MainDialog.cpp b/ui/MainDialog.cpp
index 32a1e124..e9119fea 100644
--- a/ui/MainDialog.cpp
+++ b/ui/MainDialog.cpp
@@ -19,6 +19,7 @@
#include "dragAndDrop.h"
#include "../library/filter.h"
#include "../structures.h"
+#include <wx/imaglist.h>
using namespace FreeFileSync;
@@ -136,56 +137,65 @@ MainDialog::MainDialog(wxFrame* frame, const wxString& cfgFileName, CustomLocale
cleanedUp(false),
lastSortColumn(-1),
lastSortGrid(NULL),
+#ifdef FFS_WIN
+ updateFileIcons(new IconUpdater(m_gridLeft, m_gridRight)),
+#endif
syncPreview(new SyncPreview(this))
{
+ m_bpButtonRemoveTopPair->Hide();
+
+
//initialize and load configuration
readGlobalSettings();
readConfigurationFromXml(cfgFileName, true);
//set icons for this dialog
- m_bpButton10->SetBitmapLabel(*globalResource.bitmapExit);
- m_buttonCompare->setBitmapFront(*globalResource.bitmapCompare);
- m_bpButtonSyncConfig->SetBitmapLabel(*globalResource.bitmapSyncCfg);
- m_bpButton14->SetBitmapLabel(*globalResource.bitmapHelp);
- m_bpButtonSave->SetBitmapLabel(*globalResource.bitmapSave);
- m_bpButtonLoad->SetBitmapLabel(*globalResource.bitmapLoad);
- m_bpButtonAddPair->SetBitmapLabel(*globalResource.bitmapAddFolderPair);
- m_bitmap15->SetBitmap(*globalResource.bitmapStatusEdge);
- m_bitmapShift->SetBitmap(*globalResource.bitmapShift);
- m_bitmapCreate->SetBitmap(*globalResource.bitmapCreate);
- m_bitmapUpdate->SetBitmap(*globalResource.bitmapUpdate);
- m_bitmapDelete->SetBitmap(*globalResource.bitmapDelete);
- m_bitmapData->SetBitmap(*globalResource.bitmapData);
+ m_bpButton10->SetBitmapLabel(*GlobalResources::getInstance().bitmapExit);
+ m_bpButtonSwapSides->SetBitmapLabel(*GlobalResources::getInstance().bitmapSwap);
+ m_buttonCompare->setBitmapFront(*GlobalResources::getInstance().bitmapCompare);
+ m_bpButtonSyncConfig->SetBitmapLabel(*GlobalResources::getInstance().bitmapSyncCfg);
+ m_bpButton14->SetBitmapLabel(*GlobalResources::getInstance().bitmapHelp);
+ m_bpButtonSave->SetBitmapLabel(*GlobalResources::getInstance().bitmapSave);
+ m_bpButtonLoad->SetBitmapLabel(*GlobalResources::getInstance().bitmapLoad);
+ m_bpButtonAddPair->SetBitmapLabel(*GlobalResources::getInstance().bitmapAddFolderPair);
+ m_bpButtonRemoveTopPair->SetBitmapLabel(*GlobalResources::getInstance().bitmapRemoveFolderPair);
+ m_bitmap15->SetBitmap(*GlobalResources::getInstance().bitmapStatusEdge);
+ m_bitmapShift->SetBitmap(*GlobalResources::getInstance().bitmapShift);
+
+ m_bitmapCreate->SetBitmap(*GlobalResources::getInstance().bitmapCreate);
+ m_bitmapUpdate->SetBitmap(*GlobalResources::getInstance().bitmapUpdate);
+ m_bitmapDelete->SetBitmap(*GlobalResources::getInstance().bitmapDelete);
+ m_bitmapData->SetBitmap(*GlobalResources::getInstance().bitmapData);
bSizer6->Layout(); //wxButtonWithImage size might have changed
//menu icons: workaround for wxWidgets: small hack to update menu items: actually this is a wxWidgets bug (affects Windows- and Linux-build)
MenuItemUpdater updateMenuFile(m_menuFile);
- updateMenuFile.addForUpdate(m_menuItem10, *globalResource.bitmapCompareSmall);
- updateMenuFile.addForUpdate(m_menuItem11, *globalResource.bitmapSyncSmall);
- updateMenuFile.addForUpdate(m_menuItemSwitchView, *globalResource.bitmapSwitchViewSmall);
+ updateMenuFile.addForUpdate(m_menuItem10, *GlobalResources::getInstance().bitmapCompareSmall);
+ updateMenuFile.addForUpdate(m_menuItem11, *GlobalResources::getInstance().bitmapSyncSmall);
MenuItemUpdater updateMenuAdv(m_menuAdvanced);
- updateMenuAdv.addForUpdate(m_menuItemGlobSett, *globalResource.bitmapSettingsSmall);
- updateMenuAdv.addForUpdate(m_menuItem7, *globalResource.bitmapBatchSmall);
+ updateMenuAdv.addForUpdate(m_menuItemGlobSett, *GlobalResources::getInstance().bitmapSettingsSmall);
+ updateMenuAdv.addForUpdate(m_menuItem7, *GlobalResources::getInstance().bitmapBatchSmall);
MenuItemUpdater updateMenuHelp(m_menuHelp);
- updateMenuHelp.addForUpdate(m_menuItemAbout, *globalResource.bitmapAboutSmall);
-
- MenuItemUpdater updateMenuAdvLang(m_menuLanguages);
- updateMenuAdvLang.addForUpdate(m_menuItemGerman, *globalResource.bitmapGermany);
- updateMenuAdvLang.addForUpdate(m_menuItemEnglish, *globalResource.bitmapEngland);
- updateMenuAdvLang.addForUpdate(m_menuItemSpanish, *globalResource.bitmapSpain);
- updateMenuAdvLang.addForUpdate(m_menuItemFrench, *globalResource.bitmapFrance);
- updateMenuAdvLang.addForUpdate(m_menuItemItalian, *globalResource.bitmapItaly);
- updateMenuAdvLang.addForUpdate(m_menuItemHungarian, *globalResource.bitmapHungary);
- updateMenuAdvLang.addForUpdate(m_menuItemDutch, *globalResource.bitmapHolland);
- updateMenuAdvLang.addForUpdate(m_menuItemPolish, *globalResource.bitmapPoland);
- updateMenuAdvLang.addForUpdate(m_menuItemPortuguese, *globalResource.bitmapPortugal);
- updateMenuAdvLang.addForUpdate(m_menuItemPortugueseBrazil, *globalResource.bitmapBrazil);
- updateMenuAdvLang.addForUpdate(m_menuItemSlovenian, *globalResource.bitmapSlovakia);
- updateMenuAdvLang.addForUpdate(m_menuItemJapanese, *globalResource.bitmapJapan);
- updateMenuAdvLang.addForUpdate(m_menuItemChineseSimple, *globalResource.bitmapChina);
+ updateMenuHelp.addForUpdate(m_menuItemAbout, *GlobalResources::getInstance().bitmapAboutSmall);
+
+
+ //create language selection menu
+ for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::getMapping().begin(); i != LocalizationInfo::getMapping().end(); ++i)
+ {
+ wxMenuItem* newItem = new wxMenuItem(m_menuLanguages, wxID_ANY, i->languageName, wxEmptyString, wxITEM_NORMAL );
+ newItem->SetBitmap(*i->languageFlag);
+
+ //map menu item IDs with language IDs: evaluated when processing event handler
+ languageMenuItemMap.insert(std::map<MenuItemID, LanguageID>::value_type(newItem->GetId(), i->languageID));
+
+ //connect event
+ Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnMenuLanguageSwitch));
+
+ m_menuLanguages->Append(newItem);
+ }
//prepare drag & drop
@@ -217,22 +227,9 @@ MainDialog::MainDialog(wxFrame* frame, const wxString& cfgFileName, CustomLocale
m_gridMiddle->Connect(FFS_SYNC_DIRECTION_EVENT, FFSSyncDirectionEventHandler(MainDialog::OnSetSyncDirection), NULL, this);
//init grid settings
- m_gridLeft->initSettings( globalSettings.gui.showFileIcons,
- m_gridLeft,
- m_gridRight,
- m_gridMiddle,
- &gridDataView);
-
- m_gridMiddle->initSettings(m_gridLeft,
- m_gridRight,
- m_gridMiddle,
- &gridDataView);
-
- m_gridRight->initSettings( globalSettings.gui.showFileIcons,
- m_gridLeft,
- m_gridRight,
- m_gridMiddle,
- &gridDataView);
+ m_gridLeft ->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, &gridDataView);
+ m_gridMiddle->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, &gridDataView);
+ m_gridRight ->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, &gridDataView);
//disable sync button as long as "compare" hasn't been triggered.
syncPreview->enableSynchronization(false);
@@ -255,6 +252,9 @@ MainDialog::MainDialog(wxFrame* frame, const wxString& cfgFileName, CustomLocale
//register regular check for update on next idle event
Connect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), NULL, this);
+
+ //asynchronous call to wxWindow::Layout(): fix superfluous frame on right and bottom when FFS is started in fullscreen mode
+ Connect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnLayoutWindowAsync), NULL, this);
}
@@ -273,7 +273,7 @@ void MainDialog::cleanUp()
//no need for event Disconnect() here; done automatically
//save configuration
- writeConfigurationToXml(xmlAccess::LAST_CONFIG_FILE); //don't trow exceptions in destructors
+ writeConfigurationToXml(FreeFileSync::getLastConfigFile()); //don't trow exceptions in destructors
writeGlobalSettings();
}
}
@@ -315,6 +315,15 @@ void MainDialog::readGlobalSettings()
i != globalSettings.gui.folderHistoryRight.rend();
++i)
addRightFolderToHistory(*i);
+
+ //show/hide file icons
+#ifdef FFS_WIN
+ m_gridLeft->enableFileIcons(globalSettings.gui.showFileIconsLeft);
+ m_gridRight->enableFileIcons(globalSettings.gui.showFileIconsRight);
+#endif
+
+ //set selected tab
+ m_notebookBottomLeft->ChangeSelection(globalSettings.gui.selectedTabBottomLeft);
}
@@ -344,6 +353,24 @@ void MainDialog::writeGlobalSettings()
const wxArrayString rightFolderHistory = m_directoryRight->GetStrings();
for (unsigned i = 0; i < rightFolderHistory.GetCount(); ++i)
globalSettings.gui.folderHistoryRight.push_back(rightFolderHistory[i]);
+
+ //get selected tab
+ globalSettings.gui.selectedTabBottomLeft = m_notebookBottomLeft->GetSelection();
+}
+
+
+void MainDialog::setSyncDirManually(const std::set<int>& rowsToSetOnUiTable, const FreeFileSync::SyncDirection dir)
+{
+ if (rowsToSetOnUiTable.size() > 0)
+ {
+ for (std::set<int>::const_iterator i = rowsToSetOnUiTable.begin(); i != rowsToSetOnUiTable.end(); ++i)
+ {
+ gridDataView[*i].direction = dir;
+ gridDataView[*i].selectedForSynchronization = true;
+ }
+
+ updateGuiGrid();
+ }
}
@@ -372,7 +399,7 @@ void MainDialog::filterRangeManually(const std::set<int>& rowsToFilterOnUiTable,
const std::set<int>& markedRows = compRef[i - currentGridData.begin()];
std::set<int> markedRowsTotal; //retrieve additional rows that need to be filtered, too
- for (std::set<int>::iterator i = markedRows.begin(); i != markedRows.end(); ++i)
+ for (std::set<int>::const_iterator i = markedRows.begin(); i != markedRows.end(); ++i)
{
markedRowsTotal.insert(*i);
FreeFileSync::addSubElements(fileCmp, fileCmp[*i], markedRowsTotal);
@@ -383,22 +410,7 @@ void MainDialog::filterRangeManually(const std::set<int>& rowsToFilterOnUiTable,
fileCmp[*i].selectedForSynchronization = newSelection;
}
- //signal UI that grids need to be refreshed on next Update()
- m_gridLeft->ForceRefresh();
- m_gridMiddle->ForceRefresh();
- m_gridRight->ForceRefresh();
- Update(); //show changes resulting from ForceRefresh()
-
- if (hideFilteredElements)
- {
- wxMilliSleep(400); //some delay to show user the rows he has filtered out before they are removed
- updateGuiGrid(); //redraw grid to remove excluded elements (keeping sort sequence)
-
- m_gridLeft->ClearSelection();
- m_gridRight->ClearSelection();
- }
- else
- updateGuiGrid();
+ refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts
}
}
@@ -430,7 +442,7 @@ void MainDialog::copySelectionToClipboard(const CustomGrid* selectedGrid)
{
wxString clipboardString;
- for (std::set<int>::iterator i = selectedRows.begin(); i != selectedRows.end(); ++i)
+ for (std::set<int>::const_iterator i = selectedRows.begin(); i != selectedRows.end(); ++i)
{
for (int k = 0; k < const_cast<CustomGrid*>(selectedGrid)->GetNumberCols(); ++k)
{
@@ -478,6 +490,18 @@ std::set<int> MainDialog::getSelectedRows(const CustomGrid* grid) const
}
+std::set<int> MainDialog::getSelectedRows() const
+{
+ //merge selections from left and right grid
+ std::set<int> selection = getSelectedRows(m_gridLeft);
+ std::set<int> additional = getSelectedRows(m_gridRight);
+ for (std::set<int>::const_iterator i = additional.begin(); i != additional.end(); ++i)
+ selection.insert(*i);
+
+ return selection;
+}
+
+
class DeleteErrorHandler : public ErrorHandler
{
public:
@@ -603,7 +627,7 @@ void MainDialog::openWithFileManager(const int rowNumber, const bool leftSide)
case FileDescrLine::TYPE_FILE:
command = globalSettings.gui.commandLineFileManager;
command.Replace(wxT("%name"), fileDescr->fullName.c_str());
- command.Replace(wxT("%path"), wxString(fileDescr->fullName.c_str()).BeforeLast(GlobalResources::FILE_NAME_SEPARATOR));
+ command.Replace(wxT("%path"), wxString(fileDescr->fullName.c_str()).BeforeLast(FreeFileSync::FILE_NAME_SEPARATOR));
break;
case FileDescrLine::TYPE_DIRECTORY:
command = globalSettings.gui.commandLineFileManager;
@@ -625,7 +649,7 @@ void MainDialog::openWithFileManager(const int rowNumber, const bool leftSide)
switch (fileDescrOther->objType)
{
case FileDescrLine::TYPE_FILE:
- alternateFolder = syncFolder + wxString(fileDescrOther->relativeName.c_str()).BeforeLast(GlobalResources::FILE_NAME_SEPARATOR);
+ alternateFolder = syncFolder + wxString(fileDescrOther->relativeName.c_str()).BeforeLast(FreeFileSync::FILE_NAME_SEPARATOR);
break;
case FileDescrLine::TYPE_DIRECTORY:
alternateFolder = syncFolder + wxString(fileDescrOther->relativeName.c_str());
@@ -763,30 +787,79 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event)
}
-void MainDialog::OnContextMenu(wxGridEvent& event)
+void MainDialog::OnContextRim(wxGridEvent& event)
{
- std::set<int> selectionLeft = getSelectedRows(m_gridLeft);
- std::set<int> selectionRight = getSelectedRows(m_gridRight);
+ //usability: select row unter right-click if not already selected
+ wxGrid* sourceGrid = dynamic_cast<wxGrid*>(event.GetEventObject());
+ if (sourceGrid != NULL)
+ {
+ const int clickedRow = event.GetRow();
+ const int clickedCol = event.GetCol();
+ if (clickedRow >= 0 && clickedCol >= 0 && !sourceGrid->IsInSelection(clickedRow, 0))
+ {
+ sourceGrid->SelectRow(clickedRow);
+ sourceGrid->SetGridCursor(clickedRow, clickedCol);
+
+ if (sourceGrid == m_gridLeft)
+ m_gridRight->ClearSelection();
+ else if (sourceGrid == m_gridRight)
+ m_gridLeft->ClearSelection();
+ }
+ }
+//------------------------------------------------------------------------------
+
+
+ const std::set<int> selectionLeft = getSelectedRows(m_gridLeft);
+ const std::set<int> selectionRight = getSelectedRows(m_gridRight);
+
+ const int selectionBegin = selectionLeft.size() + selectionRight.size() == 0 ? 0 :
+ selectionLeft.size() == 0 ? *selectionRight.begin() :
+ selectionRight.size() == 0 ? *selectionLeft.begin() :
+ std::min(*selectionLeft.begin(), *selectionRight.begin());
//#######################################################
//re-create context menu
contextMenu.reset(new wxMenu);
+ if (syncPreview->previewIsEnabled())
+ {
+ if (selectionLeft.size() + selectionRight.size() > 0)
+ {
+ //CONTEXT_SYNC_DIR_LEFT
+ wxMenuItem* menuItemSyncDirLeft = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_DIR_LEFT, _("Change direction"));
+ menuItemSyncDirLeft->SetBitmap(getSyncOpImage(gridDataView[selectionBegin].cmpResult, true, SYNC_DIR_LEFT));
+ contextMenu->Append(menuItemSyncDirLeft);
+
+ //CONTEXT_SYNC_DIR_NONE
+ wxMenuItem* menuItemSyncDirNone = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_DIR_NONE, _("Change direction"));
+ menuItemSyncDirNone->SetBitmap(getSyncOpImage(gridDataView[selectionBegin].cmpResult, true, SYNC_DIR_NONE));
+ contextMenu->Append(menuItemSyncDirNone);
+
+ //CONTEXT_SYNC_DIR_RIGHT
+ wxMenuItem* menuItemSyncDirRight = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_DIR_RIGHT, _("Change direction"));
+ menuItemSyncDirRight->SetBitmap(getSyncOpImage(gridDataView[selectionBegin].cmpResult, true, SYNC_DIR_RIGHT));
+ contextMenu->Append(menuItemSyncDirRight);
+
+ contextMenu->AppendSeparator();
+ }
+ }
+
+
//CONTEXT_FILTER_TEMP
if (selectionLeft.size() + selectionRight.size() > 0)
{
- int selectionBegin = 0;
- if (!selectionLeft.size())
- selectionBegin = *selectionRight.begin();
- else if (!selectionRight.size())
- selectionBegin = *selectionLeft.begin();
- else
- selectionBegin = std::min(*selectionLeft.begin(), *selectionRight.begin());
-
if (gridDataView[selectionBegin].selectedForSynchronization) //valid access, as getSelectedRows returns valid references only
- contextMenu->Append(CONTEXT_FILTER_TEMP, _("Exclude temporarily"));
+ {
+ wxMenuItem* menuItemExclTemp = new wxMenuItem(contextMenu.get(), CONTEXT_FILTER_TEMP, _("Exclude temporarily"));
+ menuItemExclTemp->SetBitmap(*GlobalResources::getInstance().bitmapCheckBoxFalse);
+ contextMenu->Append(menuItemExclTemp);
+ }
else
- contextMenu->Append(CONTEXT_FILTER_TEMP, _("Include temporarily"));
+ {
+ wxMenuItem* menuItemInclTemp = new wxMenuItem(contextMenu.get(), CONTEXT_FILTER_TEMP, _("Include temporarily"));
+ menuItemInclTemp->SetBitmap(*GlobalResources::getInstance().bitmapCheckBoxTrue);
+ contextMenu->Append(menuItemInclTemp);
+ }
}
else
{
@@ -798,7 +871,7 @@ void MainDialog::OnContextMenu(wxGridEvent& event)
//get list of relative file/dir-names for filtering
exFilterCandidateObj.clear();
FilterObject newFilterEntry;
- for (std::set<int>::iterator i = selectionLeft.begin(); i != selectionLeft.end(); ++i)
+ for (std::set<int>::const_iterator i = selectionLeft.begin(); i != selectionLeft.end(); ++i)
{
const FileCompareLine& line = gridDataView[*i];
newFilterEntry.relativeName = line.fileDescrLeft.relativeName.c_str();
@@ -806,7 +879,7 @@ void MainDialog::OnContextMenu(wxGridEvent& event)
if (!newFilterEntry.relativeName.IsEmpty())
exFilterCandidateObj.push_back(newFilterEntry);
}
- for (std::set<int>::iterator i = selectionRight.begin(); i != selectionRight.end(); ++i)
+ for (std::set<int>::const_iterator i = selectionRight.begin(); i != selectionRight.end(); ++i)
{
const FileCompareLine& line = gridDataView[*i];
newFilterEntry.relativeName = line.fileDescrRight.relativeName.c_str();
@@ -820,20 +893,32 @@ void MainDialog::OnContextMenu(wxGridEvent& event)
exFilterCandidateExtension.clear();
if (exFilterCandidateObj.size() > 0 && exFilterCandidateObj[0].type == FileDescrLine::TYPE_FILE)
{
- const wxString filename = exFilterCandidateObj[0].relativeName.AfterLast(GlobalResources::FILE_NAME_SEPARATOR);
+ const wxString filename = exFilterCandidateObj[0].relativeName.AfterLast(FreeFileSync::FILE_NAME_SEPARATOR);
if (filename.Find(wxChar('.')) != wxNOT_FOUND) //be careful: AfterLast will return the whole string if '.' is not found!
{
exFilterCandidateExtension = filename.AfterLast(wxChar('.'));
- contextMenu->Append(CONTEXT_EXCLUDE_EXT, wxString(_("Exclude via filter:")) + wxT(" ") + wxT("*.") + exFilterCandidateExtension);
+
+ //add context menu item
+ wxMenuItem* menuItemExclExt = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_EXT, wxString(_("Exclude via filter:")) + wxT(" ") + wxT("*.") + exFilterCandidateExtension);
+ menuItemExclExt->SetBitmap(*GlobalResources::getInstance().bitmapFilterSmall);
+ contextMenu->Append(menuItemExclExt);
}
}
//CONTEXT_EXCLUDE_OBJ
+ wxMenuItem* menuItemExclObj = NULL;
if (exFilterCandidateObj.size() == 1)
- contextMenu->Append(CONTEXT_EXCLUDE_OBJ, wxString(_("Exclude via filter:")) + wxT(" ") + exFilterCandidateObj[0].relativeName.AfterLast(GlobalResources::FILE_NAME_SEPARATOR));
+ menuItemExclObj = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_OBJ, wxString(_("Exclude via filter:")) + wxT(" ") + exFilterCandidateObj[0].relativeName.AfterLast(FreeFileSync::FILE_NAME_SEPARATOR));
else if (exFilterCandidateObj.size() > 1)
- contextMenu->Append(CONTEXT_EXCLUDE_OBJ, wxString(_("Exclude via filter:")) + wxT(" ") + _("<multiple selection>"));
+ menuItemExclObj = new wxMenuItem(contextMenu.get(), CONTEXT_EXCLUDE_OBJ, wxString(_("Exclude via filter:")) + wxT(" ") + _("<multiple selection>"));
+
+ if (menuItemExclObj != NULL)
+ {
+ menuItemExclObj->SetBitmap(*GlobalResources::getInstance().bitmapFilterSmall);
+ contextMenu->Append(menuItemExclObj);
+ }
+
contextMenu->AppendSeparator();
@@ -869,30 +954,51 @@ void MainDialog::OnContextMenu(wxGridEvent& event)
//###############################################################################################
- contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextMenuSelection), NULL, this);
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextRimSelection), NULL, this);
//show context menu
PopupMenu(contextMenu.get());
}
-void MainDialog::OnContextMenuSelection(wxCommandEvent& event)
+void MainDialog::OnContextRimSelection(wxCommandEvent& event)
{
- int eventId = event.GetId();
- if (eventId == CONTEXT_FILTER_TEMP)
+ const ContextIDRim eventId = static_cast<ContextIDRim>(event.GetId());
+ switch (eventId)
+ {
+ case CONTEXT_SYNC_DIR_LEFT:
{
//merge selections from left and right grid
- std::set<int> selection = getSelectedRows(m_gridLeft);
- std::set<int> additional = getSelectedRows(m_gridRight);
- for (std::set<int>::const_iterator i = additional.begin(); i != additional.end(); ++i)
- selection.insert(*i);
+ const std::set<int> selection = getSelectedRows();
+ setSyncDirManually(selection, FreeFileSync::SYNC_DIR_LEFT);
+ }
+ break;
- if (selection.size() > 0)
- filterRangeManually(selection, *selection.begin());
+ case CONTEXT_SYNC_DIR_NONE:
+ {
+ //merge selections from left and right grid
+ const std::set<int> selection = getSelectedRows();
+ setSyncDirManually(selection, FreeFileSync::SYNC_DIR_NONE);
}
+ break;
- else if (eventId == CONTEXT_EXCLUDE_EXT)
+ case CONTEXT_SYNC_DIR_RIGHT:
{
+ //merge selections from left and right grid
+ const std::set<int> selection = getSelectedRows();
+ setSyncDirManually(selection, FreeFileSync::SYNC_DIR_RIGHT);
+ }
+ break;
+
+ case CONTEXT_FILTER_TEMP:
+ {
+ //merge selections from left and right grid
+ std::set<int> selection = getSelectedRows();
+ filterRangeManually(selection, *selection.begin());
+ }
+ break;
+
+ case CONTEXT_EXCLUDE_EXT:
if (!exFilterCandidateExtension.IsEmpty())
{
if (!cfg.excludeFilter.IsEmpty() && !cfg.excludeFilter.EndsWith(wxT(";")))
@@ -914,10 +1020,9 @@ void MainDialog::OnContextMenuSelection(wxCommandEvent& event)
m_gridMiddle->ClearSelection();
}
}
- }
+ break;
- else if (eventId == CONTEXT_EXCLUDE_OBJ)
- {
+ case CONTEXT_EXCLUDE_OBJ:
if (exFilterCandidateObj.size() > 0) //check needed to determine if filtering is needed
{
for (std::vector<FilterObject>::const_iterator i = exFilterCandidateObj.begin(); i != exFilterCandidateObj.end(); ++i)
@@ -926,9 +1031,9 @@ void MainDialog::OnContextMenuSelection(wxCommandEvent& event)
cfg.excludeFilter+= wxT("\n");
if (i->type == FileDescrLine::TYPE_FILE)
- cfg.excludeFilter+= wxString(GlobalResources::FILE_NAME_SEPARATOR) + i->relativeName;
+ cfg.excludeFilter+= wxString(FreeFileSync::FILE_NAME_SEPARATOR) + i->relativeName;
else if (i->type == FileDescrLine::TYPE_DIRECTORY)
- cfg.excludeFilter+= wxString(GlobalResources::FILE_NAME_SEPARATOR) + i->relativeName + GlobalResources::FILE_NAME_SEPARATOR + wxT("*");
+ cfg.excludeFilter+= wxString(FreeFileSync::FILE_NAME_SEPARATOR) + i->relativeName + FreeFileSync::FILE_NAME_SEPARATOR + wxT("*");
else assert(false);
}
@@ -946,18 +1051,16 @@ void MainDialog::OnContextMenuSelection(wxCommandEvent& event)
m_gridMiddle->ClearSelection();
}
}
- }
+ break;
- else if (eventId == CONTEXT_CLIPBOARD)
- {
+ case CONTEXT_CLIPBOARD:
if (m_gridLeft->isLeadGrid())
copySelectionToClipboard(m_gridLeft);
else if (m_gridRight->isLeadGrid())
copySelectionToClipboard(m_gridRight);
- }
+ break;
- else if (eventId == CONTEXT_EXPLORER)
- {
+ case CONTEXT_EXPLORER:
if (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid())
{
const CustomGrid* leadGrid = NULL;
@@ -973,20 +1076,80 @@ void MainDialog::OnContextMenuSelection(wxCommandEvent& event)
else if (selection.size() == 0)
openWithFileManager(-1, m_gridLeft->isLeadGrid());
}
+ break;
+
+ case CONTEXT_DELETE_FILES:
+ deleteSelectedFiles();
+ break;
}
+}
+
+
+void MainDialog::OnContextRimLabelLeft(wxGridEvent& event)
+{
+ contextMenu.reset(new wxMenu); //re-create context menu
+ contextMenu->Append(CONTEXT_CUSTOMIZE_COLUMN_LEFT, _("Customize columns"));
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextRimLabelSelection), NULL, this);
+ PopupMenu(contextMenu.get()); //show context menu
+}
- else if (eventId == CONTEXT_DELETE_FILES)
+
+void MainDialog::OnContextRimLabelRight(wxGridEvent& event)
+{
+ contextMenu.reset(new wxMenu); //re-create context menu
+ contextMenu->Append(CONTEXT_CUSTOMIZE_COLUMN_RIGHT, _("Customize columns"));
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextRimLabelSelection), NULL, this);
+ PopupMenu(contextMenu.get()); //show context menu
+}
+
+
+void MainDialog::OnContextRimLabelSelection(wxCommandEvent& event)
+{
+ const ContextIDRimLabel eventId = static_cast<ContextIDRimLabel>(event.GetId());
+ switch (eventId)
{
- deleteSelectedFiles();
+ case CONTEXT_CUSTOMIZE_COLUMN_LEFT:
+ {
+ xmlAccess::ColumnAttributes colAttr = m_gridLeft->getColumnAttributes();
+ CustomizeColsDlg* customizeDlg = new CustomizeColsDlg(this, colAttr, globalSettings.gui.showFileIconsLeft);
+ if (customizeDlg->ShowModal() == CustomizeColsDlg::BUTTON_OKAY)
+ {
+ m_gridLeft->setColumnAttributes(colAttr);
+#ifdef FFS_WIN
+ m_gridLeft->enableFileIcons(globalSettings.gui.showFileIconsLeft);
+#endif
+
+ m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); //hide sort direction indicator on GUI grids
+ m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ }
+ }
+ break;
+ case CONTEXT_CUSTOMIZE_COLUMN_RIGHT:
+ {
+ xmlAccess::ColumnAttributes colAttr = m_gridRight->getColumnAttributes();
+ CustomizeColsDlg* customizeDlg = new CustomizeColsDlg(this, colAttr, globalSettings.gui.showFileIconsRight);
+ if (customizeDlg->ShowModal() == CustomizeColsDlg::BUTTON_OKAY)
+ {
+ m_gridRight->setColumnAttributes(colAttr);
+#ifdef FFS_WIN
+ m_gridRight->enableFileIcons(globalSettings.gui.showFileIconsRight);
+#endif
+
+ m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); //hide sort direction indicator on GUI grids
+ m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ }
+ }
+ break;
}
}
-void MainDialog::OnContextMenuMiddle(wxGridEvent& event)
+void MainDialog::OnContextMiddle(wxGridEvent& event)
{
contextMenu.reset(new wxMenu); //re-create context menu
- contextMenu->Append(CONTEXT_SWAP_SIDES, _("Swap sides"));
- contextMenu->AppendSeparator();
+
contextMenu->Append(CONTEXT_CHECK_ALL, _("Check all"));
contextMenu->Append(CONTEXT_UNCHECK_ALL, _("Uncheck all"));
@@ -996,86 +1159,61 @@ void MainDialog::OnContextMenuMiddle(wxGridEvent& event)
contextMenu->Enable(CONTEXT_UNCHECK_ALL, false);
}
- contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextMenuMiddleSelection), NULL, this);
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextMiddleSelection), NULL, this);
PopupMenu(contextMenu.get()); //show context menu
}
-void MainDialog::OnContextMenuMiddleSelection(wxCommandEvent& event)
+void MainDialog::OnContextMiddleSelection(wxCommandEvent& event)
{
- int eventId = event.GetId();
- if (eventId == CONTEXT_SWAP_SIDES)
- {
- wxCommandEvent dummy;
- MainDialog::OnSwapSides(dummy);
- }
- else if (eventId == CONTEXT_CHECK_ALL)
+ const ContextIDMiddle eventId = static_cast<ContextIDMiddle>(event.GetId());
+ switch (eventId)
{
+ case CONTEXT_CHECK_ALL:
FreeFileSync::FilterProcess::includeAllRowsOnGrid(currentGridData);
- updateGuiGrid();
- }
- else if (eventId == CONTEXT_UNCHECK_ALL)
- {
+ refreshGridAfterFilterChange(0); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts break;
+ break;
+ case CONTEXT_UNCHECK_ALL:
FreeFileSync::FilterProcess::excludeAllRowsOnGrid(currentGridData);
- updateGuiGrid();
+ refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts
+ break;
}
}
-void MainDialog::OnContextColumnLeft(wxGridEvent& event)
+void MainDialog::OnContextMiddleLabel(wxGridEvent& event)
{
contextMenu.reset(new wxMenu); //re-create context menu
- contextMenu->Append(CONTEXT_CUSTOMIZE_COLUMN_LEFT, _("Customize columns"));
- contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextColumnSelection), NULL, this);
- PopupMenu(contextMenu.get()); //show context menu
- event.Skip();
-}
+ wxMenuItem* itemSyncPreview = new wxMenuItem(contextMenu.get(), CONTEXT_SYNC_PREVIEW, _("Synchronization Preview"));
+ wxMenuItem* itemCmpResult = new wxMenuItem(contextMenu.get(), CONTEXT_COMPARISON_RESULT, _("Comparison Result"));
+ if (syncPreview->previewIsEnabled())
+ itemSyncPreview->SetBitmap(*GlobalResources::getInstance().bitmapSyncViewSmall);
+ else
+ itemCmpResult->SetBitmap(*GlobalResources::getInstance().bitmapCmpViewSmall);
-void MainDialog::OnContextColumnRight(wxGridEvent& event)
-{
- contextMenu.reset(new wxMenu); //re-create context menu
- contextMenu->Append(CONTEXT_CUSTOMIZE_COLUMN_RIGHT, _("Customize columns"));
- contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextColumnSelection), NULL, this);
- PopupMenu(contextMenu.get()); //show context menu
+ contextMenu->Append(itemCmpResult);
+ contextMenu->Append(itemSyncPreview);
- event.Skip();
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextMiddleLabelSelection), NULL, this);
+ PopupMenu(contextMenu.get()); //show context menu
}
-void MainDialog::OnContextColumnSelection(wxCommandEvent& event)
+void MainDialog::OnContextMiddleLabelSelection(wxCommandEvent& event)
{
- int eventId = event.GetId();
- if (eventId == CONTEXT_CUSTOMIZE_COLUMN_LEFT)
- {
- xmlAccess::ColumnAttributes colAttr = m_gridLeft->getColumnAttributes();
- CustomizeColsDlg* customizeDlg = new CustomizeColsDlg(this, colAttr, globalSettings.gui.showFileIcons);
- if (customizeDlg->ShowModal() == CustomizeColsDlg::BUTTON_OKAY)
- {
- m_gridLeft->setColumnAttributes(colAttr);
- m_gridLeft->enableFileIcons(globalSettings.gui.showFileIcons);
- m_gridRight->enableFileIcons(globalSettings.gui.showFileIcons);
-
- m_gridLeft->setSortMarker(-1); //hide sort direction indicator on GUI grids
- m_gridMiddle->setSortMarker(-1);
- m_gridRight->setSortMarker(-1);
- }
- }
- else if (eventId == CONTEXT_CUSTOMIZE_COLUMN_RIGHT)
+ const ContextIDMiddleLabel eventId = static_cast<ContextIDMiddleLabel>(event.GetId());
+ switch (eventId)
{
- xmlAccess::ColumnAttributes colAttr = m_gridRight->getColumnAttributes();
- CustomizeColsDlg* customizeDlg = new CustomizeColsDlg(this, colAttr, globalSettings.gui.showFileIcons);
- if (customizeDlg->ShowModal() == CustomizeColsDlg::BUTTON_OKAY)
- {
- m_gridRight->setColumnAttributes(colAttr);
- m_gridLeft->enableFileIcons(globalSettings.gui.showFileIcons);
- m_gridRight->enableFileIcons(globalSettings.gui.showFileIcons);
-
- m_gridLeft->setSortMarker(-1); //hide sort direction indicator on GUI grids
- m_gridMiddle->setSortMarker(-1);
- m_gridRight->setSortMarker(-1);
- }
+ case CONTEXT_COMPARISON_RESULT:
+ //change view
+ syncPreview->enablePreview(false);
+ break;
+ case CONTEXT_SYNC_PREVIEW:
+ //change view
+ syncPreview->enablePreview(true);
+ break;
}
}
@@ -1112,10 +1250,10 @@ bool sameFileSpecified(const wxString& file1, const wxString& file2)
wxString file2Full = file2;
if (wxFileName(file1).GetPath() == wxEmptyString)
- file1Full = wxFileName::GetCwd() + GlobalResources::FILE_NAME_SEPARATOR + file1;
+ file1Full = wxFileName::GetCwd() + FreeFileSync::FILE_NAME_SEPARATOR + file1;
if (wxFileName(file2).GetPath() == wxEmptyString)
- file2Full = wxFileName::GetCwd() + GlobalResources::FILE_NAME_SEPARATOR + file2;
+ file2Full = wxFileName::GetCwd() + FreeFileSync::FILE_NAME_SEPARATOR + file2;
#ifdef FFS_WIN //don't respect case in windows build
return FreeFileSync::compareStringsWin32(file1Full.c_str(), file2Full.c_str()) == 0;
@@ -1156,7 +1294,7 @@ void MainDialog::addFileToCfgHistory(const wxString& filename)
cfgFileNames.insert(cfgFileNames.begin(), filename);
//the default config file should receive another name on GUI
- if (sameFileSpecified(xmlAccess::LAST_CONFIG_FILE, filename))
+ if (sameFileSpecified(FreeFileSync::getLastConfigFile(), filename))
m_choiceHistory->Insert(_("<Last session>"), 0); //insert at beginning of list
else
m_choiceHistory->Insert(getFormattedHistoryElement(filename), 0); //insert at beginning of list
@@ -1462,7 +1600,10 @@ void MainDialog::OnSetSyncDirection(FFSSyncDirectionEvent& event)
if (0 <= lowerBound)
{
for (int i = lowerBound; i <= std::min(upperBound, int(gridDataView.elementsOnView()) - 1); ++i)
+ {
gridDataView[i].direction = event.direction;
+ gridDataView[i].selectedForSynchronization = true;
+ }
updateGuiGrid();
}
@@ -1481,7 +1622,7 @@ bool MainDialog::readConfigurationFromXml(const wxString& filename, bool program
{
if (programStartup)
{
- if (filename == xmlAccess::LAST_CONFIG_FILE && !wxFileExists(filename)) //do not show error in this case
+ if (filename == FreeFileSync::getLastConfigFile() && !wxFileExists(filename)) //do not show error in this case
;
else //program startup: show error message and load defaults
wxMessageBox(error.show().c_str(), _("Error"), wxOK | wxICON_ERROR);
@@ -1566,7 +1707,7 @@ bool MainDialog::readConfigurationFromXml(const wxString& filename, bool program
lastConfigurationSaved = guiCfg;
- if (filename == xmlAccess::LAST_CONFIG_FILE) //set title
+ if (filename == FreeFileSync::getLastConfigFile()) //set title
{
SetTitle(wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization"));
currentConfigFileName.clear();
@@ -1577,6 +1718,10 @@ bool MainDialog::readConfigurationFromXml(const wxString& filename, bool program
currentConfigFileName = filename;
}
+ //update variant name
+ m_staticTextVariant->SetLabel(wxString(wxT("(")) + cfg.syncConfiguration.getVariantName() + wxT(")"));
+ bSizer6->Layout(); //adapt layout for variant text
+
return true;
}
@@ -1601,7 +1746,7 @@ bool MainDialog::writeConfigurationToXml(const wxString& filename)
lastConfigurationSaved = guiCfg;
- if (filename == xmlAccess::LAST_CONFIG_FILE) //set title
+ if (filename == FreeFileSync::getLastConfigFile()) //set title
{
SetTitle(wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization"));
currentConfigFileName.clear();
@@ -1642,6 +1787,27 @@ void MainDialog::OnShowHelpDialog(wxCommandEvent &event)
}
+void MainDialog::refreshGridAfterFilterChange(const int delay)
+{
+ //signal UI that grids need to be refreshed on next Update()
+ m_gridLeft->ForceRefresh();
+ m_gridMiddle->ForceRefresh();
+ m_gridRight->ForceRefresh();
+ Update(); //show changes resulting from ForceRefresh()
+
+ if (hideFilteredElements)
+ {
+ wxMilliSleep(delay); //some delay to show user the rows he has filtered out before they are removed
+ updateGuiGrid(); //redraw grid to remove excluded elements (keeping sort sequence)
+
+ m_gridLeft->ClearSelection();
+ m_gridRight->ClearSelection();
+ }
+ else
+ updateGuiGrid();
+}
+
+
void MainDialog::OnFilterButton(wxCommandEvent &event)
{ //toggle filter on/off
cfg.filterIsActive = !cfg.filterIsActive;
@@ -1652,11 +1818,13 @@ void MainDialog::OnFilterButton(wxCommandEvent &event)
{
FreeFileSync::FilterProcess filterInstance(cfg.includeFilter, cfg.excludeFilter);
filterInstance.filterGridData(currentGridData);
+ refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts
}
else
+ {
FreeFileSync::FilterProcess::includeAllRowsOnGrid(currentGridData);
-
- updateGuiGrid();
+ refreshGridAfterFilterChange(0); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts }
+ }
}
@@ -1669,7 +1837,7 @@ void MainDialog::OnHideFilteredButton(wxCommandEvent &event)
m_gridLeft->ClearSelection();
m_gridRight->ClearSelection();
- updateGuiGrid();
+ refreshGridAfterFilterChange(0);
event.Skip();
}
@@ -1704,6 +1872,7 @@ void MainDialog::OnConfigureFilter(wxHyperlinkEvent &event)
updateGuiGrid();
}
}
+
//no event.Skip() here, to not start browser
}
@@ -1789,112 +1958,112 @@ void MainDialog::updateViewFilterButtons()
//compare result buttons
if (gridDataView.leftOnlyFilesActive)
{
- m_bpButtonLeftOnly->SetBitmapLabel(*globalResource.bitmapLeftOnlyAct);
+ m_bpButtonLeftOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapLeftOnlyAct);
m_bpButtonLeftOnly->SetToolTip(_("Hide files that exist on left side only"));
}
else
{
- m_bpButtonLeftOnly->SetBitmapLabel(*globalResource.bitmapLeftOnlyDeact);
+ m_bpButtonLeftOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapLeftOnlyDeact);
m_bpButtonLeftOnly->SetToolTip(_("Show files that exist on left side only"));
}
if (gridDataView.rightOnlyFilesActive)
{
- m_bpButtonRightOnly->SetBitmapLabel(*globalResource.bitmapRightOnlyAct);
+ m_bpButtonRightOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapRightOnlyAct);
m_bpButtonRightOnly->SetToolTip(_("Hide files that exist on right side only"));
}
else
{
- m_bpButtonRightOnly->SetBitmapLabel(*globalResource.bitmapRightOnlyDeact);
+ m_bpButtonRightOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapRightOnlyDeact);
m_bpButtonRightOnly->SetToolTip(_("Show files that exist on right side only"));
}
if (gridDataView.leftNewerFilesActive)
{
- m_bpButtonLeftNewer->SetBitmapLabel(*globalResource.bitmapLeftNewerAct);
+ m_bpButtonLeftNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapLeftNewerAct);
m_bpButtonLeftNewer->SetToolTip(_("Hide files that are newer on left"));
}
else
{
- m_bpButtonLeftNewer->SetBitmapLabel(*globalResource.bitmapLeftNewerDeact);
+ m_bpButtonLeftNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapLeftNewerDeact);
m_bpButtonLeftNewer->SetToolTip(_("Show files that are newer on left"));
}
if (gridDataView.rightNewerFilesActive)
{
- m_bpButtonRightNewer->SetBitmapLabel(*globalResource.bitmapRightNewerAct);
+ m_bpButtonRightNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapRightNewerAct);
m_bpButtonRightNewer->SetToolTip(_("Hide files that are newer on right"));
}
else
{
- m_bpButtonRightNewer->SetBitmapLabel(*globalResource.bitmapRightNewerDeact);
+ m_bpButtonRightNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapRightNewerDeact);
m_bpButtonRightNewer->SetToolTip(_("Show files that are newer on right"));
}
if (gridDataView.equalFilesActive)
{
- m_bpButtonEqual->SetBitmapLabel(*globalResource.bitmapEqualAct);
+ m_bpButtonEqual->SetBitmapLabel(*GlobalResources::getInstance().bitmapEqualAct);
m_bpButtonEqual->SetToolTip(_("Hide files that are equal"));
}
else
{
- m_bpButtonEqual->SetBitmapLabel(*globalResource.bitmapEqualDeact);
+ m_bpButtonEqual->SetBitmapLabel(*GlobalResources::getInstance().bitmapEqualDeact);
m_bpButtonEqual->SetToolTip(_("Show files that are equal"));
}
if (gridDataView.differentFilesActive)
{
- m_bpButtonDifferent->SetBitmapLabel(*globalResource.bitmapDifferentAct);
+ m_bpButtonDifferent->SetBitmapLabel(*GlobalResources::getInstance().bitmapDifferentAct);
m_bpButtonDifferent->SetToolTip(_("Hide files that are different"));
}
else
{
- m_bpButtonDifferent->SetBitmapLabel(*globalResource.bitmapDifferentDeact);
+ m_bpButtonDifferent->SetBitmapLabel(*GlobalResources::getInstance().bitmapDifferentDeact);
m_bpButtonDifferent->SetToolTip(_("Show files that are different"));
}
if (gridDataView.conflictFilesActive)
{
- m_bpButtonConflict->SetBitmapLabel(*globalResource.bitmapConflictAct);
+ m_bpButtonConflict->SetBitmapLabel(*GlobalResources::getInstance().bitmapConflictAct);
m_bpButtonConflict->SetToolTip(_("Hide conflicts"));
}
else
{
- m_bpButtonConflict->SetBitmapLabel(*globalResource.bitmapConflictDeact);
+ m_bpButtonConflict->SetBitmapLabel(*GlobalResources::getInstance().bitmapConflictDeact);
m_bpButtonConflict->SetToolTip(_("Show conflicts"));
}
//sync preview buttons
if (gridDataView.syncDirLeftActive)
{
- m_bpButtonSyncDirLeft->SetBitmapLabel(*globalResource.bitmapSyncDirLeftAct);
+ m_bpButtonSyncDirLeft->SetBitmapLabel(*GlobalResources::getInstance().bitmapSyncDirLeftAct);
m_bpButtonSyncDirLeft->SetToolTip(_("Hide files that will be copied to the left side"));
}
else
{
- m_bpButtonSyncDirLeft->SetBitmapLabel(*globalResource.bitmapSyncDirLeftDeact);
+ m_bpButtonSyncDirLeft->SetBitmapLabel(*GlobalResources::getInstance().bitmapSyncDirLeftDeact);
m_bpButtonSyncDirLeft->SetToolTip(_("Show files that will be copied to the left side"));
}
if (gridDataView.syncDirRightActive)
{
- m_bpButtonSyncDirRight->SetBitmapLabel(*globalResource.bitmapSyncDirRightAct);
+ m_bpButtonSyncDirRight->SetBitmapLabel(*GlobalResources::getInstance().bitmapSyncDirRightAct);
m_bpButtonSyncDirRight->SetToolTip(_("Hide files that will be copied to the right side"));
}
else
{
- m_bpButtonSyncDirRight->SetBitmapLabel(*globalResource.bitmapSyncDirRightDeact);
+ m_bpButtonSyncDirRight->SetBitmapLabel(*GlobalResources::getInstance().bitmapSyncDirRightDeact);
m_bpButtonSyncDirRight->SetToolTip(_("Show files that will be copied to the right side"));
}
if (gridDataView.syncDirNoneActive)
{
- m_bpButtonSyncDirNone->SetBitmapLabel(*globalResource.bitmapSyncDirNoneAct);
+ m_bpButtonSyncDirNone->SetBitmapLabel(*GlobalResources::getInstance().bitmapSyncDirNoneAct);
m_bpButtonSyncDirNone->SetToolTip(_("Hide files that won't be copied"));
}
else
{
- m_bpButtonSyncDirNone->SetBitmapLabel(*globalResource.bitmapSyncDirNoneDeact);
+ m_bpButtonSyncDirNone->SetBitmapLabel(*GlobalResources::getInstance().bitmapSyncDirNoneDeact);
m_bpButtonSyncDirNone->SetToolTip(_("Show files that won't be copied"));
}
}
@@ -1904,13 +2073,26 @@ void MainDialog::updateFilterButton(wxBitmapButton* filterButton, bool isActive)
{
if (isActive)
{
- filterButton->SetBitmapLabel(*globalResource.bitmapFilterOn);
+ filterButton->SetBitmapLabel(*GlobalResources::getInstance().bitmapFilterOn);
filterButton->SetToolTip(_("Filter active: Press again to deactivate"));
+
+ //show filter icon
+ if (m_notebookBottomLeft->GetImageList() == NULL)
+ {
+ wxImageList* panelIcons = new wxImageList(16, 16);
+ panelIcons->Add(wxBitmap(*GlobalResources::getInstance().bitmapFilterSmall));
+ m_notebookBottomLeft->AssignImageList(panelIcons); //pass ownership
+ }
+ m_notebookBottomLeft->SetPageImage(1, 0);
+
}
else
{
- filterButton->SetBitmapLabel(*globalResource.bitmapFilterOff);
+ filterButton->SetBitmapLabel(*GlobalResources::getInstance().bitmapFilterOff);
filterButton->SetToolTip(_("Press button to activate filter"));
+
+ //hide filter icon
+ m_notebookBottomLeft->SetPageImage(1, -1);
}
}
@@ -1978,10 +2160,10 @@ void MainDialog::OnCompare(wxCommandEvent &event)
filterInstance.reset(new FreeFileSync::FilterProcess(cfg.includeFilter, cfg.excludeFilter));
//begin comparison
- FreeFileSync::CompareProcess comparison(globalSettings.shared.traverseDirectorySymlinks,
- globalSettings.shared.fileTimeTolerance,
- globalSettings.shared.ignoreOneHourDiff,
- globalSettings.shared.warningDependentFolders,
+ FreeFileSync::CompareProcess comparison(globalSettings.traverseDirectorySymlinks,
+ globalSettings.fileTimeTolerance,
+ globalSettings.ignoreOneHourDiff,
+ globalSettings.warnings,
filterInstance.get(),
&statusHandler);
@@ -1996,7 +2178,7 @@ void MainDialog::OnCompare(wxCommandEvent &event)
gridDataView.sortView(GridView::SORT_BY_DIRECTORY, true, true);
}
- catch (AbortThisProcess& theException)
+ catch (AbortThisProcess&)
{
aborted = true;
}
@@ -2013,9 +2195,9 @@ void MainDialog::OnCompare(wxCommandEvent &event)
m_buttonStartSync->SetFocus();
//hide sort direction indicator on GUI grids
- m_gridLeft->setSortMarker(-1);
- m_gridMiddle->setSortMarker(-1);
- m_gridRight->setSortMarker(-1);
+ m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
//reset last sort selection: used for determining sort direction
lastSortColumn = -1;
@@ -2080,6 +2262,33 @@ void MainDialog::updateGuiGrid()
}
+void MainDialog::calculatePreview()
+{
+ //update preview of bytes to be transferred:
+ int objectsToCreate = 0;
+ int objectsToOverwrite = 0;
+ int objectsToDelete = 0;
+ int conflictsDummy = 0;
+ wxULongLong dataToProcess;
+ FreeFileSync::calcTotalBytesToSync(currentGridData,
+ objectsToCreate,
+ objectsToOverwrite,
+ objectsToDelete,
+ conflictsDummy,
+ dataToProcess);
+
+ const wxString toCreate = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToCreate));
+ const wxString toUpdate = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToOverwrite));
+ const wxString toDelete = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToDelete));
+ const wxString data = FreeFileSync::formatFilesizeToShortString(dataToProcess);
+
+ m_textCtrlCreate->SetValue(toCreate);
+ m_textCtrlUpdate->SetValue(toUpdate);
+ m_textCtrlDelete->SetValue(toDelete);
+ m_textCtrlData->SetValue(data);
+}
+
+
void MainDialog::OnSwitchView(wxCommandEvent& event)
{
//toggle view
@@ -2092,7 +2301,12 @@ void MainDialog::OnSyncSettings(wxCommandEvent& event)
SyncDialog* syncDlg = new SyncDialog(this, currentGridData, cfg, ignoreErrors);
if (syncDlg->ShowModal() == SyncDialog::BUTTON_OKAY)
{
+ //update variant name
+ m_staticTextVariant->SetLabel(wxString(wxT("(")) + cfg.syncConfiguration.getVariantName() + wxT(")"));
+ bSizer6->Layout(); //adapt layout for variant text
+
redetermineSyncDirection(cfg.syncConfiguration, currentGridData);
+
updateGuiGrid();
}
}
@@ -2102,6 +2316,40 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
{
if (syncPreview->synchronizationIsEnabled())
{
+ //show sync preview screen
+ if (globalSettings.gui.showSummaryBeforeSync)
+ {
+ //prepare preview screen
+ int objectsToCreate = 0;
+ int objectsToOverwrite = 0;
+ int objectsToDelete = 0;
+ int conflictsDummy = 0;
+ wxULongLong dataToProcess;
+ FreeFileSync::calcTotalBytesToSync(currentGridData,
+ objectsToCreate,
+ objectsToOverwrite,
+ objectsToDelete,
+ conflictsDummy,
+ dataToProcess);
+
+ const wxString toCreate = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToCreate));
+ const wxString toUpdate = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToOverwrite));
+ const wxString toDelete = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToDelete));
+ const wxString data = FreeFileSync::formatFilesizeToShortString(dataToProcess);
+
+ bool dontShowAgain = false;
+
+ SyncPreviewDlg* preview = new SyncPreviewDlg(
+ this, cfg.syncConfiguration.getVariantName(),
+ toCreate, toUpdate, toDelete, data,
+ dontShowAgain);
+
+ if (preview->ShowModal() != SyncPreviewDlg::BUTTON_START)
+ return;
+
+ globalSettings.gui.showSummaryBeforeSync = !dontShowAgain;
+ }
+
//check if there are files/folders to be sync'ed at all
if (!synchronizationNeeded(currentGridData))
{
@@ -2117,28 +2365,17 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
//class handling status updates and error messages
SyncStatusHandler statusHandler(this, ignoreErrors);
-// //small reminder that synchronization will be starting immediately
-// if (globalSettings.shared.warningSynchronizationStarting) //test if check should be executed
-// {
-// bool dontShowAgain = false;
-// statusHandler.reportWarning(_(""),
-// dontShowAgain);
-// globalSettings.shared.warningSynchronizationStarting = !dontShowAgain;
-// }
-
//start synchronization and return elements that were not sync'ed in currentGridData
FreeFileSync::SyncProcess synchronization(
cfg.useRecycleBin,
- globalSettings.shared.copyFileSymlinks,
- globalSettings.shared.traverseDirectorySymlinks,
- globalSettings.shared.warningSignificantDifference,
- globalSettings.shared.warningNotEnoughDiskSpace,
- globalSettings.shared.warningUnresolvedConflicts,
+ globalSettings.copyFileSymlinks,
+ globalSettings.traverseDirectorySymlinks,
+ globalSettings.warnings,
&statusHandler);
synchronization.startSynchronizationProcess(currentGridData);
}
- catch (AbortThisProcess& theException)
+ catch (AbortThisProcess&)
{ //do NOT disable the sync button: user might want to try to sync the REMAINING rows
} //enableSynchronization(false);
@@ -2161,6 +2398,7 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
}
}
+
void MainDialog::OnLeftGridDoubleClick(wxGridEvent& event)
{
openWithFileManager(event.GetRow(), true);
@@ -2217,12 +2455,9 @@ void MainDialog::OnSortLeftGrid(wxGridEvent& event)
updateGuiGrid(); //refresh gridDataView
//set sort direction indicator on UI
- m_gridMiddle->setSortMarker(-1);
- m_gridRight->setSortMarker(-1);
- if (sortAscending)
- m_gridLeft->setSortMarker(currentSortColumn, globalResource.bitmapSmallUp);
- else
- m_gridLeft->setSortMarker(currentSortColumn, globalResource.bitmapSmallDown);
+ m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridLeft->setSortMarker(CustomGrid::SortMarker(currentSortColumn, sortAscending ? CustomGrid::ASCENDING : CustomGrid::DESCENDING));
}
}
@@ -2239,17 +2474,17 @@ void MainDialog::OnSortMiddleGrid(wxGridEvent& event)
lastSortGrid = m_gridMiddle;
//start sort
- gridDataView.sortView(GridView::SORT_BY_CMP_RESULT, true, sortAscending);
+ if (syncPreview->previewIsEnabled())
+ gridDataView.sortView(GridView::SORT_BY_SYNC_DIRECTION, true, sortAscending);
+ else
+ gridDataView.sortView(GridView::SORT_BY_CMP_RESULT, true, sortAscending);
updateGuiGrid(); //refresh gridDataView
//set sort direction indicator on UI
- m_gridLeft->setSortMarker(-1);
- m_gridRight->setSortMarker(-1);
- if (sortAscending)
- m_gridMiddle->setSortMarker(0, globalResource.bitmapSmallUp);
- else
- m_gridMiddle->setSortMarker(0, globalResource.bitmapSmallDown);
+ m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridMiddle->setSortMarker(CustomGrid::SortMarker(0, sortAscending ? CustomGrid::ASCENDING : CustomGrid::DESCENDING));
}
@@ -2295,12 +2530,9 @@ void MainDialog::OnSortRightGrid(wxGridEvent& event)
updateGuiGrid(); //refresh gridDataView
//set sort direction indicator on UI
- m_gridLeft->setSortMarker(-1);
- m_gridMiddle->setSortMarker(-1);
- if (sortAscending)
- m_gridRight->setSortMarker(currentSortColumn, globalResource.bitmapSmallUp);
- else
- m_gridRight->setSortMarker(currentSortColumn, globalResource.bitmapSmallDown);
+ m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ m_gridRight->setSortMarker(CustomGrid::SortMarker(currentSortColumn, sortAscending ? CustomGrid::ASCENDING : CustomGrid::DESCENDING));
}
}
@@ -2334,7 +2566,7 @@ void MainDialog::OnSwapSides(wxCommandEvent& event)
updateViewFilterButtons();
//swap grid information
- FreeFileSync::swapGrids(currentGridData);
+ FreeFileSync::swapGrids(cfg.syncConfiguration, currentGridData);
updateGuiGrid();
event.Skip();
}
@@ -2530,7 +2762,18 @@ void MainDialog::updateGridViewData()
void MainDialog::OnAddFolderPair(wxCommandEvent& event)
{
- addFolderPair(wxEmptyString, wxEmptyString);
+ const wxString topPairLeft = m_directoryLeft->GetValue();
+ const wxString topPairRight = m_directoryRight->GetValue();
+
+ //clear existing pairs first
+ m_directoryLeft->SetSelection(wxNOT_FOUND);
+ m_directoryLeft->SetValue(wxEmptyString);
+ m_dirPickerLeft->SetPath(wxEmptyString);
+ m_directoryRight->SetSelection(wxNOT_FOUND);
+ m_directoryRight->SetValue(wxEmptyString);
+ m_dirPickerRight->SetPath(wxEmptyString);
+
+ addFolderPair(topPairLeft.c_str(), topPairRight.c_str(), true); //add pair in front of additonal pairs
//disable the sync button
syncPreview->enableSynchronization(false);
@@ -2563,46 +2806,58 @@ void MainDialog::OnRemoveFolderPair(wxCommandEvent& event)
}
-void MainDialog::calculatePreview()
+void MainDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
{
- //update preview of bytes to be transferred:
- int objectsToCreate = 0;
- int objectsToOverwrite = 0;
- int objectsToDelete = 0;
- int conflictsDummy = 0;
- wxULongLong dataToProcess;
- FreeFileSync::calcTotalBytesToSync(currentGridData,
- objectsToCreate,
- objectsToOverwrite,
- objectsToDelete,
- conflictsDummy,
- dataToProcess);
+ if (additionalFolderPairs.size() > 0)
+ {
+ m_directoryLeft->SetSelection(wxNOT_FOUND);
+ m_directoryRight->SetSelection(wxNOT_FOUND);
- const wxString toCreate = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToCreate));
- const wxString toUpdate = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToOverwrite));
- const wxString toDelete = globalFunctions::includeNumberSeparator(globalFunctions::numberToWxString(objectsToDelete));
- const wxString data = FreeFileSync::formatFilesizeToShortString(dataToProcess);
+ m_directoryLeft->SetValue((*additionalFolderPairs.begin())->m_directoryLeft->GetValue());
+ m_directoryRight->SetValue((*additionalFolderPairs.begin())->m_directoryRight->GetValue());
- m_textCtrlCreate->SetValue(toCreate);
- m_textCtrlUpdate->SetValue(toUpdate);
- m_textCtrlDelete->SetValue(toDelete);
- m_textCtrlData->SetValue(data);
+ removeFolderPair(0); //remove first of additional folder pairs
+
+ //disable the sync button
+ syncPreview->enableSynchronization(false);
+
+ //clear grids
+ currentGridData.clear();
+ updateGuiGrid();
+ }
}
-void MainDialog::addFolderPair(const Zstring& leftDir, const Zstring& rightDir)
+void MainDialog::addFolderPair(const Zstring& leftDir, const Zstring& rightDir, bool addFront)
{
std::vector<FolderPair> newPairs;
- FolderPair pair;
- pair.leftDirectory = leftDir;
- pair.rightDirectory = rightDir;
- newPairs.push_back(pair);
+ newPairs.push_back(FolderPair(leftDir, rightDir));
+
+ MainDialog::addFolderPair(newPairs, addFront);
+}
+
- MainDialog::addFolderPair(newPairs);
+void scrollToBottom(wxScrolledWindow* scrWindow)
+{
+ int height = 0;
+ scrWindow->GetClientSize(NULL, &height);
+
+ int pixelPerLine = 0;
+ scrWindow->GetScrollPixelsPerUnit(NULL, &pixelPerLine);
+
+ if (height > 0 && pixelPerLine > 0)
+ {
+ const int scrollLinesTotal = scrWindow->GetScrollLines(wxVERTICAL);
+ const int scrollLinesOnScreen = height / pixelPerLine;
+ const int scrollPosBottom = scrollLinesTotal - scrollLinesOnScreen;
+
+ if (0 <= scrollPosBottom)
+ scrWindow->Scroll(0, scrollPosBottom);
+ }
}
-void MainDialog::addFolderPair(const std::vector<FolderPair>& newPairs)
+void MainDialog::addFolderPair(const std::vector<FolderPair>& newPairs, bool addFront)
{
if (newPairs.size() == 0)
return;
@@ -2611,14 +2866,22 @@ void MainDialog::addFolderPair(const std::vector<FolderPair>& newPairs)
{
//add new folder pair
FolderPairPanel* newPair = new FolderPairPanel(m_scrolledWindowFolderPairs);
- newPair->m_bitmap23->SetBitmap(*globalResource.bitmapLink);
- newPair->m_bpButtonRemovePair->SetBitmapLabel(*globalResource.bitmapRemoveFolderPair);
+ newPair->m_bitmap23->SetBitmap(*GlobalResources::getInstance().bitmapLink);
+ newPair->m_bpButtonRemovePair->SetBitmapLabel(*GlobalResources::getInstance().bitmapRemoveFolderPair);
- bSizerFolderPairs->Add(newPair, 0, wxEXPAND, 5);
- additionalFolderPairs.push_back(newPair);
+ if (addFront)
+ {
+ bSizerFolderPairs->Insert(0, newPair, 0, wxEXPAND, 5);
+ additionalFolderPairs.insert(additionalFolderPairs.begin(), newPair);
+ }
+ else
+ {
+ bSizerFolderPairs->Add(newPair, 0, wxEXPAND, 5);
+ additionalFolderPairs.push_back(newPair);
+ }
//set size of scrolled window
- wxSize pairSize = newPair->GetSize();
+ const wxSize pairSize = newPair->GetSize();
const int additionalRows = additionalFolderPairs.size();
if (additionalRows <= 3) //up to 3 additional pairs shall be shown
@@ -2654,9 +2917,19 @@ void MainDialog::addFolderPair(const std::vector<FolderPair>& newPairs)
m_bitmapShift->Show();
}
+ //adapt delete top folder pair button
+ if (additionalFolderPairs.size() > 0)
+ {
+ m_bpButtonRemoveTopPair->Show();
+ m_panelTopRight->Layout();
+ }
+
+ //scroll to the bottom of wxScrolledWindow
+ //scrollToBottom(m_scrolledWindowFolderPairs);
+
m_scrolledWindowFolderPairs->Layout();
bSizer1->Layout();
- m_bpButtonSwitchView->Refresh();
+ m_bpButtonSwapSides->Refresh();
}
@@ -2680,15 +2953,24 @@ void MainDialog::removeFolderPair(const int pos, bool refreshLayout)
//adjust scrollbars (do not put in else clause)
m_scrolledWindowFolderPairs->Fit();
+ //adapt left-shift display distortion caused by scrollbars
if (refreshLayout)
{
- //adapt left-shift display distortion caused by scrollbars
- if (additionalFolderPairs.size() <= 3)
+ if (additionalRows <= 3)
m_bitmapShift->Hide();
m_scrolledWindowFolderPairs->Layout();
bSizer1->Layout();
}
+
+ //adapt delete top folder pair button
+ if (additionalFolderPairs.size() == 0)
+ {
+ m_bpButtonRemoveTopPair->Hide();
+ if (refreshLayout)
+ m_panelTopRight->Layout();
+ }
+
}
}
@@ -2808,7 +3090,17 @@ void MainDialog::OnRegularUpdateCheck(wxIdleEvent& event)
//execute just once per startup!
Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), NULL, this);
- FreeFileSync::checkForUpdatePeriodically(globalSettings.shared.lastUpdateCheck);
+ FreeFileSync::checkForUpdatePeriodically(globalSettings.lastUpdateCheck);
+}
+
+
+void MainDialog::OnLayoutWindowAsync(wxIdleEvent& event)
+{
+ //execute just once per startup!
+ Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnLayoutWindowAsync), NULL, this);
+
+ Layout(); //strangely this layout call works if called in next idle event only
+ Refresh();
}
@@ -2835,89 +3127,20 @@ void MainDialog::switchProgramLanguage(const int langID)
cleanUp(); //destructor's code: includes writing settings to HD
//create new dialog with respect to new language
- MainDialog* frame = new MainDialog(NULL, xmlAccess::LAST_CONFIG_FILE, programLanguage, globalSettings);
- frame->SetIcon(*globalResource.programIcon); //set application icon
+ MainDialog* frame = new MainDialog(NULL, FreeFileSync::getLastConfigFile(), programLanguage, globalSettings);
+ frame->SetIcon(*GlobalResources::getInstance().programIcon); //set application icon
frame->Show();
Destroy();
}
-void MainDialog::OnMenuLangChineseSimp(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_CHINESE_SIMPLIFIED);
-}
-
-
-void MainDialog::OnMenuLangDutch(wxCommandEvent& event)
+void MainDialog::OnMenuLanguageSwitch(wxCommandEvent& event)
{
- switchProgramLanguage(wxLANGUAGE_DUTCH);
-}
+ std::map<MenuItemID, LanguageID>::const_iterator it = languageMenuItemMap.find(event.GetId());
-
-void MainDialog::OnMenuLangEnglish(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_ENGLISH);
-}
-
-
-void MainDialog::OnMenuLangFrench(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_FRENCH);
-}
-
-
-void MainDialog::OnMenuLangGerman(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_GERMAN);
-}
-
-
-void MainDialog::OnMenuLangHungarian(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_HUNGARIAN);
-}
-
-
-void MainDialog::OnMenuLangItalian(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_ITALIAN);
-}
-
-
-void MainDialog::OnMenuLangJapanese(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_JAPANESE);
-}
-
-
-void MainDialog::OnMenuLangPolish(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_POLISH);
-}
-
-
-void MainDialog::OnMenuLangPortuguese(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_PORTUGUESE);
-}
-
-
-void MainDialog::OnMenuLangPortugueseBrazil(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_PORTUGUESE_BRAZILIAN);
-}
-
-
-void MainDialog::OnMenuLangSlovenian(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_SLOVENIAN);
-}
-
-
-void MainDialog::OnMenuLangSpanish(wxCommandEvent& event)
-{
- switchProgramLanguage(wxLANGUAGE_SPANISH);
+ if (it != languageMenuItemMap.end())
+ switchProgramLanguage(it->second);
}
//#########################################################################################################
@@ -2941,19 +3164,6 @@ void SyncPreview::enablePreview(bool value)
{
syncPreviewEnabled = true;
- mainDlg_->m_bpButtonSwitchView->SetBitmapLabel(*globalResource.bitmapSyncView);
- mainDlg_->m_bpButtonSwitchView->SetToolTip(_("Synchronization Preview"));
-
- /*mainDlg_->m_bpButtonSyncConfig->Show();
- mainDlg_->m_bpButtonSyncConfig->Enable();
-
- mainDlg_->m_buttonStartSync->Show();
- mainDlg_->m_buttonStartSync->Enable();*/
-
- mainDlg_->m_panelSyncPreview->Show();
-
- mainDlg_->bSizer6->Layout();
-
//toggle display of sync preview in middle grid
mainDlg_->m_gridMiddle->enableSyncPreview(true);
@@ -2963,19 +3173,6 @@ void SyncPreview::enablePreview(bool value)
{
syncPreviewEnabled = false;
- mainDlg_->m_bpButtonSwitchView->SetBitmapLabel(*globalResource.bitmapCmpView);
- mainDlg_->m_bpButtonSwitchView->SetToolTip(_("Comparison Result"));
-
- /*mainDlg_->m_bpButtonSyncConfig->Disable();
- mainDlg_->m_bpButtonSyncConfig->Hide();
-
- mainDlg_->m_buttonStartSync->Disable();
- mainDlg_->m_buttonStartSync->Hide();*/
-
- mainDlg_->m_panelSyncPreview->Hide();
-
- mainDlg_->bSizer6->Layout();
-
//toggle display of sync preview in middle grid
mainDlg_->m_gridMiddle->enableSyncPreview(false);
@@ -2992,13 +3189,13 @@ void SyncPreview::enableSynchronization(bool value)
{
synchronizationEnabled = true;
mainDlg_->m_buttonStartSync->SetForegroundColour(*wxBLACK);
- mainDlg_->m_buttonStartSync->setBitmapFront(*globalResource.bitmapSync);
+ mainDlg_->m_buttonStartSync->setBitmapFront(*GlobalResources::getInstance().bitmapSync);
}
else
{
synchronizationEnabled = false;
mainDlg_->m_buttonStartSync->SetForegroundColour(wxColor(94, 94, 94)); //grey
- mainDlg_->m_buttonStartSync->setBitmapFront(*globalResource.bitmapSyncDisabled);
+ mainDlg_->m_buttonStartSync->setBitmapFront(*GlobalResources::getInstance().bitmapSyncDisabled);
}
}
diff --git a/ui/MainDialog.h b/ui/MainDialog.h
index 671da7ee..e8eae783 100644
--- a/ui/MainDialog.h
+++ b/ui/MainDialog.h
@@ -13,16 +13,22 @@
#include "../library/processXml.h"
#include "gridView.h"
#include <memory>
+#include <map>
class CompareStatusHandler;
class CompareStatus;
-class CustomLocale;
class MainFolderDragDrop;
class FolderPairPanel;
class CustomGrid;
class FFSCheckRowsEvent;
class FFSSyncDirectionEvent;
class SyncPreview;
+class IconUpdater;
+
+namespace FreeFileSync
+{
+ class CustomLocale;
+}
class MainDialog : public MainDialogGenerated
@@ -32,7 +38,7 @@ class MainDialog : public MainDialogGenerated
friend class SyncPreview;
//IDs for context menu items
- enum //context menu for left and right grids
+ enum ContextIDRim //context menu for left and right grids
{
CONTEXT_FILTER_TEMP = 10,
CONTEXT_EXCLUDE_EXT,
@@ -40,24 +46,36 @@ class MainDialog : public MainDialogGenerated
CONTEXT_CLIPBOARD,
CONTEXT_EXPLORER,
CONTEXT_DELETE_FILES,
- CONTEXT_SWAP_SIDES
+ CONTEXT_SYNC_DIR_LEFT,
+ CONTEXT_SYNC_DIR_NONE,
+ CONTEXT_SYNC_DIR_RIGHT
};
- enum //context menu for middle grid
+ enum ContextIDRimLabel//context menu for column settings
{
- CONTEXT_CHECK_ALL,
+ CONTEXT_CUSTOMIZE_COLUMN_LEFT,
+ CONTEXT_CUSTOMIZE_COLUMN_RIGHT
+ };
+
+ enum ContextIDMiddle//context menu for middle grid
+ {
+ CONTEXT_CHECK_ALL = 20,
CONTEXT_UNCHECK_ALL
};
- enum //context menu for column settings
+ enum ContextIDMiddleLabel
{
- CONTEXT_CUSTOMIZE_COLUMN_LEFT,
- CONTEXT_CUSTOMIZE_COLUMN_RIGHT
+ CONTEXT_COMPARISON_RESULT = 30,
+ CONTEXT_SYNC_PREVIEW
};
public:
- MainDialog(wxFrame* frame, const wxString& cfgFileName, CustomLocale* language, xmlAccess::XmlGlobalSettings& settings);
+ MainDialog(wxFrame* frame,
+ const wxString& cfgFileName,
+ FreeFileSync::CustomLocale* language,
+ xmlAccess::XmlGlobalSettings& settings);
+
~MainDialog();
private:
@@ -74,15 +92,15 @@ private:
void writeGlobalSettings();
void updateViewFilterButtons();
- static void updateFilterButton(wxBitmapButton* filterButton, bool isActive);
+ void updateFilterButton(wxBitmapButton* filterButton, bool isActive);
void updateCompareButtons();
void addFileToCfgHistory(const wxString& filename);
void addLeftFolderToHistory(const wxString& leftFolder);
void addRightFolderToHistory(const wxString& rightFolder);
- void addFolderPair(const Zstring& leftDir, const Zstring& rightDir);
- void addFolderPair(const std::vector<FreeFileSync::FolderPair>& newPairs);
+ void addFolderPair(const Zstring& leftDir, const Zstring& rightDir, bool addFront = false);
+ void addFolderPair(const std::vector<FreeFileSync::FolderPair>& newPairs, bool addFront = false);
void removeFolderPair(const int pos, bool refreshLayout = true); //keep it an int, allow negative values!
void clearFolderPairs();
@@ -93,6 +111,8 @@ private:
//context menu functions
std::set<int> getSelectedRows(const CustomGrid* grid) const;
+ std::set<int> getSelectedRows() const;
+ void setSyncDirManually(const std::set<int>& rowsToSetOnUiTable, const FreeFileSync::SyncDirection dir);
void filterRangeManually(const std::set<int>& rowsToFilterOnUiTable, const int leadingRow);
void copySelectionToClipboard(const CustomGrid* selectedGrid);
void openWithFileManager(const int rowNumber, const bool leftSide);
@@ -106,16 +126,18 @@ private:
void clearStatusBar();
//events
- void onGridLeftButtonEvent(wxKeyEvent& event);
- void onGridRightButtonEvent(wxKeyEvent& event);
- void onGridMiddleButtonEvent(wxKeyEvent& event);
- void OnContextMenu(wxGridEvent& event);
- void OnContextMenuSelection(wxCommandEvent& event);
- void OnContextMenuMiddle(wxGridEvent& event);
- void OnContextMenuMiddleSelection(wxCommandEvent& event);
- void OnContextColumnLeft(wxGridEvent& event);
- void OnContextColumnRight(wxGridEvent& event);
- void OnContextColumnSelection(wxCommandEvent& event);
+ void onGridLeftButtonEvent( wxKeyEvent& event);
+ void onGridRightButtonEvent( wxKeyEvent& event);
+ void onGridMiddleButtonEvent( wxKeyEvent& event);
+ void OnContextRim( wxGridEvent& event);
+ void OnContextRimSelection( wxCommandEvent& event);
+ void OnContextRimLabelLeft( wxGridEvent& event);
+ void OnContextRimLabelRight( wxGridEvent& event);
+ void OnContextRimLabelSelection( wxCommandEvent& event);
+ void OnContextMiddle( wxGridEvent& event);
+ void OnContextMiddleSelection( wxCommandEvent& event);
+ void OnContextMiddleLabel( wxGridEvent& event);
+ void OnContextMiddleLabelSelection(wxCommandEvent& event);
void OnDirSelected(wxFileDirPickerEvent& event);
@@ -151,6 +173,9 @@ private:
void OnCfgHistoryKeyEvent( wxKeyEvent& event);
void OnFolderHistoryKeyEvent(wxKeyEvent& event);
void OnRegularUpdateCheck( wxIdleEvent& event);
+ void OnLayoutWindowAsync( wxIdleEvent& event);
+
+ void refreshGridAfterFilterChange(const int delay);
void onResizeMainWindow( wxEvent& event);
void OnAbortCompare( wxCommandEvent& event);
@@ -168,10 +193,11 @@ private:
void OnClose( wxCloseEvent& event);
void OnQuit( wxCommandEvent& event);
+ void calculatePreview();
+
void OnAddFolderPair( wxCommandEvent& event);
void OnRemoveFolderPair( wxCommandEvent& event);
-
- void calculatePreview();
+ void OnRemoveTopFolderPair( wxCommandEvent& event);
//menu events
void OnMenuSaveConfig( wxCommandEvent& event);
@@ -182,22 +208,14 @@ private:
void OnMenuCheckVersion( wxCommandEvent& event);
void OnMenuAbout( wxCommandEvent& event);
void OnMenuQuit( wxCommandEvent& event);
- void OnMenuLangChineseSimp( wxCommandEvent& event);
- void OnMenuLangDutch( wxCommandEvent& event);
- void OnMenuLangEnglish( wxCommandEvent& event);
- void OnMenuLangFrench( wxCommandEvent& event);
- void OnMenuLangGerman( wxCommandEvent& event);
- void OnMenuLangHungarian( wxCommandEvent& event);
- void OnMenuLangItalian( wxCommandEvent& event);
- void OnMenuLangJapanese( wxCommandEvent& event);
- void OnMenuLangPolish( wxCommandEvent& event);
- void OnMenuLangPortuguese( wxCommandEvent& event);
- void OnMenuLangPortugueseBrazil(wxCommandEvent& event);
- void OnMenuLangSlovenian( wxCommandEvent& event);
- void OnMenuLangSpanish( wxCommandEvent& event);
+ void OnMenuLanguageSwitch( wxCommandEvent& event);
void switchProgramLanguage(const int langID);
+ typedef int MenuItemID;
+ typedef int LanguageID;
+ std::map<MenuItemID, LanguageID> languageMenuItemMap; //needed to attach menu item events
+
//***********************************************
//application variables are stored here:
@@ -234,7 +252,7 @@ private:
//***********************************************
std::auto_ptr<wxMenu> contextMenu;
- CustomLocale* programLanguage;
+ FreeFileSync::CustomLocale* programLanguage;
//status information
wxLongLong lastStatusChange;
@@ -270,6 +288,11 @@ private:
std::auto_ptr<MainFolderDragDrop> dragDropOnLeft;
std::auto_ptr<MainFolderDragDrop> dragDropOnRight;
+#ifdef FFS_WIN
+ //update icons periodically: one updater instance for both left and right grids
+ std::auto_ptr<IconUpdater> updateFileIcons;
+#endif
+
//encapsulation of handling of sync preview
std::auto_ptr<SyncPreview> syncPreview;
};
diff --git a/ui/SmallDialogs.cpp b/ui/SmallDialogs.cpp
index 9ab09e88..db20e526 100644
--- a/ui/SmallDialogs.cpp
+++ b/ui/SmallDialogs.cpp
@@ -6,29 +6,40 @@
#include "../library/customGrid.h"
#include "../library/customButton.h"
#include "../library/statistics.h"
+#include "../library/localization.h"
using namespace FreeFileSync;
AboutDlg::AboutDlg(wxWindow* window) : AboutDlgGenerated(window)
{
- m_bitmap9->SetBitmap(*globalResource.bitmapWebsite);
- m_bitmap10->SetBitmap(*globalResource.bitmapEmail);
- m_bitmap11->SetBitmap(*globalResource.bitmapLogo);
- m_bitmap13->SetBitmap(*globalResource.bitmapGPL);
-
- //flag bitmaps
- m_bitmapFrench ->SetBitmap(*globalResource.bitmapFrance);
- m_bitmapJapanese ->SetBitmap(*globalResource.bitmapJapan);
- m_bitmapDutch ->SetBitmap(*globalResource.bitmapHolland);
- m_bitmapChineseSimple ->SetBitmap(*globalResource.bitmapChina);
- m_bitmapPolish ->SetBitmap(*globalResource.bitmapPoland);
- m_bitmapPortuguese ->SetBitmap(*globalResource.bitmapPortugal);
- m_bitmapItalian ->SetBitmap(*globalResource.bitmapItaly);
- m_bitmapSlovenian ->SetBitmap(*globalResource.bitmapSlovakia);
- m_bitmapHungarian ->SetBitmap(*globalResource.bitmapHungary);
- m_bitmapSpanish ->SetBitmap(*globalResource.bitmapSpain);
- m_bitmapPortugueseBrazil->SetBitmap(*globalResource.bitmapBrazil);
+ m_bitmap9->SetBitmap(*GlobalResources::getInstance().bitmapWebsite);
+ m_bitmap10->SetBitmap(*GlobalResources::getInstance().bitmapEmail);
+ m_bitmap11->SetBitmap(*GlobalResources::getInstance().bitmapLogo);
+ m_bitmap13->SetBitmap(*GlobalResources::getInstance().bitmapGPL);
+
+
+ //create language credits
+ for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::getMapping().begin(); i != LocalizationInfo::getMapping().end(); ++i)
+ {
+ //flag
+ wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, *i->languageFlag, wxDefaultPosition, wxSize(-1,11), 0 );
+ fgSizerTranslators->Add(staticBitmapFlag, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ //language name
+ wxStaticText* staticTextLanguage = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, i->languageName, wxDefaultPosition, wxDefaultSize, 0 );
+ staticTextLanguage->Wrap( -1 );
+ fgSizerTranslators->Add(staticTextLanguage, 0, wxALIGN_CENTER_VERTICAL, 5);
+
+ //translator name
+ wxStaticText* staticTextTranslator = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, i->translatorName, wxDefaultPosition, wxDefaultSize, 0 );
+ staticTextTranslator->Wrap( -1 );
+ fgSizerTranslators->Add(staticTextTranslator, 0, wxALIGN_CENTER_VERTICAL, 5);
+ }
+
+ bSizerTranslators->Fit(m_scrolledWindowTranslators);
+
+
//build information
wxString build = wxString(wxT("(")) + _("Build:") + wxT(" ") + __TDATE__;
@@ -39,7 +50,7 @@ AboutDlg::AboutDlg(wxWindow* window) : AboutDlgGenerated(window)
#endif //wxUSE_UNICODE
m_build->SetLabel(build);
- m_animationControl1->SetAnimation(*globalResource.animationMoney);
+ m_animationControl1->SetAnimation(*GlobalResources::getInstance().animationMoney);
m_animationControl1->Play(); //Note: The animation is created hidden(!) to not disturb constraint based window creation;
m_animationControl1->Show(); //
@@ -65,7 +76,7 @@ HelpDlg::HelpDlg(wxWindow* window) : HelpDlgGenerated(window)
{
m_notebook1->SetFocus();
- m_bitmap25->SetBitmap(*globalResource.bitmapHelp);
+ m_bitmap25->SetBitmap(*GlobalResources::getInstance().bitmapHelp);
//populate decision trees: "compare by date"
wxTreeItemId treeRoot = m_treeCtrl1->AddRoot(_("DECISION TREE"));
@@ -120,10 +131,10 @@ FilterDlg::FilterDlg(wxWindow* window, wxString& filterIncl, wxString& filterExc
includeFilter(filterIncl),
excludeFilter(filterExcl)
{
- m_bitmap8->SetBitmap(*globalResource.bitmapInclude);
- m_bitmap9->SetBitmap(*globalResource.bitmapExclude);
- m_bitmap26->SetBitmap(*globalResource.bitmapFilter);
- m_bpButtonHelp->SetBitmapLabel(*globalResource.bitmapHelp);
+ m_bitmap8->SetBitmap(*GlobalResources::getInstance().bitmapInclude);
+ m_bitmap9->SetBitmap(*GlobalResources::getInstance().bitmapExclude);
+ m_bitmap26->SetBitmap(*GlobalResources::getInstance().bitmapFilter);
+ m_bpButtonHelp->SetBitmapLabel(*GlobalResources::getInstance().bitmapHelp);
m_textCtrlInclude->SetValue(includeFilter);
m_textCtrlExclude->SetValue(excludeFilter);
@@ -207,12 +218,12 @@ void DeleteDialog::updateTexts()
if (m_checkBoxUseRecycler->GetValue())
{
headerText = _("Do you really want to move the following objects(s) to the Recycle Bin?");
- m_bitmap12->SetBitmap(*globalResource.bitmapRecycler);
+ m_bitmap12->SetBitmap(*GlobalResources::getInstance().bitmapRecycler);
}
else
{
headerText = _("Do you really want to delete the following objects(s)?");
- m_bitmap12->SetBitmap(*globalResource.bitmapDeleteFile);
+ m_bitmap12->SetBitmap(*GlobalResources::getInstance().bitmapDeleteFile);
}
m_staticTextHeader->SetLabel(headerText);
@@ -282,7 +293,7 @@ ErrorDlg::ErrorDlg(wxWindow* parentWindow, const int activeButtons, const wxStri
ErrorDlgGenerated(parentWindow),
ignoreErrors(ignoreNextErrors)
{
- m_bitmap10->SetBitmap(*globalResource.bitmapError);
+ m_bitmap10->SetBitmap(*GlobalResources::getInstance().bitmapError);
m_textCtrl8->SetValue(messageText);
m_checkBoxIgnoreErrors->SetValue(ignoreNextErrors);
@@ -343,7 +354,7 @@ WarningDlg::WarningDlg(wxWindow* parentWindow, int activeButtons, const wxStrin
WarningDlgGenerated(parentWindow),
dontShowAgain(dontShowDlgAgain)
{
- m_bitmap10->SetBitmap(*globalResource.bitmapWarning);
+ m_bitmap10->SetBitmap(*GlobalResources::getInstance().bitmapWarning);
m_textCtrl8->SetValue(messageText);
m_checkBoxDontShowAgain->SetValue(dontShowAgain);
@@ -393,7 +404,7 @@ QuestionDlg::QuestionDlg(wxWindow* parentWindow, int activeButtons, const wxStri
QuestionDlgGenerated(parentWindow),
dontShowAgain(dontShowDlgAgain)
{
- m_bitmap10->SetBitmap(*globalResource.bitmapQuestion);
+ m_bitmap10->SetBitmap(*GlobalResources::getInstance().bitmapQuestion);
m_textCtrl8->SetValue(messageText);
m_checkBoxDontAskAgain->SetValue(dontShowAgain);
@@ -419,9 +430,6 @@ QuestionDlg::QuestionDlg(wxWindow* parentWindow, int activeButtons, const wxStri
}
-QuestionDlg::~QuestionDlg() {}
-
-
void QuestionDlg::OnClose(wxCloseEvent& event)
{
dontShowAgain = m_checkBoxDontAskAgain->GetValue();
@@ -456,8 +464,8 @@ CustomizeColsDlg::CustomizeColsDlg(wxWindow* window, xmlAccess::ColumnAttributes
output(attr),
m_showFileIcons(showFileIcons)
{
- m_bpButton29->SetBitmapLabel(*globalResource.bitmapMoveUp);
- m_bpButton30->SetBitmapLabel(*globalResource.bitmapMoveDown);
+ m_bpButton29->SetBitmapLabel(*GlobalResources::getInstance().bitmapMoveUp);
+ m_bpButton30->SetBitmapLabel(*GlobalResources::getInstance().bitmapMoveDown);
xmlAccess::ColumnAttributes columnSettings = attr;
@@ -563,15 +571,68 @@ void CustomizeColsDlg::OnMoveDown(wxCommandEvent& event)
}
//########################################################################################
+
+
+SyncPreviewDlg::SyncPreviewDlg(wxWindow* parentWindow,
+ const wxString& variantName,
+ const wxString& toCreate,
+ const wxString& toUpdate,
+ const wxString& toDelete,
+ const wxString& data,
+ bool& dontShowAgain) :
+ SyncPreviewDlgGenerated(parentWindow),
+ m_dontShowAgain(dontShowAgain)
+{
+ //m_bitmapPreview->SetBitmap(*GlobalResources::getInstance().bitmapSync);
+ m_buttonStartSync->setBitmapFront(*GlobalResources::getInstance().bitmapStartSync);
+ m_bitmapCreate->SetBitmap(*GlobalResources::getInstance().bitmapCreate);
+ m_bitmapUpdate->SetBitmap(*GlobalResources::getInstance().bitmapUpdate);
+ m_bitmapDelete->SetBitmap(*GlobalResources::getInstance().bitmapDelete);
+ m_bitmapData->SetBitmap(*GlobalResources::getInstance().bitmapData);
+
+ m_staticTextVariant->SetLabel(variantName);
+ m_textCtrlCreate->SetValue(toCreate);
+ m_textCtrlUpdate->SetValue(toUpdate);
+ m_textCtrlDelete->SetValue(toDelete);
+ m_textCtrlData->SetValue(data);
+
+ m_checkBoxDontShowAgain->SetValue(dontShowAgain);
+
+ m_buttonStartSync->SetFocus();
+ Fit();
+}
+
+
+void SyncPreviewDlg::OnClose(wxCloseEvent& event)
+{
+ EndModal(BUTTON_CANCEL);
+}
+
+
+void SyncPreviewDlg::OnCancel(wxCommandEvent& event)
+{
+ EndModal(BUTTON_CANCEL);
+}
+
+
+void SyncPreviewDlg::OnStartSync(wxCommandEvent& event)
+{
+ m_dontShowAgain = m_checkBoxDontShowAgain->GetValue();
+ EndModal(BUTTON_START);
+}
+
+
+
+//########################################################################################
GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* window, xmlAccess::XmlGlobalSettings& globalSettings) :
GlobalSettingsDlgGenerated(window),
settings(globalSettings)
{
- m_bitmapSettings->SetBitmap(*globalResource.bitmapSettings);
- m_buttonResetWarnings->setBitmapFront(*globalResource.bitmapWarningSmall, 5);
+ m_bitmapSettings->SetBitmap(*GlobalResources::getInstance().bitmapSettings);
+ m_buttonResetWarnings->setBitmapFront(*GlobalResources::getInstance().bitmapWarningSmall, 5);
- m_spinCtrlFileTimeTolerance->SetValue(globalSettings.shared.fileTimeTolerance);
- m_checkBoxIgnoreOneHour->SetValue(globalSettings.shared.ignoreOneHourDiff);
+ m_spinCtrlFileTimeTolerance->SetValue(globalSettings.fileTimeTolerance);
+ m_checkBoxIgnoreOneHour->SetValue(globalSettings.ignoreOneHourDiff);
m_textCtrlFileManager->SetValue(globalSettings.gui.commandLineFileManager);
@@ -582,8 +643,8 @@ GlobalSettingsDlg::GlobalSettingsDlg(wxWindow* window, xmlAccess::XmlGlobalSetti
void GlobalSettingsDlg::OnOkay(wxCommandEvent& event)
{
//write global settings only when okay-button is pressed!
- settings.shared.fileTimeTolerance = m_spinCtrlFileTimeTolerance->GetValue();
- settings.shared.ignoreOneHourDiff = m_checkBoxIgnoreOneHour->GetValue();
+ settings.fileTimeTolerance = m_spinCtrlFileTimeTolerance->GetValue();
+ settings.ignoreOneHourDiff = m_checkBoxIgnoreOneHour->GetValue();
settings.gui.commandLineFileManager = m_textCtrlFileManager->GetValue();
@@ -595,7 +656,7 @@ void GlobalSettingsDlg::OnResetWarnings(wxCommandEvent& event)
{
wxMessageDialog* messageDlg = new wxMessageDialog(this, _("Reset all warning messages?"), _("Warning") , wxOK | wxCANCEL);
if (messageDlg->ShowModal() == wxID_OK)
- settings.shared.resetWarnings();
+ settings.warnings.resetWarnings();
}
@@ -803,7 +864,7 @@ SyncStatus::SyncStatus(StatusHandler* updater, wxWindow* parentWindow) :
lastStatCallSpeed(-1000000), //some big number
lastStatCallRemTime(-1000000)
{
- m_animationControl1->SetAnimation(*globalResource.animationSync);
+ m_animationControl1->SetAnimation(*GlobalResources::getInstance().animationSync);
m_animationControl1->Play();
//initialize gauge
@@ -943,37 +1004,37 @@ void SyncStatus::setCurrentStatus(SyncStatusID id)
switch (id)
{
case ABORTED:
- m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusError);
+ m_bitmapStatus->SetBitmap(*GlobalResources::getInstance().bitmapStatusError);
m_staticTextStatus->SetLabel(_("Aborted"));
break;
case FINISHED_WITH_SUCCESS:
- m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusSuccess);
+ m_bitmapStatus->SetBitmap(*GlobalResources::getInstance().bitmapStatusSuccess);
m_staticTextStatus->SetLabel(_("Completed"));
break;
case FINISHED_WITH_ERROR:
- m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusWarning);
+ m_bitmapStatus->SetBitmap(*GlobalResources::getInstance().bitmapStatusWarning);
m_staticTextStatus->SetLabel(_("Completed"));
break;
case PAUSE:
- m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusPause);
+ m_bitmapStatus->SetBitmap(*GlobalResources::getInstance().bitmapStatusPause);
m_staticTextStatus->SetLabel(_("Paused"));
break;
case SCANNING:
- m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusScanning);
+ m_bitmapStatus->SetBitmap(*GlobalResources::getInstance().bitmapStatusScanning);
m_staticTextStatus->SetLabel(_("Scanning..."));
break;
case COMPARING_CONTENT:
- m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusBinCompare);
+ m_bitmapStatus->SetBitmap(*GlobalResources::getInstance().bitmapStatusBinCompare);
m_staticTextStatus->SetLabel(_("Comparing content..."));
break;
case SYNCHRONIZING:
- m_bitmapStatus->SetBitmap(*globalResource.bitmapStatusSyncing);
+ m_bitmapStatus->SetBitmap(*GlobalResources::getInstance().bitmapStatusSyncing);
m_staticTextStatus->SetLabel(_("Synchronizing..."));
break;
}
diff --git a/ui/SmallDialogs.h b/ui/SmallDialogs.h
index 2c3e89d2..e9156665 100644
--- a/ui/SmallDialogs.h
+++ b/ui/SmallDialogs.h
@@ -143,7 +143,6 @@ class QuestionDlg : public QuestionDlgGenerated
{
public:
QuestionDlg(wxWindow* parentWindow, int activeButtons, const wxString messageText, bool& dontShowAgain);
- ~QuestionDlg();
enum
{
@@ -166,7 +165,6 @@ class CustomizeColsDlg : public CustomizeColsDlgGenerated
{
public:
CustomizeColsDlg(wxWindow* window, xmlAccess::ColumnAttributes& attr, bool& showFileIcons);
- ~CustomizeColsDlg() {}
enum
{
@@ -187,6 +185,32 @@ private:
};
+class SyncPreviewDlg : public SyncPreviewDlgGenerated
+{
+public:
+ SyncPreviewDlg(wxWindow* parentWindow,
+ const wxString& variantName,
+ const wxString& toCreate,
+ const wxString& toUpdate,
+ const wxString& toDelete,
+ const wxString& data,
+ bool& dontShowAgain);
+
+ enum
+ {
+ BUTTON_START = 1,
+ BUTTON_CANCEL = 2
+ };
+
+private:
+ void OnClose(wxCloseEvent& event);
+ void OnCancel(wxCommandEvent& event);
+ void OnStartSync(wxCommandEvent& event);
+
+ bool& m_dontShowAgain;
+};
+
+
class GlobalSettingsDlg : public GlobalSettingsDlgGenerated
{
public:
diff --git a/ui/SyncDialog.cpp b/ui/SyncDialog.cpp
index 2004a06c..58abc753 100644
--- a/ui/SyncDialog.cpp
+++ b/ui/SyncDialog.cpp
@@ -31,38 +31,30 @@ SyncDialog::SyncDialog(wxWindow* window,
updateConfigIcons(cfg.compareVar, localSyncConfiguration);
//set icons for this dialog
- m_bitmapLeftOnly->SetBitmap(*globalResource.bitmapLeftOnly);
- m_bitmapRightOnly->SetBitmap(*globalResource.bitmapRightOnly);
- m_bitmapLeftNewer->SetBitmap(*globalResource.bitmapLeftNewer);
- m_bitmapRightNewer->SetBitmap(*globalResource.bitmapRightNewer);
- m_bitmapDifferent->SetBitmap(*globalResource.bitmapDifferent);
+ m_bitmapLeftOnly->SetBitmap(*GlobalResources::getInstance().bitmapLeftOnly);
+ m_bitmapRightOnly->SetBitmap(*GlobalResources::getInstance().bitmapRightOnly);
+ m_bitmapLeftNewer->SetBitmap(*GlobalResources::getInstance().bitmapLeftNewer);
+ m_bitmapRightNewer->SetBitmap(*GlobalResources::getInstance().bitmapRightNewer);
+ m_bitmapDifferent->SetBitmap(*GlobalResources::getInstance().bitmapDifferent);
bSizer201->Layout(); //wxButtonWithImage size might have changed
//set radiobutton
- if ( localSyncConfiguration.exLeftSideOnly == SYNC_DIR_RIGHT &&
- localSyncConfiguration.exRightSideOnly == SYNC_DIR_RIGHT &&
- localSyncConfiguration.leftNewer == SYNC_DIR_RIGHT &&
- localSyncConfiguration.rightNewer == SYNC_DIR_RIGHT &&
- localSyncConfiguration.different == SYNC_DIR_RIGHT)
+ switch (localSyncConfiguration.getVariant())
+ {
+ case SyncConfiguration::MIRROR:
m_radioBtn1->SetValue(true); //one way ->
-
- else if (localSyncConfiguration.exLeftSideOnly == SYNC_DIR_RIGHT &&
- localSyncConfiguration.exRightSideOnly == SYNC_DIR_NONE &&
- localSyncConfiguration.leftNewer == SYNC_DIR_RIGHT &&
- localSyncConfiguration.rightNewer == SYNC_DIR_NONE &&
- localSyncConfiguration.different == SYNC_DIR_NONE)
+ break;
+ case SyncConfiguration::UPDATE:
m_radioBtnUpdate->SetValue(true); //Update ->
-
- else if (localSyncConfiguration.exLeftSideOnly == SYNC_DIR_RIGHT &&
- localSyncConfiguration.exRightSideOnly == SYNC_DIR_LEFT &&
- localSyncConfiguration.leftNewer == SYNC_DIR_RIGHT &&
- localSyncConfiguration.rightNewer == SYNC_DIR_LEFT &&
- localSyncConfiguration.different == SYNC_DIR_NONE)
+ break;
+ case SyncConfiguration::TWOWAY:
m_radioBtn2->SetValue(true); //two way <->
-
- else
+ break;
+ case SyncConfiguration::CUSTOM:
m_radioBtn3->SetValue(true); //other
+ break;
+ }
Fit();
}
@@ -106,112 +98,112 @@ void SyncDialog::updateConfigIcons(const CompareVariant compareVar,
switch (compareVar)
{
case CMP_BY_TIME_SIZE:
- buttonLeftOnly->Show();
- buttonRightOnly->Show();
- buttonLeftNewer->Show();
+ buttonLeftOnly ->Show();
+ buttonRightOnly ->Show();
+ buttonLeftNewer ->Show();
buttonRightNewer->Show();
- buttonDifferent->Hide();
+ buttonDifferent ->Hide();
- bitmapLeftOnly->Show();
- bitmapRightOnly->Show();
- bitmapLeftNewer->Show();
+ bitmapLeftOnly ->Show();
+ bitmapRightOnly ->Show();
+ bitmapLeftNewer ->Show();
bitmapRightNewer->Show();
- bitmapDifferent->Hide();
+ bitmapDifferent ->Hide();
break;
case CMP_BY_CONTENT:
- buttonLeftOnly->Show();
- buttonRightOnly->Show();
- buttonLeftNewer->Hide();
+ buttonLeftOnly ->Show();
+ buttonRightOnly ->Show();
+ buttonLeftNewer ->Hide();
buttonRightNewer->Hide();
- buttonDifferent->Show();
+ buttonDifferent ->Show();
- bitmapLeftOnly->Show();
- bitmapRightOnly->Show();
- bitmapLeftNewer->Hide();
+ bitmapLeftOnly ->Show();
+ bitmapRightOnly ->Show();
+ bitmapLeftNewer ->Hide();
bitmapRightNewer->Hide();
- bitmapDifferent->Show();
+ bitmapDifferent ->Show();
break;
}
if (syncConfig.exLeftSideOnly == SYNC_DIR_RIGHT)
{
- buttonLeftOnly->SetBitmapLabel(*globalResource.bitmapArrowRightCr);
+ buttonLeftOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowRightCr);
buttonLeftOnly->SetToolTip(_("Copy from left to right"));
}
else if (syncConfig.exLeftSideOnly == SYNC_DIR_LEFT)
{
- buttonLeftOnly->SetBitmapLabel(*globalResource.bitmapDeleteLeft);
+ buttonLeftOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapDeleteLeft);
buttonLeftOnly->SetToolTip(_("Delete files/folders existing on left side only"));
}
else if (syncConfig.exLeftSideOnly == SYNC_DIR_NONE)
{
- buttonLeftOnly->SetBitmapLabel(*globalResource.bitmapArrowNone);
+ buttonLeftOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowNone);
buttonLeftOnly->SetToolTip(_("Do nothing"));
}
if (syncConfig.exRightSideOnly == SYNC_DIR_RIGHT)
{
- buttonRightOnly->SetBitmapLabel(*globalResource.bitmapDeleteRight);
+ buttonRightOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapDeleteRight);
buttonRightOnly->SetToolTip(_("Delete files/folders existing on right side only"));
}
else if (syncConfig.exRightSideOnly == SYNC_DIR_LEFT)
{
- buttonRightOnly->SetBitmapLabel(*globalResource.bitmapArrowLeftCr);
+ buttonRightOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowLeftCr);
buttonRightOnly->SetToolTip(_("Copy from right to left"));
}
else if (syncConfig.exRightSideOnly == SYNC_DIR_NONE)
{
- buttonRightOnly->SetBitmapLabel(*globalResource.bitmapArrowNone);
+ buttonRightOnly->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowNone);
buttonRightOnly->SetToolTip(_("Do nothing"));
}
if (syncConfig.leftNewer == SYNC_DIR_RIGHT)
{
- buttonLeftNewer->SetBitmapLabel(*globalResource.bitmapArrowRight);
+ buttonLeftNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowRight);
buttonLeftNewer->SetToolTip(_("Copy from left to right overwriting"));
}
else if (syncConfig.leftNewer == SYNC_DIR_LEFT)
{
- buttonLeftNewer->SetBitmapLabel(*globalResource.bitmapArrowLeft);
+ buttonLeftNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowLeft);
buttonLeftNewer->SetToolTip(_("Copy from right to left overwriting"));
}
else if (syncConfig.leftNewer == SYNC_DIR_NONE)
{
- buttonLeftNewer->SetBitmapLabel(*globalResource.bitmapArrowNone);
+ buttonLeftNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowNone);
buttonLeftNewer->SetToolTip(_("Do nothing"));
}
if (syncConfig.rightNewer == SYNC_DIR_RIGHT)
{
- buttonRightNewer->SetBitmapLabel(*globalResource.bitmapArrowRight);
+ buttonRightNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowRight);
buttonRightNewer->SetToolTip(_("Copy from left to right overwriting"));
}
else if (syncConfig.rightNewer == SYNC_DIR_LEFT)
{
- buttonRightNewer->SetBitmapLabel(*globalResource.bitmapArrowLeft);
+ buttonRightNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowLeft);
buttonRightNewer->SetToolTip(_("Copy from right to left overwriting"));
}
else if (syncConfig.rightNewer == SYNC_DIR_NONE)
{
- buttonRightNewer->SetBitmapLabel(*globalResource.bitmapArrowNone);
+ buttonRightNewer->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowNone);
buttonRightNewer->SetToolTip(_("Do nothing"));
}
if (syncConfig.different == SYNC_DIR_RIGHT)
{
- buttonDifferent->SetBitmapLabel(*globalResource.bitmapArrowRight);
+ buttonDifferent->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowRight);
buttonDifferent->SetToolTip(_("Copy from left to right overwriting"));
}
else if (syncConfig.different == SYNC_DIR_LEFT)
{
- buttonDifferent->SetBitmapLabel(*globalResource.bitmapArrowLeft);
+ buttonDifferent->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowLeft);
buttonDifferent->SetToolTip(_("Copy from right to left overwriting"));
}
else if (syncConfig.different == SYNC_DIR_NONE)
{
- buttonDifferent->SetBitmapLabel(*globalResource.bitmapArrowNone);
+ buttonDifferent->SetBitmapLabel(*GlobalResources::getInstance().bitmapArrowNone);
buttonDifferent->SetToolTip(_("Do nothing"));
}
}
@@ -255,11 +247,7 @@ void SyncDialog::OnSelectRecycleBin(wxCommandEvent& event)
void SyncDialog::OnSyncLeftToRight(wxCommandEvent& event)
{
- localSyncConfiguration.exLeftSideOnly = SYNC_DIR_RIGHT;
- localSyncConfiguration.exRightSideOnly = SYNC_DIR_RIGHT;
- localSyncConfiguration.leftNewer = SYNC_DIR_RIGHT;
- localSyncConfiguration.rightNewer = SYNC_DIR_RIGHT;
- localSyncConfiguration.different = SYNC_DIR_RIGHT;
+ localSyncConfiguration.setVariant(SyncConfiguration::MIRROR);
updateConfigIcons(cfg.compareVar, localSyncConfiguration);
@@ -270,11 +258,7 @@ void SyncDialog::OnSyncLeftToRight(wxCommandEvent& event)
void SyncDialog::OnSyncUpdate(wxCommandEvent& event)
{
- localSyncConfiguration.exLeftSideOnly = SYNC_DIR_RIGHT;
- localSyncConfiguration.exRightSideOnly = SYNC_DIR_NONE;
- localSyncConfiguration.leftNewer = SYNC_DIR_RIGHT;
- localSyncConfiguration.rightNewer = SYNC_DIR_NONE;
- localSyncConfiguration.different = SYNC_DIR_NONE;
+ localSyncConfiguration.setVariant(SyncConfiguration::UPDATE);
updateConfigIcons(cfg.compareVar, localSyncConfiguration);
@@ -285,11 +269,7 @@ void SyncDialog::OnSyncUpdate(wxCommandEvent& event)
void SyncDialog::OnSyncBothSides(wxCommandEvent& event)
{
- localSyncConfiguration.exLeftSideOnly = SYNC_DIR_RIGHT;
- localSyncConfiguration.exRightSideOnly = SYNC_DIR_LEFT;
- localSyncConfiguration.leftNewer = SYNC_DIR_RIGHT;
- localSyncConfiguration.rightNewer = SYNC_DIR_LEFT;
- localSyncConfiguration.different = SYNC_DIR_NONE;
+ localSyncConfiguration.setVariant(SyncConfiguration::TWOWAY);
updateConfigIcons(cfg.compareVar, localSyncConfiguration);
@@ -430,14 +410,14 @@ void BatchDialog::init()
dragDropOnLogfileDir.reset(new DragDropOnDlg(m_panelLogging, m_dirPickerLogfileDir, m_textCtrlLogfileDir));
//set icons for this dialog
- m_bitmapLeftOnly->SetBitmap(*globalResource.bitmapLeftOnly);
- m_bitmapRightOnly->SetBitmap(*globalResource.bitmapRightOnly);
- m_bitmapLeftNewer->SetBitmap(*globalResource.bitmapLeftNewer);
- m_bitmapRightNewer->SetBitmap(*globalResource.bitmapRightNewer);
- m_bitmapDifferent->SetBitmap(*globalResource.bitmapDifferent);
- m_bitmap8->SetBitmap(*globalResource.bitmapInclude);
- m_bitmap9->SetBitmap(*globalResource.bitmapExclude);
- m_bitmap27->SetBitmap(*globalResource.bitmapBatch);
+ m_bitmapLeftOnly->SetBitmap(*GlobalResources::getInstance().bitmapLeftOnly);
+ m_bitmapRightOnly->SetBitmap(*GlobalResources::getInstance().bitmapRightOnly);
+ m_bitmapLeftNewer->SetBitmap(*GlobalResources::getInstance().bitmapLeftNewer);
+ m_bitmapRightNewer->SetBitmap(*GlobalResources::getInstance().bitmapRightNewer);
+ m_bitmapDifferent->SetBitmap(*GlobalResources::getInstance().bitmapDifferent);
+ m_bitmap8->SetBitmap(*GlobalResources::getInstance().bitmapInclude);
+ m_bitmap9->SetBitmap(*GlobalResources::getInstance().bitmapExclude);
+ m_bitmap27->SetBitmap(*GlobalResources::getInstance().bitmapBatch);
}
diff --git a/ui/batchStatusHandler.cpp b/ui/batchStatusHandler.cpp
index 716dccd5..f7f0df9f 100644
--- a/ui/batchStatusHandler.cpp
+++ b/ui/batchStatusHandler.cpp
@@ -14,13 +14,13 @@ public:
LogFile(const wxString& logfileDirectory)
{
//create logfile directory
- const Zstring logfileDir = logfileDirectory.empty() ? wxT("Logs") : logfileDirectory.c_str();
+ const Zstring logfileDir = logfileDirectory.empty() ? FreeFileSync::getDefaultLogDirectory().c_str() : logfileDirectory.c_str();
if (!wxDirExists(logfileDir))
try
{
FreeFileSync::createDirectory(logfileDir, Zstring(), false);
}
- catch (FileError&)
+ catch (FreeFileSync::FileError&)
{
readyToWrite = false;
return;
@@ -29,10 +29,10 @@ public:
//assemble logfile name
wxString logfileName = logfileDir.c_str();
if (!FreeFileSync::endsWithPathSeparator(logfileName.c_str()))
- logfileName += GlobalResources::FILE_NAME_SEPARATOR;
+ logfileName += FreeFileSync::FILE_NAME_SEPARATOR;
wxString timeNow = wxDateTime::Now().FormatISOTime();
- timeNow.Replace(wxT(":"), wxEmptyString);
- logfileName += wxT("FFS_") + wxDateTime::Now().FormatISODate() + wxChar('_') + timeNow + wxT(".log");
+ timeNow.Replace(wxT(":"), wxT("-"));
+ logfileName += wxDateTime::Now().FormatISODate() + wxChar(' ') + timeNow + wxT(".log");
logFile.Open(logfileName.c_str(), wxT("w"));
@@ -111,9 +111,9 @@ public:
m_statusHandler(statusHandler),
processPaused(false)
{
- running.reset(new wxIcon(*globalResource.programIcon));
+ running.reset(new wxIcon(*GlobalResources::getInstance().programIcon));
paused.reset(new wxIcon);
- paused->CopyFromBitmap(*globalResource.bitmapFFSPaused);
+ paused->CopyFromBitmap(*GlobalResources::getInstance().bitmapFFSPaused);
wxTaskBarIcon::SetIcon(*running);
}
diff --git a/ui/gridView.cpp b/ui/gridView.cpp
index aa309970..aa1867fd 100644
--- a/ui/gridView.cpp
+++ b/ui/gridView.cpp
@@ -4,7 +4,7 @@
using FreeFileSync::GridView;
-GridView::GridView(FolderComparison& results) :
+GridView::GridView(FreeFileSync::FolderComparison& results) :
leftOnlyFilesActive(false),
rightOnlyFilesActive(false),
leftNewerFilesActive(false),
@@ -48,26 +48,24 @@ GridView::StatusInfo GridView::update_sub(const bool hideFiltered)
{
const FileComparison& fileCmp = j->fileCmp;
- output.objectsTotal += j->fileCmp.size();
-
RefIndex newEntry;
newEntry.folderIndex = j - folderCmp.begin();
for (FileComparison::const_iterator i = fileCmp.begin(); i != fileCmp.end(); ++i)
{
- //hide filtered row, if corresponding option is set
- if (hideFiltered && !i->selectedForSynchronization)
- continue;
-
//process UI filter settings
if (syncPreviewActive) //synchronization preview
{
//exclude result "=="
- if (i->cmpResult == FILE_EQUAL) //note: consider elementsTotal()!
- {
- --output.objectsTotal;
+ if (i->cmpResult == FILE_EQUAL) //note: consider "objectsTotal"
continue;
- }
+
+ output.objectsTotal++;
+
+ //hide filtered row, if corresponding option is set
+ if (hideFiltered && !i->selectedForSynchronization) //keep AFTER "objectsTotal++"
+ continue;
+
switch (i->direction)
{
@@ -91,6 +89,12 @@ GridView::StatusInfo GridView::update_sub(const bool hideFiltered)
}
else //comparison results view
{
+ output.objectsTotal++;
+
+ //hide filtered row, if corresponding option is set
+ if (hideFiltered && !i->selectedForSynchronization)
+ continue;
+
switch (i->cmpResult)
{
case FILE_LEFT_SIDE_ONLY:
@@ -164,13 +168,13 @@ GridView::StatusInfo GridView::update(const bool hideFiltered, const bool syncPr
}
-void GridView::viewRefToFolderRef(const std::set<int>& viewRef, FolderCompRef& output)
+void GridView::viewRefToFolderRef(const std::set<int>& viewRef, FreeFileSync::FolderCompRef& output)
{
output.clear();
for (int i = 0; i < int(folderCmp.size()); ++i)
output.push_back(std::set<int>()); //avoid copy by value for full set<int>
- for (std::set<int>::iterator i = viewRef.begin(); i != viewRef.end(); ++i)
+ for (std::set<int>::const_iterator i = viewRef.begin(); i != viewRef.end(); ++i)
{
const unsigned int folder = refView[*i].folderIndex;
const unsigned int row = refView[*i].rowIndex;
@@ -261,6 +265,10 @@ void GridView::sortView(const SortType type, const bool onLeft, const bool ascen
if ( ascending) std::sort(fileCmp.begin(), fileCmp.end(), sortByCmpResult<ASCENDING>);
else if (!ascending) std::sort(fileCmp.begin(), fileCmp.end(), sortByCmpResult<DESCENDING>);
break;
+ case SORT_BY_SYNC_DIRECTION:
+ if ( ascending) std::sort(fileCmp.begin(), fileCmp.end(), sortBySyncDirection<ASCENDING>);
+ else if (!ascending) std::sort(fileCmp.begin(), fileCmp.end(), sortBySyncDirection<DESCENDING>);
+ break;
default:
assert(false);
}
diff --git a/ui/gridView.h b/ui/gridView.h
index 2a4d4e29..b531093d 100644
--- a/ui/gridView.h
+++ b/ui/gridView.h
@@ -78,7 +78,8 @@ namespace FreeFileSync
SORT_BY_FILESIZE,
SORT_BY_DATE,
SORT_BY_CMP_RESULT,
- SORT_BY_DIRECTORY
+ SORT_BY_DIRECTORY,
+ SORT_BY_SYNC_DIRECTION
};
void sortView(const SortType type, const bool onLeft, const bool ascending);
diff --git a/ui/guiGenerated.cpp b/ui/guiGenerated.cpp
index 4819f9e6..de21b0f8 100644
--- a/ui/guiGenerated.cpp
+++ b/ui/guiGenerated.cpp
@@ -14,7 +14,7 @@
MainDialogGenerated::MainDialogGenerated( 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 );
+ this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize );
m_menubar1 = new wxMenuBar( 0 );
m_menuFile = new wxMenu();
@@ -49,45 +49,6 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_menuAdvanced = new wxMenu();
m_menuLanguages = new wxMenu();
- m_menuItemGerman = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Deutsch") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemGerman );
-
- m_menuItemEnglish = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("English") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemEnglish );
-
- m_menuItemSpanish = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Español") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemSpanish );
-
- m_menuItemFrench = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Français") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemFrench );
-
- m_menuItemItalian = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Italiano") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemItalian );
-
- m_menuItemHungarian = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Magyar") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemHungarian );
-
- m_menuItemDutch = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Nederlands") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemDutch );
-
- m_menuItemPolish = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Polski") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemPolish );
-
- m_menuItemPortuguese = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Português") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemPortuguese );
-
- m_menuItemPortugueseBrazil = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Português do Brasil") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemPortugueseBrazil );
-
- m_menuItemSlovenian = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("Slovenščina") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemSlovenian );
-
- m_menuItemJapanese = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("日本語") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemJapanese );
-
- m_menuItemChineseSimple = new wxMenuItem( m_menuLanguages, wxID_ANY, wxString( _("简体中文") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuLanguages->Append( m_menuItemChineseSimple );
-
m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages );
m_menuAdvanced->AppendSeparator();
@@ -184,54 +145,35 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
bSizer6->Add( 0, 0, 1, 0, 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 ) );
- 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 );
-
+ wxFlexGridSizer* fgSizer12;
+ fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 );
+ fgSizer12->SetFlexibleDirection( wxBOTH );
+ fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- bSizer56->Add( 0, 4, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- bSizer6->Add( bSizer56, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
+ m_staticTextVariant = new wxStaticText( m_panel71, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextVariant->Wrap( -1 );
+ m_staticTextVariant->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Arial") ) );
+ m_staticTextVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
- bSizer6->Add( 20, 0, 0, 0, 5 );
+ fgSizer12->Add( m_staticTextVariant, 1, wxALIGN_CENTER_HORIZONTAL, 5 );
m_bpButtonSyncConfig = new wxBitmapButton( m_panel71, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,40 ), wxBU_AUTODRAW );
m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
- bSizer6->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
+ fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
- m_buttonStartSync = new wxButtonWithImage( m_panel71, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 );
+ m_buttonStartSync = new wxButtonWithImage( m_panel71, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( -1,40 ), 0 );
m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
m_buttonStartSync->SetToolTip( _("Start synchronization") );
- bSizer6->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizer12->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer6->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizer6->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
@@ -270,17 +212,18 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
bSizer93 = new wxBoxSizer( wxVERTICAL );
- bSizer93->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer93->Add( 0, 3, 0, 0, 5 );
bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonSwitchView = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 44,44 ), wxBU_AUTODRAW );
- bSizerMiddle->Add( m_bpButtonSwitchView, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
- bSizer93->Add( bSizerMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+ m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
+ bSizerMiddle->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
- bSizer93->Add( 0, 0, 0, 0, 5 );
+ bSizer93->Add( bSizerMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_panelTopMiddle->SetSizer( bSizer93 );
m_panelTopMiddle->Layout();
@@ -297,15 +240,19 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
wxBoxSizer* bSizer781;
bSizer781 = new wxBoxSizer( wxVERTICAL );
-
- bSizer781->Add( 0, 3, 0, 0, 5 );
-
m_bpButtonAddPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
- bSizer781->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
+ bSizer781->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 3 );
+
+ m_bpButtonRemoveTopPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonRemoveTopPair->SetToolTip( _("Remove folder pair") );
+
+ m_bpButtonRemoveTopPair->SetToolTip( _("Remove folder pair") );
+
+ bSizer781->Add( m_bpButtonRemoveTopPair, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
bSizer77->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
@@ -320,7 +267,7 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
sbSizer3->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
- bSizer77->Add( sbSizer3, 1, wxRIGHT|wxLEFT, 3 );
+ bSizer77->Add( sbSizer3, 1, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 3 );
bSizer94->Add( bSizer77, 0, wxEXPAND, 5 );
@@ -471,31 +418,66 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
wxBoxSizer* bSizer120;
bSizer120 = new wxBoxSizer( wxVERTICAL );
- wxStaticBoxSizer* sbSizer16;
- sbSizer16 = new wxStaticBoxSizer( new wxStaticBox( m_panel4, wxID_ANY, _("Configuration") ), wxHORIZONTAL );
+ m_notebookBottomLeft = new wxNotebook( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panel30 = new wxPanel( m_notebookBottomLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer139;
+ bSizer139 = new wxBoxSizer( wxHORIZONTAL );
- m_bpButtonSave = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonSave = new wxBitmapButton( m_panel30, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
m_bpButtonSave->SetToolTip( _("Save current configuration to file") );
m_bpButtonSave->SetToolTip( _("Save current configuration to file") );
- sbSizer16->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer139->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_bpButtonLoad = new wxBitmapButton( m_panel4, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonLoad = new wxBitmapButton( m_panel30, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
m_bpButtonLoad->SetToolTip( _("Load configuration from file") );
m_bpButtonLoad->SetToolTip( _("Load configuration from file") );
- sbSizer16->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+ bSizer139->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
wxArrayString m_choiceHistoryChoices;
- m_choiceHistory = new wxChoice( m_panel4, wxID_ANY, wxDefaultPosition, wxSize( 150,-1 ), m_choiceHistoryChoices, 0 );
+ m_choiceHistory = new wxChoice( m_panel30, wxID_ANY, wxDefaultPosition, wxSize( 150,-1 ), m_choiceHistoryChoices, 0 );
m_choiceHistory->SetSelection( 0 );
m_choiceHistory->SetToolTip( _("Load configuration history (press DEL to delete items)") );
- sbSizer16->Add( m_choiceHistory, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer139->Add( m_choiceHistory, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panel30->SetSizer( bSizer139 );
+ m_panel30->Layout();
+ bSizer139->Fit( m_panel30 );
+ m_notebookBottomLeft->AddPage( m_panel30, _("Configuration"), true );
+ m_panelFilter = new wxPanel( m_notebookBottomLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer140;
+ bSizer140 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
+ bSizer140->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ wxBoxSizer* bSizer23;
+ bSizer23 = new wxBoxSizer( wxVERTICAL );
+
+ m_hyperlinkCfgFilter = new wxHyperlinkCtrl( m_panelFilter, wxID_ANY, _("Configure filter..."), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+
+ m_hyperlinkCfgFilter->SetNormalColour( wxColour( 0, 0, 255 ) );
+ m_hyperlinkCfgFilter->SetVisitedColour( wxColour( 0, 0, 255 ) );
+ bSizer23->Add( m_hyperlinkCfgFilter, 0, wxALL, 5 );
+
+ m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide filtered items"), wxDefaultPosition, wxDefaultSize, 0 );
+
+ m_checkBoxHideFilt->SetToolTip( _("Choose to hide filtered files/directories from list") );
- bSizer120->Add( sbSizer16, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer23->Add( m_checkBoxHideFilt, 0, 0, 5 );
+
+ bSizer140->Add( bSizer23, 0, 0, 5 );
+
+ m_panelFilter->SetSizer( bSizer140 );
+ m_panelFilter->Layout();
+ bSizer140->Fit( m_panelFilter );
+ m_notebookBottomLeft->AddPage( m_panelFilter, _("Filter files"), false );
+
+ bSizer120->Add( m_notebookBottomLeft, 0, wxALL, 5 );
bSizer3->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
@@ -550,18 +532,17 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
bSizer64->Fit( m_panel112 );
bSizer3->Add( m_panel112, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
- wxBoxSizer* bSizer66;
- bSizer66 = new wxBoxSizer( wxHORIZONTAL );
+ bSizerBottomRight = new wxBoxSizer( wxHORIZONTAL );
- bSizer66->Add( 0, 0, 1, 0, 5 );
+ bSizerBottomRight->Add( 5, 0, 1, 0, 5 );
m_panelSyncPreview = new wxPanel( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer121;
bSizer121 = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizer161;
- sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( m_panelSyncPreview, wxID_ANY, _("Preview") ), wxHORIZONTAL );
+ sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( m_panelSyncPreview, wxID_ANY, _("Statistics") ), wxHORIZONTAL );
wxFlexGridSizer* fgSizer5;
fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 );
@@ -630,16 +611,16 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_panelSyncPreview->SetSizer( bSizer121 );
m_panelSyncPreview->Layout();
bSizer121->Fit( m_panelSyncPreview );
- bSizer66->Add( m_panelSyncPreview, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerBottomRight->Add( m_panelSyncPreview, 0, wxALIGN_CENTER_VERTICAL, 5 );
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_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
+ bSizerBottomRight->Add( m_bpButton10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
- bSizer3->Add( bSizer66, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+ bSizer3->Add( bSizerBottomRight, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
m_panel4->SetSizer( bSizer3 );
m_panel4->Layout();
@@ -727,19 +708,6 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuSaveConfig ) );
this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLoadConfig ) );
this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
- this->Connect( m_menuItemGerman->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangGerman ) );
- this->Connect( m_menuItemEnglish->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangEnglish ) );
- this->Connect( m_menuItemSpanish->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangSpanish ) );
- this->Connect( m_menuItemFrench->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangFrench ) );
- this->Connect( m_menuItemItalian->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangItalian ) );
- this->Connect( m_menuItemHungarian->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangHungarian ) );
- this->Connect( m_menuItemDutch->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangDutch ) );
- this->Connect( m_menuItemPolish->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangPolish ) );
- this->Connect( m_menuItemPortuguese->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangPortuguese ) );
- this->Connect( m_menuItemPortugueseBrazil->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangPortugueseBrazil ) );
- this->Connect( m_menuItemSlovenian->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangSlovenian ) );
- this->Connect( m_menuItemJapanese->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangJapanese ) );
- this->Connect( m_menuItemChineseSimple->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangChineseSimp ) );
this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) );
this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) );
this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) );
@@ -750,31 +718,33 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const
m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompareByTimeSize ), NULL, this );
m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompareByContent ), NULL, this );
m_bpButton14->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowHelpDialog ), NULL, this );
- m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnFilterButton ), NULL, this );
- m_hyperlinkCfgFilter->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this );
m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this );
m_directoryLeft->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( MainDialogGenerated::OnFolderHistoryKeyEvent ), NULL, this );
m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
- m_bpButtonSwitchView->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ), NULL, this );
+ m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemoveTopPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
m_directoryRight->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( MainDialogGenerated::OnFolderHistoryKeyEvent ), NULL, this );
m_dirPickerRight->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
m_gridLeft->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this );
- m_gridLeft->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMenu ), NULL, this );
+ m_gridLeft->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this );
m_gridLeft->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this );
- m_gridLeft->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextColumnLeft ), NULL, this );
- m_gridMiddle->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMenuMiddle ), NULL, this );
+ m_gridLeft->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this );
+ m_gridMiddle->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this );
m_gridMiddle->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this );
+ m_gridMiddle->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this );
m_gridRight->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this );
- m_gridRight->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMenu ), NULL, this );
+ m_gridRight->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this );
m_gridRight->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this );
- m_gridRight->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextColumnRight ), NULL, this );
+ m_gridRight->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this );
m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this );
m_bpButtonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this );
m_choiceHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
m_choiceHistory->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnFilterButton ), NULL, this );
+ m_hyperlinkCfgFilter->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
+ m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this );
m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this );
m_bpButtonEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this );
@@ -798,19 +768,6 @@ MainDialogGenerated::~MainDialogGenerated()
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuSaveConfig ) );
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLoadConfig ) );
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangGerman ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangEnglish ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangSpanish ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangFrench ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangItalian ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangHungarian ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangDutch ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangPolish ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangPortuguese ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangPortugueseBrazil ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangSlovenian ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangJapanese ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuLangChineseSimp ) );
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) );
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) );
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) );
@@ -821,31 +778,33 @@ MainDialogGenerated::~MainDialogGenerated()
m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompareByTimeSize ), NULL, this );
m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompareByContent ), NULL, this );
m_bpButton14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnShowHelpDialog ), NULL, this );
- m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnFilterButton ), NULL, this );
- m_hyperlinkCfgFilter->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this );
m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this );
m_directoryLeft->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( MainDialogGenerated::OnFolderHistoryKeyEvent ), NULL, this );
m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
- m_bpButtonSwitchView->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ), NULL, this );
+ m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemoveTopPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
m_directoryRight->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( MainDialogGenerated::OnFolderHistoryKeyEvent ), NULL, this );
m_dirPickerRight->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
m_gridLeft->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this );
- m_gridLeft->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMenu ), NULL, this );
+ m_gridLeft->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this );
m_gridLeft->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this );
- m_gridLeft->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextColumnLeft ), NULL, this );
- m_gridMiddle->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMenuMiddle ), NULL, this );
+ m_gridLeft->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this );
+ m_gridMiddle->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this );
m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this );
+ m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this );
m_gridRight->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this );
- m_gridRight->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMenu ), NULL, this );
+ m_gridRight->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this );
m_gridRight->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this );
- m_gridRight->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextColumnRight ), NULL, this );
+ m_gridRight->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this );
m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this );
m_bpButtonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this );
m_choiceHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
m_choiceHistory->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnFilterButton ), NULL, this );
+ m_hyperlinkCfgFilter->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
+ m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this );
m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this );
m_bpButtonEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this );
@@ -1729,7 +1688,7 @@ SyncDlgGenerated::SyncDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
bSizer201->Add( m_checkBoxIgnoreErrors, 0, wxALL, 5 );
- bSizer29->Add( bSizer201, 0, 0, 5 );
+ bSizer29->Add( bSizer201, 0, wxTOP|wxBOTTOM, 5 );
bSizer29->Add( 0, 5, 1, 0, 5 );
@@ -1741,7 +1700,7 @@ SyncDlgGenerated::SyncDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr
m_button6->SetDefault();
m_button6->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
- bSizer291->Add( m_button6, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+ bSizer291->Add( m_button6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
m_button16->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
@@ -2376,156 +2335,33 @@ AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxS
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,140 ) );
- m_scrolledWindow3->SetMaxSize( wxSize( -1,140 ) );
+ m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL );
+ m_scrolledWindowTranslators->SetScrollRate( 5, 5 );
+ m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) );
+ m_scrolledWindowTranslators->SetMinSize( wxSize( -1,140 ) );
+ m_scrolledWindowTranslators->SetMaxSize( wxSize( -1,140 ) );
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxVERTICAL );
+ bSizerTranslators = new wxBoxSizer( wxVERTICAL );
- m_staticText54 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Big thanks for localizing FreeFileSync goes out to:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText54 = new wxStaticText( m_scrolledWindowTranslators, 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 );
-
-
- bSizer72->Add( 0, 5, 0, 0, 5 );
-
- wxFlexGridSizer* fgSizer9;
- fgSizer9 = new wxFlexGridSizer( 1, 3, 5, 20 );
- fgSizer9->SetFlexibleDirection( wxBOTH );
- fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_bitmapFrench = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapFrench, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText68 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Jean-François Hartmann"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText68->Wrap( -1 );
- fgSizer9->Add( m_staticText68, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText69 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Français"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText69->Wrap( -1 );
- fgSizer9->Add( m_staticText69, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapJapanese = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapJapanese, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticText70 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Tilt"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText70->Wrap( -1 );
- fgSizer9->Add( m_staticText70, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText71 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("日本語"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText71->Wrap( -1 );
- fgSizer9->Add( m_staticText71, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapDutch = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapDutch, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText711 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("M.D. Vrakking"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText711->Wrap( -1 );
- fgSizer9->Add( m_staticText711, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText712 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Nederlands"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText712->Wrap( -1 );
- fgSizer9->Add( m_staticText712, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapChineseSimple = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapChineseSimple, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticText91 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Misty Wu"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText91->Wrap( -1 );
- fgSizer9->Add( m_staticText91, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText92 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("简体中文"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText92->Wrap( -1 );
- fgSizer9->Add( m_staticText92, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapPolish = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapPolish, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText911 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Wojtek Pietruszewski"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText911->Wrap( -1 );
- fgSizer9->Add( m_staticText911, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText921 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Polski"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText921->Wrap( -1 );
- fgSizer9->Add( m_staticText921, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapPortuguese = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapPortuguese, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+ bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
- m_staticText9211 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("QuestMark"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText9211->Wrap( -1 );
- fgSizer9->Add( m_staticText9211, 0, wxALIGN_CENTER_VERTICAL, 5 );
- m_staticText9212 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Português"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText9212->Wrap( -1 );
- fgSizer9->Add( m_staticText9212, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerTranslators->Add( 0, 5, 0, 0, 5 );
- m_bitmapItalian = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapItalian, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerTranslators = new wxFlexGridSizer( 1, 3, 5, 20 );
+ fgSizerTranslators->SetFlexibleDirection( wxBOTH );
+ fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticText92121 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Emmo"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText92121->Wrap( -1 );
- fgSizer9->Add( m_staticText92121, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
- m_staticText92122 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Italiano"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText92122->Wrap( -1 );
- fgSizer9->Add( m_staticText92122, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapSlovenian = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapSlovenian, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText921221 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Matej Badalic"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText921221->Wrap( -1 );
- fgSizer9->Add( m_staticText921221, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText921222 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Slovenščina"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText921222->Wrap( -1 );
- fgSizer9->Add( m_staticText921222, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapHungarian = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapHungarian, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText682 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Demon"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText682->Wrap( -1 );
- fgSizer9->Add( m_staticText682, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText681 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Magyar"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText681->Wrap( -1 );
- fgSizer9->Add( m_staticText681, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapSpanish = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapSpanish, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticText683 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("David Rodríguez"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText683->Wrap( -1 );
- fgSizer9->Add( m_staticText683, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText691 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Español"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText691->Wrap( -1 );
- fgSizer9->Add( m_staticText691, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapPortugueseBrazil = new wxStaticBitmap( m_scrolledWindow3, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,11 ), 0 );
- fgSizer9->Add( m_bitmapPortugueseBrazil, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText684 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Edison Aranha"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText684->Wrap( -1 );
- fgSizer9->Add( m_staticText684, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText685 = new wxStaticText( m_scrolledWindow3, wxID_ANY, _("Português do Brasil"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText685->Wrap( -1 );
- fgSizer9->Add( m_staticText685, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer72->Add( fgSizer9, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_scrolledWindow3->SetSizer( bSizer72 );
- m_scrolledWindow3->Layout();
- bSizer72->Fit( m_scrolledWindow3 );
- bSizer53->Add( m_scrolledWindow3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+ m_scrolledWindowTranslators->SetSizer( bSizerTranslators );
+ m_scrolledWindowTranslators->Layout();
+ bSizerTranslators->Fit( m_scrolledWindowTranslators );
+ bSizer53->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 25 );
@@ -2741,7 +2577,7 @@ WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const
bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
- m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this warning again"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
@@ -2965,7 +2801,7 @@ FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const w
wxBoxSizer* bSizer72;
bSizer72 = new wxBoxSizer( wxVERTICAL );
- m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Synchronization filter"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Filter files"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText56->Wrap( -1 );
m_staticText56->SetFont( wxFont( 16, 74, 90, 92, false, wxT("Tahoma") ) );
@@ -3407,3 +3243,137 @@ GlobalSettingsDlgGenerated::~GlobalSettingsDlgGenerated()
m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
}
+
+SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( 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* bSizer134;
+ bSizer134 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer28;
+ sbSizer28 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Variant") ), wxVERTICAL );
+
+ m_staticTextVariant = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextVariant->Wrap( -1 );
+ m_staticTextVariant->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Arial Black") ) );
+
+ sbSizer28->Add( m_staticTextVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer134->Add( sbSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer141;
+ bSizer141 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonStartSync = new wxButtonWithImage( this, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 );
+ m_buttonStartSync->SetDefault();
+ m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) );
+ m_buttonStartSync->SetToolTip( _("Start synchronization") );
+
+ bSizer141->Add( m_buttonStartSync, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer141->Add( m_staticline14, 0, wxEXPAND|wxRIGHT, 5 );
+
+
+ bSizer141->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer161;
+ sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxHORIZONTAL );
+
+ wxFlexGridSizer* fgSizer5;
+ fgSizer5 = new wxFlexGridSizer( 4, 2, 0, 5 );
+ fgSizer5->SetFlexibleDirection( wxHORIZONTAL );
+ fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_bitmapCreate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") );
+
+ fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 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_bitmapDelete = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") );
+
+ fgSizer5->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|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 );
+
+ m_bitmapUpdate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 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") );
+
+ fgSizer5->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") );
+
+ fgSizer5->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 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") );
+
+ fgSizer5->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizer161->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ bSizer134->Add( bSizer141, 0, wxEXPAND, 5 );
+
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline12, 0, wxEXPAND|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer142;
+ bSizer142 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
+
+ bSizer142->Add( m_checkBoxDontShowAgain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer142->Add( 10, 0, 1, 0, 5 );
+
+ m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button16->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
+
+ bSizer142->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer134->Add( bSizer142, 0, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer134 );
+ this->Layout();
+ bSizer134->Fit( this );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) );
+ m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this );
+ m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this );
+}
+
+SyncPreviewDlgGenerated::~SyncPreviewDlgGenerated()
+{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) );
+ m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this );
+ m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this );
+}
diff --git a/ui/guiGenerated.h b/ui/guiGenerated.h
index 37d41205..5230128b 100644
--- a/ui/guiGenerated.h
+++ b/ui/guiGenerated.h
@@ -29,8 +29,7 @@ class wxButtonWithImage;
#include <wx/radiobut.h>
#include <wx/bmpbuttn.h>
#include <wx/statbox.h>
-#include <wx/hyperlink.h>
-#include <wx/checkbox.h>
+#include <wx/stattext.h>
#include <wx/panel.h>
#include <wx/combobox.h>
#include <wx/filepicker.h>
@@ -38,11 +37,12 @@ class wxButtonWithImage;
#include <wx/scrolwin.h>
#include <wx/grid.h>
#include <wx/choice.h>
+#include <wx/hyperlink.h>
+#include <wx/checkbox.h>
+#include <wx/notebook.h>
#include <wx/textctrl.h>
-#include <wx/stattext.h>
#include <wx/statline.h>
#include <wx/frame.h>
-#include <wx/notebook.h>
#include <wx/dialog.h>
#include <wx/gauge.h>
#include <wx/animate.h>
@@ -68,19 +68,6 @@ class MainDialogGenerated : public wxFrame
wxMenuItem* m_menuItemSwitchView;
wxMenu* m_menuAdvanced;
wxMenu* m_menuLanguages;
- wxMenuItem* m_menuItemGerman;
- wxMenuItem* m_menuItemEnglish;
- wxMenuItem* m_menuItemSpanish;
- wxMenuItem* m_menuItemFrench;
- wxMenuItem* m_menuItemItalian;
- wxMenuItem* m_menuItemHungarian;
- wxMenuItem* m_menuItemDutch;
- wxMenuItem* m_menuItemPolish;
- wxMenuItem* m_menuItemPortuguese;
- wxMenuItem* m_menuItemPortugueseBrazil;
- wxMenuItem* m_menuItemSlovenian;
- wxMenuItem* m_menuItemJapanese;
- wxMenuItem* m_menuItemChineseSimple;
wxMenuItem* m_menuItemGlobSett;
wxMenuItem* m_menuItem7;
wxMenu* m_menuHelp;
@@ -96,11 +83,8 @@ class MainDialogGenerated : public wxFrame
wxBitmapButton* m_bpButton14;
- wxBitmapButton* m_bpButtonFilter;
- wxHyperlinkCtrl* m_hyperlinkCfgFilter;
- wxCheckBox* m_checkBoxHideFilt;
-
+ wxStaticText* m_staticTextVariant;
wxBitmapButton* m_bpButtonSyncConfig;
wxButtonWithImage* m_buttonStartSync;
@@ -111,11 +95,10 @@ class MainDialogGenerated : public wxFrame
wxPanel* m_panelTopMiddle;
wxBoxSizer* bSizerMiddle;
- wxBitmapButton* m_bpButtonSwitchView;
-
+ wxBitmapButton* m_bpButtonSwapSides;
wxPanel* m_panelTopRight;
-
wxBitmapButton* m_bpButtonAddPair;
+ wxBitmapButton* m_bpButtonRemoveTopPair;
wxComboBox* m_directoryRight;
wxDirPickerCtrl* m_dirPickerRight;
wxBoxSizer* bSizer106;
@@ -129,9 +112,15 @@ class MainDialogGenerated : public wxFrame
wxPanel* m_panelRight;
CustomGridRight* m_gridRight;
wxBoxSizer* bSizer3;
+ wxNotebook* m_notebookBottomLeft;
+ wxPanel* m_panel30;
wxBitmapButton* m_bpButtonSave;
wxBitmapButton* m_bpButtonLoad;
wxChoice* m_choiceHistory;
+ wxPanel* m_panelFilter;
+ wxBitmapButton* m_bpButtonFilter;
+ wxHyperlinkCtrl* m_hyperlinkCfgFilter;
+ wxCheckBox* m_checkBoxHideFilt;
wxPanel* m_panel112;
wxBitmapButton* m_bpButtonLeftOnly;
@@ -145,6 +134,7 @@ class MainDialogGenerated : public wxFrame
wxBitmapButton* m_bpButtonSyncDirRight;
wxBitmapButton* m_bpButtonConflict;
+ wxBoxSizer* bSizerBottomRight;
wxPanel* m_panelSyncPreview;
wxStaticBitmap* m_bitmapCreate;
@@ -178,19 +168,6 @@ class MainDialogGenerated : public wxFrame
virtual void OnMenuSaveConfig( wxCommandEvent& event ){ event.Skip(); }
virtual void OnMenuLoadConfig( wxCommandEvent& event ){ event.Skip(); }
virtual void OnMenuQuit( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangGerman( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangEnglish( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangSpanish( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangFrench( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangItalian( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangHungarian( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangDutch( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangPolish( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangPortuguese( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangPortugueseBrazil( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangSlovenian( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangJapanese( wxCommandEvent& event ){ event.Skip(); }
- virtual void OnMenuLangChineseSimp( wxCommandEvent& event ){ event.Skip(); }
virtual void OnMenuGlobalSettings( wxCommandEvent& event ){ event.Skip(); }
virtual void OnMenuBatchJob( wxCommandEvent& event ){ event.Skip(); }
virtual void OnMenuExportFileList( wxCommandEvent& event ){ event.Skip(); }
@@ -200,26 +177,29 @@ class MainDialogGenerated : public wxFrame
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 OnSyncSettings( wxCommandEvent& event ){ event.Skip(); }
virtual void OnFolderHistoryKeyEvent( wxKeyEvent& event ){ event.Skip(); }
virtual void OnDirSelected( wxFileDirPickerEvent& event ){ event.Skip(); }
+ virtual void OnSwapSides( wxCommandEvent& event ){ event.Skip(); }
virtual void OnAddFolderPair( wxCommandEvent& event ){ event.Skip(); }
+ virtual void OnRemoveTopFolderPair( wxCommandEvent& event ){ event.Skip(); }
virtual void OnLeftGridDoubleClick( wxGridEvent& event ){ event.Skip(); }
- virtual void OnContextMenu( wxGridEvent& event ){ event.Skip(); }
+ virtual void OnContextRim( wxGridEvent& event ){ event.Skip(); }
virtual void OnSortLeftGrid( wxGridEvent& event ){ event.Skip(); }
- virtual void OnContextColumnLeft( wxGridEvent& event ){ event.Skip(); }
- virtual void OnContextMenuMiddle( wxGridEvent& event ){ event.Skip(); }
+ virtual void OnContextRimLabelLeft( wxGridEvent& event ){ event.Skip(); }
+ virtual void OnContextMiddle( wxGridEvent& event ){ event.Skip(); }
virtual void OnSortMiddleGrid( wxGridEvent& event ){ event.Skip(); }
+ virtual void OnContextMiddleLabel( wxGridEvent& event ){ event.Skip(); }
virtual void OnRightGridDoubleClick( wxGridEvent& event ){ event.Skip(); }
virtual void OnSortRightGrid( wxGridEvent& event ){ event.Skip(); }
- virtual void OnContextColumnRight( wxGridEvent& event ){ event.Skip(); }
+ virtual void OnContextRimLabelRight( wxGridEvent& event ){ event.Skip(); }
virtual void OnSaveConfig( wxCommandEvent& event ){ event.Skip(); }
virtual void OnLoadConfig( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ){ event.Skip(); }
virtual void OnLoadFromHistory( 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 OnLeftOnlyFiles( wxCommandEvent& event ){ event.Skip(); }
virtual void OnLeftNewerFiles( wxCommandEvent& event ){ event.Skip(); }
virtual void OnEqualFiles( wxCommandEvent& event ){ event.Skip(); }
@@ -612,42 +592,11 @@ class AboutDlgGenerated : public wxDialog
wxStaticText* m_staticText72;
wxStaticText* m_staticText73;
wxStaticText* m_staticText74;
- wxScrolledWindow* m_scrolledWindow3;
+ wxScrolledWindow* m_scrolledWindowTranslators;
+ wxBoxSizer* bSizerTranslators;
wxStaticText* m_staticText54;
- wxStaticBitmap* m_bitmapFrench;
- wxStaticText* m_staticText68;
- wxStaticText* m_staticText69;
- wxStaticBitmap* m_bitmapJapanese;
- wxStaticText* m_staticText70;
- wxStaticText* m_staticText71;
- wxStaticBitmap* m_bitmapDutch;
- wxStaticText* m_staticText711;
- wxStaticText* m_staticText712;
- wxStaticBitmap* m_bitmapChineseSimple;
- wxStaticText* m_staticText91;
- wxStaticText* m_staticText92;
- wxStaticBitmap* m_bitmapPolish;
- wxStaticText* m_staticText911;
- wxStaticText* m_staticText921;
- wxStaticBitmap* m_bitmapPortuguese;
- wxStaticText* m_staticText9211;
- wxStaticText* m_staticText9212;
- wxStaticBitmap* m_bitmapItalian;
- wxStaticText* m_staticText92121;
- wxStaticText* m_staticText92122;
- wxStaticBitmap* m_bitmapSlovenian;
- wxStaticText* m_staticText921221;
- wxStaticText* m_staticText921222;
- wxStaticBitmap* m_bitmapHungarian;
- wxStaticText* m_staticText682;
- wxStaticText* m_staticText681;
- wxStaticBitmap* m_bitmapSpanish;
- wxStaticText* m_staticText683;
- wxStaticText* m_staticText691;
- wxStaticBitmap* m_bitmapPortugueseBrazil;
- wxStaticText* m_staticText684;
- wxStaticText* m_staticText685;
+ wxFlexGridSizer* fgSizerTranslators;
wxStaticLine* m_staticline3;
wxPanel* m_panel22;
wxStaticText* m_staticText131;
@@ -929,4 +878,41 @@ class GlobalSettingsDlgGenerated : public wxDialog
};
+///////////////////////////////////////////////////////////////////////////////
+/// Class SyncPreviewDlgGenerated
+///////////////////////////////////////////////////////////////////////////////
+class SyncPreviewDlgGenerated : public wxDialog
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticTextVariant;
+ wxButtonWithImage* m_buttonStartSync;
+ wxStaticLine* m_staticline14;
+
+ wxStaticBitmap* m_bitmapCreate;
+ wxTextCtrl* m_textCtrlCreate;
+ wxStaticBitmap* m_bitmapDelete;
+ wxTextCtrl* m_textCtrlDelete;
+ wxStaticBitmap* m_bitmapUpdate;
+ wxTextCtrl* m_textCtrlUpdate;
+ wxStaticBitmap* m_bitmapData;
+ wxTextCtrl* m_textCtrlData;
+ wxStaticLine* m_staticline12;
+ wxCheckBox* m_checkBoxDontShowAgain;
+
+ wxButton* m_button16;
+
+ // 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 OnCancel( wxCommandEvent& event ){ event.Skip(); }
+
+
+ public:
+ SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~SyncPreviewDlgGenerated();
+
+};
+
#endif //__guiGenerated__
diff --git a/ui/guiStatusHandler.cpp b/ui/guiStatusHandler.cpp
index c2f27fac..51714ed8 100644
--- a/ui/guiStatusHandler.cpp
+++ b/ui/guiStatusHandler.cpp
@@ -12,6 +12,7 @@ CompareStatusHandler::CompareStatusHandler(MainDialog* dlg) :
{
//prevent user input during "compare", do not disable maindialog since abort-button would also be disabled
//it's not nice, but works
+ mainDialog->m_notebookBottomLeft->Disable();
mainDialog->m_radioBtnSizeDate->Disable();
mainDialog->m_radioBtnContent->Disable();
mainDialog->m_bpButtonFilter->Disable();
@@ -21,7 +22,7 @@ CompareStatusHandler::CompareStatusHandler(MainDialog* dlg) :
mainDialog->m_buttonStartSync->Disable();
mainDialog->m_dirPickerLeft->Disable();
mainDialog->m_dirPickerRight->Disable();
- mainDialog->m_bpButtonSwitchView->Disable();
+ mainDialog->m_bpButtonSwapSides->Disable();
mainDialog->m_bpButtonLeftOnly->Disable();
mainDialog->m_bpButtonLeftNewer->Disable();
mainDialog->m_bpButtonEqual->Disable();
@@ -66,6 +67,7 @@ CompareStatusHandler::~CompareStatusHandler()
updateUiNow(); //ui update before enabling buttons again: prevent strange behaviour of delayed button clicks
//reenable complete main dialog
+ mainDialog->m_notebookBottomLeft->Enable();
mainDialog->m_radioBtnSizeDate->Enable();
mainDialog->m_radioBtnContent->Enable();
mainDialog->m_bpButtonFilter->Enable();
@@ -75,7 +77,7 @@ CompareStatusHandler::~CompareStatusHandler()
mainDialog->m_buttonStartSync->Enable();
mainDialog->m_dirPickerLeft->Enable();
mainDialog->m_dirPickerRight->Enable();
- mainDialog->m_bpButtonSwitchView->Enable();
+ mainDialog->m_bpButtonSwapSides->Enable();
mainDialog->m_bpButtonLeftOnly->Enable();
mainDialog->m_bpButtonLeftNewer->Enable();
mainDialog->m_bpButtonEqual->Enable();
diff --git a/ui/sorting.h b/ui/sorting.h
index f7879a8b..2716eceb 100644
--- a/ui/sorting.h
+++ b/ui/sorting.h
@@ -89,11 +89,11 @@ namespace FreeFileSync
const wxChar* stringA = descrLineA->relativeName.c_str();
const wxChar* stringB = descrLineB->relativeName.c_str();
- size_t pos = descrLineA->relativeName.findFromEnd(GlobalResources::FILE_NAME_SEPARATOR); //start search beginning from end
+ size_t pos = descrLineA->relativeName.findFromEnd(FreeFileSync::FILE_NAME_SEPARATOR); //start search beginning from end
if (pos != std::string::npos)
stringA += pos + 1;
- pos = descrLineB->relativeName.findFromEnd(GlobalResources::FILE_NAME_SEPARATOR); //start search beginning from end
+ pos = descrLineB->relativeName.findFromEnd(FreeFileSync::FILE_NAME_SEPARATOR); //start search beginning from end
if (pos != std::string::npos)
stringB += pos + 1;
@@ -119,7 +119,7 @@ namespace FreeFileSync
relLengthA = descrLineA->relativeName.length();
else if (descrLineA->objType == FileDescrLine::TYPE_FILE)
{
- relLengthA = descrLineA->relativeName.findFromEnd(GlobalResources::FILE_NAME_SEPARATOR); //start search beginning from end
+ relLengthA = descrLineA->relativeName.findFromEnd(FreeFileSync::FILE_NAME_SEPARATOR); //start search beginning from end
if (relLengthA == wxNOT_FOUND)
{
relLengthA = 0;
@@ -144,7 +144,7 @@ namespace FreeFileSync
relLengthB = descrLineB->relativeName.length();
else if (descrLineB->objType == FileDescrLine::TYPE_FILE)
{
- relLengthB = descrLineB->relativeName.findFromEnd(GlobalResources::FILE_NAME_SEPARATOR); //start search beginning from end
+ relLengthB = descrLineB->relativeName.findFromEnd(FreeFileSync::FILE_NAME_SEPARATOR); //start search beginning from end
if (relLengthB == wxNOT_FOUND)
{
relLengthB = 0;
@@ -283,6 +283,16 @@ namespace FreeFileSync
}
+ template <SortDirection sortAscending>
+ inline
+ bool sortBySyncDirection(const FileCompareLine& a, const FileCompareLine& b)
+ {
+ return sortAscending == ASCENDING ?
+ a.direction < b.direction :
+ a.direction > b.direction;
+ }
+
+
template <SortDirection sortAscending, SideToSort side>
inline
bool sortByDirectory(const FolderCompareLine& a, const FolderCompareLine& b)
bgstack15