summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/Taskbar_Seven/dll_main.cpp2
-rw-r--r--ui/Taskbar_Seven/taskbar.cpp2
-rw-r--r--ui/Taskbar_Seven/taskbar.h2
-rw-r--r--ui/batch_config.cpp93
-rw-r--r--ui/batch_config.h2
-rw-r--r--ui/batch_status_handler.cpp7
-rw-r--r--ui/batch_status_handler.h2
-rw-r--r--ui/check_version.cpp2
-rw-r--r--ui/check_version.h2
-rw-r--r--ui/column_attr.h120
-rw-r--r--ui/custom_grid.cpp1414
-rw-r--r--ui/custom_grid.h83
-rw-r--r--ui/dir_name.cpp51
-rw-r--r--ui/dir_name.h17
-rw-r--r--ui/exec_finished_box.cpp2
-rw-r--r--ui/exec_finished_box.h2
-rw-r--r--ui/folder_history_box.cpp2
-rw-r--r--ui/folder_history_box.h2
-rw-r--r--ui/folder_pair.h64
-rw-r--r--ui/grid_view.cpp387
-rw-r--r--ui/grid_view.h103
-rw-r--r--ui/gui_generated.cpp7339
-rw-r--r--ui/gui_generated.h1690
-rw-r--r--ui/gui_status_handler.cpp4
-rw-r--r--ui/gui_status_handler.h2
-rw-r--r--ui/main_dlg.cpp2561
-rw-r--r--ui/main_dlg.h157
-rw-r--r--ui/msg_popup.cpp2
-rw-r--r--ui/msg_popup.h2
-rw-r--r--ui/progress_indicator.cpp17
-rw-r--r--ui/progress_indicator.h2
-rw-r--r--ui/search.cpp220
-rw-r--r--ui/search.h10
-rw-r--r--ui/small_dlgs.cpp178
-rw-r--r--ui/small_dlgs.h4
-rw-r--r--ui/sorting.h48
-rw-r--r--ui/switch_to_gui.h2
-rw-r--r--ui/sync_cfg.cpp51
-rw-r--r--ui/sync_cfg.h2
-rw-r--r--ui/taskbar.cpp2
-rw-r--r--ui/taskbar.h2
-rw-r--r--ui/tray_icon.cpp2
-rw-r--r--ui/tray_icon.h2
-rw-r--r--ui/tree_view.cpp1176
-rw-r--r--ui/tree_view.h176
-rw-r--r--ui/wx_form_build_hide_warnings.h2
46 files changed, 9033 insertions, 6981 deletions
diff --git a/ui/Taskbar_Seven/dll_main.cpp b/ui/Taskbar_Seven/dll_main.cpp
index 3805c99d..46c65311 100644
--- a/ui/Taskbar_Seven/dll_main.cpp
+++ b/ui/Taskbar_Seven/dll_main.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
diff --git a/ui/Taskbar_Seven/taskbar.cpp b/ui/Taskbar_Seven/taskbar.cpp
index 1c5e32bf..be662242 100644
--- a/ui/Taskbar_Seven/taskbar.cpp
+++ b/ui/Taskbar_Seven/taskbar.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "taskbar.h"
diff --git a/ui/Taskbar_Seven/taskbar.h b/ui/Taskbar_Seven/taskbar.h
index 082f463f..6a46aad3 100644
--- a/ui/Taskbar_Seven/taskbar.h
+++ b/ui/Taskbar_Seven/taskbar.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef TASKBAR_SEVEN_DLL_H
diff --git a/ui/batch_config.cpp b/ui/batch_config.cpp
index dd63684c..dac14637 100644
--- a/ui/batch_config.cpp
+++ b/ui/batch_config.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "batch_config.h"
@@ -9,6 +9,7 @@
#include "folder_pair.h"
#include <iterator>
#include <wx/wupdlock.h>
+#include <wx+/context_menu.h>
#include "../lib/help_provider.h"
#include <zen/file_handling.h>
#include "msg_popup.h"
@@ -44,11 +45,11 @@ private:
virtual void OnCmpSettings( wxCommandEvent& event);
virtual void OnSyncSettings( wxCommandEvent& event);
virtual void OnConfigureFilter( wxCommandEvent& event);
-
virtual void OnHelp( wxCommandEvent& event);
- void OnGlobalFilterOpenContext(wxCommandEvent& event);
- void OnGlobalFilterRemConfirm(wxCommandEvent& event);
+ void OnCompSettingsContext(wxCommandEvent& event);
+ void OnSyncSettingsContext(wxCommandEvent& event);
+ void OnGlobalFilterContext(wxCommandEvent& event);
virtual void OnCheckSaveLog( wxCommandEvent& event);
virtual void OnChangeMaxLogCountTxt(wxCommandEvent& event);
virtual void OnClose( wxCloseEvent& event);
@@ -58,7 +59,7 @@ private:
virtual void OnAddFolderPair( wxCommandEvent& event);
virtual void OnRemoveFolderPair( wxCommandEvent& event);
virtual void OnRemoveTopFolderPair(wxCommandEvent& event);
- void OnFilesDropped(FFSFileDropEvent& event);
+ void OnFilesDropped(FileDropEvent& event);
void addFolderPair(const std::vector<zen::FolderPairEnh>& newPairs, bool addFront = false);
void removeAddFolderPair(const int pos);
@@ -88,8 +89,6 @@ private:
xmlAccess::XmlBatchConfig localBatchCfg;
- std::unique_ptr<wxMenu> contextMenu;
-
std::unique_ptr<DirectoryName<FolderHistoryBox>> logfileDir;
zen::EnumDescrList<xmlAccess::OnError> enumDescrMap;
@@ -146,16 +145,16 @@ private:
batchDlg.updateGui();
}
- virtual void OnAltCompCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeAltCompCfg()
{
- FolderPairPanelBasic<GuiPanel>::OnAltCompCfgRemoveConfirm(event);
+ FolderPairPanelBasic<GuiPanel>::removeAltCompCfg();
batchDlg.updateGui();
}
- virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeAltSyncCfg()
{
- FolderPairPanelBasic<GuiPanel>::OnAltSyncCfgRemoveConfirm(event);
+ FolderPairPanelBasic<GuiPanel>::removeAltSyncCfg();
batchDlg.updateGui();
}
@@ -268,11 +267,13 @@ BatchDialog::BatchDialog(wxWindow* window,
//init handling of first folder pair
firstFolderPair.reset(new DirectoryPairBatchFirst(*this));
- m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnGlobalFilterOpenContext), NULL, this);
+ m_bpButtonCmpConfig ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnCompSettingsContext), NULL, this);
+ m_bpButtonSyncConfig->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnSyncSettingsContext), NULL, this);
+ m_bpButtonFilter ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnGlobalFilterContext), NULL, this);
//prepare drag & drop for loading of *.ffs_batch files
setupFileDrop(*this);
- Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(BatchDialog::OnFilesDropped), NULL, this);
+ Connect(EVENT_DROP_FILE, FileDropEventHandler(BatchDialog::OnFilesDropped), NULL, this);
logfileDir.reset(new DirectoryName<FolderHistoryBox>(*m_panelBatchSettings, *m_dirPickerLogfileDir, *m_comboBoxLogfileDir));
@@ -383,25 +384,59 @@ void BatchDialog::updateGui() //re-evaluate gui after config changes
}
-void BatchDialog::OnGlobalFilterOpenContext(wxCommandEvent& event)
+void BatchDialog::OnCompSettingsContext(wxCommandEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
+ ContextMenu menu;
+
+ auto setVariant = [&](CompareVariant var)
+ {
+ localBatchCfg.mainCfg.cmpConfig.compareVar = var;
+ updateGui();
+ };
- wxMenuItem* itemClear = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Clear filter settings"));
- contextMenu->Append(itemClear);
- contextMenu->Connect(itemClear->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(BatchDialog::OnGlobalFilterRemConfirm), NULL, this);
+ auto currentVar = localBatchCfg.mainCfg.cmpConfig.compareVar;
- if (isNullFilter(localBatchCfg.mainCfg.globalFilter))
- contextMenu->Enable(itemClear->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway
+ menu.addRadio(_("File time and size"), [&] { setVariant(CMP_BY_TIME_SIZE); }, currentVar == CMP_BY_TIME_SIZE);
+ menu.addRadio(_("File content" ), [&] { setVariant(CMP_BY_CONTENT); }, currentVar == CMP_BY_CONTENT);
- PopupMenu(contextMenu.get()); //show context menu
+ menu.popup(*this);
}
-void BatchDialog::OnGlobalFilterRemConfirm(wxCommandEvent& event)
+void BatchDialog::OnSyncSettingsContext(wxCommandEvent& event)
{
- localBatchCfg.mainCfg.globalFilter = FilterConfig();
- updateGui();
+
+ ContextMenu menu;
+
+ auto setVariant = [&](DirectionConfig::Variant var)
+ {
+ localBatchCfg.mainCfg.syncCfg.directionCfg.var = var;
+ updateGui();
+ };
+
+ const auto currentVar = localBatchCfg.mainCfg.syncCfg.directionCfg.var;
+
+ menu.addRadio(_("<Automatic>"), [&] { setVariant(DirectionConfig::AUTOMATIC); }, currentVar == DirectionConfig::AUTOMATIC);
+ menu.addRadio(_("Mirror ->>") , [&] { setVariant(DirectionConfig::MIRROR); }, currentVar == DirectionConfig::MIRROR);
+ menu.addRadio(_("Update ->") , [&] { setVariant(DirectionConfig::UPDATE); }, currentVar == DirectionConfig::UPDATE);
+ menu.addRadio(_("Custom") , [&] { setVariant(DirectionConfig::CUSTOM); }, currentVar == DirectionConfig::CUSTOM);
+
+ menu.popup(*this);
+}
+
+
+void BatchDialog::OnGlobalFilterContext(wxCommandEvent& event)
+{
+ ContextMenu menu;
+
+ auto clearFilter = [&]
+ {
+ localBatchCfg.mainCfg.globalFilter = FilterConfig();
+ updateGui();
+ };
+ menu.addItem( _("Clear filter settings"), clearFilter, NULL, !isNullFilter(localBatchCfg.mainCfg.globalFilter));
+
+ menu.popup(*this);
}
@@ -420,7 +455,7 @@ void BatchDialog::OnChangeMaxLogCountTxt(wxCommandEvent& event)
}
-void BatchDialog::OnFilesDropped(FFSFileDropEvent& event)
+void BatchDialog::OnFilesDropped(FileDropEvent& event)
{
if (event.getFiles().empty())
return;
@@ -720,7 +755,7 @@ void BatchDialog::OnRemoveFolderPair(wxCommandEvent& event)
void BatchDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
{
- if (additionalFolderPairs.size() > 0)
+ if (!additionalFolderPairs.empty())
{
//get settings from second folder pair
const FolderPairEnh cfgSecond = getEnhancedPair(additionalFolderPairs[0]);
@@ -740,13 +775,13 @@ void BatchDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
void BatchDialog::updateGuiForFolderPair()
{
//adapt delete top folder pair button
- if (additionalFolderPairs.size() == 0)
+ if (additionalFolderPairs.empty())
m_bpButtonRemovePair->Hide();
else
m_bpButtonRemovePair->Show();
//adapt local filter and sync cfg for first folder pair
- if (additionalFolderPairs.size() == 0 &&
+ if (additionalFolderPairs.empty() &&
firstFolderPair->getAltCompConfig().get() == NULL &&
firstFolderPair->getAltSyncConfig().get() == NULL &&
isNullFilter(firstFolderPair->getAltFilterConfig()))
@@ -766,7 +801,7 @@ void BatchDialog::updateGuiForFolderPair()
const int maxAddFolderPairsVisible = 2;
int pairHeight = sbSizerMainPair->GetSize().GetHeight(); //respect height of main pair
- if (additionalFolderPairs.size() > 0)
+ if (!additionalFolderPairs.empty())
pairHeight += std::min<double>(maxAddFolderPairsVisible + 0.5, additionalFolderPairs.size()) * //have 0.5 * height indicate that more folders are there
additionalFolderPairs[0]->GetSize().GetHeight();
diff --git a/ui/batch_config.h b/ui/batch_config.h
index 5a1c177a..5d47f64d 100644
--- a/ui/batch_config.h
+++ b/ui/batch_config.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef BATCHCONFIG_H_INCLUDED
diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp
index 02dfcb75..6308842f 100644
--- a/ui/batch_status_handler.cpp
+++ b/ui/batch_status_handler.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "batch_status_handler.h"
@@ -190,7 +190,7 @@ BatchStatusHandler::~BatchStatusHandler()
{
returnValue = -4;
finalStatus = _("Synchronization aborted!");
- errorLog.logMsg(finalStatus, TYPE_ERROR);
+ errorLog.logMsg(finalStatus, TYPE_FATAL_ERROR);
}
else if (totalErrors > 0)
{
@@ -206,7 +206,10 @@ BatchStatusHandler::~BatchStatusHandler()
//print the results list: logfile
if (logFile.get())
+ {
logFile->writeLog(errorLog, finalStatus);
+ logFile.reset(); //close file now: user may do something with it in "on completion"
+ }
//decide whether to stay on status screen or exit immediately...
if (switchToGuiRequested) //-> avoid recursive yield() calls, thous switch not before ending batch mode
diff --git a/ui/batch_status_handler.h b/ui/batch_status_handler.h
index 719e44a9..d5a18322 100644
--- a/ui/batch_status_handler.h
+++ b/ui/batch_status_handler.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef BATCHSTATUSHANDLER_H_INCLUDED
diff --git a/ui/check_version.cpp b/ui/check_version.cpp
index 4cf2a53a..61af5b48 100644
--- a/ui/check_version.cpp
+++ b/ui/check_version.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "check_version.h"
diff --git a/ui/check_version.h b/ui/check_version.h
index c1331f7f..bbf8d7cb 100644
--- a/ui/check_version.h
+++ b/ui/check_version.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef UPDATEVERSION_H_INCLUDED
diff --git a/ui/column_attr.h b/ui/column_attr.h
new file mode 100644
index 00000000..275c9dd7
--- /dev/null
+++ b/ui/column_attr.h
@@ -0,0 +1,120 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef COL_ATTR_HEADER_189467891346732143214
+#define COL_ATTR_HEADER_189467891346732143214
+
+#include <stddef.h> //size_t
+#include <vector>
+
+namespace zen
+{
+enum ColumnTypeRim
+{
+ COL_TYPE_DIRECTORY,
+ COL_TYPE_FULL_PATH,
+ COL_TYPE_REL_PATH,
+ COL_TYPE_FILENAME,
+ COL_TYPE_SIZE,
+ COL_TYPE_DATE,
+ COL_TYPE_EXTENSION
+};
+
+struct ColumnAttributeRim
+{
+ ColumnAttributeRim() : type_(COL_TYPE_DIRECTORY), width_(0), visible_(false) {}
+ ColumnAttributeRim(ColumnTypeRim type, int width, bool visible) : type_(type), width_(width), visible_(visible) {}
+
+ ColumnTypeRim type_;
+ int width_; //negative value stretches proportionally!
+ bool visible_;
+};
+
+
+namespace
+{
+std::vector<ColumnAttributeRim> getDefaultColumnAttributesLeft()
+{
+ std::vector<ColumnAttributeRim> attr;
+ attr.push_back(ColumnAttributeRim(COL_TYPE_FULL_PATH, 250, false));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_DIRECTORY, 200, false));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_REL_PATH, 200, true));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_FILENAME, 150, true));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_SIZE, 80, true));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_DATE, 112, false));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_EXTENSION, 60, false));
+ return attr;
+}
+
+std::vector<ColumnAttributeRim> getDefaultColumnAttributesRight()
+{
+ std::vector<ColumnAttributeRim> attr;
+ attr.push_back(ColumnAttributeRim(COL_TYPE_FULL_PATH, 250, false));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_DIRECTORY, 200, false));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_REL_PATH, 200, false)); //already shown on left side
+ attr.push_back(ColumnAttributeRim(COL_TYPE_FILENAME, 150, true));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_SIZE, 80, true));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_DATE, 112, false));
+ attr.push_back(ColumnAttributeRim(COL_TYPE_EXTENSION, 60, false));
+ return attr;
+}
+}
+
+//------------------------------------------------------------------
+
+enum ColumnTypeMiddle
+{
+ COL_TYPE_MIDDLE_VALUE,
+ COL_TYPE_BORDER
+};
+
+
+//------------------------------------------------------------------
+
+enum ColumnTypeNavi
+{
+ COL_TYPE_NAVI_BYTES,
+ COL_TYPE_NAVI_DIRECTORY
+};
+
+
+struct ColumnAttributeNavi
+{
+ ColumnAttributeNavi() : type_(COL_TYPE_NAVI_DIRECTORY), width_(0), visible_(false) {}
+ ColumnAttributeNavi(ColumnTypeNavi type, int width, bool visible) : type_(type), width_(width), visible_(visible) {}
+
+ ColumnTypeNavi type_;
+ int width_; //negative value stretches proportionally!
+ bool visible_;
+};
+
+
+static const bool defaultValueShowPercentage = true;
+static const ColumnTypeNavi defaultValueLastSortColumn = COL_TYPE_NAVI_DIRECTORY; //remember sort on navigation panel
+static const bool defaultValueLastSortAscending = true; //
+
+inline
+std::vector<ColumnAttributeNavi> getDefaultColumnAttributesNavi()
+{
+ std::vector<ColumnAttributeNavi> attr;
+
+ ColumnAttributeNavi newEntry;
+
+ newEntry.type_ = COL_TYPE_NAVI_DIRECTORY;
+ newEntry.visible_ = true;
+ newEntry.width_ = -1; //stretch, old value: 280;
+ attr.push_back(newEntry);
+
+ newEntry.type_ = COL_TYPE_NAVI_BYTES;
+ newEntry.visible_ = true;
+ newEntry.width_ = 55;
+ attr.push_back(newEntry);
+
+ return attr;
+}
+}
+
+#endif // COL_ATTR_HEADER_189467891346732143214
diff --git a/ui/custom_grid.cpp b/ui/custom_grid.cpp
new file mode 100644
index 00000000..df1e9145
--- /dev/null
+++ b/ui/custom_grid.cpp
@@ -0,0 +1,1414 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#include "custom_grid.h"
+#include <wx/dc.h>
+#include <wx/settings.h>
+#include <zen/i18n.h>
+#include <zen/file_error.h>
+#include <wx+/tooltip.h>
+#include <wx+/format_unit.h>
+#include <wx+/string_conv.h>
+#include <wx+/rtl.h>
+#include "../file_hierarchy.h"
+#include "../lib/resources.h"
+
+using namespace zen;
+using namespace gridview;
+
+
+const wxEventType zen::EVENT_GRID_CHECK_ROWS = wxNewEventType();
+const wxEventType zen::EVENT_GRID_SYNC_DIRECTION = wxNewEventType();
+
+namespace
+{
+const wxColour COLOR_ORANGE (238, 201, 0);
+const wxColour COLOR_GREY (212, 208, 200);
+const wxColour COLOR_YELLOW (247, 252, 62);
+const wxColour COLOR_YELLOW_LIGHT(253, 252, 169);
+const wxColour COLOR_CMP_RED (249, 163, 165);
+const wxColour COLOR_SYNC_BLUE (201, 203, 247);
+const wxColour COLOR_SYNC_GREEN (197, 248, 190);
+const wxColour COLOR_NOT_ACTIVE(228, 228, 228); //light grey
+
+
+const Zstring ICON_FILE_FOLDER = Zstr("folder");
+
+const int CHECK_BOX_IMAGE = 12; //width of checkbox image
+const int CHECK_BOX_WIDTH = CHECK_BOX_IMAGE + 2; //width of first block
+
+const size_t MIN_ROW_COUNT = 10;
+
+/*
+class hierarchy:
+ GridDataBase
+ /|\
+ ________________|________________
+ | |
+ GridDataRim |
+ /|\ |
+ __________|__________ |
+ | | |
+ GridDataLeftRim GridDataRight GridDataMiddle
+*/
+
+
+
+void refreshCell(Grid& grid, int row, ColumnType colType, size_t compPos)
+{
+ wxRect cellArea = grid.getCellArea(row, colType, compPos); //returns empty rect if column not found; absolute coordinates!
+ if (cellArea.height > 0)
+ {
+ cellArea.SetTopLeft(grid.CalcScrolledPosition(cellArea.GetTopLeft()));
+ grid.getMainWin().RefreshRect(cellArea, false);
+ }
+}
+
+
+std::pair<int, int> getVisibleRows(Grid& grid) //returns range [from, to)
+{
+ const wxSize clientSize = grid.getMainWin().GetClientSize();
+ if (clientSize.GetHeight() > 0)
+ {
+ wxPoint topLeft = grid.CalcUnscrolledPosition(wxPoint(0, 0));
+ wxPoint bottom = grid.CalcUnscrolledPosition(wxPoint(0, clientSize.GetHeight() - 1));
+
+ int rowFrom = grid.getRowAtPos(topLeft.y); //returns < 0 if column not found; absolute coordinates!
+ if (rowFrom >= 0)
+ {
+ int rowEnd = grid.getRowAtPos(bottom.y); //returns < 0 if column not found; absolute coordinates!
+ if (rowEnd < 0)
+ rowEnd = grid.getRowCount();
+ else
+ ++rowEnd;
+ return std::make_pair(rowFrom, rowEnd);
+ }
+ }
+ return std::make_pair(0, 0);
+}
+
+
+class IconUpdater;
+class GridEventManager;
+
+
+struct IconManager
+{
+ IconManager(IconBuffer::IconSize sz) : iconBuffer(sz) {}
+
+ IconBuffer iconBuffer;
+ std::unique_ptr<IconUpdater> iconUpdater; //bind ownership to GridDataRim<>!
+};
+
+//########################################################################################################
+
+class GridDataBase : public GridData
+{
+public:
+ GridDataBase(Grid& grid) : grid_(grid) {}
+
+ void holdOwnership(const std::shared_ptr<GridEventManager>& evtMgr) { evtMgr_ = evtMgr; }
+
+protected:
+ Grid& refGrid() { return grid_; }
+ const Grid& refGrid() const { return grid_; }
+
+private:
+ std::shared_ptr<GridEventManager> evtMgr_;
+ Grid& grid_;
+
+};
+
+//########################################################################################################
+
+template <SelectedSide side>
+class GridDataRim : public GridDataBase
+{
+public:
+ GridDataRim(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid, size_t compPos) : GridDataBase(grid), gridDataView_(gridDataView), compPos_(compPos) {}
+
+ void setIconManager(const std::shared_ptr<IconManager>& iconMgr) { iconMgr_ = iconMgr; }
+
+ void addIconsToBeLoaded(std::vector<Zstring>& newLoad) //loads all (not yet) drawn icons
+ {
+ //don't check too often! give worker thread some time to fetch data
+ if (iconMgr_)
+ {
+ const std::pair<int, int>& rowsOnScreen = getVisibleRows(refGrid());
+
+ //loop over all visible rows
+ const int firstRow = rowsOnScreen.first;
+ const int rowCount = rowsOnScreen.second - firstRow;
+
+ for (int i = 0; i < rowCount; ++i)
+ {
+ //alternate when adding rows: first, last, first + 1, last - 1 ... -> Icon buffer will then load reversely, i.e. from inside out
+ const int currentRow = firstRow + (i % 2 == 0 ?
+ i / 2 :
+ rowCount - 1 - (i - 1) / 2);
+
+ if (isFailedLoad(currentRow)) //find failed attempts to load icon
+ {
+ const Zstring fileName = getIconFile(currentRow);
+ if (!fileName.empty())
+ {
+ //test if they are already loaded in buffer:
+ if (iconMgr_->iconBuffer.requestFileIcon(fileName))
+ {
+ //do a *full* refresh for *every* failed load to update partial DC updates while scrolling
+ refreshCell(refGrid(), currentRow, static_cast<ColumnType>(COL_TYPE_FILENAME), compPos_);
+ setFailedLoad(currentRow, false);
+ }
+ else //not yet in buffer: mark for async. loading
+ newLoad.push_back(fileName);
+ }
+ }
+ }
+ }
+ }
+
+ void setFailedLoad(size_t row, bool failed)
+ {
+ if (failedLoads.size() != refGrid().getRowCount())
+ failedLoads.resize(refGrid().getRowCount());
+
+ if (row < failedLoads.size())
+ failedLoads[row] = failed;
+ }
+
+ bool isFailedLoad(size_t row) const { return row < failedLoads.size() ? failedLoads[row] != 0 : false; }
+
+protected:
+ virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus)
+ {
+ if (enabled)
+ {
+ if (selected)
+ dc.GradientFillLinear(rect, getColorSelectionGradientFrom(), getColorSelectionGradientTo(), wxEAST);
+ //ignore focus
+ else
+ clearArea(dc, rect, getBackGroundColor(row));
+ }
+ else
+ clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+ }
+
+ wxColor getBackGroundColor(int row) const
+ {
+ wxColor backGroundCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+
+ if (const FileSystemObject* fsObj = getRawData(row))
+ {
+ //mark filtered rows
+ if (!fsObj->isActive())
+ return COLOR_NOT_ACTIVE;
+ else if (!fsObj->isEmpty<side>()) //always show not existing files/dirs/symlinks as empty
+ {
+ //mark directories and symlinks
+ struct GetRowColor : public FSObjectVisitor
+ {
+ GetRowColor(wxColour& background) : background_(background) {}
+
+ virtual void visit(const FileMapping& fileObj) {}
+ virtual void visit(const SymLinkMapping& linkObj)
+ {
+ background_ = COLOR_ORANGE;
+ }
+ virtual void visit(const DirMapping& dirObj)
+ {
+ background_ = COLOR_GREY;
+ }
+ private:
+ wxColour& background_;
+ } getCol(backGroundCol);
+ fsObj->accept(getCol);
+ }
+ }
+ return backGroundCol;
+ }
+
+ const FileSystemObject* getRawData(int row) const { return gridDataView_ ? gridDataView_->getObject(row) : NULL; }
+
+private:
+ virtual size_t getRowCount() const { return std::max(MIN_ROW_COUNT, gridDataView_ ? gridDataView_->rowsOnView() : 0); }
+
+ virtual wxString getValue(int row, ColumnType colType) const
+ {
+ if (const FileSystemObject* fsObj = getRawData(row))
+ {
+ struct GetTextValue : public FSObjectVisitor
+ {
+ GetTextValue(ColumnTypeRim colType, const FileSystemObject& fso) : colType_(colType), fsObj_(fso) {}
+ virtual void visit(const FileMapping& fileObj)
+ {
+ switch (colType_)
+ {
+ case COL_TYPE_FULL_PATH:
+ value = toWx(beforeLast(fileObj.getFullName<side>(), FILE_NAME_SEPARATOR));
+ break;
+ case COL_TYPE_FILENAME: //filename
+ value = toWx(fileObj.getShortName<side>());
+ break;
+ case COL_TYPE_REL_PATH: //relative path
+ value = toWx(beforeLast(fileObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found
+ break;
+ case COL_TYPE_DIRECTORY:
+ value = toWx(fileObj.getBaseDirPf<side>());
+ break;
+ case COL_TYPE_SIZE: //file size
+ if (!fsObj_.isEmpty<side>())
+ value = zen::toStringSep(fileObj.getFileSize<side>());
+ break;
+ case COL_TYPE_DATE: //date
+ if (!fsObj_.isEmpty<side>())
+ value = zen::utcToLocalTimeString(fileObj.getLastWriteTime<side>());
+ break;
+ case COL_TYPE_EXTENSION: //file extension
+ value = toWx(fileObj.getExtension<side>());
+ break;
+ }
+ }
+
+ virtual void visit(const SymLinkMapping& linkObj)
+ {
+ switch (colType_)
+ {
+ case COL_TYPE_FULL_PATH:
+ value = toWx(beforeLast(linkObj.getFullName<side>(), FILE_NAME_SEPARATOR));
+ break;
+ case COL_TYPE_FILENAME: //filename
+ value = toWx(linkObj.getShortName<side>());
+ break;
+ case COL_TYPE_REL_PATH: //relative path
+ value = toWx(beforeLast(linkObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found
+ break;
+ case COL_TYPE_DIRECTORY:
+ value = toWx(linkObj.getBaseDirPf<side>());
+ break;
+ case COL_TYPE_SIZE: //file size
+ if (!fsObj_.isEmpty<side>())
+ value = _("<Symlink>");
+ break;
+ case COL_TYPE_DATE: //date
+ if (!fsObj_.isEmpty<side>())
+ value = zen::utcToLocalTimeString(linkObj.getLastWriteTime<side>());
+ break;
+ case COL_TYPE_EXTENSION: //file extension
+ value = wxEmptyString;
+ break;
+ }
+ }
+
+ virtual void visit(const DirMapping& dirObj)
+ {
+ switch (colType_)
+ {
+ case COL_TYPE_FULL_PATH:
+ value = toWx(dirObj.getFullName<side>());
+ break;
+ case COL_TYPE_FILENAME:
+ value = toWx(dirObj.getShortName<side>());
+ break;
+ case COL_TYPE_REL_PATH:
+ value = toWx(beforeLast(dirObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found
+ break;
+ case COL_TYPE_DIRECTORY:
+ value = toWx(dirObj.getBaseDirPf<side>());
+ break;
+ case COL_TYPE_SIZE: //file size
+ if (!fsObj_.isEmpty<side>())
+ value = _("<Directory>");
+ break;
+ case COL_TYPE_DATE: //date
+ if (!fsObj_.isEmpty<side>())
+ value = wxEmptyString;
+ break;
+ case COL_TYPE_EXTENSION: //file extension
+ value = wxEmptyString;
+ break;
+ }
+ }
+ ColumnTypeRim colType_;
+ wxString value;
+
+ const FileSystemObject& fsObj_;
+ } getVal(static_cast<ColumnTypeRim>(colType), *fsObj);
+ fsObj->accept(getVal);
+ return getVal.value;
+ }
+ //if data is not found:
+ return wxEmptyString;
+ }
+
+ static const int CELL_BORDER = 2;
+
+
+ virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType)
+ {
+ wxRect rectTmp = drawCellBorder(dc, rect);
+
+ const bool isActive = [&]() -> bool
+ {
+ if (const FileSystemObject* fsObj = this->getRawData(row))
+ return fsObj->isActive();
+ return true;
+ }();
+
+ //draw file icon
+ if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_FILENAME)
+ {
+ if (iconMgr_)
+ {
+ rectTmp.x += CELL_BORDER;
+ rectTmp.width -= CELL_BORDER;
+
+ const int iconSize = iconMgr_->iconBuffer.getSize();
+ if (rectTmp.GetWidth() >= iconSize)
+ {
+ // Partitioning:
+ // _______________________________
+ // | border | icon | border | text |
+ // -------------------------------
+
+ const Zstring fileName = getIconFile(row);
+ if (!fileName.empty())
+ {
+ wxIcon icon;
+
+ //first check if it is a directory icon:
+ if (fileName == ICON_FILE_FOLDER)
+ icon = iconMgr_->iconBuffer.genericDirIcon();
+ else //retrieve file icon
+ {
+ if (!iconMgr_->iconBuffer.requestFileIcon(fileName, &icon)) //returns false if icon is not in buffer
+ {
+ icon = iconMgr_->iconBuffer.genericFileIcon(); //better than nothing
+ setFailedLoad(row, true); //save status of failed icon load -> used for async. icon loading
+ //falsify only! we want to avoid writing incorrect success values when only partially updating the DC, e.g. when scrolling,
+ //see repaint behavior of ::ScrollWindow() function!
+ }
+ }
+
+ if (icon.IsOk())
+ {
+ //center icon if it is too small
+ const int posX = rectTmp.GetX() + std::max(0, (iconSize - icon.GetWidth()) / 2);
+ const int posY = rectTmp.GetY() + std::max(0, (rectTmp.GetHeight() - icon.GetHeight()) / 2);
+
+ drawIconRtlNoMirror(dc, icon, wxPoint(posX, posY), buffer);
+
+ //convert icon to greyscale if row is not active
+ if (!isActive)
+ {
+ wxBitmap bmp(icon.GetWidth(), icon.GetHeight());
+ wxMemoryDC memDc(bmp);
+ memDc.Blit(0, 0, icon.GetWidth(), icon.GetHeight(), &dc, posX, posY); //blit in
+
+ bmp = wxBitmap(bmp.ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3)); //treat all channels equally!
+ memDc.SelectObject(bmp);
+
+ dc.Blit(posX, posY, icon.GetWidth(), icon.GetHeight(), &memDc, 0, 0); //blit out
+ }
+ }
+ }
+ }
+ rectTmp.x += iconSize;
+ rectTmp.width -= iconSize;
+ }
+
+ rectTmp.x += CELL_BORDER;
+ rectTmp.width -= CELL_BORDER;
+
+ drawCellText(dc, rectTmp, getValue(row, colType), isActive, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+ }
+ else
+ {
+ int alignment = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL;
+
+ //have file size right-justified (but don't change for RTL languages)
+ if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_SIZE && grid.GetLayoutDirection() != wxLayout_RightToLeft)
+ {
+ rectTmp.width -= CELL_BORDER;
+ alignment = wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL;
+ }
+ else
+ {
+ rectTmp.x += CELL_BORDER;
+ rectTmp.width -= CELL_BORDER;
+ }
+
+ drawCellText(dc, rectTmp, getValue(row, colType), isActive, alignment);
+ }
+ }
+
+ virtual size_t getBestSize(wxDC& dc, int row, ColumnType colType)
+ {
+ // Partitioning:
+ // ________________________________________
+ // | border | icon | border | text | border |
+ // ----------------------------------------
+
+ int bestSize = 0;
+ if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_FILENAME && iconMgr_)
+ bestSize += CELL_BORDER + iconMgr_->iconBuffer.getSize();
+
+ bestSize += CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth();
+
+ return bestSize + CELL_BORDER + 1; //add additional right border + 1 pix for border line
+ }
+
+ virtual wxString getColumnLabel(ColumnType colType) const
+ {
+ switch (static_cast<ColumnTypeRim>(colType))
+ {
+ case COL_TYPE_FULL_PATH:
+ return _("Full path");
+ case COL_TYPE_FILENAME:
+ return _("Name"); //= short name
+ case COL_TYPE_REL_PATH:
+ return _("Relative path");
+ case COL_TYPE_DIRECTORY:
+ return _("Directory");
+ case COL_TYPE_SIZE:
+ return _("Size");
+ case COL_TYPE_DATE:
+ return _("Date");
+ case COL_TYPE_EXTENSION:
+ return _("Extension");
+ }
+ return wxEmptyString;
+ }
+
+ virtual void renderColumnLabel(Grid& tree, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted)
+ {
+ wxRect rectInside = drawColumnLabelBorder(dc, rect);
+ drawColumnLabelBackground(dc, rectInside, highlighted);
+
+ const int COLUMN_BORDER_LEFT = 4;
+
+ rectInside.x += COLUMN_BORDER_LEFT;
+ rectInside.width -= COLUMN_BORDER_LEFT;
+ drawColumnLabelText(dc, rectInside, getColumnLabel(colType));
+
+ //draw sort marker
+ if (gridDataView_)
+ {
+ auto sortInfo = gridDataView_->getSortInfo();
+ if (sortInfo)
+ {
+ if (colType == static_cast<ColumnType>(sortInfo->type_) && (compPos_ == gridview::COMP_LEFT) == sortInfo->onLeft_)
+ {
+ const wxBitmap& marker = GlobalResources::getImage(sortInfo->ascending_ ? L"sortAscending" : L"sortDescending");
+ wxPoint markerBegin = rectInside.GetTopLeft() + wxPoint((rectInside.width - marker.GetWidth()) / 2, 0);
+ dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel border
+ }
+ }
+ }
+ }
+
+ Zstring getIconFile(size_t row) const //return ICON_FILE_FOLDER if row points to a folder
+ {
+ const FileSystemObject* fsObj = getRawData(row);
+ if (fsObj && !fsObj->isEmpty<side>())
+ {
+ struct GetIcon : public FSObjectVisitor
+ {
+ virtual void visit(const FileMapping& fileObj)
+ {
+ iconName = fileObj.getFullName<side>();
+ }
+ virtual void visit(const SymLinkMapping& linkObj)
+ {
+ iconName = linkObj.getLinkType<side>() == LinkDescriptor::TYPE_DIR ?
+ Zstr("folder") :
+ linkObj.getFullName<side>();
+ }
+ virtual void visit(const DirMapping& dirObj)
+ {
+ iconName = Zstr("folder");
+ }
+
+ Zstring iconName;
+ } getIcon;
+ fsObj->accept(getIcon);
+ return getIcon.iconName;
+ }
+ return Zstring();
+ }
+
+ virtual wxString getToolTip(int row, ColumnType colType) const
+ {
+ wxString toolTip;
+ const FileSystemObject* fsObj = getRawData(row);
+ if (fsObj && !fsObj->isEmpty<side>())
+ {
+ struct AssembleTooltip : public FSObjectVisitor
+ {
+ AssembleTooltip(wxString& tipMsg) : tipMsg_(tipMsg) {}
+
+ virtual void visit(const FileMapping& fileObj)
+ {
+ tipMsg_ = copyStringTo<wxString>(std::wstring() + fileObj.getRelativeName<side>() + L"\n" +
+ _("Size") + L": " + zen::filesizeToShortString(to<Int64>(fileObj.getFileSize<side>())) + L"\n" +
+ _("Date") + L": " + zen::utcToLocalTimeString(fileObj.getLastWriteTime<side>()));
+ }
+
+ virtual void visit(const SymLinkMapping& linkObj)
+ {
+ tipMsg_ = copyStringTo<wxString>(std::wstring() + linkObj.getRelativeName<side>() + L"\n" +
+ _("Date") + L": " + zen::utcToLocalTimeString(linkObj.getLastWriteTime<side>()));
+ }
+
+ virtual void visit(const DirMapping& dirObj)
+ {
+ tipMsg_ = toWx(dirObj.getRelativeName<side>());
+ }
+
+ wxString& tipMsg_;
+ } assembler(toolTip);
+ fsObj->accept(assembler);
+ }
+ return toolTip;
+ }
+
+ std::shared_ptr<const zen::GridView> gridDataView_;
+ std::shared_ptr<IconManager> iconMgr_;
+ std::vector<char> failedLoads; //effectively a vector<bool> of size "number of rows"
+ const size_t compPos_;
+ std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable
+};
+
+
+class GridDataLeft : public GridDataRim<LEFT_SIDE>
+{
+public:
+ GridDataLeft(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid, size_t compPos) : GridDataRim<LEFT_SIDE>(gridDataView, grid, compPos) {}
+
+ void setNavigationMarker(std::vector<const HierarchyObject*>&& markedFiles,
+ std::vector<const HierarchyObject*>&& markedContainer)
+ {
+ markedFiles_ .swap(markedFiles);
+ markedContainer_.swap(markedContainer);
+ }
+
+private:
+ virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus)
+ {
+ GridDataRim<LEFT_SIDE>::renderRowBackgound(dc, rect, row, enabled, selected, hasFocus);
+
+ //mark rows selected on navigation grid:
+ if (enabled && !selected)
+ {
+ const bool markRow = [&]() -> bool
+ {
+ if (const FileSystemObject* fsObj = getRawData(row))
+ {
+ if (dynamic_cast<const FileMapping*>(fsObj) || dynamic_cast<const SymLinkMapping*>(fsObj))
+ {
+ for (auto iter = markedFiles_.begin(); iter != markedFiles_.end(); ++iter)
+ if (*iter == &(fsObj->parent())) //mark files/links wich have the given parent
+ return true;
+ }
+ else if (auto dirObj = dynamic_cast<const DirMapping*>(fsObj))
+ {
+ for (auto iter = markedContainer_.begin(); iter != markedContainer_.end(); ++iter)
+ if (*iter == dirObj) //mark directories which *are* the given HierarchyObject*
+ return true;
+ }
+
+ for (auto iter = markedContainer_.begin(); iter != markedContainer_.end(); ++iter)
+ {
+ //mark all objects which have the HierarchyObject as *any* matching ancestor
+ const HierarchyObject* parent = &(fsObj->parent());
+ for (;;)
+ {
+ if (*iter == parent)
+ return true;
+
+ if (auto dirObj = dynamic_cast<const DirMapping*>(parent))
+ parent = &(dirObj->parent());
+ else
+ break;
+ }
+ }
+ }
+ return false;
+ }();
+
+ if (markRow)
+ {
+ //const wxColor COLOR_TREE_SELECTION_GRADIENT = wxColor(101, 148, 255); //H:158 S:255 V:178
+ const wxColor COLOR_TREE_SELECTION_GRADIENT = getColorSelectionGradientFrom();
+
+ wxRect rectTmp = rect;
+ rectTmp.width /= 20;
+ dc.GradientFillLinear(rectTmp, COLOR_TREE_SELECTION_GRADIENT, GridDataRim<LEFT_SIDE>::getBackGroundColor(row), wxEAST);
+ }
+ }
+ }
+
+ std::vector<const HierarchyObject*> markedFiles_; //mark files/symlinks directly within a container
+ std::vector<const HierarchyObject*> markedContainer_; //mark full container including all child-objects
+ //DO NOT DEREFERENCE!!!! NOT GUARANTEED TO BE VALID!!!
+};
+
+
+class GridDataRight : public GridDataRim<RIGHT_SIDE>
+{
+public:
+ GridDataRight(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid, size_t compPos) : GridDataRim<RIGHT_SIDE>(gridDataView, grid, compPos) {}
+};
+
+
+
+
+//########################################################################################################
+
+class GridDataMiddle : public GridDataBase
+{
+public:
+ GridDataMiddle(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid) :
+ GridDataBase(grid),
+ gridDataView_(gridDataView),
+ syncPreviewActive(true) {}
+
+ void onSelectBegin(const wxPoint& clientPos, int row, ColumnType colType)
+ {
+ if (static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE)
+ {
+ refGrid().clearSelection(gridview::COMP_MIDDLE);
+ dragSelection.reset(new std::pair<int, BlockPosition>(row, mousePosToBlock(clientPos, row)));
+ }
+ }
+
+ void onSelectEnd(int row)
+ {
+ refGrid().clearSelection(gridview::COMP_MIDDLE);
+
+ //issue custom event
+ if (dragSelection)
+ {
+ const int rowFrom = dragSelection->first;
+ const int rowTo = row;
+
+ if (0 <= rowFrom && rowFrom < static_cast<int>(refGrid().getRowCount()) &&
+ 0 <= rowTo && rowTo < static_cast<int>(refGrid().getRowCount())) //row is -1 on capture lost!
+ {
+ if (wxEvtHandler* evtHandler = refGrid().GetEventHandler())
+ switch (dragSelection->second)
+ {
+ case BLOCKPOS_CHECK_BOX:
+ {
+ const FileSystemObject* fsObj = getRawData(rowFrom);
+ const bool setIncluded = fsObj ? !fsObj->isActive() : true;
+
+ CheckRowsEvent evt(rowFrom, rowTo, setIncluded);
+ evtHandler->ProcessEvent(evt);
+ }
+ break;
+ case BLOCKPOS_LEFT:
+ {
+ SyncDirectionEvent evt(rowFrom, rowTo, SYNC_DIR_LEFT);
+ evtHandler->ProcessEvent(evt);
+ }
+ break;
+ case BLOCKPOS_MIDDLE:
+ {
+ SyncDirectionEvent evt(rowFrom, rowTo, SYNC_DIR_NONE);
+ evtHandler->ProcessEvent(evt);
+ }
+ break;
+ case BLOCKPOS_RIGHT:
+ {
+ SyncDirectionEvent evt(rowFrom, rowTo, SYNC_DIR_RIGHT);
+ evtHandler->ProcessEvent(evt);
+ }
+ break;
+ }
+ }
+ dragSelection.reset();
+ }
+ }
+
+ void onMouseMovement(const wxPoint& clientPos, int row, ColumnType colType, size_t compPos)
+ {
+ //manage block highlighting and custom tooltip
+ if (dragSelection)
+ {
+ toolTip.hide(); //handle custom tooltip
+ }
+ else
+ {
+ if (compPos == gridview::COMP_MIDDLE && static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE)
+ {
+ if (highlight) //refresh old highlight
+ refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE);
+
+ highlight.reset(new std::pair<int, BlockPosition>(row, mousePosToBlock(clientPos, row)));
+ refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE);
+
+ //show custom tooltip
+ showToolTip(row, refGrid().getMainWin().ClientToScreen(clientPos));
+ }
+ else
+ onMouseLeave();
+ }
+ }
+
+ void onMouseLeave()
+ {
+ if (highlight)
+ {
+ refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE);
+ highlight.reset();
+ }
+
+ toolTip.hide(); //handle custom tooltip
+ }
+
+ void setSyncPreviewActive(bool value) { syncPreviewActive = value; }
+
+private:
+ virtual size_t getRowCount() const { return std::max(MIN_ROW_COUNT, gridDataView_ ? gridDataView_->rowsOnView() : 0); }
+
+ virtual wxString getValue(int row, ColumnType colType) const
+ {
+ if (static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE)
+ {
+ const FileSystemObject* fsObj = getRawData(row);
+ if (fsObj)
+ return syncPreviewActive ? getSymbol(fsObj->getSyncOperation()) : getSymbol(fsObj->getCategory());
+ }
+ return wxEmptyString;
+ }
+
+
+ virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus)
+ {
+ drawCellBackground(dc, rect, enabled, selected, hasFocus, getBackGroundColor(row));
+ }
+
+ virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType)
+ {
+ switch (static_cast<ColumnTypeMiddle>(colType))
+ {
+ case COL_TYPE_MIDDLE_VALUE:
+ {
+ wxRect rectInside = drawCellBorder(dc, rect);
+
+ const FileSystemObject* fsObj = getRawData(row);
+ if (fsObj)
+ {
+ //draw checkbox
+ wxRect checkBoxArea = rectInside;
+ checkBoxArea.SetWidth(CHECK_BOX_WIDTH);
+
+ const bool rowHighlighted = dragSelection ? row == dragSelection->first : highlight ? row == highlight->first : false;
+ const BlockPosition highlightBlock = dragSelection ? dragSelection->second : highlight ? highlight->second : BLOCKPOS_CHECK_BOX;
+
+ if (rowHighlighted && highlightBlock == BLOCKPOS_CHECK_BOX)
+ drawBitmapRtlMirror(dc, GlobalResources::getImage(fsObj->isActive() ? L"checkboxTrueFocus" : L"checkboxFalseFocus"), checkBoxArea, wxALIGN_CENTER, buffer);
+ else //default
+ drawBitmapRtlMirror(dc, GlobalResources::getImage(fsObj->isActive() ? L"checkboxTrue" : L"checkboxFalse" ), checkBoxArea, wxALIGN_CENTER, buffer);
+
+ rectInside.width -= CHECK_BOX_WIDTH;
+ rectInside.x += CHECK_BOX_WIDTH;
+
+ //synchronization preview
+ if (syncPreviewActive)
+ {
+ if (rowHighlighted && highlightBlock != BLOCKPOS_CHECK_BOX)
+ switch (highlightBlock)
+ {
+ case BLOCKPOS_CHECK_BOX:
+ break;
+ case BLOCKPOS_LEFT:
+ drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_LEFT, true)), rectInside, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, buffer);
+ break;
+ case BLOCKPOS_MIDDLE:
+ drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_NONE, true)), rectInside, wxALIGN_CENTER, buffer);
+ break;
+ case BLOCKPOS_RIGHT:
+ drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_RIGHT, true)), rectInside, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, buffer);
+ break;
+ }
+ else //default
+ drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->getSyncOperation()), rectInside, wxALIGN_CENTER, buffer);
+ }
+ else //comparison results view
+ drawBitmapRtlMirror(dc, getCmpResultImage(fsObj->getCategory()), rectInside, wxALIGN_CENTER, buffer);
+ }
+ }
+ break;
+ case COL_TYPE_BORDER:
+ clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
+ break;
+ }
+ }
+
+ virtual wxString getColumnLabel(ColumnType colType) const { return wxEmptyString; }
+
+ virtual void renderColumnLabel(Grid& tree, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted)
+ {
+ switch (static_cast<ColumnTypeMiddle>(colType))
+ {
+ case COL_TYPE_MIDDLE_VALUE:
+ drawColumnLabelBackground(dc, rect, highlighted);
+
+ if (syncPreviewActive)
+ dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("syncViewSmall")), rect, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL);
+ else
+ dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("cmpViewSmall")), rect, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL);
+ break;
+
+ case COL_TYPE_BORDER:
+ drawCellBackground(dc, rect, true, false, true, wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
+ break;
+ }
+ }
+
+ const FileSystemObject* getRawData(int row) const { return gridDataView_ ? gridDataView_->getObject(row) : NULL; }
+
+ wxColor getBackGroundColor(int row) const
+ {
+ const FileSystemObject* fsObj = getRawData(row);
+ if (fsObj)
+ {
+ if (!fsObj->isActive())
+ return COLOR_NOT_ACTIVE;
+ else
+ {
+ if (syncPreviewActive) //synchronization preview
+ {
+ switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction
+ {
+ case SO_DO_NOTHING:
+ case SO_EQUAL:
+ break; //usually white
+
+ case SO_CREATE_NEW_LEFT:
+ case SO_OVERWRITE_LEFT:
+ case SO_DELETE_LEFT:
+ case SO_MOVE_LEFT_SOURCE:
+ case SO_MOVE_LEFT_TARGET:
+ case SO_COPY_METADATA_TO_LEFT:
+ return COLOR_SYNC_BLUE;
+
+ case SO_CREATE_NEW_RIGHT:
+ case SO_OVERWRITE_RIGHT:
+ case SO_DELETE_RIGHT:
+ case SO_MOVE_RIGHT_SOURCE:
+ case SO_MOVE_RIGHT_TARGET:
+ case SO_COPY_METADATA_TO_RIGHT:
+ return COLOR_SYNC_GREEN;
+
+ case SO_UNRESOLVED_CONFLICT:
+ return COLOR_YELLOW;
+ }
+ }
+ else //comparison results view
+ {
+ switch (fsObj->getCategory())
+ {
+ case FILE_LEFT_SIDE_ONLY:
+ case FILE_LEFT_NEWER:
+ return COLOR_SYNC_BLUE; //COLOR_CMP_BLUE;
+
+ case FILE_RIGHT_SIDE_ONLY:
+ case FILE_RIGHT_NEWER:
+ return COLOR_SYNC_GREEN; //COLOR_CMP_GREEN;
+ case FILE_DIFFERENT:
+ return COLOR_CMP_RED;
+ case FILE_EQUAL:
+ break; //usually white
+ case FILE_CONFLICT:
+ return COLOR_YELLOW;
+ case FILE_DIFFERENT_METADATA:
+ return COLOR_YELLOW_LIGHT;
+ }
+ }
+ }
+ }
+ return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+ }
+
+ enum BlockPosition //each cell can be divided into four blocks concerning mouse selections
+ {
+ BLOCKPOS_CHECK_BOX,
+ BLOCKPOS_LEFT,
+ BLOCKPOS_MIDDLE,
+ BLOCKPOS_RIGHT
+ };
+
+ //determine blockposition within cell
+ BlockPosition mousePosToBlock(const wxPoint& clientPos, int row) const
+ {
+ const int absX = refGrid().CalcUnscrolledPosition(clientPos).x;
+
+ const wxRect rect = refGrid().getCellArea(row, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE); //returns empty rect if column not found; absolute coordinates!
+ if (rect.width > CHECK_BOX_WIDTH && rect.height > 0)
+ {
+ const FileSystemObject* const fsObj = getRawData(row);
+ if (fsObj && syncPreviewActive &&
+ fsObj->getSyncOperation() != SO_EQUAL) //in sync-preview equal files shall be treated as in cmp result, i.e. as full checkbox
+ {
+ // cell:
+ // ----------------------------------
+ // | checkbox | left | middle | right|
+ // ----------------------------------
+
+ const double blockWidth = (rect.GetWidth() - CHECK_BOX_WIDTH) / 3.0;
+ if (rect.GetX() + CHECK_BOX_WIDTH <= absX && absX < rect.GetX() + rect.GetWidth())
+ {
+ if (absX < rect.GetX() + CHECK_BOX_WIDTH + blockWidth)
+ return BLOCKPOS_LEFT;
+ else if (absX < rect.GetX() + CHECK_BOX_WIDTH + 2 * blockWidth)
+ return BLOCKPOS_MIDDLE;
+ else
+ return BLOCKPOS_RIGHT;
+ }
+ }
+
+ }
+ return BLOCKPOS_CHECK_BOX;
+ }
+
+ void showToolTip(int row, wxPoint posScreen)
+ {
+ const FileSystemObject* fsObj = getRawData(row);
+ if (fsObj)
+ {
+ if (syncPreviewActive) //synchronization preview
+ {
+ const wchar_t* imageName = [&]() -> const wchar_t*
+ {
+ const SyncOperation syncOp = fsObj->getSyncOperation();
+ switch (syncOp)
+ {
+ case SO_CREATE_NEW_LEFT:
+ return L"createLeft";
+ case SO_CREATE_NEW_RIGHT:
+ return L"createRight";
+ case SO_DELETE_LEFT:
+ return L"deleteLeft";
+ case SO_DELETE_RIGHT:
+ return L"deleteRight";
+ case SO_MOVE_LEFT_SOURCE:
+ return L"moveLeftSource";
+ case SO_MOVE_LEFT_TARGET:
+ return L"moveLeftTarget";
+ case SO_MOVE_RIGHT_SOURCE:
+ return L"moveRightSource";
+ case SO_MOVE_RIGHT_TARGET:
+ return L"moveRightTarget";
+ case SO_OVERWRITE_LEFT:
+ return L"updateLeft";
+ case SO_COPY_METADATA_TO_LEFT:
+ return L"moveLeft";
+ case SO_OVERWRITE_RIGHT:
+ return L"updateRight";
+ case SO_COPY_METADATA_TO_RIGHT:
+ return L"moveRight";
+ case SO_DO_NOTHING:
+ return L"none";
+ case SO_EQUAL:
+ return L"equal";
+ case SO_UNRESOLVED_CONFLICT:
+ return L"conflict";
+ };
+ assert(false);
+ return L"";
+ }();
+ const auto& img = mirrorIfRtl(GlobalResources::getImage(imageName));
+ toolTip.show(getSyncOpDescription(*fsObj), posScreen, &img);
+ }
+ else
+ {
+ const wchar_t* imageName = [&]() -> const wchar_t*
+ {
+ const CompareFilesResult cmpRes = fsObj->getCategory();
+ switch (cmpRes)
+ {
+ case FILE_LEFT_SIDE_ONLY:
+ return L"leftOnly";
+ case FILE_RIGHT_SIDE_ONLY:
+ return L"rightOnly";
+ case FILE_LEFT_NEWER:
+ return L"leftNewer";
+ case FILE_RIGHT_NEWER:
+ return L"rightNewer";
+ case FILE_DIFFERENT:
+ return L"different";
+ case FILE_EQUAL:
+ return L"equal";
+ case FILE_DIFFERENT_METADATA:
+ return L"conflict";
+ case FILE_CONFLICT:
+ return L"conflict";
+ }
+ assert(false);
+ return L"";
+ }();
+ const auto& img = mirrorIfRtl(GlobalResources::getImage(imageName));
+ toolTip.show(getCategoryDescription(*fsObj), posScreen, &img);
+ }
+ }
+ else
+ toolTip.hide(); //if invalid row...
+ }
+
+ virtual wxString getToolTip(ColumnType colType) const { return syncPreviewActive ? _("Synchronization Preview") : _("Comparison Result"); }
+
+ std::shared_ptr<const zen::GridView> gridDataView_;
+ bool syncPreviewActive;
+ std::unique_ptr<std::pair<int, BlockPosition>> highlight; //(row, block) current mouse highlight
+ std::unique_ptr<std::pair<int, BlockPosition>> dragSelection; //(row, block)
+ std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable
+ zen::Tooltip toolTip;
+};
+
+//########################################################################################################
+
+class GridEventManager : private wxEvtHandler
+{
+public:
+ GridEventManager(Grid& grid,
+ GridDataLeft& provLeft,
+ GridDataMiddle& provMiddle,
+ GridDataRight& provRight) : grid_(grid), provLeft_(provLeft), provMiddle_(provMiddle), provRight_(provRight)
+ {
+ grid_.Connect(EVENT_GRID_COL_RESIZE, GridColumnResizeEventHandler(GridEventManager::onResizeColumn), NULL, this);
+
+ grid_.getMainWin().Connect(wxEVT_MOTION, wxMouseEventHandler(GridEventManager::onMouseMovement), NULL, this);
+ grid_.getMainWin().Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(GridEventManager::onMouseLeave ), NULL, this);
+ grid_.getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler (GridEventManager::onKeyDown ), NULL, this);
+
+ grid_.Connect(EVENT_GRID_MOUSE_LEFT_DOWN, GridClickEventHandler (GridEventManager::onSelectBegin), NULL, this);
+ grid_.Connect(EVENT_GRID_SELECT_RANGE, GridRangeSelectEventHandler(GridEventManager::onSelectEnd ), NULL, this);
+ }
+
+private:
+ void onMouseMovement(wxMouseEvent& event)
+ {
+ const wxPoint& topLeftAbs = grid_.CalcUnscrolledPosition(event.GetPosition());
+ const Opt<std::pair<ColumnType, size_t>> colInfo = grid_.getColumnAtPos(topLeftAbs.x);
+ const int row = grid_.getRowAtPos(topLeftAbs.y); //returns < 0 if column not found; absolute coordinates!
+ if (colInfo)
+ {
+ //redirect mouse movement to middle grid component
+ provMiddle_.onMouseMovement(event.GetPosition(), row, colInfo->first, colInfo->second);
+ }
+ event.Skip();
+ }
+
+ void onMouseLeave(wxMouseEvent& event)
+ {
+ provMiddle_.onMouseLeave();
+ event.Skip();
+ }
+
+ void onSelectBegin(GridClickEvent& event)
+ {
+ if (event.compPos_ == gridview::COMP_MIDDLE)
+ provMiddle_.onSelectBegin(event.GetPosition(), event.row_, event.colType_);
+ event.Skip();
+ }
+
+ void onSelectEnd(GridRangeSelectEvent& event)
+ {
+ if (event.compPos_ == gridview::COMP_MIDDLE)
+ provMiddle_.onSelectEnd(event.rowTo_);
+ event.Skip();
+ }
+
+ void onKeyDown(wxKeyEvent& event)
+ {
+ int keyCode = event.GetKeyCode();
+ if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
+ {
+ if (keyCode == WXK_LEFT)
+ keyCode = WXK_RIGHT;
+ else if (keyCode == WXK_RIGHT)
+ keyCode = WXK_LEFT;
+ else if (keyCode == WXK_NUMPAD_LEFT)
+ keyCode = WXK_NUMPAD_RIGHT;
+ else if (keyCode == WXK_NUMPAD_RIGHT)
+ keyCode = WXK_NUMPAD_LEFT;
+ }
+
+ //skip middle component when navigating via keyboard
+
+ int row = grid_.getGridCursor().first;
+ if (row < 0)
+ row = 0;
+
+ if (event.ShiftDown())
+ ;
+ else if (event.ControlDown())
+ ;
+ else
+ switch (keyCode)
+ {
+ case WXK_LEFT:
+ case WXK_NUMPAD_LEFT:
+ grid_.setGridCursor(row, gridview::COMP_LEFT);
+ return; //swallow event
+
+ case WXK_RIGHT:
+ case WXK_NUMPAD_RIGHT:
+ grid_.setGridCursor(row, gridview::COMP_RIGHT);
+ return; //swallow event
+ }
+
+ event.Skip();
+ }
+
+ void onResizeColumn(GridColumnResizeEvent& event)
+ {
+ auto resizeOtherSide = [&](size_t compPosOther)
+ {
+ std::vector<Grid::ColumnAttribute> colAttr = grid_.getColumnConfig(compPosOther);
+
+ std::for_each(colAttr.begin(), colAttr.end(), [&](Grid::ColumnAttribute& ca)
+ {
+ if (ca.type_ == event.colType_)
+ ca.width_ = event.width_;
+ });
+
+ grid_.setColumnConfig(colAttr, compPosOther); //set column count + widths
+ };
+
+ switch (event.compPos_)
+ {
+ case gridview::COMP_LEFT:
+ resizeOtherSide(gridview::COMP_RIGHT);
+ break;
+ case gridview::COMP_MIDDLE:
+ break;
+ case gridview::COMP_RIGHT:
+ resizeOtherSide(gridview::COMP_LEFT);
+ break;
+ }
+ }
+
+ Grid& grid_;
+ GridDataLeft& provLeft_;
+ GridDataMiddle& provMiddle_;
+ GridDataRight& provRight_;
+};
+}
+
+//########################################################################################################
+
+void gridview::init(Grid& grid, const std::shared_ptr<const zen::GridView>& gridDataView)
+{
+ grid.setComponentCount(3);
+
+ auto provLeft_ = std::make_shared<GridDataLeft >(gridDataView, grid, gridview::COMP_LEFT );
+ auto provMiddle_ = std::make_shared<GridDataMiddle>(gridDataView, grid);
+ auto provRight_ = std::make_shared<GridDataRight >(gridDataView, grid, gridview::COMP_RIGHT);
+
+ grid.setDataProvider(provLeft_ , gridview::COMP_LEFT); //data providers reference grid =>
+ grid.setDataProvider(provMiddle_, gridview::COMP_MIDDLE); //ownership must belong *exclusively* to grid!
+ grid.setDataProvider(provRight_ , gridview::COMP_RIGHT);
+
+ auto evtMgr = std::make_shared<GridEventManager>(grid, *provLeft_, *provMiddle_, *provRight_);
+ provLeft_ ->holdOwnership(evtMgr);
+ provMiddle_->holdOwnership(evtMgr);
+ provRight_ ->holdOwnership(evtMgr);
+
+ grid.enableColumnMove (false, gridview::COMP_MIDDLE);
+ grid.enableColumnResize(false, gridview::COMP_MIDDLE);
+
+ std::vector<Grid::ColumnAttribute> attribMiddle;
+ attribMiddle.push_back(Grid::ColumnAttribute(static_cast<ColumnType>(COL_TYPE_BORDER), 5));
+ attribMiddle.push_back(Grid::ColumnAttribute(static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), 60));
+ attribMiddle.push_back(Grid::ColumnAttribute(static_cast<ColumnType>(COL_TYPE_BORDER), 5));
+
+ grid.setColumnConfig(attribMiddle, gridview::COMP_MIDDLE);
+}
+
+
+namespace
+{
+std::vector<ColumnAttributeRim> makeConsistent(const std::vector<ColumnAttributeRim>& attribs)
+{
+ std::set<ColumnTypeRim> usedTypes;
+
+ std::vector<ColumnAttributeRim> output;
+ //remove duplicates
+ std::copy_if(attribs.begin(), attribs.end(), std::back_inserter(output),
+ [&](const ColumnAttributeRim& a) { return usedTypes.insert(a.type_).second; });
+
+ //make sure each type is existing! -> should *only* be a problem if user manually messes with globalsettings.xml
+ const auto& defAttr = getDefaultColumnAttributesLeft();
+ std::copy_if(defAttr.begin(), defAttr.end(), std::back_inserter(output),
+ [&](const ColumnAttributeRim& a) { return usedTypes.insert(a.type_).second; });
+
+ return output;
+}
+}
+
+std::vector<Grid::ColumnAttribute> gridview::convertConfig(const std::vector<ColumnAttributeRim>& attribs)
+{
+ const auto& attribClean = makeConsistent(attribs);
+
+ std::vector<Grid::ColumnAttribute> output;
+ std::transform(attribClean.begin(), attribClean.end(), std::back_inserter(output),
+ [&](const ColumnAttributeRim& a) { return Grid::ColumnAttribute(static_cast<ColumnType>(a.type_), a.width_, a.visible_); });
+
+ return output;
+}
+
+
+std::vector<ColumnAttributeRim> gridview::convertConfig(const std::vector<Grid::ColumnAttribute>& attribs)
+{
+ std::vector<ColumnAttributeRim> output;
+
+ std::transform(attribs.begin(), attribs.end(), std::back_inserter(output),
+ [&](const Grid::ColumnAttribute& ca) { return ColumnAttributeRim(static_cast<ColumnTypeRim>(ca.type_), ca.width_, ca.visible_); });
+
+ return makeConsistent(output);
+}
+
+
+namespace
+{
+class IconUpdater : private wxEvtHandler //update file icons periodically: use SINGLE instance to coordinate left and right grid in parallel
+{
+public:
+ IconUpdater(GridDataLeft& provLeft, GridDataRight& provRight, IconBuffer& iconBuffer) : provLeft_(provLeft), provRight_(provRight), iconBuffer_(iconBuffer)
+ {
+ timer.Connect(wxEVT_TIMER, wxEventHandler(IconUpdater::loadIconsAsynchronously), NULL, this);
+ timer.Start(50); //timer interval in ms
+ }
+
+private:
+ void loadIconsAsynchronously(wxEvent& event) //loads all (not yet) drawn icons
+ {
+ std::vector<Zstring> newLoad;
+ provLeft_ .addIconsToBeLoaded(newLoad); //loads all (not yet) drawn icons
+ provRight_.addIconsToBeLoaded(newLoad); //
+ iconBuffer_.setWorkload(newLoad);
+ }
+
+ GridDataLeft& provLeft_;
+ GridDataRight& provRight_;
+ IconBuffer& iconBuffer_;
+ wxTimer timer;
+};
+}
+
+
+void gridview::setIconSize(Grid& grid, IconBuffer::IconSize sz)
+{
+ auto* provLeft = dynamic_cast<GridDataLeft*>(grid.getDataProvider(gridview::COMP_LEFT));
+ auto* provRight = dynamic_cast<GridDataRight*>(grid.getDataProvider(gridview::COMP_RIGHT));
+
+ if (provLeft && provRight)
+ {
+ std::shared_ptr<IconManager> iconMgr = std::make_shared<IconManager>(sz);
+ iconMgr->iconUpdater.reset(new IconUpdater(*provLeft, *provRight, iconMgr->iconBuffer));
+
+ provLeft ->setIconManager(iconMgr);
+ provRight->setIconManager(iconMgr);
+ grid.setRowHeight(iconMgr->iconBuffer.getSize() + 1); //+ 1 for line between rows
+ grid.Refresh();
+ }
+ else
+ assert(false);
+}
+
+
+void gridview::clearSelection(Grid& grid)
+{
+ grid.clearSelection(gridview::COMP_LEFT);
+ grid.clearSelection(gridview::COMP_MIDDLE);
+ grid.clearSelection(gridview::COMP_RIGHT);
+}
+
+
+void gridview::setNavigationMarker(Grid& grid,
+ std::vector<const HierarchyObject*>&& markedFiles,
+ std::vector<const HierarchyObject*>&& markedContainer)
+{
+ if (auto* provLeft = dynamic_cast<GridDataLeft*>(grid.getDataProvider(gridview::COMP_LEFT)))
+ provLeft->setNavigationMarker(std::move(markedFiles), std::move(markedContainer));
+ else
+ assert(false);
+ grid.Refresh();
+}
+
+
+void gridview::setSyncPreviewActive(Grid& grid, bool value)
+{
+ if (auto* provMiddle = dynamic_cast<GridDataMiddle*>(grid.getDataProvider(gridview::COMP_MIDDLE)))
+ provMiddle->setSyncPreviewActive(value);
+ else
+ assert(false);
+}
+
+wxBitmap zen::getSyncOpImage(SyncOperation syncOp)
+{
+ switch (syncOp) //evaluate comparison result and sync direction
+ {
+ case SO_CREATE_NEW_LEFT:
+ return GlobalResources::getImage(L"createLeftSmall");
+ case SO_CREATE_NEW_RIGHT:
+ return GlobalResources::getImage(L"createRightSmall");
+ case SO_DELETE_LEFT:
+ return GlobalResources::getImage(L"deleteLeftSmall");
+ case SO_DELETE_RIGHT:
+ return GlobalResources::getImage(L"deleteRightSmall");
+ case SO_MOVE_LEFT_SOURCE:
+ return GlobalResources::getImage(L"moveLeftSourceSmall");
+ case SO_MOVE_LEFT_TARGET:
+ return GlobalResources::getImage(L"moveLeftTargetSmall");
+ case SO_MOVE_RIGHT_SOURCE:
+ return GlobalResources::getImage(L"moveRightSourceSmall");
+ case SO_MOVE_RIGHT_TARGET:
+ return GlobalResources::getImage(L"moveRightTargetSmall");
+ case SO_OVERWRITE_RIGHT:
+ return GlobalResources::getImage(L"updateRightSmall");
+ case SO_COPY_METADATA_TO_RIGHT:
+ return GlobalResources::getImage(L"moveRightSmall");
+ case SO_OVERWRITE_LEFT:
+ return GlobalResources::getImage(L"updateLeftSmall");
+ case SO_COPY_METADATA_TO_LEFT:
+ return GlobalResources::getImage(L"moveLeftSmall");
+ case SO_DO_NOTHING:
+ return GlobalResources::getImage(L"noneSmall");
+ case SO_EQUAL:
+ return GlobalResources::getImage(L"equalSmall");
+ case SO_UNRESOLVED_CONFLICT:
+ return GlobalResources::getImage(L"conflictSmall");
+ }
+ return wxNullBitmap;
+}
+
+
+wxBitmap zen::getCmpResultImage(CompareFilesResult cmpResult)
+{
+ switch (cmpResult)
+ {
+ case FILE_LEFT_SIDE_ONLY:
+ return GlobalResources::getImage(L"leftOnlySmall");
+ case FILE_RIGHT_SIDE_ONLY:
+ return GlobalResources::getImage(L"rightOnlySmall");
+ case FILE_LEFT_NEWER:
+ return GlobalResources::getImage(L"leftNewerSmall");
+ case FILE_RIGHT_NEWER:
+ return GlobalResources::getImage(L"rightNewerSmall");
+ case FILE_DIFFERENT:
+ return GlobalResources::getImage(L"differentSmall");
+ case FILE_EQUAL:
+ return GlobalResources::getImage(L"equalSmall");
+ case FILE_CONFLICT:
+ case FILE_DIFFERENT_METADATA:
+ return GlobalResources::getImage(L"conflictSmall");
+ }
+ return wxNullBitmap;
+}
diff --git a/ui/custom_grid.h b/ui/custom_grid.h
new file mode 100644
index 00000000..4c07c150
--- /dev/null
+++ b/ui/custom_grid.h
@@ -0,0 +1,83 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef CUSTOMGRID_H_INCLUDED
+#define CUSTOMGRID_H_INCLUDED
+
+#include <wx+/grid.h>
+#include "grid_view.h"
+#include "column_attr.h"
+#include "../lib/icon_buffer.h"
+
+namespace zen
+{
+//setup grid to show grid view within three components:
+namespace gridview
+{
+static const size_t COMP_LEFT = 0;
+static const size_t COMP_MIDDLE = 1;
+static const size_t COMP_RIGHT = 2;
+
+void init(Grid& grid, const std::shared_ptr<const GridView>& gridDataView);
+
+std::vector<Grid::ColumnAttribute> convertConfig(const std::vector<ColumnAttributeRim>& attribs); //+ make consistent
+std::vector<ColumnAttributeRim> convertConfig(const std::vector<Grid::ColumnAttribute>& attribs); //
+
+void setSyncPreviewActive(Grid& grid, bool value);
+
+void setIconSize(Grid& grid, IconBuffer::IconSize sz);
+
+void clearSelection(Grid& grid); //clear all components
+
+//mark rows selected in navigation/compressed tree and navigate to leading object
+void setNavigationMarker(Grid& grid,
+ std::vector<const HierarchyObject*>&& markedFiles, //mark files/symlinks directly within a container
+ std::vector<const HierarchyObject*>&& markedContainer); //mark full container including child-objects
+}
+
+wxBitmap getSyncOpImage(SyncOperation syncOp);
+wxBitmap getCmpResultImage(CompareFilesResult cmpResult);
+
+
+//---------- custom events for middle grid ----------
+
+//(UN-)CHECKING ROWS FROM SYNCHRONIZATION
+extern const wxEventType EVENT_GRID_CHECK_ROWS;
+//SELECTING SYNC DIRECTION
+extern const wxEventType EVENT_GRID_SYNC_DIRECTION;
+
+struct CheckRowsEvent : public wxCommandEvent
+{
+ CheckRowsEvent(int rowFrom, int rowTo, bool setIncluded) : wxCommandEvent(EVENT_GRID_CHECK_ROWS), rowFrom_(rowFrom), rowTo_(rowTo), setIncluded_(setIncluded) {}
+ virtual wxEvent* Clone() const { return new CheckRowsEvent(*this); }
+
+ const int rowFrom_;
+ const int rowTo_;
+ const bool setIncluded_;
+};
+
+
+struct SyncDirectionEvent : public wxCommandEvent
+{
+ SyncDirectionEvent(int rowFrom, int rowTo, SyncDirection direction) : wxCommandEvent(EVENT_GRID_SYNC_DIRECTION), rowFrom_(rowFrom), rowTo_(rowTo), direction_(direction) {}
+ virtual wxEvent* Clone() const { return new SyncDirectionEvent(*this); }
+
+ const int rowFrom_;
+ const int rowTo_;
+ const SyncDirection direction_;
+};
+
+typedef void (wxEvtHandler::*CheckRowsEventFunction)(CheckRowsEvent&);
+typedef void (wxEvtHandler::*SyncDirectionEventFunction)(SyncDirectionEvent&);
+
+#define CheckRowsEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(CheckRowsEventFunction, &func)
+
+#define SyncDirectionEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(SyncDirectionEventFunction, &func)
+}
+
+#endif // CUSTOMGRID_H_INCLUDED
diff --git a/ui/dir_name.cpp b/ui/dir_name.cpp
index 7d747609..84670356 100644
--- a/ui/dir_name.cpp
+++ b/ui/dir_name.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "dir_name.h"
@@ -20,13 +20,13 @@ using namespace zen;
namespace
{
-void setDirectoryNameImpl(const wxString& dirname, wxDirPickerCtrl* dirPicker, wxWindow& tooltipWnd, wxStaticBoxSizer* staticBox, size_t timeout)
+void setDirectoryNameImpl(const wxString& dirname, wxDirPickerCtrl* dirPicker, wxWindow& tooltipWnd, wxStaticText* staticText, size_t timeout)
{
const wxString dirFormatted = toWx(getFormattedDirectoryName(toZ(dirname)));
tooltipWnd.SetToolTip(dirFormatted); //wxComboBox bug: the edit control is not updated... http://trac.wxwidgets.org/ticket/12659
- if (staticBox)
+ if (staticText)
{
//change static box label only if there is a real difference to what is shown in wxTextCtrl anyway
wxString dirNormalized = dirname;
@@ -34,7 +34,7 @@ void setDirectoryNameImpl(const wxString& dirname, wxDirPickerCtrl* dirPicker, w
if (!dirNormalized.empty() && !endsWith(dirNormalized, FILE_NAME_SEPARATOR))
dirNormalized += FILE_NAME_SEPARATOR;
- staticBox->GetStaticBox()->SetLabel(dirNormalized == dirFormatted ? wxString(_("Drag && drop")) : dirFormatted);
+ staticText->SetLabel(dirNormalized == dirFormatted ? wxString(_("Drag && drop")) : dirFormatted);
}
if (dirPicker && !dirFormatted.empty())
@@ -52,12 +52,12 @@ void setDirectoryName(const wxString& dirname,
wxTextCtrl* txtCtrl,
wxDirPickerCtrl* dirPicker,
wxWindow& tooltipWnd,
- wxStaticBoxSizer* staticBox,
+ wxStaticText* staticText,
size_t timeout = 200) //pointers are optional
{
if (txtCtrl)
txtCtrl->ChangeValue(dirname);
- setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticBox, timeout);
+ setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticText, timeout);
}
@@ -65,12 +65,12 @@ void setDirectoryName(const wxString& dirname,
FolderHistoryBox* comboBox,
wxDirPickerCtrl* dirPicker,
wxWindow& tooltipWnd,
- wxStaticBoxSizer* staticBox,
+ wxStaticText* staticText,
size_t timeout = 200) //pointers are optional
{
if (comboBox)
comboBox->setValue(dirname);
- setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticBox, timeout);
+ setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticText, timeout);
}
}
//##############################################################################################################
@@ -79,23 +79,23 @@ template <class NameControl>
DirectoryName<NameControl>::DirectoryName(wxWindow& dropWindow,
wxDirPickerCtrl& dirPicker,
NameControl& dirName,
- wxStaticBoxSizer* staticBox,
+ wxStaticText* staticText,
wxWindow* dropWindow2) :
dropWindow_(dropWindow),
dropWindow2_(dropWindow2),
dirPicker_(dirPicker),
dirName_(dirName),
- staticBox_(staticBox)
+ staticText_(staticText)
{
//prepare drag & drop
setupFileDrop(dropWindow);
- if (dropWindow2)
- setupFileDrop(*dropWindow2);
+ dropWindow.Connect(EVENT_DROP_FILE, FileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this);
- //redirect drag & drop event back to this class
- dropWindow.Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this);
if (dropWindow2)
- dropWindow2->Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this);
+ {
+ setupFileDrop(*dropWindow2);
+ dropWindow2->Connect(EVENT_DROP_FILE, FileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this);
+ }
//keep dirPicker and dirName synchronous
dirName_ .Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DirectoryName::OnWriteDirManually), NULL, this);
@@ -112,16 +112,17 @@ DirectoryName<NameControl>::~DirectoryName()
template <class NameControl>
-void DirectoryName<NameControl>::OnFilesDropped(FFSFileDropEvent& event)
+void DirectoryName<NameControl>::OnFilesDropped(FileDropEvent& event)
{
- if (event.getFiles().empty())
+ const auto& files = event.getFiles();
+ if (files.empty())
return;
- if (acceptDrop(event.getFiles()))
+ if (acceptDrop(files, event.getDropPosition(), event.getDropWindow()))
{
const wxString fileName = event.getFiles()[0];
if (dirExists(toZ(fileName)))
- setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticBox_);
+ setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticText_);
else
{
wxString parentName = beforeLast(fileName, utf8CvrtTo<wxString>(FILE_NAME_SEPARATOR)); //returns empty string if ch not found
@@ -130,18 +131,20 @@ void DirectoryName<NameControl>::OnFilesDropped(FFSFileDropEvent& event)
parentName += FILE_NAME_SEPARATOR;
#endif
if (dirExists(toZ(parentName)))
- setDirectoryName(parentName, &dirName_, &dirPicker_, dirName_, staticBox_);
+ setDirectoryName(parentName, &dirName_, &dirPicker_, dirName_, staticText_);
else //set original name unconditionally: usecase: inactive mapped network shares
- setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticBox_);
+ setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticText_);
}
}
+ else
+ event.Skip(); //let other handlers try!!!
}
template <class NameControl>
void DirectoryName<NameControl>::OnWriteDirManually(wxCommandEvent& event)
{
- setDirectoryName(event.GetString(), static_cast<NameControl*>(NULL), &dirPicker_, dirName_, staticBox_, 100); //potentially slow network access: wait 100 ms at most
+ setDirectoryName(event.GetString(), static_cast<NameControl*>(NULL), &dirPicker_, dirName_, staticText_, 100); //potentially slow network access: wait 100 ms at most
event.Skip();
}
@@ -150,7 +153,7 @@ template <class NameControl>
void DirectoryName<NameControl>::OnDirSelected(wxFileDirPickerEvent& event)
{
const wxString newPath = event.GetPath();
- setDirectoryName(newPath, &dirName_, NULL, dirName_, staticBox_);
+ setDirectoryName(newPath, &dirName_, NULL, dirName_, staticText_);
event.Skip();
}
@@ -165,7 +168,7 @@ wxString DirectoryName<NameControl>::getName() const
template <class NameControl>
void DirectoryName<NameControl>::setName(const wxString& dirname)
{
- setDirectoryName(dirname, &dirName_, &dirPicker_, dirName_, staticBox_);
+ setDirectoryName(dirname, &dirName_, &dirPicker_, dirName_, staticText_);
}
diff --git a/ui/dir_name.h b/ui/dir_name.h
index 43f2015d..d491cacc 100644
--- a/ui/dir_name.h
+++ b/ui/dir_name.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef DRAGANDDROP_H_INCLUDED
@@ -12,6 +12,7 @@
#include <wx/sizer.h>
#include <wx/filepicker.h>
#include <wx+/file_drop.h>
+#include <wx/stattext.h>
namespace zen
{
@@ -21,10 +22,10 @@ template <class NameControl> //NameControl may be wxTextCtrl, FolderHistoryBox
class DirectoryName: private wxEvtHandler
{
public:
- DirectoryName(wxWindow& dropWindow,
- wxDirPickerCtrl& dirPicker,
- NameControl& dirName,
- wxStaticBoxSizer* staticBox = NULL,
+ DirectoryName(wxWindow& dropWindow,
+ wxDirPickerCtrl& dirPicker,
+ NameControl& dirName,
+ wxStaticText* staticText = NULL,
wxWindow* dropWindow2 = NULL); //optional
~DirectoryName();
@@ -33,9 +34,9 @@ public:
void setName(const wxString& dirname);
private:
- virtual bool acceptDrop(const std::vector<wxString>& droppedFiles) { return true; }; //return true if drop should be processed
+ virtual bool acceptDrop(const std::vector<wxString>& droppedFiles, const wxPoint& clientPos, const wxWindow& wnd) { return true; }; //return true if drop should be processed
- void OnFilesDropped(FFSFileDropEvent& event);
+ void OnFilesDropped(FileDropEvent& event);
void OnWriteDirManually(wxCommandEvent& event);
void OnDirSelected(wxFileDirPickerEvent& event);
@@ -43,7 +44,7 @@ private:
const wxWindow* dropWindow2_;
wxDirPickerCtrl& dirPicker_;
NameControl& dirName_;
- wxStaticBoxSizer* staticBox_; //optional
+ wxStaticText* staticText_; //optional
};
}
diff --git a/ui/exec_finished_box.cpp b/ui/exec_finished_box.cpp
index 49c490ad..06fad778 100644
--- a/ui/exec_finished_box.cpp
+++ b/ui/exec_finished_box.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "exec_finished_box.h"
diff --git a/ui/exec_finished_box.h b/ui/exec_finished_box.h
index c179f5c0..87108a7d 100644
--- a/ui/exec_finished_box.h
+++ b/ui/exec_finished_box.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef EXEC_FINISHED_BOX_18947773210473214
diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp
index 6ce8ee88..7f7b08ef 100644
--- a/ui/folder_history_box.cpp
+++ b/ui/folder_history_box.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "folder_history_box.h"
diff --git a/ui/folder_history_box.h b/ui/folder_history_box.h
index e48b7fce..d28f3c72 100644
--- a/ui/folder_history_box.h
+++ b/ui/folder_history_box.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef CUSTOMCOMBOBOX_H_INCLUDED
diff --git a/ui/folder_pair.h b/ui/folder_pair.h
index 43a7b279..010d6162 100644
--- a/ui/folder_pair.h
+++ b/ui/folder_pair.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef FOLDERPAIR_H_INCLUDED
@@ -13,6 +13,7 @@
#include "small_dlgs.h"
#include "sync_cfg.h"
#include <wx/event.h>
+#include <wx+/context_menu.h>
#include <wx/menu.h>
#include <wx+/string_conv.h>
#include "../lib/norm_filter.h"
@@ -85,76 +86,55 @@ protected:
basicPanel_(basicPanel)
{
//register events for removal of alternate configuration
- basicPanel_.m_bpButtonAltCompCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfgRemove ), NULL, this);
- basicPanel_.m_bpButtonAltSyncCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfgRemove ), NULL, this);
- basicPanel_.m_bpButtonLocalFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgRemove), NULL, this);
+ basicPanel_.m_bpButtonAltCompCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfgContext ), NULL, this);
+ basicPanel_.m_bpButtonAltSyncCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfgContext ), NULL, this);
+ basicPanel_.m_bpButtonLocalFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgContext), NULL, this);
basicPanel_.m_bpButtonAltCompCfg-> Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfg ), NULL, this);
basicPanel_.m_bpButtonAltSyncCfg-> Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfg ), NULL, this);
basicPanel_.m_bpButtonLocalFilter->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfg), NULL, this);
- basicPanel_.m_bpButtonRemovePair->SetBitmapLabel(GlobalResources::getImage(wxT("removeFolderPair")));
+ basicPanel_.m_bpButtonRemovePair->SetBitmapLabel(GlobalResources::getImage(L"removeFolderPair"));
}
- virtual void OnAltCompCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeAltCompCfg()
{
altCompConfig.reset();
refreshButtons();
}
- virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeAltSyncCfg()
{
altSyncConfig.reset();
refreshButtons();
}
- virtual void OnLocalFilterCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeLocalFilterCfg()
{
localFilter = FilterConfig();
refreshButtons();
}
private:
- void OnAltCompCfgRemove(wxCommandEvent& event)
+ void OnAltCompCfgContext(wxCommandEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemRemove = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Remove alternate settings"));
- contextMenu->Append(itemRemove);
- contextMenu->Connect(itemRemove->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfgRemoveConfirm), NULL, this);
-
- if (!altCompConfig.get())
- contextMenu->Enable(itemRemove->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway
-
- basicPanel_.PopupMenu(contextMenu.get()); //show context menu
+ ContextMenu menu;
+ menu.addItem(_("Remove alternate settings"), [this] { this->removeAltCompCfg(); }, NULL, altCompConfig.get() != NULL);
+ menu.popup(basicPanel_);
}
- void OnAltSyncCfgRemove(wxCommandEvent& event)
+ void OnAltSyncCfgContext(wxCommandEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemRemove = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Remove alternate settings"));
- contextMenu->Append(itemRemove);
- contextMenu->Connect(itemRemove->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfgRemoveConfirm), NULL, this);
-
- if (!altSyncConfig.get())
- contextMenu->Enable(itemRemove->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway
-
- basicPanel_.PopupMenu(contextMenu.get()); //show context menu
+ ContextMenu menu;
+ menu.addItem(_("Remove alternate settings"), [this] { this->removeAltSyncCfg(); }, NULL, altSyncConfig.get() != NULL);
+ menu.popup(basicPanel_);
}
- void OnLocalFilterCfgRemove(wxCommandEvent& event)
+ void OnLocalFilterCfgContext(wxCommandEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemClear = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Clear filter settings"));
- contextMenu->Append(itemClear);
- contextMenu->Connect(itemClear->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgRemoveConfirm), NULL, this);
-
- if (isNullFilter(localFilter))
- contextMenu->Enable(itemClear->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway
-
- basicPanel_.PopupMenu(contextMenu.get()); //show context menu
+ ContextMenu menu;
+ menu.addItem(_("Clear filter settings"), [this] { this->removeLocalFilterCfg(); }, NULL, !isNullFilter(localFilter));
+ menu.popup(basicPanel_);
}
@@ -219,8 +199,6 @@ private:
AltCompCfgPtr altCompConfig; //optional: present if non-NULL
AltSyncCfgPtr altSyncConfig; //
FilterConfig localFilter;
-
- std::unique_ptr<wxMenu> contextMenu;
};
}
diff --git a/ui/grid_view.cpp b/ui/grid_view.cpp
index 7ed2bde1..8460b238 100644
--- a/ui/grid_view.cpp
+++ b/ui/grid_view.cpp
@@ -1,32 +1,18 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "grid_view.h"
#include "sorting.h"
#include "../synchronization.h"
#include <zen/stl_tools.h>
+//#include <zen/perf.h>
using namespace zen;
-GridView::StatusCmpResult::StatusCmpResult() :
- existsLeftOnly(false),
- existsRightOnly(false),
- existsLeftNewer(false),
- existsRightNewer(false),
- existsDifferent(false),
- existsEqual(false),
- existsConflict(false),
-
- filesOnLeftView(0),
- foldersOnLeftView(0),
- filesOnRightView(0),
- foldersOnRightView(0) {}
-
-
template <class StatusResult>
void getNumbers(const FileSystemObject& fsObj, StatusResult& result)
{
@@ -71,6 +57,70 @@ void getNumbers(const FileSystemObject& fsObj, StatusResult& result)
}
+template <class Predicate>
+void GridView::updateView(Predicate pred)
+{
+ viewRef.clear();
+ rowPositions.clear();
+ rowPositionsFirstChild.clear();
+
+ std::for_each(sortedRef.begin(), sortedRef.end(),
+ [&](const RefIndex& ref)
+ {
+ if (const FileSystemObject* fsObj = FileSystemObject::retrieve(ref.objId))
+ if (pred(*fsObj))
+ {
+ //save row position for direct random access to FileMapping or DirMapping
+ rowPositions.insert(std::make_pair(ref.objId, viewRef.size())); //costs: 0.28 µs per call - MSVC based on std::set
+
+ //save row position to identify first child *on sorted subview* of DirMapping or BaseDirMapping in case latter are filtered out
+ const HierarchyObject* parent = &(fsObj->parent());
+ for (;;) //map all yet unassociated parents to this row
+ {
+ const auto rv = rowPositionsFirstChild.insert(std::make_pair(parent, viewRef.size()));
+ if (!rv.second)
+ break;
+
+ if (auto dirObj = dynamic_cast<const DirMapping*>(parent))
+ parent = &(dirObj->parent());
+ else
+ break;
+ }
+
+ //build subview
+ viewRef.push_back(ref.objId);
+ }
+ });
+}
+
+
+int GridView::findRowDirect(FileSystemObject::ObjectIdConst objId) const
+{
+ auto iter = rowPositions.find(objId);
+ return iter != rowPositions.end() ? iter->second : -1;
+}
+
+int GridView::findRowFirstChild(const HierarchyObject* hierObj) const
+{
+ auto iter = rowPositionsFirstChild.find(hierObj);
+ return iter != rowPositionsFirstChild.end() ? iter->second : -1;
+}
+
+
+GridView::StatusCmpResult::StatusCmpResult() :
+ existsLeftOnly (false),
+ existsRightOnly (false),
+ existsLeftNewer (false),
+ existsRightNewer(false),
+ existsDifferent (false),
+ existsEqual (false),
+ existsConflict (false),
+ filesOnLeftView (0),
+ foldersOnLeftView (0),
+ filesOnRightView (0),
+ foldersOnRightView(0) {}
+
+
GridView::StatusCmpResult GridView::updateCmpResult(bool hideFiltered, //maps sortedRef to viewRef
bool leftOnlyFilesActive,
bool rightOnlyFilesActive,
@@ -82,75 +132,65 @@ GridView::StatusCmpResult GridView::updateCmpResult(bool hideFiltered, //maps so
{
StatusCmpResult output;
- viewRef.clear();
-
- for (std::vector<RefIndex>::const_iterator j = sortedRef.begin(); j != sortedRef.end(); ++j)
+ updateView([&](const FileSystemObject& fsObj) -> bool
{
- const FileSystemObject* fsObj = FileSystemObject::retrieve(j->objId);
- if (fsObj)
- {
- //hide filtered row, if corresponding option is set
- if (hideFiltered && !fsObj->isActive())
- continue;
-
- switch (fsObj->getCategory())
- {
- case FILE_LEFT_SIDE_ONLY:
- output.existsLeftOnly = true;
- if (!leftOnlyFilesActive) continue;
- break;
- case FILE_RIGHT_SIDE_ONLY:
- output.existsRightOnly = true;
- if (!rightOnlyFilesActive) continue;
- break;
- case FILE_LEFT_NEWER:
- output.existsLeftNewer = true;
- if (!leftNewerFilesActive) continue;
- break;
- case FILE_RIGHT_NEWER:
- output.existsRightNewer = true;
- if (!rightNewerFilesActive) continue;
- break;
- case FILE_DIFFERENT:
- output.existsDifferent = true;
- if (!differentFilesActive) continue;
- break;
- case FILE_EQUAL:
- output.existsEqual = true;
- if (!equalFilesActive) continue;
- break;
- case FILE_CONFLICT:
- case FILE_DIFFERENT_METADATA: //no extra button on screen
- output.existsConflict = true;
- if (!conflictFilesActive) continue;
- break;
- }
-
- //calculate total number of bytes for each side
- getNumbers(*fsObj, output);
+ if (hideFiltered && !fsObj.isActive())
+ return false;
- viewRef.push_back(j->objId);
+ switch (fsObj.getCategory())
+ {
+ case FILE_LEFT_SIDE_ONLY:
+ output.existsLeftOnly = true;
+ if (!leftOnlyFilesActive) return false;
+ break;
+ case FILE_RIGHT_SIDE_ONLY:
+ output.existsRightOnly = true;
+ if (!rightOnlyFilesActive) return false;
+ break;
+ case FILE_LEFT_NEWER:
+ output.existsLeftNewer = true;
+ if (!leftNewerFilesActive) return false;
+ break;
+ case FILE_RIGHT_NEWER:
+ output.existsRightNewer = true;
+ if (!rightNewerFilesActive) return false;
+ break;
+ case FILE_DIFFERENT:
+ output.existsDifferent = true;
+ if (!differentFilesActive) return false;
+ break;
+ case FILE_EQUAL:
+ output.existsEqual = true;
+ if (!equalFilesActive) return false;
+ break;
+ case FILE_CONFLICT:
+ case FILE_DIFFERENT_METADATA: //no extra button on screen
+ output.existsConflict = true;
+ if (!conflictFilesActive) return false;
+ break;
}
- }
+ //calculate total number of bytes for each side
+ getNumbers(fsObj, output);
+ return true;
+ });
return output;
}
GridView::StatusSyncPreview::StatusSyncPreview() :
- existsSyncCreateLeft(false),
+ existsSyncCreateLeft (false),
existsSyncCreateRight(false),
- existsSyncDeleteLeft(false),
+ existsSyncDeleteLeft (false),
existsSyncDeleteRight(false),
- existsSyncDirLeft(false),
- existsSyncDirRight(false),
- existsSyncDirNone(false),
- existsSyncEqual(false),
- existsConflict(false),
-
- filesOnLeftView(0),
- foldersOnLeftView(0),
- filesOnRightView(0),
+ existsSyncDirLeft (false),
+ existsSyncDirRight (false),
+ existsSyncDirNone (false),
+ existsSyncEqual (false),
+ existsConflict (false),
+ filesOnLeftView (0),
+ foldersOnLeftView (0),
+ filesOnRightView (0),
foldersOnRightView(0) {}
@@ -167,86 +207,76 @@ GridView::StatusSyncPreview GridView::updateSyncPreview(bool hideFiltered, //map
{
StatusSyncPreview output;
- viewRef.clear();
-
- for (std::vector<RefIndex>::const_iterator j = sortedRef.begin(); j != sortedRef.end(); ++j)
+ updateView([&](const FileSystemObject& fsObj) -> bool
{
- const FileSystemObject* fsObj = FileSystemObject::retrieve(j->objId);
- if (fsObj)
- {
- //hide filtered row, if corresponding option is set
- if (hideFiltered && !fsObj->isActive())
- continue;
-
- switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction
- {
- case SO_CREATE_NEW_LEFT:
- case SO_MOVE_LEFT_TARGET:
- output.existsSyncCreateLeft = true;
- if (!syncCreateLeftActive) continue;
- break;
- case SO_CREATE_NEW_RIGHT:
- case SO_MOVE_RIGHT_TARGET:
- output.existsSyncCreateRight = true;
- if (!syncCreateRightActive) continue;
- break;
- case SO_DELETE_LEFT:
- case SO_MOVE_LEFT_SOURCE:
- output.existsSyncDeleteLeft = true;
- if (!syncDeleteLeftActive) continue;
- break;
- case SO_DELETE_RIGHT:
- case SO_MOVE_RIGHT_SOURCE:
- output.existsSyncDeleteRight = true;
- if (!syncDeleteRightActive) continue;
- break;
- case SO_OVERWRITE_RIGHT:
- case SO_COPY_METADATA_TO_RIGHT: //no extra button on screen
- output.existsSyncDirRight = true;
- if (!syncDirOverwRightActive) continue;
- break;
- case SO_OVERWRITE_LEFT:
- case SO_COPY_METADATA_TO_LEFT: //no extra button on screen
- output.existsSyncDirLeft = true;
- if (!syncDirOverwLeftActive) continue;
- break;
- case SO_DO_NOTHING:
- output.existsSyncDirNone = true;
- if (!syncDirNoneActive) continue;
- break;
- case SO_EQUAL:
- output.existsSyncEqual = true;
- if (!syncEqualActive) continue;
- break;
- case SO_UNRESOLVED_CONFLICT:
- output.existsConflict = true;
- if (!conflictFilesActive) continue;
- break;
- }
-
- //calculate total number of bytes for each side
- getNumbers(*fsObj, output);
+ if (hideFiltered && !fsObj.isActive())
+ return false;
- viewRef.push_back(j->objId);
+ switch (fsObj.getSyncOperation()) //evaluate comparison result and sync direction
+ {
+ case SO_CREATE_NEW_LEFT:
+ case SO_MOVE_LEFT_TARGET:
+ output.existsSyncCreateLeft = true;
+ if (!syncCreateLeftActive) return false;
+ break;
+ case SO_CREATE_NEW_RIGHT:
+ case SO_MOVE_RIGHT_TARGET:
+ output.existsSyncCreateRight = true;
+ if (!syncCreateRightActive) return false;
+ break;
+ case SO_DELETE_LEFT:
+ case SO_MOVE_LEFT_SOURCE:
+ output.existsSyncDeleteLeft = true;
+ if (!syncDeleteLeftActive) return false;
+ break;
+ case SO_DELETE_RIGHT:
+ case SO_MOVE_RIGHT_SOURCE:
+ output.existsSyncDeleteRight = true;
+ if (!syncDeleteRightActive) return false;
+ break;
+ case SO_OVERWRITE_RIGHT:
+ case SO_COPY_METADATA_TO_RIGHT: //no extra button on screen
+ output.existsSyncDirRight = true;
+ if (!syncDirOverwRightActive) return false;
+ break;
+ case SO_OVERWRITE_LEFT:
+ case SO_COPY_METADATA_TO_LEFT: //no extra button on screen
+ output.existsSyncDirLeft = true;
+ if (!syncDirOverwLeftActive) return false;
+ break;
+ case SO_DO_NOTHING:
+ output.existsSyncDirNone = true;
+ if (!syncDirNoneActive) return false;
+ break;
+ case SO_EQUAL:
+ output.existsSyncEqual = true;
+ if (!syncEqualActive) return false;
+ break;
+ case SO_UNRESOLVED_CONFLICT:
+ output.existsConflict = true;
+ if (!conflictFilesActive) return false;
+ break;
}
- }
+
+ //calculate total number of bytes for each side
+ getNumbers(fsObj, output);
+ return true;
+ });
return output;
}
-void GridView::getAllFileRef(const std::set<size_t>& guiRows, std::vector<FileSystemObject*>& output)
+void GridView::getAllFileRef(const std::set<size_t>& rows, std::vector<FileSystemObject*>& output)
{
- std::set<size_t>::const_iterator upperEnd = guiRows.lower_bound(rowsOnView()); //loop over valid rows only!
-
output.clear();
- output.reserve(guiRows.size());
+ output.reserve(rows.size());
- std::for_each(guiRows.begin(), upperEnd,
+ auto iterLast = rows.lower_bound(rowsOnView()); //loop over valid rows only!
+ std::for_each(rows.begin(), iterLast,
[&](size_t pos)
{
- FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef[pos]);
- if (fsObj)
+ if (FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef[pos]))
output.push_back(fsObj);
});
}
@@ -255,20 +285,14 @@ void GridView::getAllFileRef(const std::set<size_t>& guiRows, std::vector<FileSy
void GridView::removeInvalidRows()
{
viewRef.clear();
+ rowPositions.clear();
+ rowPositionsFirstChild.clear();
//remove rows that have been deleted meanwhile
vector_remove_if(sortedRef, [&](const RefIndex& refIdx) { return FileSystemObject::retrieve(refIdx.objId) == NULL; });
}
-void GridView::clearAllRows()
-{
- std::vector<FileSystemObject::ObjectID>().swap(viewRef); //free mem
- std::vector<RefIndex>().swap(sortedRef); //
- folderCmp.clear();
-}
-
-
class GridView::SerializeHierarchy
{
public:
@@ -305,15 +329,15 @@ private:
};
-void GridView::setData(FolderComparison& newData)
+void GridView::setData(FolderComparison& folderCmp)
{
- clearAllRows();
+ //clear everything
+ std::vector<FileSystemObject::ObjectId>().swap(viewRef); //free mem
+ std::vector<RefIndex>().swap(sortedRef); //
+ currentSort.reset();
- folderCmp.swap(newData);
-
- //fill sortedRef
- for (auto j = begin(folderCmp); j != end(folderCmp); ++j)
- SerializeHierarchy(sortedRef, j - folderCmp.begin()).execute(*j);
+ for (auto iter = begin(folderCmp); iter != end(folderCmp); ++iter)
+ SerializeHierarchy(sortedRef, iter - begin(folderCmp)).execute(*iter);
}
@@ -450,20 +474,19 @@ public:
};
//-------------------------------------------------------------------------------------------------------
-bool GridView::getDefaultDirection(SortType type) //true: ascending; false: descending
+bool GridView::getDefaultSortDirection(ColumnTypeRim type) //true: ascending; false: descending
{
switch (type)
{
- case SORT_BY_FILESIZE:
- case SORT_BY_DATE:
+ case COL_TYPE_SIZE:
+ case COL_TYPE_DATE:
return false;
- case SORT_BY_REL_NAME:
- case SORT_BY_FILENAME:
- case SORT_BY_EXTENSION:
- case SORT_BY_CMP_RESULT:
- case SORT_BY_DIRECTORY:
- case SORT_BY_SYNC_DIRECTION:
+ case COL_TYPE_DIRECTORY:
+ case COL_TYPE_FULL_PATH:
+ case COL_TYPE_REL_PATH:
+ case COL_TYPE_FILENAME:
+ case COL_TYPE_EXTENSION:
return true;
}
assert(false);
@@ -471,49 +494,53 @@ bool GridView::getDefaultDirection(SortType type) //true: ascending; false: desc
}
-void GridView::sortView(SortType type, bool onLeft, bool ascending)
+void GridView::sortView(ColumnTypeRim type, bool onLeft, bool ascending)
{
viewRef.clear();
+ rowPositions.clear();
+ rowPositionsFirstChild.clear();
+ currentSort.reset(new SortInfo(type, onLeft, ascending));
switch (type)
{
- case SORT_BY_REL_NAME:
+ case COL_TYPE_FULL_PATH:
+ case COL_TYPE_REL_PATH:
if ( ascending) std::sort(sortedRef.begin(), sortedRef.end(), LessRelativeName<true>());
else if (!ascending) std::sort(sortedRef.begin(), sortedRef.end(), LessRelativeName<false>());
break;
- case SORT_BY_FILENAME:
+ case COL_TYPE_FILENAME:
if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<true, LEFT_SIDE >());
else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<true, RIGHT_SIDE>());
else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<false, LEFT_SIDE >());
else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<false, RIGHT_SIDE>());
break;
- case SORT_BY_FILESIZE:
+ case COL_TYPE_SIZE:
if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<true, LEFT_SIDE >());
else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<true, RIGHT_SIDE>());
else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<false, LEFT_SIDE >());
else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<false, RIGHT_SIDE>());
break;
- case SORT_BY_DATE:
+ case COL_TYPE_DATE:
if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<true, LEFT_SIDE >());
else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<true, RIGHT_SIDE>());
else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<false, LEFT_SIDE >());
else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<false, RIGHT_SIDE>());
break;
- case SORT_BY_EXTENSION:
+ case COL_TYPE_EXTENSION:
if ( ascending && onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<true, LEFT_SIDE >());
else if ( ascending && !onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<true, RIGHT_SIDE>());
else if (!ascending && onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<false, LEFT_SIDE >());
else if (!ascending && !onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<false, RIGHT_SIDE>());
break;
- case SORT_BY_CMP_RESULT:
- if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<true >());
- else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<false>());
- break;
- case SORT_BY_SYNC_DIRECTION:
- if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<true >());
- else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<false>());
- break;
- case SORT_BY_DIRECTORY:
+ //case SORT_BY_CMP_RESULT:
+ // if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<true >());
+ // else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<false>());
+ // break;
+ //case SORT_BY_SYNC_DIRECTION:
+ // if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<true >());
+ // else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<false>());
+ // break;
+ case COL_TYPE_DIRECTORY:
if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), [](const RefIndex a, const RefIndex b) { return a.folderIndex < b.folderIndex; });
else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), [](const RefIndex a, const RefIndex b) { return a.folderIndex > b.folderIndex; });
break;
diff --git a/ui/grid_view.h b/ui/grid_view.h
index 608ddec0..8623f11f 100644
--- a/ui/grid_view.h
+++ b/ui/grid_view.h
@@ -1,30 +1,32 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef GRIDVIEW_H_INCLUDED
#define GRIDVIEW_H_INCLUDED
#include <set>
+#include "column_attr.h"
#include "../file_hierarchy.h"
namespace zen
{
-//gui view of FolderComparison
+//grid view of FolderComparison
class GridView
{
public:
//direct data access via row number
- const FileSystemObject* getObject(size_t row) const; //returns NULL if object is not found; logarithmic complexity
- FileSystemObject* getObject(size_t row); //
- size_t rowsOnView() const; //only the currently visible elements
- size_t rowsTotal() const; //total number of rows available
+ const FileSystemObject* getObject(size_t row) const; //returns NULL if object is not found; complexity: constant!
+ /**/
+ FileSystemObject* getObject(size_t row); //
+ size_t rowsOnView() const { return viewRef .size(); } //only visible elements
+ size_t rowsTotal () const { return sortedRef.size(); } //total rows available
//get references to FileSystemObject: no NULL-check needed! Everything's bound.
- void getAllFileRef(const std::set<size_t>& guiRows, std::vector<FileSystemObject*>& output);
+ void getAllFileRef(const std::set<size_t>& rows, std::vector<FileSystemObject*>& output);
struct StatusCmpResult
{
@@ -92,52 +94,55 @@ public:
bool syncEqualActive,
bool conflictFilesActive);
+ void setData(FolderComparison& newData);
+ void removeInvalidRows(); //remove rows that have been deleted meanwhile: call after manual deletion and synchronization!
+ //sorting...
+ bool static getDefaultSortDirection(zen::ColumnTypeRim type); //true: ascending; false: descending
- FolderComparison& getDataTentative(); //get data for operation that does NOT add or reorder rows! (deletion is okay)
- void setData(FolderComparison& newData); //set data, taking ownership: warning std::swap() is used!!!
- void removeInvalidRows(); //remove rows that have been deleted meanwhile: call after manual deletion and synchronization!
- void clearAllRows(); //clears everything
+ void sortView(zen::ColumnTypeRim type, bool onLeft, bool ascending); //always call this method for sorting, never sort externally!
- //sorting...
- enum SortType
+ struct SortInfo
{
- SORT_BY_REL_NAME,
- SORT_BY_FILENAME,
- SORT_BY_FILESIZE,
- SORT_BY_DATE,
- SORT_BY_EXTENSION,
- SORT_BY_CMP_RESULT,
- SORT_BY_DIRECTORY,
- SORT_BY_SYNC_DIRECTION
+ SortInfo(zen::ColumnTypeRim type, bool onLeft, bool ascending) : type_(type), onLeft_(onLeft), ascending_(ascending) {}
+ zen::ColumnTypeRim type_;
+ bool onLeft_;
+ bool ascending_;
};
+ const SortInfo* getSortInfo() const { return currentSort.get(); } //return NULL if currently not sorted
- bool static getDefaultDirection(SortType type); //true: ascending; false: descending
-
- void sortView(SortType type, bool onLeft, bool ascending); //always call this method for sorting, never sort externally!
+ int findRowDirect(FileSystemObject::ObjectIdConst objId) const; // find an object's row position on view list directly, return < 0 if not found
+ int findRowFirstChild(const HierarchyObject* hierObj) const; // find first child of DirMapping or BaseDirMapping *on sorted sub view*
+ //"hierObj" may be invalid, it is NOT dereferenced, return < 0 if not found
private:
- class SerializeHierarchy;
-
struct RefIndex
{
- RefIndex(size_t folderInd, FileSystemObject::ObjectID id) :
+ RefIndex(unsigned int folderInd, FileSystemObject::ObjectId id) :
folderIndex(folderInd),
objId(id) {}
- size_t folderIndex;
- FileSystemObject::ObjectID objId;
+ unsigned int folderIndex;
+ FileSystemObject::ObjectId objId;
};
- std::vector<FileSystemObject::ObjectID> viewRef; //partial view on sortedRef
- // |
- // | (update...)
- // \|/
- std::vector<RefIndex> sortedRef; //equivalent to folderCmp, but may be sorted
- // |
- // | (setData)
- // \|/
- FolderComparison folderCmp; //actual comparison data: owned by GridView!
+ template <class Predicate> void updateView(Predicate pred);
+
+ zen::hash_map<FileSystemObject::ObjectIdConst, size_t> rowPositions; //find row positions on sortedRef directly
+ zen::hash_map<const HierarchyObject*, size_t> rowPositionsFirstChild; //find first child on sortedRef of a hierarchy object
+ //NEVER DEREFERENCE HierarchyObject*!!! lookup only!
+
+ std::vector<FileSystemObject::ObjectId> viewRef; //partial view on sortedRef
+ /* /|\
+ | (update...)
+ | */
+ std::vector<RefIndex> sortedRef; //flat view of weak pointers on folderCmp; may be sorted
+ /* /|\
+ | (setData...)
+ | */
+ //std::shared_ptr<FolderComparison> folderCmp; //actual comparison data: owned by GridView!
+
+ class SerializeHierarchy;
//sorting classes
template <bool ascending>
@@ -160,6 +165,8 @@ private:
template <bool ascending>
class LessSyncDirection;
+
+ std::unique_ptr<SortInfo> currentSort;
};
@@ -189,26 +196,6 @@ FileSystemObject* GridView::getObject(size_t row)
//code re-use of const method: see Meyers Effective C++
return const_cast<FileSystemObject*>(static_cast<const GridView&>(*this).getObject(row));
}
-
-
-inline
-size_t GridView::rowsOnView() const
-{
- return viewRef.size();
-}
-
-
-inline
-FolderComparison& GridView::getDataTentative()
-{
- return folderCmp;
-}
-
-inline
-size_t GridView::rowsTotal() const //total number of rows available
-{
- return sortedRef.size();
-}
}
diff --git a/ui/gui_generated.cpp b/ui/gui_generated.cpp
index b79c320f..124354e6 100644
--- a/ui/gui_generated.cpp
+++ b/ui/gui_generated.cpp
@@ -5,10 +5,10 @@
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
-#include "../lib/custom_grid.h"
#include "../wx+/button.h"
#include "../wx+/dir_picker.h"
#include "../wx+/graph.h"
+#include "../wx+/grid.h"
#include "../wx+/toggle_button.h"
#include "exec_finished_box.h"
#include "folder_history_box.h"
@@ -20,922 +20,818 @@
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( wxSize( 640,400 ), wxDefaultSize );
-
- m_menubar1 = new wxMenuBar( 0 );
- m_menuFile = new wxMenu();
- m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
- #ifdef __WXMSW__
- m_menuItem10->SetBitmaps( wxNullBitmap );
- #elif defined( __WXGTK__ )
- m_menuItem10->SetBitmap( wxNullBitmap );
- #endif
- m_menuFile->Append( m_menuItem10 );
-
- m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL );
- #ifdef __WXMSW__
- m_menuItem11->SetBitmaps( wxNullBitmap );
- #elif defined( __WXGTK__ )
- m_menuItem11->SetBitmap( wxNullBitmap );
- #endif
- m_menuFile->Append( m_menuItem11 );
-
- wxMenuItem* m_separator1;
- m_separator1 = m_menuFile->AppendSeparator();
-
- m_menuItemSwitchView = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&witch view") ) + wxT('\t') + wxT("F8"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemSwitchView );
-
- wxMenuItem* m_separator2;
- m_separator2 = m_menuFile->AppendSeparator();
-
- m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl-N"), wxEmptyString, wxITEM_NORMAL );
- #ifdef __WXMSW__
- m_menuItemNew->SetBitmaps( wxNullBitmap );
- #elif defined( __WXGTK__ )
- m_menuItemNew->SetBitmap( wxNullBitmap );
- #endif
- m_menuFile->Append( m_menuItemNew );
-
- m_menuItemSave = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("Ctrl-S"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemSave );
-
- m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("Ctrl-O"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItemLoad );
-
- wxMenuItem* m_separator3;
- m_separator3 = m_menuFile->AppendSeparator();
-
- wxMenuItem* m_menuItem4;
- m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Ctrl-Q"), wxEmptyString, wxITEM_NORMAL );
- m_menuFile->Append( m_menuItem4 );
-
- m_menubar1->Append( m_menuFile, _("&Program") );
-
- m_menuAdvanced = new wxMenu();
- m_menuLanguages = new wxMenu();
- m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages );
-
- wxMenuItem* m_separator4;
- m_separator4 = m_menuAdvanced->AppendSeparator();
-
- m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuAdvanced->Append( m_menuItemGlobSett );
-
- m_menuItem7 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Create batch job...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuAdvanced->Append( m_menuItem7 );
-
- wxMenuItem* m_menuItem5;
- m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuAdvanced->Append( m_menuItem5 );
-
- m_menubar1->Append( m_menuAdvanced, _("&Advanced") );
-
- m_menuHelp = new wxMenu();
- wxMenuItem* m_menuItemReadme;
- m_menuItemReadme = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemReadme );
-
- m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemCheckVer );
-
- wxMenuItem* m_separator5;
- m_separator5 = m_menuHelp->AppendSeparator();
-
- m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("Shift-F1"), wxEmptyString, wxITEM_NORMAL );
- m_menuHelp->Append( m_menuItemAbout );
-
- m_menubar1->Append( m_menuHelp, _("&Help") );
-
- this->SetMenuBar( m_menubar1 );
-
- bSizerPanelHolder = new wxBoxSizer( wxVERTICAL );
-
- m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
- bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer155;
- bSizer155 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer155->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxFlexGridSizer* fgSizer121;
- fgSizer121 = new wxFlexGridSizer( 2, 2, 0, 0 );
- fgSizer121->SetFlexibleDirection( wxBOTH );
- fgSizer121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_staticTextCmpVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCmpVariant->Wrap( -1 );
- m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
- m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- fgSizer121->Add( m_staticTextCmpVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP, 1 );
-
-
- fgSizer121->Add( 0, 0, 1, 0, 5 );
-
- wxBoxSizer* bSizer30;
- bSizer30 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonCompare = new zen::BitmapButton( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,42 ), 0 );
- m_buttonCompare->SetDefault();
- m_buttonCompare->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
- m_buttonCompare->SetToolTip( _("Compare both sides") );
-
- bSizer30->Add( m_buttonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonAbort = new wxButton( m_panelTopButtons, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,42 ), 0 );
- m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
- m_buttonAbort->Enable( false );
- m_buttonAbort->Hide();
-
- bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- fgSizer121->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
- m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
-
- fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
-
- bSizer155->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
-
- bSizerTopButtons->Add( bSizer155, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerTopButtons->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer1551;
- bSizer1551 = new wxBoxSizer( wxHORIZONTAL );
-
- wxFlexGridSizer* fgSizer12;
- fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 );
- fgSizer12->SetFlexibleDirection( wxBOTH );
- fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
-
- fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_staticTextSyncVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSyncVariant->Wrap( -1 );
- m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
- m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- fgSizer12->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP, 1 );
-
- m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
- m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
-
- fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
-
- m_buttonStartSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( 180,42 ), 0 );
- m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
- m_buttonStartSync->SetToolTip( _("Start synchronization") );
-
- fgSizer12->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer1551->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
-
-
- bSizer1551->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerTopButtons->Add( bSizer1551, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelTopButtons->SetSizer( bSizerTopButtons );
- m_panelTopButtons->Layout();
- bSizerTopButtons->Fit( m_panelTopButtons );
- bSizerPanelHolder->Add( m_panelTopButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1601;
- bSizer1601 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer91;
- bSizer91 = new wxBoxSizer( wxHORIZONTAL );
-
- m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelTopLeft->SetMinSize( wxSize( 1,1 ) );
-
- sbSizerDirLeft = new wxStaticBoxSizer( new wxStaticBox( m_panelTopLeft, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL );
-
- m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
-
- sbSizerDirLeft->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 );
-
- m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
-
- sbSizerDirLeft->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_directoryLeft = new FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- sbSizerDirLeft->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerLeft = new zen::DirPickerCtrl( m_panelTopLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerLeft->SetToolTip( _("Select a folder") );
-
- sbSizerDirLeft->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelTopLeft->SetSizer( sbSizerDirLeft );
- m_panelTopLeft->Layout();
- sbSizerDirLeft->Fit( m_panelTopLeft );
- bSizer91->Add( m_panelTopLeft, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelTopMiddle = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer93;
- bSizer93 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer93->Add( 0, 3, 0, 0, 5 );
-
- m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
- m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
-
- bSizer93->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer160;
- bSizer160 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer160->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonAltCompCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer160->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
-
- m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer160->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizer93->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_panelTopMiddle->SetSizer( bSizer93 );
- m_panelTopMiddle->Layout();
- bSizer93->Fit( m_panelTopMiddle );
- bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelTopRight->SetMinSize( wxSize( 1,1 ) );
-
- sbSizerDirRight = new wxStaticBoxSizer( new wxStaticBox( m_panelTopRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL );
-
- m_directoryRight = new FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- sbSizerDirRight->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerRight = new zen::DirPickerCtrl( m_panelTopRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerRight->SetToolTip( _("Select a folder") );
-
- sbSizerDirRight->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelTopRight->SetSizer( sbSizerDirRight );
- m_panelTopRight->Layout();
- sbSizerDirRight->Fit( m_panelTopRight );
- bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 );
-
- m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
- m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 );
- m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) );
-
- bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL );
-
- m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs );
- m_scrolledWindowFolderPairs->Layout();
- bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs );
- bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelDirectoryPairs->SetSizer( bSizer1601 );
- m_panelDirectoryPairs->Layout();
- bSizer1601->Fit( m_panelDirectoryPairs );
- bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_panelGrids = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelGrids->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) );
-
- bSizerGridHolder = new wxBoxSizer( wxHORIZONTAL );
-
- m_panelLeft = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer7;
- bSizer7 = new wxBoxSizer( wxVERTICAL );
-
- m_gridLeft = new CustomGridLeft( m_panelLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-
- // Grid
- m_gridLeft->CreateGrid( 15, 4 );
- m_gridLeft->EnableEditing( false );
- m_gridLeft->EnableGridLines( true );
- m_gridLeft->EnableDragGridSize( true );
- m_gridLeft->SetMargins( 0, 0 );
-
- // Columns
- m_gridLeft->EnableDragColMove( false );
- m_gridLeft->EnableDragColSize( true );
- m_gridLeft->SetColLabelSize( 20 );
- m_gridLeft->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
-
- // Rows
- m_gridLeft->EnableDragRowSize( false );
- m_gridLeft->SetRowLabelSize( 38 );
- m_gridLeft->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
-
- // Label Appearance
-
- // Cell Defaults
- m_gridLeft->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
- m_gridLeft->SetMinSize( wxSize( 1,1 ) );
-
- bSizer7->Add( m_gridLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelLeft->SetSizer( bSizer7 );
- m_panelLeft->Layout();
- bSizer7->Fit( m_panelLeft );
- bSizerGridHolder->Add( m_panelLeft, 1, wxEXPAND, 5 );
-
- m_panelMiddle = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer18;
- bSizer18 = new wxBoxSizer( wxVERTICAL );
-
- m_gridMiddle = new CustomGridMiddle( m_panelMiddle, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-
- // Grid
- m_gridMiddle->CreateGrid( 15, 1 );
- m_gridMiddle->EnableEditing( false );
- m_gridMiddle->EnableGridLines( true );
- m_gridMiddle->EnableDragGridSize( false );
- m_gridMiddle->SetMargins( 0, 0 );
-
- // Columns
- m_gridMiddle->SetColSize( 0, 60 );
- m_gridMiddle->EnableDragColMove( false );
- m_gridMiddle->EnableDragColSize( false );
- m_gridMiddle->SetColLabelSize( 20 );
- m_gridMiddle->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
-
- // Rows
- m_gridMiddle->EnableDragRowSize( false );
- m_gridMiddle->SetRowLabelSize( 0 );
- m_gridMiddle->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
-
- // Label Appearance
-
- // Cell Defaults
- m_gridMiddle->SetDefaultCellFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Arial") ) );
- m_gridMiddle->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
- bSizer18->Add( m_gridMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- m_panelMiddle->SetSizer( bSizer18 );
- m_panelMiddle->Layout();
- bSizer18->Fit( m_panelMiddle );
- bSizerGridHolder->Add( m_panelMiddle, 0, wxEXPAND, 5 );
-
- m_panelRight = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer10;
- bSizer10 = new wxBoxSizer( wxVERTICAL );
-
- m_gridRight = new CustomGridRight( m_panelRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-
- // Grid
- m_gridRight->CreateGrid( 15, 4 );
- m_gridRight->EnableEditing( false );
- m_gridRight->EnableGridLines( true );
- m_gridRight->EnableDragGridSize( true );
- m_gridRight->SetMargins( 0, 0 );
-
- // Columns
- m_gridRight->EnableDragColMove( false );
- m_gridRight->EnableDragColSize( true );
- m_gridRight->SetColLabelSize( 20 );
- m_gridRight->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
-
- // Rows
- m_gridRight->EnableDragRowSize( false );
- m_gridRight->SetRowLabelSize( 0 );
- m_gridRight->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
-
- // Label Appearance
-
- // Cell Defaults
- m_gridRight->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
- m_gridRight->SetMinSize( wxSize( 1,1 ) );
-
- bSizer10->Add( m_gridRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelRight->SetSizer( bSizer10 );
- m_panelRight->Layout();
- bSizer10->Fit( m_panelRight );
- bSizerGridHolder->Add( m_panelRight, 1, wxEXPAND, 5 );
-
- m_panelGrids->SetSizer( bSizerGridHolder );
- m_panelGrids->Layout();
- bSizerGridHolder->Fit( m_panelGrids );
- bSizerPanelHolder->Add( m_panelGrids, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerConfig = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer151;
- bSizer151 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- m_bpButtonSave->SetToolTip( _("Save current configuration to file") );
-
- bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLoad = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- m_bpButtonLoad->SetToolTip( _("Load configuration from file") );
-
- bSizer151->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_listBoxHistory = new wxListBox( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_SORT );
- m_listBoxHistory->SetToolTip( _("Last used configurations (press DEL to remove from list)") );
- m_listBoxHistory->SetMinSize( wxSize( -1,40 ) );
-
- bSizerConfig->Add( m_listBoxHistory, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelConfig->SetSizer( bSizerConfig );
- m_panelConfig->Layout();
- bSizerConfig->Fit( m_panelConfig );
- bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 );
-
- m_panelFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer171;
- bSizer171 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
- bSizer171->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") );
-
- bSizer171->Add( m_checkBoxHideFilt, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelFilter->SetSizer( bSizer171 );
- m_panelFilter->Layout();
- bSizer171->Fit( m_panelFilter );
- bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 );
-
- m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerStatistics = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 );
-
- wxFlexGridSizer* fgSizer5;
- fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 );
- fgSizer5->SetFlexibleDirection( wxHORIZONTAL );
- fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_bitmapCreate = new wxStaticBitmap( m_panelStatistics, 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( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlCreate->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") );
-
- fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapUpdate = new wxStaticBitmap( m_panelStatistics, 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( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlUpdate->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") );
-
- fgSizer5->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatistics->Add( fgSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
-
- wxFlexGridSizer* fgSizer6;
- fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 );
- fgSizer6->SetFlexibleDirection( wxHORIZONTAL );
- fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_bitmapDelete = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") );
-
- fgSizer6->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlDelete = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlDelete->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") );
-
- fgSizer6->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") );
-
- fgSizer6->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_textCtrlData = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") );
-
- fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatistics->Add( fgSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
-
-
- bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_panelStatistics->SetSizer( bSizerStatistics );
- m_panelStatistics->Layout();
- bSizerStatistics->Fit( m_panelStatistics );
- bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- bSizerViewFilter->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_panelViewFilter->SetSizer( bSizerViewFilter );
- m_panelViewFilter->Layout();
- bSizerViewFilter->Fit( m_panelViewFilter );
- bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer451;
- bSizer451 = new wxBoxSizer( wxHORIZONTAL );
-
- bSizer451->SetMinSize( wxSize( -1,22 ) );
- wxBoxSizer* bSizer53;
- bSizer53 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusLeftDirs->Wrap( -1 );
- bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
-
- m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusLeftFiles->Wrap( -1 );
- bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
-
- m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusLeftBytes->Wrap( -1 );
- bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer451->Add( bSizer53, 1, wxALIGN_BOTTOM|wxEXPAND, 5 );
-
- m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 );
-
-
- bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusMiddle->Wrap( -1 );
- m_staticTextStatusMiddle->SetFont( wxFont( 8, 74, 90, 92, false, wxT("MS Shell Dlg 2") ) );
-
- bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 );
-
- wxBoxSizer* bSizer52;
- bSizer52 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusRightDirs->Wrap( -1 );
- bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
-
- m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 );
-
- m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusRightFiles->Wrap( -1 );
- bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
-
- m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatusRightBytes->Wrap( -1 );
- bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer50;
- bSizer50 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer50->Add( 0, 0, 1, wxALIGN_BOTTOM, 5 );
-
- m_bitmap15 = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 );
- bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 5 );
-
- bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM, 5 );
-
- bSizer451->Add( bSizer52, 1, wxALIGN_BOTTOM|wxEXPAND, 5 );
-
- m_panelStatusBar->SetSizer( bSizer451 );
- m_panelStatusBar->Layout();
- bSizer451->Fit( m_panelStatusBar );
- bSizerPanelHolder->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- this->SetSizer( bSizerPanelHolder );
- this->Layout();
- bSizerPanelHolder->Fit( this );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
- this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
- this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
- this->Connect( m_menuItemSwitchView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) );
- this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) );
- this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) );
- this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) );
- this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
- 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 ) );
- this->Connect( m_menuItemReadme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
- this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
- this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
- m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
- m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), 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_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
- m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
- m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), 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::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::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::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::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_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
- m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
- m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
- m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
- m_bpButtonSyncDirOverwLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this );
- m_bpButtonSyncDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), 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 );
- m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this );
- m_bpButtonSyncDirNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this );
- m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this );
- m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this );
- m_bpButtonSyncDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this );
- m_bpButtonSyncDirOverwRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this );
- m_bpButtonSyncCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this );
- m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this );
+ this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize );
+
+ m_menubar1 = new wxMenuBar( 0 );
+ m_menuFile = new wxMenu();
+ m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
+#ifdef __WXMSW__
+ m_menuItem10->SetBitmaps( wxNullBitmap );
+#elif defined( __WXGTK__ )
+ m_menuItem10->SetBitmap( wxNullBitmap );
+#endif
+ m_menuFile->Append( m_menuItem10 );
+
+ m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL );
+#ifdef __WXMSW__
+ m_menuItem11->SetBitmaps( wxNullBitmap );
+#elif defined( __WXGTK__ )
+ m_menuItem11->SetBitmap( wxNullBitmap );
+#endif
+ m_menuFile->Append( m_menuItem11 );
+
+ wxMenuItem* m_separator1;
+ m_separator1 = m_menuFile->AppendSeparator();
+
+ m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL );
+#ifdef __WXMSW__
+ m_menuItemNew->SetBitmaps( wxNullBitmap );
+#elif defined( __WXGTK__ )
+ m_menuItemNew->SetBitmap( wxNullBitmap );
+#endif
+ m_menuFile->Append( m_menuItemNew );
+
+ m_menuItemSave = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemSave );
+
+ m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItemLoad );
+
+ wxMenuItem* m_separator3;
+ m_separator3 = m_menuFile->AppendSeparator();
+
+ wxMenuItem* m_menuItem4;
+ m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL );
+ m_menuFile->Append( m_menuItem4 );
+
+ m_menubar1->Append( m_menuFile, _("&Program") );
+
+ m_menuAdvanced = new wxMenu();
+ m_menuLanguages = new wxMenu();
+ m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages );
+
+ wxMenuItem* m_separator4;
+ m_separator4 = m_menuAdvanced->AppendSeparator();
+
+ m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuAdvanced->Append( m_menuItemGlobSett );
+
+ m_menuItem7 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Create batch job...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuAdvanced->Append( m_menuItem7 );
+
+ wxMenuItem* m_menuItem5;
+ m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuAdvanced->Append( m_menuItem5 );
+
+ m_menubar1->Append( m_menuAdvanced, _("&Advanced") );
+
+ m_menuHelp = new wxMenu();
+ wxMenuItem* m_menuItemReadme;
+ m_menuItemReadme = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemReadme );
+
+ m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemCheckVer );
+
+ wxMenuItem* m_separator5;
+ m_separator5 = m_menuHelp->AppendSeparator();
+
+ m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL );
+ m_menuHelp->Append( m_menuItemAbout );
+
+ m_menubar1->Append( m_menuHelp, _("&Help") );
+
+ this->SetMenuBar( m_menubar1 );
+
+ bSizerPanelHolder = new wxBoxSizer( wxVERTICAL );
+
+ m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
+ bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer155;
+ bSizer155 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer155->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxFlexGridSizer* fgSizer121;
+ fgSizer121 = new wxFlexGridSizer( 2, 2, 0, 0 );
+ fgSizer121->SetFlexibleDirection( wxBOTH );
+ fgSizer121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextCmpVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCmpVariant->Wrap( -1 );
+ m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+ m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ fgSizer121->Add( m_staticTextCmpVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP, 1 );
+
+
+ fgSizer121->Add( 0, 0, 1, 0, 5 );
+
+ wxBoxSizer* bSizer30;
+ bSizer30 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonCompare = new zen::BitmapButton( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,42 ), 0 );
+ m_buttonCompare->SetDefault();
+ m_buttonCompare->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
+ m_buttonCompare->SetToolTip( _("Compare both sides") );
+
+ bSizer30->Add( m_buttonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonAbort = new wxButton( m_panelTopButtons, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,42 ), 0 );
+ m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
+ m_buttonAbort->Enable( false );
+ m_buttonAbort->Hide();
+
+ bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ fgSizer121->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
+
+ fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
+
+ bSizer155->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+
+ bSizerTopButtons->Add( bSizer155, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerTopButtons->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer1551;
+ bSizer1551 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxFlexGridSizer* fgSizer12;
+ fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 );
+ fgSizer12->SetFlexibleDirection( wxBOTH );
+ fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticTextSyncVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSyncVariant->Wrap( -1 );
+ m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+ m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ fgSizer12->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP, 1 );
+
+ m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
+
+ fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
+
+ m_buttonStartSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( 180,42 ), 0 );
+ m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) );
+ m_buttonStartSync->SetToolTip( _("Start synchronization") );
+
+ fgSizer12->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer1551->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+
+
+ bSizer1551->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerTopButtons->Add( bSizer1551, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelTopButtons->SetSizer( bSizerTopButtons );
+ m_panelTopButtons->Layout();
+ bSizerTopButtons->Fit( m_panelTopButtons );
+ bSizerPanelHolder->Add( m_panelTopButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1601;
+ bSizer1601 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer91;
+ bSizer91 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopLeft->SetMinSize( wxSize( 1,-1 ) );
+
+ wxBoxSizer* bSizer180;
+ bSizer180 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer181;
+ bSizer181 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer181->Add( 25, 0, 0, 0, 5 );
+
+ m_staticTextFinalPathLeft = new wxStaticText( m_panelTopLeft, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFinalPathLeft->Wrap( -1 );
+ bSizer181->Add( m_staticTextFinalPathLeft, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 );
+
+ bSizer180->Add( bSizer181, 0, 0, 5 );
+
+ wxBoxSizer* bSizer182;
+ bSizer182 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
+
+ bSizer182->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+
+ bSizer182->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_directoryLeft = new FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer182->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerLeft = new zen::DirPickerCtrl( m_panelTopLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerLeft->SetToolTip( _("Select a folder") );
+
+ bSizer182->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer180->Add( bSizer182, 0, wxEXPAND, 5 );
+
+ m_panelTopLeft->SetSizer( bSizer180 );
+ m_panelTopLeft->Layout();
+ bSizer180->Fit( m_panelTopLeft );
+ bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelTopMiddle = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer93;
+ bSizer93 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer93->Add( 0, 3, 0, 0, 5 );
+
+ m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
+ m_bpButtonSwapSides->SetToolTip( _("Swap sides") );
+
+ bSizer93->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer160->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonAltCompCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer160->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
+
+ m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer160->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizer93->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_panelTopMiddle->SetSizer( bSizer93 );
+ m_panelTopMiddle->Layout();
+ bSizer93->Fit( m_panelTopMiddle );
+ bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelTopRight->SetMinSize( wxSize( 1,-1 ) );
+
+ wxBoxSizer* bSizer183;
+ bSizer183 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer184;
+ bSizer184 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer184->Add( 25, 0, 0, 0, 5 );
+
+ m_staticTextFinalPathRight = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFinalPathRight->Wrap( -1 );
+ bSizer184->Add( m_staticTextFinalPathRight, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 2 );
+
+ bSizer183->Add( bSizer184, 0, 0, 5 );
+
+ wxBoxSizer* bSizer179;
+ bSizer179 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryRight = new FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer179->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerRight = new zen::DirPickerCtrl( m_panelTopRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerRight->SetToolTip( _("Select a folder") );
+
+ bSizer179->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer183->Add( bSizer179, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelTopRight->SetSizer( bSizer183 );
+ m_panelTopRight->Layout();
+ bSizer183->Fit( m_panelTopRight );
+ bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
+
+ bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 );
+
+ m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL );
+ m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 );
+ m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) );
+
+ bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL );
+
+ m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs );
+ m_scrolledWindowFolderPairs->Layout();
+ bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs );
+ bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelDirectoryPairs->SetSizer( bSizer1601 );
+ m_panelDirectoryPairs->Layout();
+ bSizer1601->Fit( m_panelDirectoryPairs );
+ bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_gridNavi = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridNavi->SetScrollRate( 5, 5 );
+ bSizerPanelHolder->Add( m_gridNavi, 1, wxEXPAND, 5 );
+
+ m_gridMain = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_gridMain->SetScrollRate( 5, 5 );
+ bSizerPanelHolder->Add( m_gridMain, 1, wxEXPAND, 5 );
+
+ m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerConfig = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer151;
+ bSizer151 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonSave->SetToolTip( _("Save current configuration to file") );
+
+ bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLoad = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonLoad->SetToolTip( _("Load configuration from file") );
+
+ bSizer151->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_listBoxHistory = new wxListBox( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_SORT );
+ m_listBoxHistory->SetToolTip( _("Last used configurations (press DEL to remove from list)") );
+ m_listBoxHistory->SetMinSize( wxSize( -1,40 ) );
+
+ bSizerConfig->Add( m_listBoxHistory, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelConfig->SetSizer( bSizerConfig );
+ m_panelConfig->Layout();
+ bSizerConfig->Fit( m_panelConfig );
+ bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 );
+
+ m_panelFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer171;
+ bSizer171 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
+ bSizer171->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") );
+
+ bSizer171->Add( m_checkBoxHideFilt, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelFilter->SetSizer( bSizer171 );
+ m_panelFilter->Layout();
+ bSizer171->Fit( m_panelFilter );
+ bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 );
+
+ m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerStatistics = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ wxFlexGridSizer* fgSizer5;
+ fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 );
+ fgSizer5->SetFlexibleDirection( wxHORIZONTAL );
+ fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_bitmapCreate = new wxStaticBitmap( m_panelStatistics, 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( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlCreate->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") );
+
+ fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmapUpdate = new wxStaticBitmap( m_panelStatistics, 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( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlUpdate->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer5->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatistics->Add( fgSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
+
+ wxFlexGridSizer* fgSizer6;
+ fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 );
+ fgSizer6->SetFlexibleDirection( wxHORIZONTAL );
+ fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_bitmapDelete = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") );
+
+ fgSizer6->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlDelete = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlDelete->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") );
+
+ fgSizer6->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") );
+
+ fgSizer6->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_textCtrlData = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") );
+
+ fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatistics->Add( fgSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
+
+
+ bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_panelStatistics->SetSizer( bSizerStatistics );
+ m_panelStatistics->Layout();
+ bSizerStatistics->Fit( m_panelStatistics );
+ bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ bSizerViewFilter->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_panelViewFilter->SetSizer( bSizerViewFilter );
+ m_panelViewFilter->Layout();
+ bSizerViewFilter->Fit( m_panelViewFilter );
+ bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer451;
+ bSizer451 = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizer451->SetMinSize( wxSize( -1,22 ) );
+ wxBoxSizer* bSizer53;
+ bSizer53 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusLeftDirs->Wrap( -1 );
+ bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusLeftFiles->Wrap( -1 );
+ bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusLeftBytes->Wrap( -1 );
+ bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer451->Add( bSizer53, 1, wxALIGN_BOTTOM|wxEXPAND, 5 );
+
+ m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 );
+
+
+ bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusMiddle->Wrap( -1 );
+ m_staticTextStatusMiddle->SetFont( wxFont( 8, 74, 90, 92, false, wxT("MS Shell Dlg 2") ) );
+
+ bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 );
+
+ wxBoxSizer* bSizer52;
+ bSizer52 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusRightDirs->Wrap( -1 );
+ bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 );
+
+ m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusRightFiles->Wrap( -1 );
+ bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 );
+
+ m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatusRightBytes->Wrap( -1 );
+ bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer50;
+ bSizer50 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer50->Add( 0, 0, 1, wxALIGN_BOTTOM, 5 );
+
+ m_bitmapResizeCorner = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 );
+ bSizer50->Add( m_bitmapResizeCorner, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM, 5 );
+
+ bSizer451->Add( bSizer52, 1, wxALIGN_BOTTOM|wxEXPAND, 5 );
+
+ m_panelStatusBar->SetSizer( bSizer451 );
+ m_panelStatusBar->Layout();
+ bSizer451->Fit( m_panelStatusBar );
+ bSizerPanelHolder->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ this->SetSizer( bSizerPanelHolder );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
+ this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
+ this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
+ this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) );
+ this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) );
+ this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) );
+ this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
+ 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 ) );
+ this->Connect( m_menuItemReadme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
+ this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
+ this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
+ m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
+ m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), 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_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
+ m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
+ m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
+ m_dirPickerRight->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), 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_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
+ m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
+ m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
+ m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
+ m_bpButtonSyncDirOverwLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this );
+ m_bpButtonSyncDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), 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 );
+ m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this );
+ m_bpButtonSyncDirNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this );
+ m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this );
+ m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this );
+ m_bpButtonSyncDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this );
+ m_bpButtonSyncDirOverwRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this );
+ m_bpButtonSyncCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this );
+ m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this );
}
MainDialogGenerated::~MainDialogGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) );
- this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
- 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 ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
- this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
- this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
- m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
- m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), 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_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
- m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
- m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), 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::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::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::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::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_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
- m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
- m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
- m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
- m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
- m_bpButtonSyncDirOverwLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this );
- m_bpButtonSyncDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), 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 );
- m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this );
- m_bpButtonSyncDirNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this );
- m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this );
- m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this );
- m_bpButtonSyncDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this );
- m_bpButtonSyncDirOverwRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this );
- m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this );
- m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) );
+ this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) );
+ 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 ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) );
+ this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) );
+ m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this );
+ m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), 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_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this );
+ m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this );
+ m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this );
+ m_dirPickerRight->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), 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_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this );
+ m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this );
+ m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this );
+ m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this );
+ m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this );
+ m_bpButtonSyncDirOverwLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this );
+ m_bpButtonSyncDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), 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 );
+ m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this );
+ m_bpButtonSyncDirNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this );
+ m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this );
+ m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this );
+ m_bpButtonSyncDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this );
+ m_bpButtonSyncDirOverwRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this );
+ m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this );
+ m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this );
+
}
FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- wxBoxSizer* bSizer74;
- bSizer74 = new wxBoxSizer( wxHORIZONTAL );
-
- m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer134;
- bSizer134 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
-
- bSizer134->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerLeft->SetToolTip( _("Select a folder") );
-
- bSizer134->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_panelLeft->SetSizer( bSizer134 );
- m_panelLeft->Layout();
- bSizer134->Fit( m_panelLeft );
- bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer95;
- bSizer95 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonAltCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer95->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
-
- m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer95->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_panel20->SetSizer( bSizer95 );
- m_panel20->Layout();
- bSizer95->Fit( m_panel20 );
- bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer135;
- bSizer135 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerRight->SetToolTip( _("Select a folder") );
-
- bSizer135->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_panelRight->SetSizer( bSizer135 );
- m_panelRight->Layout();
- bSizer135->Fit( m_panelRight );
- bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- this->SetSizer( bSizer74 );
- this->Layout();
- bSizer74->Fit( this );
+ wxBoxSizer* bSizer74;
+ bSizer74 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelLeft->SetMinSize( wxSize( 1,-1 ) );
+
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+
+ bSizer134->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerLeft->SetToolTip( _("Select a folder") );
+
+ bSizer134->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelLeft->SetSizer( bSizer134 );
+ m_panelLeft->Layout();
+ bSizer134->Fit( m_panelLeft );
+ bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
+
+ m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer95;
+ bSizer95 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonAltCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
+
+ m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer95->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer95->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_panel20->SetSizer( bSizer95 );
+ m_panel20->Layout();
+ bSizer95->Fit( m_panel20 );
+ bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelRight->SetMinSize( wxSize( 1,-1 ) );
+
+ wxBoxSizer* bSizer135;
+ bSizer135 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerRight->SetToolTip( _("Select a folder") );
+
+ bSizer135->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelRight->SetSizer( bSizer135 );
+ m_panelRight->Layout();
+ bSizer135->Fit( m_panelRight );
+ bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
+
+ this->SetSizer( bSizer74 );
+ this->Layout();
+ bSizer74->Fit( this );
}
FolderPairGenerated::~FolderPairGenerated()
@@ -944,159 +840,159 @@ FolderPairGenerated::~FolderPairGenerated()
CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- wxBoxSizer* bSizer40;
- bSizer40 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer48;
- bSizer48 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText30->Wrap( -1 );
- m_staticText30->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
- m_textCtrlStatus->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer40->Add( bSizer48, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH );
- bSizer40->Add( m_gauge2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- bSizer42 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer157;
- bSizer157 = new wxBoxSizer( wxVERTICAL );
-
- bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText321 = new wxStaticText( this, wxID_ANY, _("Items found:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText321->Wrap( -1 );
- m_staticText321->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextScanned->Wrap( -1 );
- m_staticTextScanned->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
- bSizer157->Add( bSizerFilesFound, 0, 0, 5 );
-
- bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText46 = new wxStaticText( this, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText46->Wrap( -1 );
- m_staticText46->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 );
-
- wxBoxSizer* bSizer154;
- bSizer154 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextFilesRemaining->Wrap( -1 );
- m_staticTextFilesRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText117 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText117->Wrap( -1 );
- m_staticText117->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizer154->Add( m_staticText117, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataRemaining->Wrap( -1 );
- m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText118 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText118->Wrap( -1 );
- m_staticText118->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizer154->Add( m_staticText118, 0, wxALIGN_BOTTOM, 5 );
-
- bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
-
- bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 );
-
- bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
-
- sSizerSpeed = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText104->Wrap( -1 );
- m_staticText104->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSpeed->Wrap( -1 );
- m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeRemFixed->Wrap( -1 );
- m_staticTextTimeRemFixed->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextRemTime = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemTime->Wrap( -1 );
- m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- sSizerTimeRemaining->Add( m_staticTextRemTime, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
-
- sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticText* m_staticText37;
- m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText37->Wrap( -1 );
- m_staticText37->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
-
- this->SetSizer( bSizer40 );
- this->Layout();
- bSizer40->Fit( this );
+ wxBoxSizer* bSizer40;
+ bSizer40 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer48;
+ bSizer48 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText30->Wrap( -1 );
+ m_staticText30->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+ m_textCtrlStatus->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer40->Add( bSizer48, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH );
+ bSizer40->Add( m_gauge2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ bSizer42 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer157;
+ bSizer157 = new wxBoxSizer( wxVERTICAL );
+
+ bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText321 = new wxStaticText( this, wxID_ANY, _("Items found:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText321->Wrap( -1 );
+ m_staticText321->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextScanned->Wrap( -1 );
+ m_staticTextScanned->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+ bSizer157->Add( bSizerFilesFound, 0, 0, 5 );
+
+ bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText46 = new wxStaticText( this, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText46->Wrap( -1 );
+ m_staticText46->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 );
+
+ wxBoxSizer* bSizer154;
+ bSizer154 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextFilesRemaining->Wrap( -1 );
+ m_staticTextFilesRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText117 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText117->Wrap( -1 );
+ m_staticText117->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizer154->Add( m_staticText117, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataRemaining->Wrap( -1 );
+ m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText118 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText118->Wrap( -1 );
+ m_staticText118->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizer154->Add( m_staticText118, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 );
+
+ bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 );
+
+ bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sSizerSpeed = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText104->Wrap( -1 );
+ m_staticText104->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSpeed->Wrap( -1 );
+ m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeRemFixed->Wrap( -1 );
+ m_staticTextTimeRemFixed->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextRemTime = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemTime->Wrap( -1 );
+ m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ sSizerTimeRemaining->Add( m_staticTextRemTime, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer42->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticText* m_staticText37;
+ m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText37->Wrap( -1 );
+ m_staticText37->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer40->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer40 );
+ this->Layout();
+ bSizer40->Fit( this );
}
CompareStatusGenerated::~CompareStatusGenerated()
@@ -1105,525 +1001,529 @@ CompareStatusGenerated::~CompareStatusGenerated()
BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 560,320 ), wxDefaultSize );
-
- wxBoxSizer* bSizer54;
- bSizer54 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer87;
- bSizer87 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap27 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
- bSizer87->Add( m_bitmap27, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
- m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
-
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText56->Wrap( -1 );
- m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_panel8->SetSizer( bSizer72 );
- m_panel8->Layout();
- bSizer72->Fit( m_panel8 );
- bSizer87->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer87->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer70;
- bSizer70 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText44 = new wxStaticText( this, wxID_ANY, _("Create a batch file for automated synchronization. To start in batch mode simply double-click the file or execute via command line: FreeFileSync.exe <ffs_batch file>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText44->Wrap( 460 );
- bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- m_bpButtonHelp->SetToolTip( _("Help") );
-
- bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- bSizer87->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer54->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
-
- m_listbook1 = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_DEFAULT );
- m_panelOverview = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer67;
- bSizer67 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer120;
- bSizer120 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer175;
- bSizer175 = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticBoxSizer* sbSizer241;
- sbSizer241 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare") ), wxHORIZONTAL );
-
- m_bpButtonCmpConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
- m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
-
- sbSizer241->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL, 3 );
-
-
- sbSizer241->Add( 10, 0, 0, 0, 5 );
-
- m_staticTextCmpVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCmpVariant->Wrap( -1 );
- m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
- m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- sbSizer241->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer175->Add( sbSizer241, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer175->Add( 0, 0, 1, wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer26;
- sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL );
-
- m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
- sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 );
-
- bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer175->Add( 0, 0, 1, wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer252;
- sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL );
-
- m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSyncVariant->Wrap( -1 );
- m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
- m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- sbSizer252->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizer252->Add( 10, 0, 0, 0, 5 );
-
- m_bpButtonSyncConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
- m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
-
- sbSizer252->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL, 3 );
-
- bSizer175->Add( sbSizer252, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer120->Add( bSizer175, 0, wxEXPAND, 5 );
-
-
- bSizer120->Add( 0, 5, 0, 0, 5 );
-
- m_scrolledWindow6 = new wxScrolledWindow( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
- m_scrolledWindow6->SetScrollRate( 5, 5 );
- wxBoxSizer* bSizer141;
- bSizer141 = new wxBoxSizer( wxVERTICAL );
-
- sbSizerMainPair = new wxBoxSizer( wxHORIZONTAL );
-
- m_panelMainPair = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER );
- wxBoxSizer* bSizer147;
- bSizer147 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer1361;
- bSizer1361 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonAddPair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
-
- bSizer1361->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 );
-
- m_bpButtonRemovePair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
-
- bSizer1361->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer147->Add( bSizer1361, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer143;
- bSizer143 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer145;
- bSizer145 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText532 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText532->Wrap( -1 );
- m_staticText532->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer145->Add( m_staticText532, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer143->Add( bSizer145, 1, 0, 5 );
-
- wxBoxSizer* bSizer146;
- bSizer146 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText5411 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText5411->Wrap( -1 );
- m_staticText5411->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer146->Add( m_staticText5411, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer143->Add( bSizer146, 1, 0, 5 );
-
- bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_panelMainPair->SetSizer( bSizer147 );
- m_panelMainPair->Layout();
- bSizer147->Fit( m_panelMainPair );
- sbSizerMainPair->Add( m_panelMainPair, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxVERTICAL );
-
- m_panelLeft = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1141;
- bSizer1141 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerLeft->SetToolTip( _("Select a folder") );
-
- bSizer1141->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelLeft->SetSizer( bSizer1141 );
- m_panelLeft->Layout();
- bSizer1141->Fit( m_panelLeft );
- bSizer158->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelRight = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer115;
- bSizer115 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerRight->SetToolTip( _("Select a folder") );
-
- bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelRight->SetSizer( bSizer115 );
- m_panelRight->Layout();
- bSizer115->Fit( m_panelRight );
- bSizer158->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizerMainPair->Add( bSizer158, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer177;
- bSizer177 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonAltCompCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer177->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLocalFilter = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer177->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 );
-
- m_bpButtonAltSyncCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer177->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizerMainPair->Add( bSizer177, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- bSizer141->Add( sbSizerMainPair, 0, wxEXPAND, 5 );
-
- bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL );
-
- bSizer141->Add( bSizerAddFolderPairs, 1, wxEXPAND, 5 );
-
- m_scrolledWindow6->SetSizer( bSizer141 );
- m_scrolledWindow6->Layout();
- bSizer141->Fit( m_scrolledWindow6 );
- bSizer120->Add( m_scrolledWindow6, 1, wxEXPAND, 5 );
-
-
- bSizer120->Add( 0, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 10 );
-
- m_panelOverview->SetSizer( bSizer67 );
- m_panelOverview->Layout();
- bSizer67->Fit( m_panelOverview );
- m_listbook1->AddPage( m_panelOverview, _("Overview"), true );
- m_panelBatchSettings = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer117;
- bSizer117 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer1722;
- bSizer1722 = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticBoxSizer* sbSizer24;
- sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Status feedback") ), wxVERTICAL );
-
- m_checkBoxShowProgress = new wxCheckBox( m_panelBatchSettings, wxID_ANY, _("Show progress dialog"), wxDefaultPosition, wxDefaultSize, 0 );
- sbSizer24->Add( m_checkBoxShowProgress, 0, wxALL|wxEXPAND, 5 );
-
- bSizer1722->Add( sbSizer24, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer1722->Add( 10, 0, 0, 0, 5 );
-
- wxStaticBoxSizer* sbSizer25;
- sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Error handling") ), wxHORIZONTAL );
-
- wxArrayString m_choiceHandleErrorChoices;
- m_choiceHandleError = new wxChoice( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 );
- m_choiceHandleError->SetSelection( 0 );
- sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer1722->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- bSizer172->Add( bSizer1722, 0, wxEXPAND, 5 );
-
-
- bSizer172->Add( 0, 5, 0, 0, 5 );
-
- sbSizerLogfileDir = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Logging") ), wxVERTICAL );
-
- wxBoxSizer* bSizer152;
- bSizer152 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText96 = new wxStaticText( m_panelBatchSettings, wxID_ANY, _("Maximum number of log files:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText96->Wrap( -1 );
- bSizer152->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
-
- bSizer152->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_spinCtrlLogCountMax = new wxSpinCtrl( m_panelBatchSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer152->Add( m_spinCtrlLogCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizerLogfileDir->Add( bSizer152, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- m_panelLogfile = new wxPanel( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1721;
- bSizer1721 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText94 = new wxStaticText( m_panelLogfile, wxID_ANY, _("Select log file directory:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText94->Wrap( -1 );
- bSizer1721->Add( m_staticText94, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- wxBoxSizer* bSizer170;
- bSizer170 = new wxBoxSizer( wxHORIZONTAL );
-
- m_comboBoxLogfileDir = new FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer170->Add( m_comboBoxLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerLogfileDir = new zen::DirPickerCtrl( m_panelLogfile, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerLogfileDir->SetToolTip( _("Select a folder") );
-
- bSizer170->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer1721->Add( bSizer170, 0, wxEXPAND, 5 );
-
- m_panelLogfile->SetSizer( bSizer1721 );
- m_panelLogfile->Layout();
- bSizer1721->Fit( m_panelLogfile );
- sbSizerLogfileDir->Add( m_panelLogfile, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- bSizer172->Add( sbSizerLogfileDir, 0, wxEXPAND, 5 );
-
- bSizer117->Add( bSizer172, 1, wxEXPAND|wxALL, 10 );
-
- m_panelBatchSettings->SetSizer( bSizer117 );
- m_panelBatchSettings->Layout();
- bSizer117->Fit( m_panelBatchSettings );
- m_listbook1->AddPage( m_panelBatchSettings, _("Batch settings"), false );
- #ifndef __WXGTK__ // Small icon style not supported in GTK
- wxListView* m_listbook1ListView = m_listbook1->GetListView();
- long m_listbook1Flags = m_listbook1ListView->GetWindowStyleFlag();
- m_listbook1Flags = ( m_listbook1Flags & ~wxLC_ICON ) | wxLC_SMALL_ICON;
- m_listbook1ListView->SetWindowStyleFlag( m_listbook1Flags );
- #endif
-
- bSizer54->Add( m_listbook1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- wxBoxSizer* bSizer68;
- bSizer68 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonSave->SetDefault();
- m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer68->Add( m_buttonSave, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Load"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonLoad->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer68->Add( m_buttonLoad, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer54->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
-
- this->SetSizer( bSizer54 );
- this->Layout();
- bSizer54->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
- m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
- m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this );
- m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this );
- m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this );
- m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this );
- m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_spinCtrlLogCountMax->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this );
- m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
- m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this );
- m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 560,320 ), wxDefaultSize );
+
+ wxBoxSizer* bSizer54;
+ bSizer54 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer87;
+ bSizer87 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap27 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
+ bSizer87->Add( m_bitmap27, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
+ m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
+
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText56->Wrap( -1 );
+ m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_panel8->SetSizer( bSizer72 );
+ m_panel8->Layout();
+ bSizer72->Fit( m_panel8 );
+ bSizer87->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer87->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer70;
+ bSizer70 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText44 = new wxStaticText( this, wxID_ANY, _("Create a batch file for automated synchronization. To start in batch mode simply double-click the file or execute via command line: FreeFileSync.exe <ffs_batch file>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText44->Wrap( 460 );
+ bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonHelp->SetToolTip( _("Help") );
+
+ bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ bSizer87->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer54->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
+
+ m_listbook1 = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_DEFAULT );
+ m_panelOverview = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer67;
+ bSizer67 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer120;
+ bSizer120 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer175;
+ bSizer175 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer1701;
+ bSizer1701 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer241;
+ sbSizer241 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare") ), wxHORIZONTAL );
+
+ m_bpButtonCmpConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") );
+
+ sbSizer241->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL, 3 );
+
+
+ sbSizer241->Add( 10, 0, 0, 0, 5 );
+
+ m_staticTextCmpVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCmpVariant->Wrap( -1 );
+ m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+ m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ sbSizer241->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer1701->Add( sbSizer241, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer175->Add( bSizer1701, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxStaticBoxSizer* sbSizer26;
+ sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL );
+
+ m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE );
+ sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 );
+
+ bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer171;
+ bSizer171 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer252;
+ sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL );
+
+ m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSyncVariant->Wrap( -1 );
+ m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+ m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ sbSizer252->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizer252->Add( 10, 0, 0, 0, 5 );
+
+ m_bpButtonSyncConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW );
+ m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") );
+
+ sbSizer252->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL, 3 );
+
+ bSizer171->Add( sbSizer252, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+ bSizer175->Add( bSizer171, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer120->Add( bSizer175, 0, wxEXPAND, 5 );
+
+
+ bSizer120->Add( 0, 5, 0, 0, 5 );
+
+ m_scrolledWindow6 = new wxScrolledWindow( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+ m_scrolledWindow6->SetScrollRate( 5, 5 );
+ wxBoxSizer* bSizer141;
+ bSizer141 = new wxBoxSizer( wxVERTICAL );
+
+ sbSizerMainPair = new wxBoxSizer( wxHORIZONTAL );
+
+ m_panelMainPair = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER );
+ wxBoxSizer* bSizer147;
+ bSizer147 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer1361;
+ bSizer1361 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonAddPair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonAddPair->SetToolTip( _("Add folder pair") );
+
+ bSizer1361->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 );
+
+ m_bpButtonRemovePair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+
+ bSizer1361->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer147->Add( bSizer1361, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer143;
+ bSizer143 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer145;
+ bSizer145 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText532 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText532->Wrap( -1 );
+ m_staticText532->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer145->Add( m_staticText532, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer143->Add( bSizer145, 1, 0, 5 );
+
+ wxBoxSizer* bSizer146;
+ bSizer146 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText5411 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText5411->Wrap( -1 );
+ m_staticText5411->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer146->Add( m_staticText5411, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer143->Add( bSizer146, 1, 0, 5 );
+
+ bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_panelMainPair->SetSizer( bSizer147 );
+ m_panelMainPair->Layout();
+ bSizer147->Fit( m_panelMainPair );
+ sbSizerMainPair->Add( m_panelMainPair, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelLeft = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1141;
+ bSizer1141 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerLeft->SetToolTip( _("Select a folder") );
+
+ bSizer1141->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelLeft->SetSizer( bSizer1141 );
+ m_panelLeft->Layout();
+ bSizer1141->Fit( m_panelLeft );
+ bSizer158->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelRight = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer115;
+ bSizer115 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerRight->SetToolTip( _("Select a folder") );
+
+ bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelRight->SetSizer( bSizer115 );
+ m_panelRight->Layout();
+ bSizer115->Fit( m_panelRight );
+ bSizer158->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizerMainPair->Add( bSizer158, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer177;
+ bSizer177 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonAltCompCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer177->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLocalFilter = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer177->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 );
+
+ m_bpButtonAltSyncCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer177->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizerMainPair->Add( bSizer177, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ bSizer141->Add( sbSizerMainPair, 0, wxEXPAND, 5 );
+
+ bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL );
+
+ bSizer141->Add( bSizerAddFolderPairs, 1, wxEXPAND, 5 );
+
+ m_scrolledWindow6->SetSizer( bSizer141 );
+ m_scrolledWindow6->Layout();
+ bSizer141->Fit( m_scrolledWindow6 );
+ bSizer120->Add( m_scrolledWindow6, 1, wxEXPAND, 5 );
+
+
+ bSizer120->Add( 0, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 10 );
+
+ m_panelOverview->SetSizer( bSizer67 );
+ m_panelOverview->Layout();
+ bSizer67->Fit( m_panelOverview );
+ m_listbook1->AddPage( m_panelOverview, _("Overview"), true );
+ m_panelBatchSettings = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer117;
+ bSizer117 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer1722;
+ bSizer1722 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticBoxSizer* sbSizer24;
+ sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Status feedback") ), wxVERTICAL );
+
+ m_checkBoxShowProgress = new wxCheckBox( m_panelBatchSettings, wxID_ANY, _("Show progress dialog"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizer24->Add( m_checkBoxShowProgress, 0, wxALL|wxEXPAND, 5 );
+
+ bSizer1722->Add( sbSizer24, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer1722->Add( 10, 0, 0, 0, 5 );
+
+ wxStaticBoxSizer* sbSizer25;
+ sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Error handling") ), wxHORIZONTAL );
+
+ wxArrayString m_choiceHandleErrorChoices;
+ m_choiceHandleError = new wxChoice( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 );
+ m_choiceHandleError->SetSelection( 0 );
+ sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer1722->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer172->Add( bSizer1722, 0, wxEXPAND, 5 );
+
+
+ bSizer172->Add( 0, 5, 0, 0, 5 );
+
+ sbSizerLogfileDir = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Logging") ), wxVERTICAL );
+
+ wxBoxSizer* bSizer152;
+ bSizer152 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText96 = new wxStaticText( m_panelBatchSettings, wxID_ANY, _("Maximum number of log files:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText96->Wrap( -1 );
+ bSizer152->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+
+ bSizer152->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_spinCtrlLogCountMax = new wxSpinCtrl( m_panelBatchSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer152->Add( m_spinCtrlLogCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizerLogfileDir->Add( bSizer152, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_panelLogfile = new wxPanel( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1721;
+ bSizer1721 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText94 = new wxStaticText( m_panelLogfile, wxID_ANY, _("Select log file directory:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText94->Wrap( -1 );
+ bSizer1721->Add( m_staticText94, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer170;
+ bSizer170 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_comboBoxLogfileDir = new FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer170->Add( m_comboBoxLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerLogfileDir = new zen::DirPickerCtrl( m_panelLogfile, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerLogfileDir->SetToolTip( _("Select a folder") );
+
+ bSizer170->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer1721->Add( bSizer170, 0, wxEXPAND, 5 );
+
+ m_panelLogfile->SetSizer( bSizer1721 );
+ m_panelLogfile->Layout();
+ bSizer1721->Fit( m_panelLogfile );
+ sbSizerLogfileDir->Add( m_panelLogfile, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ bSizer172->Add( sbSizerLogfileDir, 0, wxEXPAND, 5 );
+
+ bSizer117->Add( bSizer172, 1, wxEXPAND|wxALL, 10 );
+
+ m_panelBatchSettings->SetSizer( bSizer117 );
+ m_panelBatchSettings->Layout();
+ bSizer117->Fit( m_panelBatchSettings );
+ m_listbook1->AddPage( m_panelBatchSettings, _("Batch settings"), false );
+#ifndef __WXGTK__ // Small icon style not supported in GTK
+ wxListView* m_listbook1ListView = m_listbook1->GetListView();
+ long m_listbook1Flags = m_listbook1ListView->GetWindowStyleFlag();
+ m_listbook1Flags = ( m_listbook1Flags & ~wxLC_ICON ) | wxLC_SMALL_ICON;
+ m_listbook1ListView->SetWindowStyleFlag( m_listbook1Flags );
+#endif
+
+ bSizer54->Add( m_listbook1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer68;
+ bSizer68 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonSave->SetDefault();
+ m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer68->Add( m_buttonSave, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Load"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonLoad->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer68->Add( m_buttonLoad, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer54->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
+
+ this->SetSizer( bSizer54 );
+ this->Layout();
+ bSizer54->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
+ m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this );
+ m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this );
+ m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this );
+ m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this );
+ m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_spinCtrlLogCountMax->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this );
+ m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
+ m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this );
+ m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
}
BatchDlgGenerated::~BatchDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
- m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
- m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this );
- m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this );
- m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this );
- m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this );
- m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this );
- m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_spinCtrlLogCountMax->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this );
- m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
- m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this );
- m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this );
+ m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this );
+ m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this );
+ m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this );
+ m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this );
+ m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this );
+ m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_spinCtrlLogCountMax->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this );
+ m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this );
+ m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this );
+ m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this );
+
}
BatchFolderPairGenerated::BatchFolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- wxBoxSizer* bSizer142;
- bSizer142 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer140;
- bSizer140 = new wxBoxSizer( wxHORIZONTAL );
-
- m_panel32 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER );
- wxBoxSizer* bSizer147;
- bSizer147 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer136;
- bSizer136 = new wxBoxSizer( wxVERTICAL );
-
- m_bpButtonRemovePair = new wxBitmapButton( m_panel32, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
-
- bSizer136->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer147->Add( bSizer136, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer143;
- bSizer143 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer145;
- bSizer145 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText53 = new wxStaticText( m_panel32, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText53->Wrap( -1 );
- m_staticText53->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer145->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer143->Add( bSizer145, 1, 0, 5 );
-
- wxBoxSizer* bSizer146;
- bSizer146 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText541 = new wxStaticText( m_panel32, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText541->Wrap( -1 );
- m_staticText541->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer146->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer143->Add( bSizer146, 1, 0, 5 );
-
- bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- m_panel32->SetSizer( bSizer147 );
- m_panel32->Layout();
- bSizer147->Fit( m_panel32 );
- bSizer140->Add( m_panel32, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer144;
- bSizer144 = new wxBoxSizer( wxVERTICAL );
-
- m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer114;
- bSizer114 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerLeft->SetToolTip( _("Select a folder") );
-
- bSizer114->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelLeft->SetSizer( bSizer114 );
- m_panelLeft->Layout();
- bSizer114->Fit( m_panelLeft );
- bSizer144->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer115;
- bSizer115 = new wxBoxSizer( wxHORIZONTAL );
-
- m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- m_dirPickerRight->SetToolTip( _("Select a folder") );
-
- bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelRight->SetSizer( bSizer115 );
- m_panelRight->Layout();
- bSizer115->Fit( m_panelRight );
- bSizer144->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer140->Add( bSizer144, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer176;
- bSizer176 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bpButtonAltCompCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer176->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLocalFilter = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer176->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 );
-
- m_bpButtonAltSyncCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
- bSizer176->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer140->Add( bSizer176, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- bSizer142->Add( bSizer140, 0, wxEXPAND, 5 );
-
-
- bSizer142->Add( 0, 5, 0, 0, 5 );
-
- this->SetSizer( bSizer142 );
- this->Layout();
- bSizer142->Fit( this );
+ wxBoxSizer* bSizer142;
+ bSizer142 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer140;
+ bSizer140 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_panel32 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER );
+ wxBoxSizer* bSizer147;
+ bSizer147 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer136;
+ bSizer136 = new wxBoxSizer( wxVERTICAL );
+
+ m_bpButtonRemovePair = new wxBitmapButton( m_panel32, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") );
+
+ bSizer136->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer147->Add( bSizer136, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer143;
+ bSizer143 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer145;
+ bSizer145 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText53 = new wxStaticText( m_panel32, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText53->Wrap( -1 );
+ m_staticText53->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer145->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer143->Add( bSizer145, 1, 0, 5 );
+
+ wxBoxSizer* bSizer146;
+ bSizer146 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText541 = new wxStaticText( m_panel32, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText541->Wrap( -1 );
+ m_staticText541->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer146->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer143->Add( bSizer146, 1, 0, 5 );
+
+ bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_panel32->SetSizer( bSizer147 );
+ m_panel32->Layout();
+ bSizer147->Fit( m_panel32 );
+ bSizer140->Add( m_panel32, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer144;
+ bSizer144 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer114;
+ bSizer114 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerLeft->SetToolTip( _("Select a folder") );
+
+ bSizer114->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelLeft->SetSizer( bSizer114 );
+ m_panelLeft->Layout();
+ bSizer114->Fit( m_panelLeft );
+ bSizer144->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer115;
+ bSizer115 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_dirPickerRight->SetToolTip( _("Select a folder") );
+
+ bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelRight->SetSizer( bSizer115 );
+ m_panelRight->Layout();
+ bSizer115->Fit( m_panelRight );
+ bSizer144->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer140->Add( bSizer144, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer176;
+ bSizer176 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bpButtonAltCompCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer176->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLocalFilter = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer176->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 );
+
+ m_bpButtonAltSyncCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW );
+ bSizer176->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer140->Add( bSizer176, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ bSizer142->Add( bSizer140, 0, wxEXPAND, 5 );
+
+
+ bSizer142->Add( 0, 5, 0, 0, 5 );
+
+ this->SetSizer( bSizer142 );
+ this->Layout();
+ bSizer142->Fit( this );
}
BatchFolderPairGenerated::~BatchFolderPairGenerated()
@@ -1632,2145 +1532,2140 @@ BatchFolderPairGenerated::~BatchFolderPairGenerated()
SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer7;
- bSizer7 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer181;
- bSizer181 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer29;
- bSizer29 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer7;
- sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Select variant:") ), wxVERTICAL );
-
- wxFlexGridSizer* fgSizer1;
- fgSizer1 = new wxFlexGridSizer( 4, 3, 8, 5 );
- fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
- fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_radioBtnAutomatic = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- m_radioBtnAutomatic->SetValue( true );
- m_radioBtnAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_radioBtnAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonAutomatic = new wxButton( this, wxID_ANY, _("<Automatic>"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_buttonAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticText81 = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText81->Wrap( 410 );
- fgSizer1->Add( m_staticText81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_radioBtnMirror = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_radioBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_radioBtnMirror, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonOneWay = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonOneWay->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText8->Wrap( 410 );
- fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_radioBtnUpdate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_radioBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_radioBtnUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonUpdate = new wxButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_buttonUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticText101 = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText101->Wrap( 410 );
- fgSizer1->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_radioBtnCustom = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_radioBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_buttonUpdate1 = new wxButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_buttonUpdate1->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer1->Add( m_buttonUpdate1, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText9->Wrap( 410 );
- fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- sbSizer7->Add( fgSizer1, 0, 0, 5 );
-
- bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 );
-
-
- bSizer29->Add( 0, 5, 1, 0, 5 );
-
- sbSizerCustDelDir = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxHORIZONTAL );
-
- wxArrayString m_choiceHandleDeletionChoices;
- m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 );
- m_choiceHandleDeletion->SetSelection( 0 );
- sbSizerCustDelDir->Add( m_choiceHandleDeletion, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer1151;
- bSizer1151 = new wxBoxSizer( wxHORIZONTAL );
-
- m_customDelFolder = new FolderHistoryBox( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizer1151->Add( m_customDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_dirPickerCustomDelFolder = new zen::DirPickerCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer1151->Add( m_dirPickerCustomDelFolder, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panelCustomDeletionDir->SetSizer( bSizer1151 );
- m_panelCustomDeletionDir->Layout();
- bSizer1151->Fit( m_panelCustomDeletionDir );
- sbSizerCustDelDir->Add( m_panelCustomDeletionDir, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer29->Add( sbSizerCustDelDir, 0, wxEXPAND, 5 );
-
- bSizer201 = new wxBoxSizer( wxHORIZONTAL );
-
- sbSizerErrorHandling = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error handling") ), wxHORIZONTAL );
-
- wxArrayString m_choiceHandleErrorChoices;
- m_choiceHandleError = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 );
- m_choiceHandleError->SetSelection( 0 );
- sbSizerErrorHandling->Add( m_choiceHandleError, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer201->Add( sbSizerErrorHandling, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
-
- sbSizerExecFinished = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("On completion:") ), wxHORIZONTAL );
-
- m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- sbSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer201->Add( sbSizerExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer29->Add( bSizer201, 0, wxEXPAND|wxTOP, 5 );
-
- bSizer181->Add( bSizer29, 0, wxEXPAND, 5 );
-
-
- bSizer181->Add( 10, 0, 0, 0, 5 );
-
- wxStaticBoxSizer* sbSizer2453245;
- sbSizer2453245 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL );
-
-
- sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bitmapDatabase = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 70,70 ), 0 );
- sbSizer2453245->Add( m_bitmapDatabase, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 );
-
- sbSizerSyncDirections = new wxBoxSizer( wxVERTICAL );
-
- wxGridSizer* gSizer3;
- gSizer3 = new wxGridSizer( 1, 2, 0, 5 );
-
- m_staticText21 = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText21->Wrap( -1 );
- m_staticText21->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText31->Wrap( -1 );
- m_staticText31->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
-
- gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- sbSizerSyncDirections->Add( gSizer3, 0, wxBOTTOM|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer121;
- bSizer121 = new wxBoxSizer( wxVERTICAL );
-
- bSizerLeftOnly = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapLeftOnly->SetToolTip( _("File/folder exists on left side only") );
-
- bSizerLeftOnly->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerLeftOnly->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerLeftOnly->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizerLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerRightOnly = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapRightOnly->SetToolTip( _("File/folder exists on right side only") );
-
- bSizerRightOnly->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerRightOnly->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerRightOnly->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizerRightOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerLeftNewer = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapLeftNewer->SetToolTip( _("Left file is newer") );
-
- bSizerLeftNewer->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerLeftNewer->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerLeftNewer->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizerLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerRightNewer = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapRightNewer->SetToolTip( _("Right file is newer") );
-
- bSizerRightNewer->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerRightNewer->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerRightNewer->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizerRightNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerDifferent = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapDifferent->SetToolTip( _("Files have different content") );
-
- bSizerDifferent->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerDifferent->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerDifferent->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizerDifferent, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerConflict = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
- m_bitmapConflict->SetToolTip( _("Conflict/file cannot be categorized") );
-
- bSizerConflict->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizerConflict->Add( 5, 0, 0, 0, 5 );
-
- m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
- bSizerConflict->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer121->Add( bSizerConflict, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- sbSizer2453245->Add( sbSizerSyncDirections, 0, wxEXPAND, 5 );
-
-
- sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizer181->Add( sbSizer2453245, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer7->Add( bSizer181, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
-
- wxBoxSizer* bSizer291;
- bSizer291 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOK->SetDefault();
- m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer7->Add( bSizer291, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
-
- this->SetSizer( bSizer7 );
- this->Layout();
- bSizer7->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
- m_radioBtnAutomatic->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
- m_buttonAutomatic->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
- m_buttonAutomatic->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
- m_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
- m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
- m_buttonOneWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
- m_radioBtnUpdate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
- m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
- m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
- m_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
- m_buttonUpdate1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
- m_buttonUpdate1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
- m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this );
- m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
- m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
- m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
- m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
- m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
- m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
- m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer7;
+ bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer181;
+ bSizer181 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer29;
+ bSizer29 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer7;
+ sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Select variant:") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizer1;
+ fgSizer1 = new wxFlexGridSizer( 4, 3, 8, 5 );
+ fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
+ fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_radioBtnAutomatic = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_radioBtnAutomatic->SetValue( true );
+ m_radioBtnAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_radioBtnAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonAutomatic = new wxButton( this, wxID_ANY, _("<Automatic>"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_buttonAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticText81 = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText81->Wrap( 410 );
+ fgSizer1->Add( m_staticText81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_radioBtnMirror = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_radioBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_radioBtnMirror, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonOneWay = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonOneWay->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText8->Wrap( 410 );
+ fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_radioBtnUpdate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_radioBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_radioBtnUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonUpdate = new wxButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_buttonUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticText101 = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText101->Wrap( 410 );
+ fgSizer1->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_radioBtnCustom = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_radioBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_buttonUpdate1 = new wxButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_buttonUpdate1->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer1->Add( m_buttonUpdate1, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText9->Wrap( 410 );
+ fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ sbSizer7->Add( fgSizer1, 0, 0, 5 );
+
+ bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 );
+
+
+ bSizer29->Add( 0, 5, 1, 0, 5 );
+
+ sbSizerCustDelDir = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxHORIZONTAL );
+
+ wxArrayString m_choiceHandleDeletionChoices;
+ m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 );
+ m_choiceHandleDeletion->SetSelection( 0 );
+ sbSizerCustDelDir->Add( m_choiceHandleDeletion, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer1151;
+ bSizer1151 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_customDelFolder = new FolderHistoryBox( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizer1151->Add( m_customDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_dirPickerCustomDelFolder = new zen::DirPickerCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer1151->Add( m_dirPickerCustomDelFolder, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panelCustomDeletionDir->SetSizer( bSizer1151 );
+ m_panelCustomDeletionDir->Layout();
+ bSizer1151->Fit( m_panelCustomDeletionDir );
+ sbSizerCustDelDir->Add( m_panelCustomDeletionDir, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer29->Add( sbSizerCustDelDir, 0, wxEXPAND, 5 );
+
+ bSizer201 = new wxBoxSizer( wxHORIZONTAL );
+
+ sbSizerErrorHandling = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error handling") ), wxHORIZONTAL );
+
+ wxArrayString m_choiceHandleErrorChoices;
+ m_choiceHandleError = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 );
+ m_choiceHandleError->SetSelection( 0 );
+ sbSizerErrorHandling->Add( m_choiceHandleError, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer201->Add( sbSizerErrorHandling, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
+
+ sbSizerExecFinished = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("On completion:") ), wxHORIZONTAL );
+
+ m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ sbSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer201->Add( sbSizerExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer29->Add( bSizer201, 0, wxEXPAND|wxTOP, 5 );
+
+ bSizer181->Add( bSizer29, 0, wxEXPAND, 5 );
+
+
+ bSizer181->Add( 10, 0, 0, 0, 5 );
+
+ wxStaticBoxSizer* sbSizer2453245;
+ sbSizer2453245 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL );
+
+
+ sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bitmapDatabase = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 70,70 ), 0 );
+ sbSizer2453245->Add( m_bitmapDatabase, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 );
+
+ sbSizerSyncDirections = new wxBoxSizer( wxVERTICAL );
+
+ wxGridSizer* gSizer3;
+ gSizer3 = new wxGridSizer( 1, 2, 0, 5 );
+
+ m_staticText21 = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText21->Wrap( -1 );
+ m_staticText21->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+
+ gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText31->Wrap( -1 );
+ m_staticText31->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+
+ gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ sbSizerSyncDirections->Add( gSizer3, 0, wxBOTTOM|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer121;
+ bSizer121 = new wxBoxSizer( wxVERTICAL );
+
+ bSizerLeftOnly = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapLeftOnly->SetToolTip( _("File/folder exists on left side only") );
+
+ bSizerLeftOnly->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerLeftOnly->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerLeftOnly->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer121->Add( bSizerLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerRightOnly = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapRightOnly->SetToolTip( _("File/folder exists on right side only") );
+
+ bSizerRightOnly->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerRightOnly->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerRightOnly->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer121->Add( bSizerRightOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerLeftNewer = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapLeftNewer->SetToolTip( _("Left file is newer") );
+
+ bSizerLeftNewer->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerLeftNewer->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerLeftNewer->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer121->Add( bSizerLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerRightNewer = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapRightNewer->SetToolTip( _("Right file is newer") );
+
+ bSizerRightNewer->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerRightNewer->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerRightNewer->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer121->Add( bSizerRightNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerDifferent = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapDifferent->SetToolTip( _("Files have different content") );
+
+ bSizerDifferent->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerDifferent->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerDifferent->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer121->Add( bSizerDifferent, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerConflict = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 );
+ m_bitmapConflict->SetToolTip( _("Conflict/file cannot be categorized") );
+
+ bSizerConflict->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerConflict->Add( 5, 0, 0, 0, 5 );
+
+ m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW );
+ bSizerConflict->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer121->Add( bSizerConflict, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ sbSizer2453245->Add( sbSizerSyncDirections, 0, wxEXPAND, 5 );
+
+
+ sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizer181->Add( sbSizer2453245, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer7->Add( bSizer181, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer291;
+ bSizer291 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOK->SetDefault();
+ m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer7->Add( bSizer291, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
+
+ this->SetSizer( bSizer7 );
+ this->Layout();
+ bSizer7->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
+ m_radioBtnAutomatic->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
+ m_buttonAutomatic->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
+ m_buttonAutomatic->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
+ m_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
+ m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
+ m_buttonOneWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
+ m_radioBtnUpdate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
+ m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
+ m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
+ m_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
+ m_buttonUpdate1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
+ m_buttonUpdate1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
+ m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this );
+ m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
+ m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
+ m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
+ m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
+ m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
+ m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
+ m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
}
SyncCfgDlgGenerated::~SyncCfgDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
- m_radioBtnAutomatic->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
- m_buttonAutomatic->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
- m_buttonAutomatic->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
- m_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
- m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
- m_buttonOneWay->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
- m_radioBtnUpdate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
- m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
- m_buttonUpdate->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
- m_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
- m_buttonUpdate1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
- m_buttonUpdate1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
- m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this );
- m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
- m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
- m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
- m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
- m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
- m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
- m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
- m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) );
+ m_radioBtnAutomatic->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
+ m_buttonAutomatic->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this );
+ m_buttonAutomatic->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this );
+ m_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
+ m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this );
+ m_buttonOneWay->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this );
+ m_radioBtnUpdate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
+ m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this );
+ m_buttonUpdate->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this );
+ m_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
+ m_buttonUpdate1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this );
+ m_buttonUpdate1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this );
+ m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this );
+ m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this );
+ m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this );
+ m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this );
+ m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this );
+ m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this );
+ m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this );
+ m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this );
+
}
CmpCfgDlgGenerated::CmpCfgDlgGenerated( 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* bSizer136;
- bSizer136 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer55;
- bSizer55 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer6;
- sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxHORIZONTAL );
-
- wxFlexGridSizer* fgSizer16;
- fgSizer16 = new wxFlexGridSizer( 2, 3, 0, 0 );
- fgSizer16->SetFlexibleDirection( wxBOTH );
- fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- m_radioBtnSizeDate->SetValue( true );
- m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
-
- fgSizer16->Add( m_radioBtnSizeDate, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapByTime->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
-
- fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,42 ), 0 );
- m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
- m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
-
- fgSizer16->Add( m_buttonTimeSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
-
- m_radioBtnContent = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
-
- fgSizer16->Add( m_radioBtnContent, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
-
- fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_buttonContent = new wxButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,42 ), 0 );
- m_buttonContent->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
- m_buttonContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
-
- fgSizer16->Add( m_buttonContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- sbSizer6->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 );
-
-
- bSizer55->Add( 0, 4, 0, 0, 5 );
-
- wxBoxSizer* bSizer177;
- bSizer177 = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticBoxSizer* sbSizer25;
- sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Symbolic Link handling") ), wxVERTICAL );
-
- wxArrayString m_choiceHandleSymlinksChoices;
- m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 );
- m_choiceHandleSymlinks->SetSelection( -1 );
- sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer177->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- m_bpButtonHelp->SetToolTip( _("Help") );
-
- bSizer177->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- bSizer55->Add( bSizer177, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer22;
- bSizer22 = new wxBoxSizer( wxHORIZONTAL );
-
- m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button10->SetDefault();
- m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer55->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer136->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- this->SetSizer( bSizer136 );
- this->Layout();
- bSizer136->Fit( this );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
- m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
- m_buttonTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
- m_buttonTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
- m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
- m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
- m_buttonContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
- m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
- m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
- m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer136;
+ bSizer136 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer55;
+ bSizer55 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer6;
+ sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxHORIZONTAL );
+
+ wxFlexGridSizer* fgSizer16;
+ fgSizer16 = new wxFlexGridSizer( 2, 3, 0, 0 );
+ fgSizer16->SetFlexibleDirection( wxBOTH );
+ fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_radioBtnSizeDate->SetValue( true );
+ m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
+
+ fgSizer16->Add( m_radioBtnSizeDate, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapByTime->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
+
+ fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,42 ), 0 );
+ m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+ m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") );
+
+ fgSizer16->Add( m_buttonTimeSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
+
+ m_radioBtnContent = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
+
+ fgSizer16->Add( m_radioBtnContent, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
+
+ fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_buttonContent = new wxButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,42 ), 0 );
+ m_buttonContent->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
+ m_buttonContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") );
+
+ fgSizer16->Add( m_buttonContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ sbSizer6->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 );
+
+
+ bSizer55->Add( 0, 4, 0, 0, 5 );
+
+ wxBoxSizer* bSizer177;
+ bSizer177 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticBoxSizer* sbSizer25;
+ sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Symbolic Link handling") ), wxVERTICAL );
+
+ wxArrayString m_choiceHandleSymlinksChoices;
+ m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 );
+ m_choiceHandleSymlinks->SetSelection( -1 );
+ sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer177->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonHelp->SetToolTip( _("Help") );
+
+ bSizer177->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ bSizer55->Add( bSizer177, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer22;
+ bSizer22 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button10->SetDefault();
+ m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer55->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer136->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ this->SetSizer( bSizer136 );
+ this->Layout();
+ bSizer136->Fit( this );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
+ m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
+ m_buttonTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
+ m_buttonTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
+ m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
+ m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
+ m_buttonContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
+ m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
+ m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
+ m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
}
CmpCfgDlgGenerated::~CmpCfgDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
- m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
- m_buttonTimeSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
- m_buttonTimeSize->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
- m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
- m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
- m_buttonContent->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
- m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
- m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
- m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
- m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) );
+ m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
+ m_buttonTimeSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this );
+ m_buttonTimeSize->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this );
+ m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
+ m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this );
+ m_buttonContent->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this );
+ m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this );
+ m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this );
+ m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this );
+ m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this );
+
}
SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 470,200 ), wxDefaultSize );
-
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxVERTICAL );
-
- m_panelBackground = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizerTop = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer42;
- bSizer42 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapStatus = new wxStaticBitmap( m_panelBackground, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 );
- bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
-
- m_staticTextStatus = new wxStaticText( m_panelBackground, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextStatus->Wrap( -1 );
- m_staticTextStatus->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_animationControl1 = new wxAnimationCtrl( m_panelBackground, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE );
- m_animationControl1->SetMinSize( wxSize( 45,45 ) );
-
- bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- bSizerTop->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerCurrentOperation = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText2511 = new wxStaticText( m_panelBackground, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText2511->Wrap( -1 );
- m_staticText2511->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
-
- bSizerCurrentOperation->Add( m_staticText2511, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlInfo = new wxTextCtrl( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
- m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizerCurrentOperation->Add( m_textCtrlInfo, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerTop->Add( bSizerCurrentOperation, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_panelProgress = new wxPanel( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- bSizer171 = new wxBoxSizer( wxHORIZONTAL );
-
- bSizerProgressStat = new wxStaticBoxSizer( new wxStaticBox( m_panelProgress, wxID_ANY, wxEmptyString ), wxHORIZONTAL );
-
- wxFlexGridSizer* fgSizer10;
- fgSizer10 = new wxFlexGridSizer( 0, 2, 0, 5 );
- fgSizer10->SetFlexibleDirection( wxBOTH );
- fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_staticTextItemsRem = new wxStaticText( m_panelProgress, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextItemsRem->Wrap( -1 );
- m_staticTextItemsRem->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextItemsRem, 0, wxALIGN_BOTTOM, 5 );
-
- bSizerItemsRem = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextRemainingObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextRemainingObj->Wrap( -1 );
- m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- bSizerItemsRem->Add( m_staticTextRemainingObj, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText96 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText96->Wrap( -1 );
- m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizerItemsRem->Add( m_staticText96, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataRemaining->Wrap( -1 );
- m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizerItemsRem->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText97 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText97->Wrap( -1 );
- m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizerItemsRem->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 );
-
- fgSizer10->Add( bSizerItemsRem, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextItemsProc = new wxStaticText( m_panelProgress, wxID_ANY, _("Items processed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextItemsProc->Wrap( -1 );
- m_staticTextItemsProc->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextItemsProc, 0, wxALIGN_BOTTOM, 5 );
-
- bSizerItemsProc = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticTextProcessedObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticTextProcessedObj->Wrap( -1 );
- m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- bSizerItemsProc->Add( m_staticTextProcessedObj, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText98 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText98->Wrap( -1 );
- m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizerItemsProc->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
-
- m_staticTextDataProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextDataProcessed->Wrap( -1 );
- m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizerItemsProc->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText99->Wrap( -1 );
- m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
-
- bSizerItemsProc->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 );
-
- fgSizer10->Add( bSizerItemsProc, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextSpeedDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSpeedDescr->Wrap( -1 );
- m_staticTextSpeedDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextSpeedDescr, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextSpeed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextSpeed->Wrap( -1 );
- m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- fgSizer10->Add( m_staticTextSpeed, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticText55 = new wxStaticText( m_panelProgress, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText55->Wrap( -1 );
- m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextTimeElapsed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextTimeElapsed->Wrap( -1 );
- m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- fgSizer10->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextRemTimeDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemTimeDescr->Wrap( -1 );
- m_staticTextRemTimeDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- fgSizer10->Add( m_staticTextRemTimeDescr, 0, wxALIGN_BOTTOM, 5 );
-
- m_staticTextRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRemTime->Wrap( -1 );
- m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
-
- fgSizer10->Add( m_staticTextRemTime, 0, wxALIGN_BOTTOM, 5 );
-
- bSizerProgressStat->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- bSizer171->Add( bSizerProgressStat, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer171->Add( 10, 0, 0, 0, 5 );
-
- m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- m_panelGraph->SetBackgroundColour( wxColour( 255, 255, 255 ) );
-
- bSizer171->Add( m_panelGraph, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- m_panelProgress->SetSizer( bSizer171 );
- m_panelProgress->Layout();
- bSizer171->Fit( m_panelProgress );
- bSizerTop->Add( m_panelProgress, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- bSizerFinalStat = new wxBoxSizer( wxVERTICAL );
-
- m_listbookResult = new wxListbook( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP );
- wxSize m_listbookResultImageSize = wxSize( 180,1 );
- int m_listbookResultIndex = 0;
- wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() );
- m_listbookResult->AssignImageList( m_listbookResultImages );
- wxBitmap m_listbookResultBitmap;
- wxImage m_listbookResultImage;
-
- bSizerFinalStat->Add( m_listbookResult, 1, wxEXPAND, 5 );
-
- bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- m_gauge1 = new wxGauge( m_panelBackground, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL );
- bSizerTop->Add( m_gauge1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- bSizerExecFinished = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText87 = new wxStaticText( m_panelBackground, wxID_ANY, _("On completion:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText87->Wrap( -1 );
- m_staticText87->SetFont( wxFont( 8, 74, 90, 90, false, wxT("MS Shell Dlg 2") ) );
-
- bSizerExecFinished->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_comboBoxExecFinished = new ExecFinishedBox( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
- bSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizerTop->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- bSizer28 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer28->Add( 0, 0, 1, 0, 5 );
-
- m_buttonOK = new wxButton( m_panelBackground, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,30 ), 0 );
- m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
- m_buttonOK->Enable( false );
-
- bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_buttonPause = new wxButton( m_panelBackground, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,30 ), 0 );
- m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_buttonAbort = new wxButton( m_panelBackground, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,30 ), 0 );
- m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
-
-
- bSizer28->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizerTop->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_panelBackground->SetSizer( bSizerTop );
- m_panelBackground->Layout();
- bSizerTop->Fit( m_panelBackground );
- bSizer172->Add( m_panelBackground, 1, wxEXPAND, 5 );
-
- this->SetSizer( bSizer172 );
- this->Layout();
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) );
- this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this );
- m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this );
- m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this );
+ this->SetSizeHints( wxSize( 470,200 ), wxDefaultSize );
+
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxVERTICAL );
+
+ m_panelBackground = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizerTop = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer42;
+ bSizer42 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapStatus = new wxStaticBitmap( m_panelBackground, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 );
+ bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+
+ m_staticTextStatus = new wxStaticText( m_panelBackground, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStatus->Wrap( -1 );
+ m_staticTextStatus->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_animationControl1 = new wxAnimationCtrl( m_panelBackground, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE );
+ m_animationControl1->SetMinSize( wxSize( 45,45 ) );
+
+ bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ bSizerTop->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerCurrentOperation = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText2511 = new wxStaticText( m_panelBackground, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText2511->Wrap( -1 );
+ m_staticText2511->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) );
+
+ bSizerCurrentOperation->Add( m_staticText2511, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlInfo = new wxTextCtrl( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+ m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizerCurrentOperation->Add( m_textCtrlInfo, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerTop->Add( bSizerCurrentOperation, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_panelProgress = new wxPanel( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ bSizer171 = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizerProgressStat = new wxStaticBoxSizer( new wxStaticBox( m_panelProgress, wxID_ANY, wxEmptyString ), wxHORIZONTAL );
+
+ wxFlexGridSizer* fgSizer10;
+ fgSizer10 = new wxFlexGridSizer( 0, 2, 0, 5 );
+ fgSizer10->SetFlexibleDirection( wxBOTH );
+ fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextItemsRem = new wxStaticText( m_panelProgress, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextItemsRem->Wrap( -1 );
+ m_staticTextItemsRem->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextItemsRem, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizerItemsRem = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextRemainingObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_staticTextRemainingObj->Wrap( -1 );
+ m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ bSizerItemsRem->Add( m_staticTextRemainingObj, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText96 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText96->Wrap( -1 );
+ m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizerItemsRem->Add( m_staticText96, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ m_staticTextDataRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataRemaining->Wrap( -1 );
+ m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizerItemsRem->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText97 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText97->Wrap( -1 );
+ m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizerItemsRem->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 );
+
+ fgSizer10->Add( bSizerItemsRem, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextItemsProc = new wxStaticText( m_panelProgress, wxID_ANY, _("Items processed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextItemsProc->Wrap( -1 );
+ m_staticTextItemsProc->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextItemsProc, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizerItemsProc = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextProcessedObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_staticTextProcessedObj->Wrap( -1 );
+ m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ bSizerItemsProc->Add( m_staticTextProcessedObj, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText98 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText98->Wrap( -1 );
+ m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizerItemsProc->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+ m_staticTextDataProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDataProcessed->Wrap( -1 );
+ m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizerItemsProc->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText99->Wrap( -1 );
+ m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) );
+
+ bSizerItemsProc->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 );
+
+ fgSizer10->Add( bSizerItemsProc, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextSpeedDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSpeedDescr->Wrap( -1 );
+ m_staticTextSpeedDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextSpeedDescr, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextSpeed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSpeed->Wrap( -1 );
+ m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ fgSizer10->Add( m_staticTextSpeed, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticText55 = new wxStaticText( m_panelProgress, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText55->Wrap( -1 );
+ m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextTimeElapsed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTimeElapsed->Wrap( -1 );
+ m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ fgSizer10->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextRemTimeDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemTimeDescr->Wrap( -1 );
+ m_staticTextRemTimeDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ fgSizer10->Add( m_staticTextRemTimeDescr, 0, wxALIGN_BOTTOM, 5 );
+
+ m_staticTextRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRemTime->Wrap( -1 );
+ m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) );
+
+ fgSizer10->Add( m_staticTextRemTime, 0, wxALIGN_BOTTOM, 5 );
+
+ bSizerProgressStat->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ bSizer171->Add( bSizerProgressStat, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer171->Add( 10, 0, 0, 0, 5 );
+
+ m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_panelGraph->SetBackgroundColour( wxColour( 255, 255, 255 ) );
+
+ bSizer171->Add( m_panelGraph, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_panelProgress->SetSizer( bSizer171 );
+ m_panelProgress->Layout();
+ bSizer171->Fit( m_panelProgress );
+ bSizerTop->Add( m_panelProgress, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ bSizerFinalStat = new wxBoxSizer( wxVERTICAL );
+
+ m_listbookResult = new wxListbook( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP );
+ wxSize m_listbookResultImageSize = wxSize( 180,1 );
+ int m_listbookResultIndex = 0;
+ wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() );
+ m_listbookResult->AssignImageList( m_listbookResultImages );
+ wxBitmap m_listbookResultBitmap;
+ wxImage m_listbookResultImage;
+
+ bSizerFinalStat->Add( m_listbookResult, 1, wxEXPAND, 5 );
+
+ bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_gauge1 = new wxGauge( m_panelBackground, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL );
+ bSizerTop->Add( m_gauge1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ bSizerExecFinished = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText87 = new wxStaticText( m_panelBackground, wxID_ANY, _("On completion:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText87->Wrap( -1 );
+ m_staticText87->SetFont( wxFont( 8, 74, 90, 90, false, wxT("MS Shell Dlg 2") ) );
+
+ bSizerExecFinished->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_comboBoxExecFinished = new ExecFinishedBox( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ bSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizerTop->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ bSizer28 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer28->Add( 0, 0, 1, 0, 5 );
+
+ m_buttonOK = new wxButton( m_panelBackground, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,30 ), 0 );
+ m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+ m_buttonOK->Enable( false );
+
+ bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_buttonPause = new wxButton( m_panelBackground, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,30 ), 0 );
+ m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_buttonAbort = new wxButton( m_panelBackground, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,30 ), 0 );
+ m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+ bSizer28->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizerTop->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_panelBackground->SetSizer( bSizerTop );
+ m_panelBackground->Layout();
+ bSizerTop->Fit( m_panelBackground );
+ bSizer172->Add( m_panelBackground, 1, wxEXPAND, 5 );
+
+ this->SetSizer( bSizer172 );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) );
+ this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this );
+ m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this );
+ m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this );
}
SyncStatusDlgGenerated::~SyncStatusDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) );
- this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) );
- m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this );
- m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this );
- m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) );
+ this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this );
+ m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this );
+ m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this );
+
}
LogControlGenerated::LogControlGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
- wxBoxSizer* bSizer153;
- bSizer153 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer154;
- bSizer154 = new wxBoxSizer( wxVERTICAL );
-
- m_bpButtonErrors = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
- bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonWarnings = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
- bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_bpButtonInfo = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
- bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
- m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer153->Add( m_textCtrlInfo, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- this->SetSizer( bSizer153 );
- this->Layout();
- bSizer153->Fit( this );
-
- // Connect Events
- m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
- m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
- m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
+ wxBoxSizer* bSizer153;
+ bSizer153 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer154;
+ bSizer154 = new wxBoxSizer( wxVERTICAL );
+
+ m_bpButtonErrors = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
+ bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonWarnings = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
+ bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_bpButtonInfo = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW );
+ bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
+ m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer153->Add( m_textCtrlInfo, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ this->SetSizer( bSizer153 );
+ this->Layout();
+ bSizer153->Fit( this );
+
+ // Connect Events
+ m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
+ m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
+ m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
}
LogControlGenerated::~LogControlGenerated()
{
- // Disconnect Events
- m_bpButtonErrors->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
- m_bpButtonWarnings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
- m_bpButtonInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
-
+ // Disconnect Events
+ m_bpButtonErrors->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this );
+ m_bpButtonWarnings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this );
+ m_bpButtonInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this );
+
}
AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer31;
- bSizer31 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer31->Add( 0, 5, 0, 0, 5 );
-
- m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
- m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) );
-
- wxBoxSizer* bSizer36;
- bSizer36 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 );
- bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panel5->SetSizer( bSizer36 );
- m_panel5->Layout();
- bSizer36->Fit( m_panel5 );
- bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_build->Wrap( -1 );
- bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer31->Add( 0, 10, 0, 0, 5 );
-
- wxBoxSizer* bSizer53;
- bSizer53 = new wxBoxSizer( wxVERTICAL );
-
- m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxTAB_TRAVERSAL );
- m_panel33->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizerCodeInfo = new wxBoxSizer( wxVERTICAL );
-
- m_staticText72 = new wxStaticText( m_panel33, wxID_ANY, _("Source code written in C++ utilizing:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText72->Wrap( -1 );
- m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
-
- bSizerCodeInfo->Add( m_staticText72, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- wxBoxSizer* bSizer167;
- bSizer167 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer171;
- bSizer171 = new wxBoxSizer( wxHORIZONTAL );
-
- m_hyperlink9 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MinGW"), wxT("http://www.mingw.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink9->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer171->Add( m_hyperlink9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink11 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MS Visual C++"), wxT("http://msdn.microsoft.com/library/60k1461a.aspx"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink11->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer171->Add( m_hyperlink11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink10 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Code::Blocks"), wxT("http://www.codeblocks.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink10->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer171->Add( m_hyperlink10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink13 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Boost"), wxT("http://www.boost.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink13->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer171->Add( m_hyperlink13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink7 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxWidgets"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink7->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer171->Add( m_hyperlink7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink16 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Artistic Style"), wxT("http://astyle.sourceforge.net"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink16->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer171->Add( m_hyperlink16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- bSizer167->Add( bSizer171, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer172;
- bSizer172 = new wxBoxSizer( wxHORIZONTAL );
-
- m_hyperlink8 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Loki"), wxT("http://sourceforge.net/projects/loki-lib"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer172->Add( m_hyperlink8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink15 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("zenXML"), wxT("http://sourceforge.net/projects/zenxml/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink15->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer172->Add( m_hyperlink15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink12 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Google Test"), wxT("http://code.google.com/p/googletest"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink12->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer172->Add( m_hyperlink12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink18 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Unicode NSIS"), wxT("http://www.scratchpaper.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink18->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer172->Add( m_hyperlink18, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_hyperlink14 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxFormBuilder"), wxT("http://wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink14->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer172->Add( m_hyperlink14, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- bSizer167->Add( bSizer172, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizerCodeInfo->Add( bSizer167, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_hyperlink21 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("- ZenJu -"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink21->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) );
- m_hyperlink21->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_hyperlink21->SetToolTip( _("zhnmju123@gmx.de") );
-
- bSizerCodeInfo->Add( m_hyperlink21, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_panel33->SetSizer( bSizerCodeInfo );
- m_panel33->Layout();
- bSizerCodeInfo->Fit( m_panel33 );
- bSizer53->Add( m_panel33, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL );
- m_scrolledWindowTranslators->SetScrollRate( 5, 5 );
- m_scrolledWindowTranslators->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_scrolledWindowTranslators->SetMinSize( wxSize( -1,180 ) );
-
- bSizerTranslators = new wxBoxSizer( wxVERTICAL );
-
- 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, 70, 90, 92, false, wxEmptyString ) );
-
- bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
-
-
- bSizerTranslators->Add( 0, 5, 0, 0, 5 );
-
- fgSizerTranslators = new wxFlexGridSizer( 50, 3, 5, 20 );
- fgSizerTranslators->SetFlexibleDirection( wxBOTH );
- fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_scrolledWindowTranslators->SetSizer( bSizerTranslators );
- m_scrolledWindowTranslators->Layout();
- bSizerTranslators->Fit( m_scrolledWindowTranslators );
- bSizer53->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 5 );
-
- bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 25 );
-
- m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- m_staticText131 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome at:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText131->Wrap( -1 );
- m_staticText131->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer31->Add( m_staticText131, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer156;
- bSizer156 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
- m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") );
-
- bSizer156->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Homepage"), wxT("http://sourceforge.net/projects/freefilesync/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink1->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
- m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") );
-
- bSizer156->Add( m_hyperlink1, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer156->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("If you like FFS"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US&currency_code=EUR"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink3->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
- m_hyperlink3->SetToolTip( _("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US&currency_code=EUR") );
-
- bSizer156->Add( m_hyperlink3, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_animationControl1 = new wxAnimationCtrl( this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxSize( -1,-1 ), wxAC_DEFAULT_STYLE );
- m_animationControl1->SetToolTip( _("Donate with PayPal") );
- m_animationControl1->SetMinSize( wxSize( 48,48 ) );
-
- bSizer156->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- bSizer31->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 10 );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
- m_bitmap10->SetToolTip( _("Email") );
-
- bSizer158->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("Email"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink2->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
- m_hyperlink2->SetToolTip( _("zhnmju123@gmx.de") );
-
- bSizer158->Add( m_hyperlink2, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer158->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_hyperlink6 = new wxHyperlinkCtrl( this, wxID_ANY, _("Report translation error"), wxT("http://sourceforge.net/projects/freefilesync/forums/forum/976976"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- m_hyperlink6->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
- m_hyperlink6->SetToolTip( _("http://sourceforge.net/projects/freefilesync/forums/forum/976976") );
-
- bSizer158->Add( m_hyperlink6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapTransl = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
- m_bitmapTransl->SetToolTip( _("Report translation error") );
-
- bSizer158->Add( m_bitmapTransl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- bSizer31->Add( bSizer158, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 10 );
-
- m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer31->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- wxStaticBoxSizer* sbSizer14;
- sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Published under the GNU General Public License:") ), wxHORIZONTAL );
-
-
- sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 88,31 ), 0 );
- sbSizer14->Add( m_bitmap13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
- sbSizer14->Add( m_hyperlink5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer31->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,30 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer31->Add( m_buttonOkay, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
- this->SetSizer( bSizer31 );
- this->Layout();
- bSizer31->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer31;
+ bSizer31 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer31->Add( 0, 5, 0, 0, 5 );
+
+ m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
+ m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) );
+
+ wxBoxSizer* bSizer36;
+ bSizer36 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 );
+ bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panel5->SetSizer( bSizer36 );
+ m_panel5->Layout();
+ bSizer36->Fit( m_panel5 );
+ bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_build->Wrap( -1 );
+ bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer31->Add( 0, 5, 0, 0, 5 );
+
+ wxBoxSizer* bSizer53;
+ bSizer53 = new wxBoxSizer( wxVERTICAL );
+
+ m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxTAB_TRAVERSAL );
+ m_panel33->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizerCodeInfo = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText72 = new wxStaticText( m_panel33, wxID_ANY, _("Source code written in C++ utilizing:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText72->Wrap( -1 );
+ m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerCodeInfo->Add( m_staticText72, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer167;
+ bSizer167 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer171;
+ bSizer171 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_hyperlink9 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MinGW"), wxT("http://www.mingw.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink9->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer171->Add( m_hyperlink9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink11 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MS Visual C++"), wxT("http://msdn.microsoft.com/library/60k1461a.aspx"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink11->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer171->Add( m_hyperlink11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink10 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Code::Blocks"), wxT("http://www.codeblocks.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink10->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer171->Add( m_hyperlink10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink13 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Boost"), wxT("http://www.boost.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink13->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer171->Add( m_hyperlink13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink7 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxWidgets"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink7->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer171->Add( m_hyperlink7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink16 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Artistic Style"), wxT("http://astyle.sourceforge.net"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink16->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer171->Add( m_hyperlink16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ bSizer167->Add( bSizer171, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer172;
+ bSizer172 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_hyperlink8 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Loki"), wxT("http://loki-lib.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer172->Add( m_hyperlink8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink15 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("zenXML"), wxT("http://zenxml.sourceforge.net/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink15->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer172->Add( m_hyperlink15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink12 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Google Test"), wxT("http://code.google.com/p/googletest"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink12->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer172->Add( m_hyperlink12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink18 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Unicode NSIS"), wxT("http://www.scratchpaper.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink18->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer172->Add( m_hyperlink18, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_hyperlink14 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxFormBuilder"), wxT("http://wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink14->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer172->Add( m_hyperlink14, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ bSizer167->Add( bSizer172, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizerCodeInfo->Add( bSizer167, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_hyperlink21 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("- ZenJu -"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink21->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) );
+ m_hyperlink21->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_hyperlink21->SetToolTip( _("zhnmju123@gmx.de") );
+
+ bSizerCodeInfo->Add( m_hyperlink21, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_panel33->SetSizer( bSizerCodeInfo );
+ m_panel33->Layout();
+ bSizerCodeInfo->Fit( m_panel33 );
+ bSizer53->Add( m_panel33, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer29;
+ sbSizer29 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Feedback and suggestions are welcome") ), wxHORIZONTAL );
+
+ wxBoxSizer* bSizer170;
+ bSizer170 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer170->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Homepage"), wxT("http://sourceforge.net/projects/freefilesync/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink1->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
+ m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") );
+
+ bSizer170->Add( m_hyperlink1, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
+ m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") );
+
+ bSizer170->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer170->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sbSizer29->Add( bSizer170, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer1711;
+ bSizer1711 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer1711->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_hyperlink2 = new wxHyperlinkCtrl( this, wxID_ANY, _("Email"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink2->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
+ m_hyperlink2->SetToolTip( _("zhnmju123@gmx.de") );
+
+ bSizer1711->Add( m_hyperlink2, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
+ m_bitmap10->SetToolTip( _("Email") );
+
+ bSizer1711->Add( m_bitmap10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer1711->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sbSizer29->Add( bSizer1711, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer53->Add( sbSizer29, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
+
+ m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL );
+ m_scrolledWindowTranslators->SetScrollRate( 5, 5 );
+ m_scrolledWindowTranslators->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_scrolledWindowTranslators->SetMinSize( wxSize( -1,180 ) );
+
+ bSizerTranslators = new wxBoxSizer( wxVERTICAL );
+
+ 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, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 );
+
+
+ bSizerTranslators->Add( 0, 5, 0, 0, 5 );
+
+ fgSizerTranslators = new wxFlexGridSizer( 50, 3, 2, 20 );
+ fgSizerTranslators->SetFlexibleDirection( wxBOTH );
+ fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_scrolledWindowTranslators->SetSizer( bSizerTranslators );
+ m_scrolledWindowTranslators->Layout();
+ bSizerTranslators->Fit( m_scrolledWindowTranslators );
+ bSizer53->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer28;
+ sbSizer28 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("If you like FreeFileSync") ), wxHORIZONTAL );
+
+
+ sbSizer28->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("Donate with PayPal"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US&currency_code=EUR"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ m_hyperlink3->SetFont( wxFont( 10, 74, 90, 92, true, wxT("MS Shell Dlg 2") ) );
+ m_hyperlink3->SetToolTip( _("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US&currency_code=EUR") );
+
+ sbSizer28->Add( m_hyperlink3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_bitmapPaypal = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapPaypal->SetToolTip( _("Donate with PayPal") );
+
+ sbSizer28->Add( m_bitmapPaypal, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+
+ sbSizer28->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizer53->Add( sbSizer28, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 25 );
+
+ wxStaticBoxSizer* sbSizer14;
+ sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Published under the GNU General Public License") ), wxHORIZONTAL );
+
+
+ sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_bitmap13 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 88,31 ), 0 );
+ sbSizer14->Add( m_bitmap13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_hyperlink5 = new wxHyperlinkCtrl( this, wxID_ANY, _("http://www.gnu.org/licenses/gpl.html"), wxT("http://www.gnu.org/licenses/gpl.html"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+ sbSizer14->Add( m_hyperlink5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ sbSizer14->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer31->Add( sbSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,30 ), 0 );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer31->Add( m_buttonOkay, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ this->SetSizer( bSizer31 );
+ this->Layout();
+ bSizer31->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
}
AboutDlgGenerated::~AboutDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
- m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) );
+ m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this );
+
}
ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
- bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY );
- m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore subsequent errors"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") );
-
- bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonIgnore = new wxButton( this, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonIgnore->SetDefault();
- m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
-
- bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- this->SetSizer( bSizer24 );
- this->Layout();
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
- m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this );
- m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this );
- m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer26;
+ bSizer26 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
+ bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY );
+ m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore subsequent errors"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") );
+
+ bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonIgnore = new wxButton( this, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonIgnore->SetDefault();
+ m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+ bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
+ m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this );
+ m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this );
+ m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this );
}
ErrorDlgGenerated::~ErrorDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
- m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this );
- m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this );
- m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) );
+ m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this );
+ m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this );
+ m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this );
+
}
WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
- bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY );
- m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonIgnore = new wxButton( this, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonIgnore->SetDefault();
- m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonSwitch->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
-
- bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- this->SetSizer( bSizer24 );
- this->Layout();
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) );
- m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this );
- m_buttonSwitch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this );
- m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer26;
+ bSizer26 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
+ bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY );
+ m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonIgnore = new wxButton( this, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonIgnore->SetDefault();
+ m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonSwitch->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+ bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) );
+ m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this );
+ m_buttonSwitch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this );
+ m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this );
}
WarningDlgGenerated::~WarningDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) );
- m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this );
- m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this );
- m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) );
+ m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this );
+ m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this );
+ m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this );
+
}
QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
- bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY );
- m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_checkBoxDontAskAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer24->Add( m_checkBoxDontAskAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonYes = new wxButton( this, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonYes->SetDefault();
- m_buttonYes->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonYes, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonNo = new wxButton( this, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonNo->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonNo, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonCancel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
-
- bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- this->SetSizer( bSizer24 );
- this->Layout();
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) );
- m_checkBoxDontAskAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this );
- m_buttonYes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this );
- m_buttonNo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer26;
+ bSizer26 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
+ bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY );
+ m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_checkBoxDontAskAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer24->Add( m_checkBoxDontAskAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonYes = new wxButton( this, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonYes->SetDefault();
+ m_buttonYes->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonYes, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonNo = new wxButton( this, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonNo->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonNo, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonCancel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+ bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) );
+ m_checkBoxDontAskAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this );
+ m_buttonYes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this );
+ m_buttonNo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this );
}
QuestionDlgGenerated::~QuestionDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) );
- m_checkBoxDontAskAgain->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this );
- m_buttonYes->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this );
- m_buttonNo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this );
- m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) );
+ m_checkBoxDontAskAgain->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this );
+ m_buttonYes->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this );
+ m_buttonNo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this );
+
}
DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxDefaultSize, wxDefaultSize );
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer( wxVERTICAL );
-
-
- bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer41;
- bSizer41 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
- bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextHeader->Wrap( -1 );
- m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- bSizer24->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
- m_textCtrlMessage->SetBackgroundColour( wxColour( 208, 208, 208 ) );
-
- bSizer24->Add( m_textCtrlMessage, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer99;
- bSizer99 = new wxBoxSizer( wxHORIZONTAL );
-
- m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") );
-
- bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
-
- bSizer99->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 );
- m_checkBoxUseRecycler->SetValue(true);
- bSizer99->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOK->SetDefault();
- m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer25->Add( m_buttonCancel, 0, wxALL, 5 );
-
- bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- this->SetSizer( bSizer24 );
- this->Layout();
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
- m_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
- m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
- m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
- m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+
+ bSizer24->Add( 0, 10, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer41;
+ bSizer41 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
+ bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHeader->Wrap( -1 );
+ m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ bSizer24->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
+ m_textCtrlMessage->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+
+ bSizer24->Add( m_textCtrlMessage, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer99;
+ bSizer99 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") );
+
+ bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+
+ bSizer99->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_checkBoxUseRecycler->SetValue(true);
+ bSizer99->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOK->SetDefault();
+ m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer25->Add( m_buttonCancel, 0, wxALL, 5 );
+
+ bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ this->SetSizer( bSizer24 );
+ this->Layout();
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
+ m_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
+ m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
}
DeleteDlgGenerated::~DeleteDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
- m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
- m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
- m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
- m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) );
+ m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this );
+ m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this );
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this );
+ m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this );
+
}
FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 370,380 ), wxDefaultSize );
-
- wxBoxSizer* bSizer21;
- bSizer21 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer86;
- bSizer86 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmap26 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
- bSizer86->Add( m_bitmap26, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
- m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
-
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxVERTICAL );
-
- m_staticTexHeader = new wxStaticText( m_panel8, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTexHeader->Wrap( -1 );
- m_staticTexHeader->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
- m_panel8->SetSizer( bSizer72 );
- m_panel8->Layout();
- bSizer72->Fit( m_panel8 );
- bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer21->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer70;
- bSizer70 = new wxBoxSizer( wxHORIZONTAL );
-
- bSizer70->SetMinSize( wxSize( 550,-1 ) );
-
- bSizer70->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that match all filter settings will be selected for synchronization.\nNote: The name filter must be specified relative(!) to main synchronization directories."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
- m_staticText44->Wrap( 550 );
- bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer70->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- m_bpButtonHelp->SetToolTip( _("Help") );
-
- bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 10 );
-
-
- bSizer21->Add( 0, 5, 0, 0, 5 );
-
- m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizer69;
- bSizer69 = new wxBoxSizer( wxVERTICAL );
-
- m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer52;
- bSizer52 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText45->Wrap( -1 );
- m_staticText45->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
-
- bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 );
-
- m_staticText83 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter relative file or directory names separated by ';' or a new line."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText83->Wrap( -1 );
- bSizer52->Add( m_staticText83, 0, 0, 5 );
-
- m_staticText84 = new wxStaticText( m_panel13, wxID_ANY, _("2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText84->Wrap( -1 );
- bSizer52->Add( m_staticText84, 0, 0, 5 );
-
- m_staticText85 = new wxStaticText( m_panel13, wxID_ANY, _("3. Exclude files directly on main grid via context menu."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText85->Wrap( -1 );
- bSizer52->Add( m_staticText85, 0, 0, 5 );
-
- bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 );
-
- wxStaticBoxSizer* sbSizer21;
- sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL );
-
- wxBoxSizer* bSizer66;
- bSizer66 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText181->Wrap( -1 );
- bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1811->Wrap( 250 );
- m_staticText1811->SetFont( wxFont( 8, 70, 93, 90, false, wxEmptyString ) );
-
- bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
-
- bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- m_panel13->SetSizer( bSizer69 );
- m_panel13->Layout();
- bSizer69->Fit( m_panel13 );
- bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 );
-
-
- bSizer21->Add( 0, 0, 0, 0, 5 );
-
- wxBoxSizer* bSizer159;
- bSizer159 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer8;
- sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Include") ), wxHORIZONTAL );
-
- m_bitmapInclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
- sbSizer8->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
-
- m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- sbSizer8->Add( m_textCtrlInclude, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- bSizer166->Add( sbSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer26;
- sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Exclude") ), wxHORIZONTAL );
-
- m_bitmapExclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
- sbSizer26->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
- sbSizer26->Add( m_textCtrlExclude, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer166->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- bSizer159->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer159->Add( 5, 0, 0, 0, 5 );
-
- wxBoxSizer* bSizer160;
- bSizer160 = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sbSizer25;
- sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Date") ), wxHORIZONTAL );
-
- wxBoxSizer* bSizer169;
- bSizer169 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapFilterDate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 34,34 ), 0 );
- bSizer169->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- wxBoxSizer* bSizer165;
- bSizer165 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText103 = new wxStaticText( this, wxID_ANY, _("Select time span"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText103->Wrap( -1 );
- bSizer165->Add( m_staticText103, 0, 0, 5 );
-
- wxBoxSizer* bSizer164;
- bSizer164 = new wxBoxSizer( wxVERTICAL );
-
- wxArrayString m_choiceUnitTimespanChoices;
- m_choiceUnitTimespan = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 );
- m_choiceUnitTimespan->SetSelection( 0 );
- bSizer164->Add( m_choiceUnitTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_spinCtrlTimespan = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- m_spinCtrlTimespan->Hide();
-
- bSizer164->Add( m_spinCtrlTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer165->Add( bSizer164, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer169->Add( bSizer165, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizer25->Add( bSizer169, 0, 0, 5 );
-
- bSizer160->Add( sbSizer25, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer81;
- sbSizer81 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Size") ), wxHORIZONTAL );
-
- wxBoxSizer* bSizer170;
- bSizer170 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapFilterSize = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
- bSizer170->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText101 = new wxStaticText( this, wxID_ANY, _("Minimum file size"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText101->Wrap( -1 );
- bSizer158->Add( m_staticText101, 0, 0, 5 );
-
- wxBoxSizer* bSizer162;
- bSizer162 = new wxBoxSizer( wxVERTICAL );
-
- m_spinCtrlMinSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer162->Add( m_spinCtrlMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxArrayString m_choiceUnitMinSizeChoices;
- m_choiceUnitMinSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 );
- m_choiceUnitMinSize->SetSelection( 0 );
- bSizer162->Add( m_choiceUnitMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer158->Add( bSizer162, 0, wxBOTTOM, 5 );
-
- m_staticText102 = new wxStaticText( this, wxID_ANY, _("Maximum file size"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText102->Wrap( -1 );
- bSizer158->Add( m_staticText102, 0, 0, 5 );
-
- wxBoxSizer* bSizer163;
- bSizer163 = new wxBoxSizer( wxVERTICAL );
-
- m_spinCtrlMaxSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
- bSizer163->Add( m_spinCtrlMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxArrayString m_choiceUnitMaxSizeChoices;
- m_choiceUnitMaxSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 );
- m_choiceUnitMaxSize->SetSelection( 0 );
- bSizer163->Add( m_choiceUnitMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer158->Add( bSizer163, 0, wxTOP, 5 );
-
- bSizer170->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizer81->Add( bSizer170, 0, 0, 5 );
-
- bSizer160->Add( sbSizer81, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- bSizer159->Add( bSizer160, 0, wxEXPAND, 5 );
-
- bSizer21->Add( bSizer159, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- wxBoxSizer* bSizer22;
- bSizer22 = new wxBoxSizer( wxHORIZONTAL );
-
- m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button10->SetDefault();
- m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button17 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- bSizer21->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxEXPAND, 5 );
-
- this->SetSizer( bSizer21 );
- this->Layout();
- bSizer21->Fit( this );
-
- this->Centre( wxBOTH );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
- m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
- m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
- m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
- m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 370,380 ), wxDefaultSize );
+
+ wxBoxSizer* bSizer21;
+ bSizer21 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer86;
+ bSizer86 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmap26 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
+ bSizer86->Add( m_bitmap26, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
+ m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
+
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTexHeader = new wxStaticText( m_panel8, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTexHeader->Wrap( -1 );
+ m_staticTexHeader->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ m_panel8->SetSizer( bSizer72 );
+ m_panel8->Layout();
+ bSizer72->Fit( m_panel8 );
+ bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer21->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer70;
+ bSizer70 = new wxBoxSizer( wxHORIZONTAL );
+
+ bSizer70->SetMinSize( wxSize( 550,-1 ) );
+
+ bSizer70->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that match all filter settings will be selected for synchronization.\nNote: The name filter must be specified relative(!) to main synchronization directories."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_staticText44->Wrap( 550 );
+ bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer70->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButtonHelp->SetToolTip( _("Help") );
+
+ bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 10 );
+
+
+ bSizer21->Add( 0, 5, 0, 0, 5 );
+
+ m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer69;
+ bSizer69 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer52;
+ bSizer52 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText45->Wrap( -1 );
+ m_staticText45->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) );
+
+ bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 );
+
+ m_staticText83 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter relative file or directory names separated by ';' or a new line."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText83->Wrap( -1 );
+ bSizer52->Add( m_staticText83, 0, 0, 5 );
+
+ m_staticText84 = new wxStaticText( m_panel13, wxID_ANY, _("2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText84->Wrap( -1 );
+ bSizer52->Add( m_staticText84, 0, 0, 5 );
+
+ m_staticText85 = new wxStaticText( m_panel13, wxID_ANY, _("3. Exclude files directly on main grid via context menu."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText85->Wrap( -1 );
+ bSizer52->Add( m_staticText85, 0, 0, 5 );
+
+ bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 );
+
+ wxStaticBoxSizer* sbSizer21;
+ sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL );
+
+ wxBoxSizer* bSizer66;
+ bSizer66 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText181->Wrap( -1 );
+ bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1811->Wrap( 250 );
+ m_staticText1811->SetFont( wxFont( 8, 70, 93, 90, false, wxEmptyString ) );
+
+ bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
+
+ bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_panel13->SetSizer( bSizer69 );
+ m_panel13->Layout();
+ bSizer69->Fit( m_panel13 );
+ bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 );
+
+
+ bSizer21->Add( 0, 0, 0, 0, 5 );
+
+ wxBoxSizer* bSizer159;
+ bSizer159 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer8;
+ sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Include") ), wxHORIZONTAL );
+
+ m_bitmapInclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
+ sbSizer8->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
+
+ m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
+ sbSizer8->Add( m_textCtrlInclude, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ bSizer166->Add( sbSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer26;
+ sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Exclude") ), wxHORIZONTAL );
+
+ m_bitmapExclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
+ sbSizer26->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
+ sbSizer26->Add( m_textCtrlExclude, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer166->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ bSizer159->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer159->Add( 5, 0, 0, 0, 5 );
+
+ wxBoxSizer* bSizer160;
+ bSizer160 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer25;
+ sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Date") ), wxHORIZONTAL );
+
+ wxBoxSizer* bSizer169;
+ bSizer169 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapFilterDate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 34,34 ), 0 );
+ bSizer169->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ wxBoxSizer* bSizer165;
+ bSizer165 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText103 = new wxStaticText( this, wxID_ANY, _("Select time span"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText103->Wrap( -1 );
+ bSizer165->Add( m_staticText103, 0, 0, 5 );
+
+ wxBoxSizer* bSizer164;
+ bSizer164 = new wxBoxSizer( wxVERTICAL );
+
+ wxArrayString m_choiceUnitTimespanChoices;
+ m_choiceUnitTimespan = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 );
+ m_choiceUnitTimespan->SetSelection( 0 );
+ bSizer164->Add( m_choiceUnitTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_spinCtrlTimespan = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ m_spinCtrlTimespan->Hide();
+
+ bSizer164->Add( m_spinCtrlTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer165->Add( bSizer164, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer169->Add( bSizer165, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizer25->Add( bSizer169, 0, 0, 5 );
+
+ bSizer160->Add( sbSizer25, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer81;
+ sbSizer81 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Size") ), wxHORIZONTAL );
+
+ wxBoxSizer* bSizer170;
+ bSizer170 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapFilterSize = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
+ bSizer170->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText101 = new wxStaticText( this, wxID_ANY, _("Minimum file size"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText101->Wrap( -1 );
+ bSizer158->Add( m_staticText101, 0, 0, 5 );
+
+ wxBoxSizer* bSizer162;
+ bSizer162 = new wxBoxSizer( wxVERTICAL );
+
+ m_spinCtrlMinSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer162->Add( m_spinCtrlMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_choiceUnitMinSizeChoices;
+ m_choiceUnitMinSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 );
+ m_choiceUnitMinSize->SetSelection( 0 );
+ bSizer162->Add( m_choiceUnitMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer158->Add( bSizer162, 0, wxBOTTOM, 5 );
+
+ m_staticText102 = new wxStaticText( this, wxID_ANY, _("Maximum file size"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText102->Wrap( -1 );
+ bSizer158->Add( m_staticText102, 0, 0, 5 );
+
+ wxBoxSizer* bSizer163;
+ bSizer163 = new wxBoxSizer( wxVERTICAL );
+
+ m_spinCtrlMaxSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 );
+ bSizer163->Add( m_spinCtrlMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxArrayString m_choiceUnitMaxSizeChoices;
+ m_choiceUnitMaxSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 );
+ m_choiceUnitMaxSize->SetSelection( 0 );
+ bSizer163->Add( m_choiceUnitMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer158->Add( bSizer163, 0, wxTOP, 5 );
+
+ bSizer170->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizer81->Add( bSizer170, 0, 0, 5 );
+
+ bSizer160->Add( sbSizer81, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ bSizer159->Add( bSizer160, 0, wxEXPAND, 5 );
+
+ bSizer21->Add( bSizer159, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer22;
+ bSizer22 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button10->SetDefault();
+ m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button17 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ bSizer21->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxEXPAND, 5 );
+
+ this->SetSizer( bSizer21 );
+ this->Layout();
+ bSizer21->Fit( this );
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
+ m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
+ m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
+ m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
}
FilterDlgGenerated::~FilterDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
- m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
- m_textCtrlInclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_textCtrlExclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
- m_choiceUnitTimespan->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMinSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_choiceUnitMaxSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
- m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
- m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
- m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) );
+ m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this );
+ m_textCtrlInclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_textCtrlExclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this );
+ m_choiceUnitTimespan->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMinSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_choiceUnitMaxSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this );
+ m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this );
+ m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this );
+ m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this );
+
}
CustomizeColsDlgGenerated::CustomizeColsDlgGenerated( 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* bSizer96;
- bSizer96 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer99;
- bSizer99 = new wxBoxSizer( wxHORIZONTAL );
-
- wxArrayString m_checkListColumnsChoices;
- m_checkListColumns = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListColumnsChoices, 0 );
- bSizer99->Add( m_checkListColumns, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer98;
- bSizer98 = new wxBoxSizer( wxVERTICAL );
-
- m_bpButton29 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- m_bpButton29->SetToolTip( _("Move column up") );
-
- bSizer98->Add( m_bpButton29, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
-
- m_bpButton30 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
- m_bpButton30->SetToolTip( _("Move column down") );
-
- bSizer98->Add( m_bpButton30, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- bSizer99->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer96->Add( bSizer99, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- wxBoxSizer* bSizer97;
- bSizer97 = new wxBoxSizer( wxHORIZONTAL );
-
- m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button9, 0, wxALL, 5 );
-
-
- bSizer97->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_button28 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button28->SetDefault();
- m_button28->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer97->Add( m_button28, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button29, 0, wxALL, 5 );
-
- bSizer96->Add( bSizer97, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- this->SetSizer( bSizer96 );
- this->Layout();
- bSizer96->Fit( this );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) );
- m_bpButton29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this );
- m_bpButton30->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this );
- m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this );
- m_button28->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this );
- m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer96;
+ bSizer96 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer99;
+ bSizer99 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxArrayString m_checkListColumnsChoices;
+ m_checkListColumns = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListColumnsChoices, 0 );
+ bSizer99->Add( m_checkListColumns, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer98;
+ bSizer98 = new wxBoxSizer( wxVERTICAL );
+
+ m_bpButton29 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButton29->SetToolTip( _("Move column up") );
+
+ bSizer98->Add( m_bpButton29, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_bpButton30 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
+ m_bpButton30->SetToolTip( _("Move column down") );
+
+ bSizer98->Add( m_bpButton30, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ bSizer99->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer96->Add( bSizer99, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ wxBoxSizer* bSizer97;
+ bSizer97 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button9, 0, wxALL, 5 );
+
+
+ bSizer97->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_button28 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button28->SetDefault();
+ m_button28->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button28, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button29, 0, wxALL, 5 );
+
+ bSizer96->Add( bSizer97, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ this->SetSizer( bSizer96 );
+ this->Layout();
+ bSizer96->Fit( this );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) );
+ m_bpButton29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this );
+ m_bpButton30->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this );
+ m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this );
+ m_button28->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this );
}
CustomizeColsDlgGenerated::~CustomizeColsDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) );
- m_bpButton29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this );
- m_bpButton30->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this );
- m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this );
- m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this );
- m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) );
+ m_bpButton29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this );
+ m_bpButton30->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this );
+ m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this );
+ m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this );
+
}
GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
- this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize );
-
- wxBoxSizer* bSizer95;
- bSizer95 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer86;
- bSizer86 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
- bSizer86->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
-
- bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
- m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
-
- wxBoxSizer* bSizer72;
- bSizer72 = new wxBoxSizer( wxVERTICAL );
-
- m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText56->Wrap( -1 );
- m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
- m_panel8->SetSizer( bSizer72 );
- m_panel8->Layout();
- bSizer72->Fit( m_panel8 );
- bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- bSizer95->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- bSizer95->Add( 0, 5, 0, 0, 5 );
-
- wxStaticBoxSizer* sbSizer23;
- sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
-
- m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Transactional file copy"), wxDefaultPosition, wxDefaultSize, 0 );
- sbSizer23->Add( m_checkBoxTransCopy, 0, wxEXPAND|wxALL, 5 );
-
- m_staticText82 = new wxStaticText( this, wxID_ANY, _("Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error."), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText82->Wrap( 400 );
- m_staticText82->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- sbSizer23->Add( m_staticText82, 0, wxLEFT, 20 );
-
- m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
- sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 );
-
- m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextCopyLocked->Wrap( 400 );
- m_staticTextCopyLocked->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- sbSizer23->Add( m_staticTextCopyLocked, 0, wxLEFT|wxEXPAND, 20 );
-
- m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 );
- sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 );
-
- m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and directory permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText8211->Wrap( 400 );
- m_staticText8211->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
-
- sbSizer23->Add( m_staticText8211, 0, wxLEFT|wxEXPAND, 20 );
-
- bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer261;
- sbSizer261 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
-
- wxBoxSizer* bSizer101;
- bSizer101 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText100 = new wxStaticText( this, wxID_ANY, _("Hidden dialogs:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText100->Wrap( -1 );
- bSizer101->Add( m_staticText100, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer101->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_buttonResetDialogs = new zen::BitmapButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxSize( 80,-1 ), 0 );
- m_buttonResetDialogs->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
- m_buttonResetDialogs->SetToolTip( _("Show hidden dialogs") );
-
- bSizer101->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- sbSizer261->Add( bSizer101, 0, wxEXPAND, 5 );
-
- bSizer95->Add( sbSizer261, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
- wxStaticBoxSizer* sbSizer26;
- sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("External applications") ), wxHORIZONTAL );
-
-
- sbSizer26->Add( 5, 0, 0, 0, 5 );
-
- m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
-
- // Grid
- m_gridCustomCommand->CreateGrid( 5, 2 );
- m_gridCustomCommand->EnableEditing( true );
- m_gridCustomCommand->EnableGridLines( true );
- m_gridCustomCommand->EnableDragGridSize( false );
- m_gridCustomCommand->SetMargins( 0, 0 );
-
- // Columns
- m_gridCustomCommand->SetColSize( 0, 165 );
- m_gridCustomCommand->SetColSize( 1, 196 );
- m_gridCustomCommand->EnableDragColMove( false );
- m_gridCustomCommand->EnableDragColSize( true );
- m_gridCustomCommand->SetColLabelSize( 20 );
- m_gridCustomCommand->SetColLabelValue( 0, _("Description") );
- m_gridCustomCommand->SetColLabelValue( 1, _("Command line") );
- m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
-
- // Rows
- m_gridCustomCommand->EnableDragRowSize( false );
- m_gridCustomCommand->SetRowLabelSize( 0 );
- m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
-
- // Label Appearance
-
- // Cell Defaults
- m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
- sbSizer26->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer157;
- bSizer157 = new wxBoxSizer( wxVERTICAL );
-
- m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 );
-
- m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
- bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 );
-
- sbSizer26->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- sbSizer26->Add( 5, 0, 0, 0, 5 );
-
- bSizer95->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer97;
- bSizer97 = new wxBoxSizer( wxHORIZONTAL );
-
- m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button9, 0, wxALL, 5 );
-
-
- bSizer97->Add( 0, 0, 1, 0, 5 );
-
- m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
-
- m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button29, 0, wxALL, 5 );
-
- bSizer95->Add( bSizer97, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- this->SetSizer( bSizer95 );
- this->Layout();
- bSizer95->Fit( this );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
- m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
- m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
- m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
- m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this );
- m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize );
+
+ wxBoxSizer* bSizer95;
+ bSizer95 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer86;
+ bSizer86 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 );
+ bSizer86->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
+ m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
+
+ wxBoxSizer* bSizer72;
+ bSizer72 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText56->Wrap( -1 );
+ m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ m_panel8->SetSizer( bSizer72 );
+ m_panel8->Layout();
+ bSizer72->Fit( m_panel8 );
+ bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ bSizer95->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer95->Add( 0, 5, 0, 0, 5 );
+
+ wxStaticBoxSizer* sbSizer23;
+ sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
+
+ m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Transactional file copy"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizer23->Add( m_checkBoxTransCopy, 0, wxEXPAND|wxALL, 5 );
+
+ m_staticText82 = new wxStaticText( this, wxID_ANY, _("Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText82->Wrap( 400 );
+ m_staticText82->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ sbSizer23->Add( m_staticText82, 0, wxLEFT, 20 );
+
+ m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextCopyLocked->Wrap( 400 );
+ m_staticTextCopyLocked->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ sbSizer23->Add( m_staticTextCopyLocked, 0, wxLEFT|wxEXPAND, 20 );
+
+ m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and directory permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText8211->Wrap( 400 );
+ m_staticText8211->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
+
+ sbSizer23->Add( m_staticText8211, 0, wxLEFT|wxEXPAND, 20 );
+
+ bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer261;
+ sbSizer261 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
+
+ wxBoxSizer* bSizer101;
+ bSizer101 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText100 = new wxStaticText( this, wxID_ANY, _("Hidden dialogs:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText100->Wrap( -1 );
+ bSizer101->Add( m_staticText100, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer101->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonResetDialogs = new zen::BitmapButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxSize( 80,-1 ), 0 );
+ m_buttonResetDialogs->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+ m_buttonResetDialogs->SetToolTip( _("Show hidden dialogs") );
+
+ bSizer101->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ sbSizer261->Add( bSizer101, 0, wxEXPAND, 5 );
+
+ bSizer95->Add( sbSizer261, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ wxStaticBoxSizer* sbSizer26;
+ sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("External applications") ), wxHORIZONTAL );
+
+
+ sbSizer26->Add( 5, 0, 0, 0, 5 );
+
+ m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+
+ // Grid
+ m_gridCustomCommand->CreateGrid( 5, 2 );
+ m_gridCustomCommand->EnableEditing( true );
+ m_gridCustomCommand->EnableGridLines( true );
+ m_gridCustomCommand->EnableDragGridSize( false );
+ m_gridCustomCommand->SetMargins( 0, 0 );
+
+ // Columns
+ m_gridCustomCommand->SetColSize( 0, 165 );
+ m_gridCustomCommand->SetColSize( 1, 196 );
+ m_gridCustomCommand->EnableDragColMove( false );
+ m_gridCustomCommand->EnableDragColSize( true );
+ m_gridCustomCommand->SetColLabelSize( 20 );
+ m_gridCustomCommand->SetColLabelValue( 0, _("Description") );
+ m_gridCustomCommand->SetColLabelValue( 1, _("Command line") );
+ m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Rows
+ m_gridCustomCommand->EnableDragRowSize( false );
+ m_gridCustomCommand->SetRowLabelSize( 0 );
+ m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Label Appearance
+
+ // Cell Defaults
+ m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ sbSizer26->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer157;
+ bSizer157 = new wxBoxSizer( wxVERTICAL );
+
+ m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 );
+
+ m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW );
+ bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 );
+
+ sbSizer26->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ sbSizer26->Add( 5, 0, 0, 0, 5 );
+
+ bSizer95->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer97;
+ bSizer97 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button9, 0, wxALL, 5 );
+
+
+ bSizer97->Add( 0, 0, 1, 0, 5 );
+
+ m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+ m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button29, 0, wxALL, 5 );
+
+ bSizer95->Add( bSizer97, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ this->SetSizer( bSizer95 );
+ this->Layout();
+ bSizer95->Fit( this );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
+ m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
+ m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
+ m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
+ m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
}
GlobalSettingsDlgGenerated::~GlobalSettingsDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
- m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
- m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
- m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
- m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
- m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this );
- m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) );
+ m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this );
+ m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this );
+ m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this );
+ m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this );
+ m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), 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 );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxHORIZONTAL );
-
- m_buttonStartSync = new zen::BitmapButton( this, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 );
- m_buttonStartSync->SetDefault();
- m_buttonStartSync->SetFont( wxFont( 14, 70, 90, 92, false, wxT("Arial Black") ) );
- m_buttonStartSync->SetToolTip( _("Start synchronization") );
-
- bSizer158->Add( m_buttonStartSync, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- bSizer158->Add( m_staticline16, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
-
- 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, 70, 90, 92, false, wxT("Arial Black") ) );
-
- sbSizer28->Add( m_staticTextVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- bSizer158->Add( sbSizer28, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- bSizer134->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
-
- m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 );
-
- wxBoxSizer* bSizer141;
- bSizer141 = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticBoxSizer* sbSizer161;
- sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxVERTICAL );
-
- wxBoxSizer* bSizer157;
- bSizer157 = new wxBoxSizer( wxHORIZONTAL );
-
- wxFlexGridSizer* fgSizer5;
- fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 5 );
- fgSizer5->SetFlexibleDirection( wxHORIZONTAL );
- fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
-
- fgSizer5->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticText94 = new wxStaticText( this, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText94->Wrap( -1 );
- m_staticText94->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer5->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- 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_textCtrlCreateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlCreateL->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlCreateL->SetToolTip( _("Number of files and directories that will be created") );
-
- fgSizer5->Add( m_textCtrlCreateL, 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_textCtrlUpdateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlUpdateL->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlUpdateL->SetToolTip( _("Number of files that will be overwritten") );
-
- fgSizer5->Add( m_textCtrlUpdateL, 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_textCtrlDeleteL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlDeleteL->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlDeleteL->SetToolTip( _("Number of files and directories that will be deleted") );
-
- fgSizer5->Add( m_textCtrlDeleteL, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer157->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- wxFlexGridSizer* fgSizer51;
- fgSizer51 = new wxFlexGridSizer( 0, 1, 0, 5 );
- fgSizer51->SetFlexibleDirection( wxHORIZONTAL );
- fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_staticText95 = new wxStaticText( this, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText95->Wrap( -1 );
- m_staticText95->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
-
- fgSizer51->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlCreateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlCreateR->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlCreateR->SetToolTip( _("Number of files and directories that will be created") );
-
- fgSizer51->Add( m_textCtrlCreateR, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlUpdateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlUpdateR->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlUpdateR->SetToolTip( _("Number of files that will be overwritten") );
-
- fgSizer51->Add( m_textCtrlUpdateR, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlDeleteR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
- m_textCtrlDeleteR->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlDeleteR->SetToolTip( _("Number of files and directories that will be deleted") );
-
- fgSizer51->Add( m_textCtrlDeleteR, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer157->Add( fgSizer51, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- sbSizer161->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
-
-
- sbSizer161->Add( 0, 10, 0, 0, 5 );
-
- wxBoxSizer* bSizer156;
- bSizer156 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") );
-
- bSizer156->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
-
-
- bSizer156->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_CENTRE|wxTE_READONLY );
- m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) );
- m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") );
-
- bSizer156->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
-
- bSizer156->Add( 0, 0, 1, wxEXPAND, 5 );
-
- sbSizer161->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
-
- bSizer134->Add( bSizer141, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
-
- m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizer134->Add( m_staticline12, 0, wxEXPAND|wxTOP|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, 70, 90, 90, false, wxEmptyString ) );
-
- 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 );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer134;
+ bSizer134 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonStartSync = new zen::BitmapButton( this, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 );
+ m_buttonStartSync->SetDefault();
+ m_buttonStartSync->SetFont( wxFont( 14, 70, 90, 92, false, wxT("Arial Black") ) );
+ m_buttonStartSync->SetToolTip( _("Start synchronization") );
+
+ bSizer158->Add( m_buttonStartSync, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizer158->Add( m_staticline16, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ 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, 70, 90, 92, false, wxT("Arial Black") ) );
+
+ sbSizer28->Add( m_staticTextVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ bSizer158->Add( sbSizer28, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ bSizer134->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
+
+ m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer141;
+ bSizer141 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticBoxSizer* sbSizer161;
+ sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxVERTICAL );
+
+ wxBoxSizer* bSizer157;
+ bSizer157 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxFlexGridSizer* fgSizer5;
+ fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 5 );
+ fgSizer5->SetFlexibleDirection( wxHORIZONTAL );
+ fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ fgSizer5->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticText94 = new wxStaticText( this, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText94->Wrap( -1 );
+ m_staticText94->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer5->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ 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_textCtrlCreateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlCreateL->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlCreateL->SetToolTip( _("Number of files and directories that will be created") );
+
+ fgSizer5->Add( m_textCtrlCreateL, 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_textCtrlUpdateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlUpdateL->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlUpdateL->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer5->Add( m_textCtrlUpdateL, 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_textCtrlDeleteL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlDeleteL->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlDeleteL->SetToolTip( _("Number of files and directories that will be deleted") );
+
+ fgSizer5->Add( m_textCtrlDeleteL, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer157->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ wxFlexGridSizer* fgSizer51;
+ fgSizer51 = new wxFlexGridSizer( 0, 1, 0, 5 );
+ fgSizer51->SetFlexibleDirection( wxHORIZONTAL );
+ fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticText95 = new wxStaticText( this, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText95->Wrap( -1 );
+ m_staticText95->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) );
+
+ fgSizer51->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlCreateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlCreateR->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlCreateR->SetToolTip( _("Number of files and directories that will be created") );
+
+ fgSizer51->Add( m_textCtrlCreateR, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlUpdateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlUpdateR->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlUpdateR->SetToolTip( _("Number of files that will be overwritten") );
+
+ fgSizer51->Add( m_textCtrlUpdateR, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlDeleteR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT );
+ m_textCtrlDeleteR->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlDeleteR->SetToolTip( _("Number of files and directories that will be deleted") );
+
+ fgSizer51->Add( m_textCtrlDeleteR, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer157->Add( fgSizer51, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ sbSizer161->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ sbSizer161->Add( 0, 10, 0, 0, 5 );
+
+ wxBoxSizer* bSizer156;
+ bSizer156 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") );
+
+ bSizer156->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 );
+
+
+ bSizer156->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_CENTRE|wxTE_READONLY );
+ m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) );
+ m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") );
+
+ bSizer156->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizer156->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ sbSizer161->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+ bSizer134->Add( bSizer141, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizer134->Add( m_staticline12, 0, wxEXPAND|wxTOP|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, 70, 90, 90, false, wxEmptyString ) );
+
+ 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 );
-
+ // 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 );
+
}
PopupFrameGenerated1::PopupFrameGenerated1( 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 );
-
- wxBoxSizer* bSizer158;
- bSizer158 = new wxBoxSizer( wxHORIZONTAL );
-
- m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMain->Wrap( 600 );
- bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
-
- this->SetSizer( bSizer158 );
- this->Layout();
- bSizer158->Fit( this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer158;
+ bSizer158 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMain->Wrap( 600 );
+ bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ this->SetSizer( bSizer158 );
+ this->Layout();
+ bSizer158->Fit( this );
}
PopupFrameGenerated1::~PopupFrameGenerated1()
@@ -3779,130 +3674,130 @@ PopupFrameGenerated1::~PopupFrameGenerated1()
SearchDialogGenerated::SearchDialogGenerated( 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* bSizer161;
- bSizer161 = new wxBoxSizer( wxHORIZONTAL );
-
- wxBoxSizer* bSizer166;
- bSizer166 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer162;
- bSizer162 = new wxBoxSizer( wxHORIZONTAL );
-
- m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText101->Wrap( -1 );
- bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 );
- bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
-
- bSizer166->Add( 0, 5, 0, 0, 5 );
-
- m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer166->Add( m_checkBoxMatchCase, 0, wxALL, 5 );
-
- bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
-
- wxBoxSizer* bSizer97;
- bSizer97 = new wxBoxSizer( wxVERTICAL );
-
- m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonFindNext->SetDefault();
- m_buttonFindNext->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer97->Add( m_buttonFindNext, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
-
- m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button29, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
-
- bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- this->SetSizer( bSizer161 );
- this->Layout();
- bSizer161->Fit( this );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
- m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
- m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
- m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer161;
+ bSizer161 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer166;
+ bSizer166 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer162;
+ bSizer162 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText101->Wrap( -1 );
+ bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 );
+ bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ bSizer166->Add( 0, 5, 0, 0, 5 );
+
+ m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer166->Add( m_checkBoxMatchCase, 0, wxALL, 5 );
+
+ bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer97;
+ bSizer97 = new wxBoxSizer( wxVERTICAL );
+
+ m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonFindNext->SetDefault();
+ m_buttonFindNext->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer97->Add( m_buttonFindNext, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
+
+ m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button29, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+ bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ this->SetSizer( bSizer161 );
+ this->Layout();
+ bSizer161->Fit( this );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
+ m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
+ m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
+ m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
}
SearchDialogGenerated::~SearchDialogGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
- m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
- m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
- m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) );
+ m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this );
+ m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this );
+ m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this );
+
}
SelectTimespanDlgGenerated::SelectTimespanDlgGenerated( 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* bSizer96;
- bSizer96 = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bSizer98;
- bSizer98 = new wxBoxSizer( wxHORIZONTAL );
-
- m_calendarFrom = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
- bSizer98->Add( m_calendarFrom, 0, wxALL, 5 );
-
- m_calendarTo = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
- bSizer98->Add( m_calendarTo, 0, wxALL, 5 );
-
- bSizer96->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 );
-
- wxBoxSizer* bSizer97;
- bSizer97 = new wxBoxSizer( wxHORIZONTAL );
-
-
- bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_buttonOkay = new wxButton( this, wxID_ANY, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_buttonOkay->SetDefault();
- m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
-
- bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
- m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
-
- bSizer97->Add( m_button29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
-
- bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
-
- bSizer96->Add( bSizer97, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
- this->SetSizer( bSizer96 );
- this->Layout();
- bSizer96->Fit( this );
-
- // Connect Events
- this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
- m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
- m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
- m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
- m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer96;
+ bSizer96 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer98;
+ bSizer98 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_calendarFrom = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
+ bSizer98->Add( m_calendarFrom, 0, wxALL, 5 );
+
+ m_calendarTo = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
+ bSizer98->Add( m_calendarTo, 0, wxALL, 5 );
+
+ bSizer96->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+ wxBoxSizer* bSizer97;
+ bSizer97 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_buttonOkay = new wxButton( this, wxID_ANY, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_buttonOkay->SetDefault();
+ m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+
+ bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 );
+ m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) );
+
+ bSizer97->Add( m_button29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer97->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ bSizer96->Add( bSizer97, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ this->SetSizer( bSizer96 );
+ this->Layout();
+ bSizer96->Fit( this );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
+ m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
+ m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
+ m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
}
SelectTimespanDlgGenerated::~SelectTimespanDlgGenerated()
{
- // Disconnect Events
- this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
- m_calendarFrom->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
- m_calendarTo->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
- m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
- m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
-
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) );
+ m_calendarFrom->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this );
+ m_calendarTo->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this );
+ m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this );
+ m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this );
+
}
diff --git a/ui/gui_generated.h b/ui/gui_generated.h
index 3fa64c80..4cc32873 100644
--- a/ui/gui_generated.h
+++ b/ui/gui_generated.h
@@ -11,16 +11,14 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
-class CustomGridLeft;
-class CustomGridMiddle;
-class CustomGridRight;
class ExecFinishedBox;
class FolderHistoryBox;
class ToggleButton;
class wxStaticText;
-namespace zen{ class BitmapButton; }
-namespace zen{ class DirPickerCtrl; }
-namespace zen{ class Graph2D; }
+namespace zen { class BitmapButton; }
+namespace zen { class DirPickerCtrl; }
+namespace zen { class Graph2D; }
+namespace zen { class Grid; }
#include <wx/string.h>
#include <wx/bitmap.h>
@@ -38,9 +36,7 @@ namespace zen{ class Graph2D; }
#include <wx/panel.h>
#include <wx/combobox.h>
#include <wx/filepicker.h>
-#include <wx/statbox.h>
#include <wx/scrolwin.h>
-#include <wx/grid.h>
#include <wx/listbox.h>
#include <wx/checkbox.h>
#include <wx/statbmp.h>
@@ -48,6 +44,7 @@ namespace zen{ class Graph2D; }
#include <wx/statline.h>
#include <wx/frame.h>
#include <wx/gauge.h>
+#include <wx/statbox.h>
#include <wx/choice.h>
#include <wx/spinctrl.h>
#include <wx/listbook.h>
@@ -58,6 +55,7 @@ namespace zen{ class Graph2D; }
#include <wx/imaglist.h>
#include <wx/hyperlink.h>
#include <wx/checklst.h>
+#include <wx/grid.h>
#include <wx/calctrl.h>
#include "../zen/i18n.h"
@@ -68,977 +66,953 @@ namespace zen{ class Graph2D; }
///////////////////////////////////////////////////////////////////////////////
/// Class MainDialogGenerated
///////////////////////////////////////////////////////////////////////////////
-class MainDialogGenerated : public wxFrame
+class MainDialogGenerated : public wxFrame
{
- private:
-
- protected:
- wxMenuBar* m_menubar1;
- wxMenu* m_menuFile;
- wxMenuItem* m_menuItem10;
- wxMenuItem* m_menuItem11;
- wxMenuItem* m_menuItemSwitchView;
- wxMenuItem* m_menuItemNew;
- wxMenuItem* m_menuItemSave;
- wxMenuItem* m_menuItemLoad;
- wxMenu* m_menuAdvanced;
- wxMenu* m_menuLanguages;
- wxMenuItem* m_menuItemGlobSett;
- wxMenuItem* m_menuItem7;
- wxMenu* m_menuHelp;
- wxMenuItem* m_menuItemCheckVer;
- wxMenuItem* m_menuItemAbout;
- wxBoxSizer* bSizerPanelHolder;
- wxPanel* m_panelTopButtons;
- wxBoxSizer* bSizerTopButtons;
- wxStaticText* m_staticTextCmpVariant;
- zen::BitmapButton* m_buttonCompare;
- wxButton* m_buttonAbort;
- wxBitmapButton* m_bpButtonCmpConfig;
- wxStaticText* m_staticTextSyncVariant;
- wxBitmapButton* m_bpButtonSyncConfig;
- zen::BitmapButton* m_buttonStartSync;
- wxPanel* m_panelDirectoryPairs;
- wxStaticBoxSizer* sbSizerDirLeft;
- wxBitmapButton* m_bpButtonAddPair;
- wxPanel* m_panelTopMiddle;
- wxBitmapButton* m_bpButtonSwapSides;
- wxStaticBoxSizer* sbSizerDirRight;
- wxScrolledWindow* m_scrolledWindowFolderPairs;
- wxBoxSizer* bSizerAddFolderPairs;
- wxPanel* m_panelGrids;
- wxBoxSizer* bSizerGridHolder;
- CustomGridLeft* m_gridLeft;
- wxPanel* m_panelMiddle;
- CustomGridMiddle* m_gridMiddle;
- CustomGridRight* m_gridRight;
- wxPanel* m_panelConfig;
- wxBoxSizer* bSizerConfig;
- wxBitmapButton* m_bpButtonSave;
- wxBitmapButton* m_bpButtonLoad;
- wxListBox* m_listBoxHistory;
- wxPanel* m_panelFilter;
- wxBitmapButton* m_bpButtonFilter;
- wxCheckBox* m_checkBoxHideFilt;
- wxPanel* m_panelStatistics;
- wxBoxSizer* bSizerStatistics;
- wxStaticBitmap* m_bitmapCreate;
- wxTextCtrl* m_textCtrlCreate;
- wxStaticBitmap* m_bitmapUpdate;
- wxTextCtrl* m_textCtrlUpdate;
- wxStaticBitmap* m_bitmapDelete;
- wxTextCtrl* m_textCtrlDelete;
- wxStaticBitmap* m_bitmapData;
- wxTextCtrl* m_textCtrlData;
- wxPanel* m_panelViewFilter;
- wxBoxSizer* bSizerViewFilter;
- ToggleButton* m_bpButtonSyncCreateLeft;
- ToggleButton* m_bpButtonSyncDirOverwLeft;
- ToggleButton* m_bpButtonSyncDeleteLeft;
- ToggleButton* m_bpButtonLeftOnly;
- ToggleButton* m_bpButtonLeftNewer;
- ToggleButton* m_bpButtonEqual;
- ToggleButton* m_bpButtonDifferent;
- ToggleButton* m_bpButtonSyncDirNone;
- ToggleButton* m_bpButtonRightNewer;
- ToggleButton* m_bpButtonRightOnly;
- ToggleButton* m_bpButtonSyncDeleteRight;
- ToggleButton* m_bpButtonSyncDirOverwRight;
- ToggleButton* m_bpButtonSyncCreateRight;
- ToggleButton* m_bpButtonConflict;
- wxPanel* m_panelStatusBar;
- wxBoxSizer* bSizerStatusLeftDirectories;
- wxStaticBitmap* m_bitmapSmallDirectoryLeft;
- wxStaticText* m_staticTextStatusLeftDirs;
- wxBoxSizer* bSizerStatusLeftFiles;
- wxStaticBitmap* m_bitmapSmallFileLeft;
- wxStaticText* m_staticTextStatusLeftFiles;
- wxStaticText* m_staticTextStatusLeftBytes;
- wxStaticLine* m_staticline9;
- wxStaticText* m_staticTextStatusMiddle;
- wxStaticLine* m_staticline10;
- wxBoxSizer* bSizerStatusRightDirectories;
- wxStaticBitmap* m_bitmapSmallDirectoryRight;
- wxStaticText* m_staticTextStatusRightDirs;
- wxBoxSizer* bSizerStatusRightFiles;
- wxStaticBitmap* m_bitmapSmallFileRight;
- wxStaticText* m_staticTextStatusRightFiles;
- wxStaticText* m_staticTextStatusRightBytes;
- wxStaticBitmap* m_bitmap15;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSwitchView( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnNewConfig( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLoadConfig( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuQuit( 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(); }
- virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDirSelected( wxFileDirPickerEvent& event ) { event.Skip(); }
- virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLeftGridDoubleClick( wxGridEvent& event ) { event.Skip(); }
- virtual void OnContextRim( wxGridEvent& event ) { event.Skip(); }
- virtual void OnSortLeftGrid( 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 OnContextRimLabelRight( wxGridEvent& event ) { event.Skip(); }
- virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) { event.Skip(); }
- virtual void OnLoadFromHistory( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHideFilteredButton( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncCreateLeft( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncDirLeft( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncDeleteLeft( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLeftOnlyFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLeftNewerFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnEqualFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDifferentFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncDirNone( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRightNewerFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRightOnlyFiles( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncDeleteRight( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncDirRight( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncCreateRight( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConflictFiles( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- wxPanel* m_panelTopLeft;
- wxBitmapButton* m_bpButtonRemovePair;
- FolderHistoryBox* m_directoryLeft;
- zen::DirPickerCtrl* m_dirPickerLeft;
- wxBitmapButton* m_bpButtonAltCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonAltSyncCfg;
- wxPanel* m_panelTopRight;
- FolderHistoryBox* m_directoryRight;
- zen::DirPickerCtrl* m_dirPickerRight;
- wxPanel* m_panelLeft;
- wxPanel* m_panelRight;
-
- MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-
- ~MainDialogGenerated();
-
+private:
+
+protected:
+ wxMenuBar* m_menubar1;
+ wxMenu* m_menuFile;
+ wxMenuItem* m_menuItem10;
+ wxMenuItem* m_menuItem11;
+ wxMenuItem* m_menuItemNew;
+ wxMenuItem* m_menuItemSave;
+ wxMenuItem* m_menuItemLoad;
+ wxMenu* m_menuAdvanced;
+ wxMenu* m_menuLanguages;
+ wxMenuItem* m_menuItemGlobSett;
+ wxMenuItem* m_menuItem7;
+ wxMenu* m_menuHelp;
+ wxMenuItem* m_menuItemCheckVer;
+ wxMenuItem* m_menuItemAbout;
+ wxBoxSizer* bSizerPanelHolder;
+ wxPanel* m_panelTopButtons;
+ wxBoxSizer* bSizerTopButtons;
+ wxStaticText* m_staticTextCmpVariant;
+ zen::BitmapButton* m_buttonCompare;
+ wxButton* m_buttonAbort;
+ wxBitmapButton* m_bpButtonCmpConfig;
+ wxStaticText* m_staticTextSyncVariant;
+ wxBitmapButton* m_bpButtonSyncConfig;
+ zen::BitmapButton* m_buttonStartSync;
+ wxPanel* m_panelDirectoryPairs;
+ wxStaticText* m_staticTextFinalPathLeft;
+ wxBitmapButton* m_bpButtonAddPair;
+ wxPanel* m_panelTopMiddle;
+ wxBitmapButton* m_bpButtonSwapSides;
+ wxStaticText* m_staticTextFinalPathRight;
+ wxScrolledWindow* m_scrolledWindowFolderPairs;
+ wxBoxSizer* bSizerAddFolderPairs;
+ zen::Grid* m_gridNavi;
+ zen::Grid* m_gridMain;
+ wxPanel* m_panelConfig;
+ wxBoxSizer* bSizerConfig;
+ wxBitmapButton* m_bpButtonSave;
+ wxBitmapButton* m_bpButtonLoad;
+ wxListBox* m_listBoxHistory;
+ wxPanel* m_panelFilter;
+ wxBitmapButton* m_bpButtonFilter;
+ wxCheckBox* m_checkBoxHideFilt;
+ wxPanel* m_panelStatistics;
+ wxBoxSizer* bSizerStatistics;
+ wxStaticBitmap* m_bitmapCreate;
+ wxTextCtrl* m_textCtrlCreate;
+ wxStaticBitmap* m_bitmapUpdate;
+ wxTextCtrl* m_textCtrlUpdate;
+ wxStaticBitmap* m_bitmapDelete;
+ wxTextCtrl* m_textCtrlDelete;
+ wxStaticBitmap* m_bitmapData;
+ wxTextCtrl* m_textCtrlData;
+ wxPanel* m_panelViewFilter;
+ wxBoxSizer* bSizerViewFilter;
+ ToggleButton* m_bpButtonSyncCreateLeft;
+ ToggleButton* m_bpButtonSyncDirOverwLeft;
+ ToggleButton* m_bpButtonSyncDeleteLeft;
+ ToggleButton* m_bpButtonLeftOnly;
+ ToggleButton* m_bpButtonLeftNewer;
+ ToggleButton* m_bpButtonEqual;
+ ToggleButton* m_bpButtonDifferent;
+ ToggleButton* m_bpButtonSyncDirNone;
+ ToggleButton* m_bpButtonRightNewer;
+ ToggleButton* m_bpButtonRightOnly;
+ ToggleButton* m_bpButtonSyncDeleteRight;
+ ToggleButton* m_bpButtonSyncDirOverwRight;
+ ToggleButton* m_bpButtonSyncCreateRight;
+ ToggleButton* m_bpButtonConflict;
+ wxPanel* m_panelStatusBar;
+ wxBoxSizer* bSizerStatusLeftDirectories;
+ wxStaticBitmap* m_bitmapSmallDirectoryLeft;
+ wxStaticText* m_staticTextStatusLeftDirs;
+ wxBoxSizer* bSizerStatusLeftFiles;
+ wxStaticBitmap* m_bitmapSmallFileLeft;
+ wxStaticText* m_staticTextStatusLeftFiles;
+ wxStaticText* m_staticTextStatusLeftBytes;
+ wxStaticLine* m_staticline9;
+ wxStaticText* m_staticTextStatusMiddle;
+ wxStaticLine* m_staticline10;
+ wxBoxSizer* bSizerStatusRightDirectories;
+ wxStaticBitmap* m_bitmapSmallDirectoryRight;
+ wxStaticText* m_staticTextStatusRightDirs;
+ wxBoxSizer* bSizerStatusRightFiles;
+ wxStaticBitmap* m_bitmapSmallFileRight;
+ wxStaticText* m_staticTextStatusRightFiles;
+ wxStaticText* m_staticTextStatusRightBytes;
+ wxStaticBitmap* m_bitmapResizeCorner;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnNewConfig( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLoadConfig( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuQuit( 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(); }
+ virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDirSelected( wxFileDirPickerEvent& event ) { event.Skip(); }
+ virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) { event.Skip(); }
+ virtual void OnLoadFromHistory( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHideFilteredButton( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncCreateLeft( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncDirLeft( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncDeleteLeft( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLeftOnlyFiles( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLeftNewerFiles( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnEqualFiles( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDifferentFiles( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncDirNone( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRightNewerFiles( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRightOnlyFiles( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncDeleteRight( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncDirRight( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncCreateRight( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConflictFiles( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ wxPanel* m_panelTopLeft;
+ wxBitmapButton* m_bpButtonRemovePair;
+ FolderHistoryBox* m_directoryLeft;
+ zen::DirPickerCtrl* m_dirPickerLeft;
+ wxBitmapButton* m_bpButtonAltCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonAltSyncCfg;
+ wxPanel* m_panelTopRight;
+ FolderHistoryBox* m_directoryRight;
+ zen::DirPickerCtrl* m_dirPickerRight;
+
+ MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 702,522 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+
+ ~MainDialogGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class FolderPairGenerated
///////////////////////////////////////////////////////////////////////////////
-class FolderPairGenerated : public wxPanel
+class FolderPairGenerated : public wxPanel
{
- private:
-
- protected:
-
- public:
- wxPanel* m_panelLeft;
- wxBitmapButton* m_bpButtonRemovePair;
- FolderHistoryBox* m_directoryLeft;
- zen::DirPickerCtrl* m_dirPickerLeft;
- wxPanel* m_panel20;
- wxBitmapButton* m_bpButtonAltCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonAltSyncCfg;
- wxPanel* m_panelRight;
- FolderHistoryBox* m_directoryRight;
- zen::DirPickerCtrl* m_dirPickerRight;
-
- FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
- ~FolderPairGenerated();
-
+private:
+
+protected:
+
+public:
+ wxPanel* m_panelLeft;
+ wxBitmapButton* m_bpButtonRemovePair;
+ FolderHistoryBox* m_directoryLeft;
+ zen::DirPickerCtrl* m_dirPickerLeft;
+ wxPanel* m_panel20;
+ wxBitmapButton* m_bpButtonAltCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonAltSyncCfg;
+ wxPanel* m_panelRight;
+ FolderHistoryBox* m_directoryRight;
+ zen::DirPickerCtrl* m_dirPickerRight;
+
+ FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+ ~FolderPairGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class CompareStatusGenerated
///////////////////////////////////////////////////////////////////////////////
-class CompareStatusGenerated : public wxPanel
+class CompareStatusGenerated : public wxPanel
{
- private:
-
- protected:
- wxStaticText* m_staticText30;
- wxTextCtrl* m_textCtrlStatus;
- wxGauge* m_gauge2;
- wxBoxSizer* bSizer42;
- wxBoxSizer* bSizerFilesFound;
- wxStaticText* m_staticText321;
- wxStaticText* m_staticTextScanned;
- wxBoxSizer* bSizerFilesRemaining;
- wxStaticText* m_staticText46;
- wxStaticText* m_staticTextFilesRemaining;
- wxStaticText* m_staticText117;
- wxStaticText* m_staticTextDataRemaining;
- wxStaticText* m_staticText118;
- wxBoxSizer* sSizerSpeed;
- wxStaticText* m_staticText104;
- wxStaticText* m_staticTextSpeed;
- wxBoxSizer* sSizerTimeRemaining;
- wxStaticText* m_staticTextTimeRemFixed;
- wxStaticText* m_staticTextRemTime;
- wxBoxSizer* sSizerTimeElapsed;
- wxStaticText* m_staticTextTimeElapsed;
-
- public:
-
- CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxRAISED_BORDER|wxTAB_TRAVERSAL );
- ~CompareStatusGenerated();
-
+private:
+
+protected:
+ wxStaticText* m_staticText30;
+ wxTextCtrl* m_textCtrlStatus;
+ wxGauge* m_gauge2;
+ wxBoxSizer* bSizer42;
+ wxBoxSizer* bSizerFilesFound;
+ wxStaticText* m_staticText321;
+ wxStaticText* m_staticTextScanned;
+ wxBoxSizer* bSizerFilesRemaining;
+ wxStaticText* m_staticText46;
+ wxStaticText* m_staticTextFilesRemaining;
+ wxStaticText* m_staticText117;
+ wxStaticText* m_staticTextDataRemaining;
+ wxStaticText* m_staticText118;
+ wxBoxSizer* sSizerSpeed;
+ wxStaticText* m_staticText104;
+ wxStaticText* m_staticTextSpeed;
+ wxBoxSizer* sSizerTimeRemaining;
+ wxStaticText* m_staticTextTimeRemFixed;
+ wxStaticText* m_staticTextRemTime;
+ wxBoxSizer* sSizerTimeElapsed;
+ wxStaticText* m_staticTextTimeElapsed;
+
+public:
+
+ CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxRAISED_BORDER|wxTAB_TRAVERSAL );
+ ~CompareStatusGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class BatchDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class BatchDlgGenerated : public wxDialog
+class BatchDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmap27;
- wxPanel* m_panel8;
- wxStaticText* m_staticText56;
- wxStaticText* m_staticText44;
- wxBitmapButton* m_bpButtonHelp;
- wxListbook* m_listbook1;
- wxPanel* m_panelOverview;
- wxBitmapButton* m_bpButtonCmpConfig;
- wxStaticText* m_staticTextCmpVariant;
- wxBitmapButton* m_bpButtonFilter;
- wxStaticText* m_staticTextSyncVariant;
- wxBitmapButton* m_bpButtonSyncConfig;
- wxBoxSizer* sbSizerMainPair;
- wxPanel* m_panelMainPair;
- wxStaticText* m_staticText532;
- wxStaticText* m_staticText5411;
- wxBoxSizer* bSizerAddFolderPairs;
- wxPanel* m_panelBatchSettings;
- wxCheckBox* m_checkBoxShowProgress;
- wxChoice* m_choiceHandleError;
- wxStaticBoxSizer* sbSizerLogfileDir;
- wxStaticText* m_staticText96;
- wxSpinCtrl* m_spinCtrlLogCountMax;
- wxPanel* m_panelLogfile;
- wxStaticText* m_staticText94;
- zen::DirPickerCtrl* m_dirPickerLogfileDir;
- wxButton* m_buttonSave;
- wxButton* m_buttonLoad;
- wxButton* m_button6;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnChangeMaxLogCountTxt( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLoadBatchJob( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- wxScrolledWindow* m_scrolledWindow6;
- wxBitmapButton* m_bpButtonAddPair;
- wxBitmapButton* m_bpButtonRemovePair;
- wxPanel* m_panelLeft;
- FolderHistoryBox* m_directoryLeft;
- zen::DirPickerCtrl* m_dirPickerLeft;
- wxPanel* m_panelRight;
- FolderHistoryBox* m_directoryRight;
- zen::DirPickerCtrl* m_dirPickerRight;
- wxBitmapButton* m_bpButtonAltCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonAltSyncCfg;
- FolderHistoryBox* m_comboBoxLogfileDir;
-
- BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create a batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~BatchDlgGenerated();
-
+private:
+
+protected:
+ wxStaticBitmap* m_bitmap27;
+ wxPanel* m_panel8;
+ wxStaticText* m_staticText56;
+ wxStaticText* m_staticText44;
+ wxBitmapButton* m_bpButtonHelp;
+ wxListbook* m_listbook1;
+ wxPanel* m_panelOverview;
+ wxBitmapButton* m_bpButtonCmpConfig;
+ wxStaticText* m_staticTextCmpVariant;
+ wxBitmapButton* m_bpButtonFilter;
+ wxStaticText* m_staticTextSyncVariant;
+ wxBitmapButton* m_bpButtonSyncConfig;
+ wxBoxSizer* sbSizerMainPair;
+ wxPanel* m_panelMainPair;
+ wxStaticText* m_staticText532;
+ wxStaticText* m_staticText5411;
+ wxBoxSizer* bSizerAddFolderPairs;
+ wxPanel* m_panelBatchSettings;
+ wxCheckBox* m_checkBoxShowProgress;
+ wxChoice* m_choiceHandleError;
+ wxStaticBoxSizer* sbSizerLogfileDir;
+ wxStaticText* m_staticText96;
+ wxSpinCtrl* m_spinCtrlLogCountMax;
+ wxPanel* m_panelLogfile;
+ wxStaticText* m_staticText94;
+ zen::DirPickerCtrl* m_dirPickerLogfileDir;
+ wxButton* m_buttonSave;
+ wxButton* m_buttonLoad;
+ wxButton* m_button6;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnChangeMaxLogCountTxt( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLoadBatchJob( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ wxScrolledWindow* m_scrolledWindow6;
+ wxBitmapButton* m_bpButtonAddPair;
+ wxBitmapButton* m_bpButtonRemovePair;
+ wxPanel* m_panelLeft;
+ FolderHistoryBox* m_directoryLeft;
+ zen::DirPickerCtrl* m_dirPickerLeft;
+ wxPanel* m_panelRight;
+ FolderHistoryBox* m_directoryRight;
+ zen::DirPickerCtrl* m_dirPickerRight;
+ wxBitmapButton* m_bpButtonAltCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonAltSyncCfg;
+ FolderHistoryBox* m_comboBoxLogfileDir;
+
+ BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create a batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~BatchDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class BatchFolderPairGenerated
///////////////////////////////////////////////////////////////////////////////
-class BatchFolderPairGenerated : public wxPanel
+class BatchFolderPairGenerated : public wxPanel
{
- private:
-
- protected:
- wxPanel* m_panel32;
- wxStaticText* m_staticText53;
- wxStaticText* m_staticText541;
- wxPanel* m_panelLeft;
- wxPanel* m_panelRight;
-
- public:
- wxBitmapButton* m_bpButtonRemovePair;
- FolderHistoryBox* m_directoryLeft;
- zen::DirPickerCtrl* m_dirPickerLeft;
- FolderHistoryBox* m_directoryRight;
- zen::DirPickerCtrl* m_dirPickerRight;
- wxBitmapButton* m_bpButtonAltCompCfg;
- wxBitmapButton* m_bpButtonLocalFilter;
- wxBitmapButton* m_bpButtonAltSyncCfg;
-
- BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
- ~BatchFolderPairGenerated();
-
+private:
+
+protected:
+ wxPanel* m_panel32;
+ wxStaticText* m_staticText53;
+ wxStaticText* m_staticText541;
+ wxPanel* m_panelLeft;
+ wxPanel* m_panelRight;
+
+public:
+ wxBitmapButton* m_bpButtonRemovePair;
+ FolderHistoryBox* m_directoryLeft;
+ zen::DirPickerCtrl* m_dirPickerLeft;
+ FolderHistoryBox* m_directoryRight;
+ zen::DirPickerCtrl* m_dirPickerRight;
+ wxBitmapButton* m_bpButtonAltCompCfg;
+ wxBitmapButton* m_bpButtonLocalFilter;
+ wxBitmapButton* m_bpButtonAltSyncCfg;
+
+ BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+ ~BatchFolderPairGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SyncCfgDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SyncCfgDlgGenerated : public wxDialog
+class SyncCfgDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxRadioButton* m_radioBtnAutomatic;
- wxButton* m_buttonAutomatic;
- wxStaticText* m_staticText81;
- wxRadioButton* m_radioBtnMirror;
- wxButton* m_buttonOneWay;
- wxStaticText* m_staticText8;
- wxRadioButton* m_radioBtnUpdate;
- wxButton* m_buttonUpdate;
- wxStaticText* m_staticText101;
- wxRadioButton* m_radioBtnCustom;
- wxButton* m_buttonUpdate1;
- wxStaticText* m_staticText9;
- wxStaticBoxSizer* sbSizerCustDelDir;
- wxChoice* m_choiceHandleDeletion;
- wxPanel* m_panelCustomDeletionDir;
- FolderHistoryBox* m_customDelFolder;
- zen::DirPickerCtrl* m_dirPickerCustomDelFolder;
- wxBoxSizer* bSizer201;
- wxStaticBoxSizer* sbSizerErrorHandling;
- wxChoice* m_choiceHandleError;
- wxStaticBoxSizer* sbSizerExecFinished;
- ExecFinishedBox* m_comboBoxExecFinished;
- wxStaticBitmap* m_bitmapDatabase;
- wxBoxSizer* sbSizerSyncDirections;
- wxStaticText* m_staticText21;
- wxStaticText* m_staticText31;
- wxBoxSizer* bSizerLeftOnly;
- wxStaticBitmap* m_bitmapLeftOnly;
- wxBitmapButton* m_bpButtonLeftOnly;
- wxBoxSizer* bSizerRightOnly;
- wxStaticBitmap* m_bitmapRightOnly;
- wxBitmapButton* m_bpButtonRightOnly;
- wxBoxSizer* bSizerLeftNewer;
- wxStaticBitmap* m_bitmapLeftNewer;
- wxBitmapButton* m_bpButtonLeftNewer;
- wxBoxSizer* bSizerRightNewer;
- wxStaticBitmap* m_bitmapRightNewer;
- wxBitmapButton* m_bpButtonRightNewer;
- wxBoxSizer* bSizerDifferent;
- wxStaticBitmap* m_bitmapDifferent;
- wxBitmapButton* m_bpButtonDifferent;
- wxBoxSizer* bSizerConflict;
- wxStaticBitmap* m_bitmapConflict;
- wxBitmapButton* m_bpButtonConflict;
- wxButton* m_buttonOK;
- wxButton* m_button16;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnSyncAutomatic( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncAutomaticDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncMirror( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnChangeDeletionHandling( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~SyncCfgDlgGenerated();
-
+private:
+
+protected:
+ wxRadioButton* m_radioBtnAutomatic;
+ wxButton* m_buttonAutomatic;
+ wxStaticText* m_staticText81;
+ wxRadioButton* m_radioBtnMirror;
+ wxButton* m_buttonOneWay;
+ wxStaticText* m_staticText8;
+ wxRadioButton* m_radioBtnUpdate;
+ wxButton* m_buttonUpdate;
+ wxStaticText* m_staticText101;
+ wxRadioButton* m_radioBtnCustom;
+ wxButton* m_buttonUpdate1;
+ wxStaticText* m_staticText9;
+ wxStaticBoxSizer* sbSizerCustDelDir;
+ wxChoice* m_choiceHandleDeletion;
+ wxPanel* m_panelCustomDeletionDir;
+ FolderHistoryBox* m_customDelFolder;
+ zen::DirPickerCtrl* m_dirPickerCustomDelFolder;
+ wxBoxSizer* bSizer201;
+ wxStaticBoxSizer* sbSizerErrorHandling;
+ wxChoice* m_choiceHandleError;
+ wxStaticBoxSizer* sbSizerExecFinished;
+ ExecFinishedBox* m_comboBoxExecFinished;
+ wxStaticBitmap* m_bitmapDatabase;
+ wxBoxSizer* sbSizerSyncDirections;
+ wxStaticText* m_staticText21;
+ wxStaticText* m_staticText31;
+ wxBoxSizer* bSizerLeftOnly;
+ wxStaticBitmap* m_bitmapLeftOnly;
+ wxBitmapButton* m_bpButtonLeftOnly;
+ wxBoxSizer* bSizerRightOnly;
+ wxStaticBitmap* m_bitmapRightOnly;
+ wxBitmapButton* m_bpButtonRightOnly;
+ wxBoxSizer* bSizerLeftNewer;
+ wxStaticBitmap* m_bitmapLeftNewer;
+ wxBitmapButton* m_bpButtonLeftNewer;
+ wxBoxSizer* bSizerRightNewer;
+ wxStaticBitmap* m_bitmapRightNewer;
+ wxBitmapButton* m_bpButtonRightNewer;
+ wxBoxSizer* bSizerDifferent;
+ wxStaticBitmap* m_bitmapDifferent;
+ wxBitmapButton* m_bpButtonDifferent;
+ wxBoxSizer* bSizerConflict;
+ wxStaticBitmap* m_bitmapConflict;
+ wxBitmapButton* m_bpButtonConflict;
+ wxButton* m_buttonOK;
+ wxButton* m_button16;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnSyncAutomatic( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncAutomaticDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncMirror( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnChangeDeletionHandling( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~SyncCfgDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class CmpCfgDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class CmpCfgDlgGenerated : public wxDialog
+class CmpCfgDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxRadioButton* m_radioBtnSizeDate;
- wxStaticBitmap* m_bitmapByTime;
- wxButton* m_buttonTimeSize;
- wxRadioButton* m_radioBtnContent;
- wxStaticBitmap* m_bitmapByContent;
- wxButton* m_buttonContent;
- wxChoice* m_choiceHandleSymlinks;
- wxBitmapButton* m_bpButtonHelp;
- wxButton* m_button10;
- wxButton* m_button6;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnTimeSize( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnContent( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnContentDouble( wxMouseEvent& event ) { event.Skip(); }
- virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~CmpCfgDlgGenerated();
-
+private:
+
+protected:
+ wxRadioButton* m_radioBtnSizeDate;
+ wxStaticBitmap* m_bitmapByTime;
+ wxButton* m_buttonTimeSize;
+ wxRadioButton* m_radioBtnContent;
+ wxStaticBitmap* m_bitmapByContent;
+ wxButton* m_buttonContent;
+ wxChoice* m_choiceHandleSymlinks;
+ wxBitmapButton* m_bpButtonHelp;
+ wxButton* m_button10;
+ wxButton* m_button6;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnTimeSize( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnContent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnContentDouble( wxMouseEvent& event ) { event.Skip(); }
+ virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~CmpCfgDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SyncStatusDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SyncStatusDlgGenerated : public wxFrame
+class SyncStatusDlgGenerated : public wxFrame
{
- private:
-
- protected:
- wxPanel* m_panelBackground;
- wxBoxSizer* bSizerTop;
- wxStaticBitmap* m_bitmapStatus;
- wxStaticText* m_staticTextStatus;
- wxAnimationCtrl* m_animationControl1;
- wxBoxSizer* bSizerCurrentOperation;
- wxStaticText* m_staticText2511;
- wxTextCtrl* m_textCtrlInfo;
- wxPanel* m_panelProgress;
- wxBoxSizer* bSizer171;
- wxStaticBoxSizer* bSizerProgressStat;
- wxStaticText* m_staticTextItemsRem;
- wxBoxSizer* bSizerItemsRem;
- wxStaticText* m_staticTextRemainingObj;
- wxStaticText* m_staticText96;
- wxStaticText* m_staticTextDataRemaining;
- wxStaticText* m_staticText97;
- wxStaticText* m_staticTextItemsProc;
- wxBoxSizer* bSizerItemsProc;
- wxStaticText* m_staticTextProcessedObj;
- wxStaticText* m_staticText98;
- wxStaticText* m_staticTextDataProcessed;
- wxStaticText* m_staticText99;
- wxStaticText* m_staticTextSpeedDescr;
- wxStaticText* m_staticTextSpeed;
- wxStaticText* m_staticText55;
- wxStaticText* m_staticTextTimeElapsed;
- wxStaticText* m_staticTextRemTimeDescr;
- wxStaticText* m_staticTextRemTime;
- zen::Graph2D* m_panelGraph;
- wxBoxSizer* bSizerFinalStat;
- wxListbook* m_listbookResult;
- wxBoxSizer* bSizerExecFinished;
- wxStaticText* m_staticText87;
- ExecFinishedBox* m_comboBoxExecFinished;
- wxBoxSizer* bSizer28;
- wxButton* m_buttonOK;
- wxButton* m_buttonPause;
- wxButton* m_buttonAbort;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnPause( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- wxGauge* m_gauge1;
-
- SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,350 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
-
- ~SyncStatusDlgGenerated();
-
+private:
+
+protected:
+ wxPanel* m_panelBackground;
+ wxBoxSizer* bSizerTop;
+ wxStaticBitmap* m_bitmapStatus;
+ wxStaticText* m_staticTextStatus;
+ wxAnimationCtrl* m_animationControl1;
+ wxBoxSizer* bSizerCurrentOperation;
+ wxStaticText* m_staticText2511;
+ wxTextCtrl* m_textCtrlInfo;
+ wxPanel* m_panelProgress;
+ wxBoxSizer* bSizer171;
+ wxStaticBoxSizer* bSizerProgressStat;
+ wxStaticText* m_staticTextItemsRem;
+ wxBoxSizer* bSizerItemsRem;
+ wxStaticText* m_staticTextRemainingObj;
+ wxStaticText* m_staticText96;
+ wxStaticText* m_staticTextDataRemaining;
+ wxStaticText* m_staticText97;
+ wxStaticText* m_staticTextItemsProc;
+ wxBoxSizer* bSizerItemsProc;
+ wxStaticText* m_staticTextProcessedObj;
+ wxStaticText* m_staticText98;
+ wxStaticText* m_staticTextDataProcessed;
+ wxStaticText* m_staticText99;
+ wxStaticText* m_staticTextSpeedDescr;
+ wxStaticText* m_staticTextSpeed;
+ wxStaticText* m_staticText55;
+ wxStaticText* m_staticTextTimeElapsed;
+ wxStaticText* m_staticTextRemTimeDescr;
+ wxStaticText* m_staticTextRemTime;
+ zen::Graph2D* m_panelGraph;
+ wxBoxSizer* bSizerFinalStat;
+ wxListbook* m_listbookResult;
+ wxBoxSizer* bSizerExecFinished;
+ wxStaticText* m_staticText87;
+ ExecFinishedBox* m_comboBoxExecFinished;
+ wxBoxSizer* bSizer28;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonPause;
+ wxButton* m_buttonAbort;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPause( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ wxGauge* m_gauge1;
+
+ SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,350 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
+
+ ~SyncStatusDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class LogControlGenerated
///////////////////////////////////////////////////////////////////////////////
-class LogControlGenerated : public wxPanel
+class LogControlGenerated : public wxPanel
{
- private:
-
- protected:
- ToggleButton* m_bpButtonErrors;
- ToggleButton* m_bpButtonWarnings;
- ToggleButton* m_bpButtonInfo;
- wxTextCtrl* m_textCtrlInfo;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnErrors( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnWarnings( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- LogControlGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
- ~LogControlGenerated();
-
+private:
+
+protected:
+ ToggleButton* m_bpButtonErrors;
+ ToggleButton* m_bpButtonWarnings;
+ ToggleButton* m_bpButtonInfo;
+ wxTextCtrl* m_textCtrlInfo;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnErrors( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnWarnings( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ LogControlGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+ ~LogControlGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class AboutDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class AboutDlgGenerated : public wxDialog
+class AboutDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxPanel* m_panel5;
- wxStaticBitmap* m_bitmap11;
- wxStaticText* m_build;
- wxPanel* m_panel33;
- wxBoxSizer* bSizerCodeInfo;
- wxStaticText* m_staticText72;
- wxHyperlinkCtrl* m_hyperlink9;
- wxHyperlinkCtrl* m_hyperlink11;
- wxHyperlinkCtrl* m_hyperlink10;
- wxHyperlinkCtrl* m_hyperlink13;
- wxHyperlinkCtrl* m_hyperlink7;
- wxHyperlinkCtrl* m_hyperlink16;
- wxHyperlinkCtrl* m_hyperlink8;
- wxHyperlinkCtrl* m_hyperlink15;
- wxHyperlinkCtrl* m_hyperlink12;
- wxHyperlinkCtrl* m_hyperlink18;
- wxHyperlinkCtrl* m_hyperlink14;
- wxHyperlinkCtrl* m_hyperlink21;
- wxScrolledWindow* m_scrolledWindowTranslators;
- wxBoxSizer* bSizerTranslators;
- wxStaticText* m_staticText54;
- wxFlexGridSizer* fgSizerTranslators;
- wxStaticLine* m_staticline3;
- wxStaticText* m_staticText131;
- wxStaticLine* m_staticline12;
- wxStaticBitmap* m_bitmap9;
- wxHyperlinkCtrl* m_hyperlink1;
- wxHyperlinkCtrl* m_hyperlink3;
- wxAnimationCtrl* m_animationControl1;
- wxStaticBitmap* m_bitmap10;
- wxHyperlinkCtrl* m_hyperlink2;
- wxHyperlinkCtrl* m_hyperlink6;
- wxStaticBitmap* m_bitmapTransl;
- wxStaticLine* m_staticline2;
- wxStaticBitmap* m_bitmap13;
- wxHyperlinkCtrl* m_hyperlink5;
- wxButton* m_buttonOkay;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~AboutDlgGenerated();
-
+private:
+
+protected:
+ wxPanel* m_panel5;
+ wxStaticBitmap* m_bitmap11;
+ wxStaticText* m_build;
+ wxPanel* m_panel33;
+ wxBoxSizer* bSizerCodeInfo;
+ wxStaticText* m_staticText72;
+ wxHyperlinkCtrl* m_hyperlink9;
+ wxHyperlinkCtrl* m_hyperlink11;
+ wxHyperlinkCtrl* m_hyperlink10;
+ wxHyperlinkCtrl* m_hyperlink13;
+ wxHyperlinkCtrl* m_hyperlink7;
+ wxHyperlinkCtrl* m_hyperlink16;
+ wxHyperlinkCtrl* m_hyperlink8;
+ wxHyperlinkCtrl* m_hyperlink15;
+ wxHyperlinkCtrl* m_hyperlink12;
+ wxHyperlinkCtrl* m_hyperlink18;
+ wxHyperlinkCtrl* m_hyperlink14;
+ wxHyperlinkCtrl* m_hyperlink21;
+ wxHyperlinkCtrl* m_hyperlink1;
+ wxStaticBitmap* m_bitmap9;
+ wxHyperlinkCtrl* m_hyperlink2;
+ wxStaticBitmap* m_bitmap10;
+ wxScrolledWindow* m_scrolledWindowTranslators;
+ wxBoxSizer* bSizerTranslators;
+ wxStaticText* m_staticText54;
+ wxFlexGridSizer* fgSizerTranslators;
+ wxHyperlinkCtrl* m_hyperlink3;
+ wxStaticBitmap* m_bitmapPaypal;
+ wxStaticBitmap* m_bitmap13;
+ wxHyperlinkCtrl* m_hyperlink5;
+ wxButton* m_buttonOkay;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~AboutDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class ErrorDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class ErrorDlgGenerated : public wxDialog
+class ErrorDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmap10;
- wxTextCtrl* m_textCtrl8;
- wxCheckBox* m_checkBoxIgnoreErrors;
- wxButton* m_buttonIgnore;
- wxButton* m_buttonRetry;
- wxButton* m_buttonAbort;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRetry( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
- ~ErrorDlgGenerated();
-
+private:
+
+protected:
+ wxStaticBitmap* m_bitmap10;
+ wxTextCtrl* m_textCtrl8;
+ wxCheckBox* m_checkBoxIgnoreErrors;
+ wxButton* m_buttonIgnore;
+ wxButton* m_buttonRetry;
+ wxButton* m_buttonAbort;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRetry( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ ~ErrorDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class WarningDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class WarningDlgGenerated : public wxDialog
+class WarningDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxTextCtrl* m_textCtrl8;
- wxCheckBox* m_checkBoxDontShowAgain;
- wxButton* m_buttonIgnore;
- wxButton* m_buttonSwitch;
- wxButton* m_buttonAbort;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSwitch( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
- wxStaticBitmap* m_bitmap10;
-
- WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
- ~WarningDlgGenerated();
-
+private:
+
+protected:
+ wxTextCtrl* m_textCtrl8;
+ wxCheckBox* m_checkBoxDontShowAgain;
+ wxButton* m_buttonIgnore;
+ wxButton* m_buttonSwitch;
+ wxButton* m_buttonAbort;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSwitch( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+ wxStaticBitmap* m_bitmap10;
+
+ WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ ~WarningDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class QuestionDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class QuestionDlgGenerated : public wxDialog
+class QuestionDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmap10;
- wxTextCtrl* m_textCtrl8;
- wxCheckBox* m_checkBoxDontAskAgain;
- wxButton* m_buttonYes;
- wxButton* m_buttonNo;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnCheckBoxDontShowAgain( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnYes( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnNo( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
- ~QuestionDlgGenerated();
-
+private:
+
+protected:
+ wxStaticBitmap* m_bitmap10;
+ wxTextCtrl* m_textCtrl8;
+ wxCheckBox* m_checkBoxDontAskAgain;
+ wxButton* m_buttonYes;
+ wxButton* m_buttonNo;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnCheckBoxDontShowAgain( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnYes( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnNo( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ ~QuestionDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class DeleteDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class DeleteDlgGenerated : public wxDialog
+class DeleteDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmap12;
- wxStaticText* m_staticTextHeader;
- wxTextCtrl* m_textCtrlMessage;
- wxCheckBox* m_checkBoxDeleteBothSides;
- wxCheckBox* m_checkBoxUseRecycler;
- wxButton* m_buttonOK;
- wxButton* m_buttonCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnDelOnBothSides( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
- ~DeleteDlgGenerated();
-
+private:
+
+protected:
+ wxStaticBitmap* m_bitmap12;
+ wxStaticText* m_staticTextHeader;
+ wxTextCtrl* m_textCtrlMessage;
+ wxCheckBox* m_checkBoxDeleteBothSides;
+ wxCheckBox* m_checkBoxUseRecycler;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnDelOnBothSides( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ ~DeleteDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class FilterDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class FilterDlgGenerated : public wxDialog
+class FilterDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmap26;
- wxPanel* m_panel8;
- wxStaticText* m_staticTexHeader;
- wxStaticText* m_staticText44;
- wxBitmapButton* m_bpButtonHelp;
- wxPanel* m_panel13;
- wxStaticLine* m_staticline10;
- wxStaticText* m_staticText45;
- wxStaticText* m_staticText83;
- wxStaticText* m_staticText84;
- wxStaticText* m_staticText85;
- wxStaticText* m_staticText181;
- wxStaticText* m_staticText1811;
- wxStaticBitmap* m_bitmapInclude;
- wxTextCtrl* m_textCtrlInclude;
- wxStaticBitmap* m_bitmapExclude;
- wxTextCtrl* m_textCtrlExclude;
- wxStaticBitmap* m_bitmapFilterDate;
- wxStaticText* m_staticText103;
- wxChoice* m_choiceUnitTimespan;
- wxSpinCtrl* m_spinCtrlTimespan;
- wxStaticBitmap* m_bitmapFilterSize;
- wxStaticText* m_staticText101;
- wxSpinCtrl* m_spinCtrlMinSize;
- wxChoice* m_choiceUnitMinSize;
- wxStaticText* m_staticText102;
- wxSpinCtrl* m_spinCtrlMaxSize;
- wxChoice* m_choiceUnitMaxSize;
- wxButton* m_button9;
- wxButton* m_button10;
- wxButton* m_button17;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnUpdateNameFilter( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnUpdateChoice( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~FilterDlgGenerated();
-
+private:
+
+protected:
+ wxStaticBitmap* m_bitmap26;
+ wxPanel* m_panel8;
+ wxStaticText* m_staticTexHeader;
+ wxStaticText* m_staticText44;
+ wxBitmapButton* m_bpButtonHelp;
+ wxPanel* m_panel13;
+ wxStaticLine* m_staticline10;
+ wxStaticText* m_staticText45;
+ wxStaticText* m_staticText83;
+ wxStaticText* m_staticText84;
+ wxStaticText* m_staticText85;
+ wxStaticText* m_staticText181;
+ wxStaticText* m_staticText1811;
+ wxStaticBitmap* m_bitmapInclude;
+ wxTextCtrl* m_textCtrlInclude;
+ wxStaticBitmap* m_bitmapExclude;
+ wxTextCtrl* m_textCtrlExclude;
+ wxStaticBitmap* m_bitmapFilterDate;
+ wxStaticText* m_staticText103;
+ wxChoice* m_choiceUnitTimespan;
+ wxSpinCtrl* m_spinCtrlTimespan;
+ wxStaticBitmap* m_bitmapFilterSize;
+ wxStaticText* m_staticText101;
+ wxSpinCtrl* m_spinCtrlMinSize;
+ wxChoice* m_choiceUnitMinSize;
+ wxStaticText* m_staticText102;
+ wxSpinCtrl* m_spinCtrlMaxSize;
+ wxChoice* m_choiceUnitMaxSize;
+ wxButton* m_button9;
+ wxButton* m_button10;
+ wxButton* m_button17;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnUpdateNameFilter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnUpdateChoice( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~FilterDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class CustomizeColsDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class CustomizeColsDlgGenerated : public wxDialog
+class CustomizeColsDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxCheckListBox* m_checkListColumns;
- wxBitmapButton* m_bpButton29;
- wxBitmapButton* m_bpButton30;
- wxButton* m_button9;
- wxButton* m_button28;
- wxButton* m_button29;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnMoveUp( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnMoveDown( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Customize columns"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~CustomizeColsDlgGenerated();
-
+private:
+
+protected:
+ wxCheckListBox* m_checkListColumns;
+ wxBitmapButton* m_bpButton29;
+ wxBitmapButton* m_bpButton30;
+ wxButton* m_button9;
+ wxButton* m_button28;
+ wxButton* m_button29;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnMoveUp( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMoveDown( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Customize columns"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~CustomizeColsDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class GlobalSettingsDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class GlobalSettingsDlgGenerated : public wxDialog
+class GlobalSettingsDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapSettings;
- wxPanel* m_panel8;
- wxStaticText* m_staticText56;
- wxCheckBox* m_checkBoxTransCopy;
- wxStaticText* m_staticText82;
- wxCheckBox* m_checkBoxCopyLocked;
- wxStaticText* m_staticTextCopyLocked;
- wxCheckBox* m_checkBoxCopyPermissions;
- wxStaticText* m_staticText8211;
- wxStaticText* m_staticText100;
- zen::BitmapButton* m_buttonResetDialogs;
- wxGrid* m_gridCustomCommand;
- wxBitmapButton* m_bpButtonAddRow;
- wxBitmapButton* m_bpButtonRemoveRow;
- wxButton* m_button9;
- wxButton* m_buttonOkay;
- wxButton* m_button29;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnResetDialogs( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~GlobalSettingsDlgGenerated();
-
+private:
+
+protected:
+ wxStaticBitmap* m_bitmapSettings;
+ wxPanel* m_panel8;
+ wxStaticText* m_staticText56;
+ wxCheckBox* m_checkBoxTransCopy;
+ wxStaticText* m_staticText82;
+ wxCheckBox* m_checkBoxCopyLocked;
+ wxStaticText* m_staticTextCopyLocked;
+ wxCheckBox* m_checkBoxCopyPermissions;
+ wxStaticText* m_staticText8211;
+ wxStaticText* m_staticText100;
+ zen::BitmapButton* m_buttonResetDialogs;
+ wxGrid* m_gridCustomCommand;
+ wxBitmapButton* m_bpButtonAddRow;
+ wxBitmapButton* m_bpButtonRemoveRow;
+ wxButton* m_button9;
+ wxButton* m_buttonOkay;
+ wxButton* m_button29;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnResetDialogs( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~GlobalSettingsDlgGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SyncPreviewDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SyncPreviewDlgGenerated : public wxDialog
+class SyncPreviewDlgGenerated : public wxDialog
{
- private:
-
- protected:
- zen::BitmapButton* m_buttonStartSync;
- wxStaticLine* m_staticline16;
- wxStaticText* m_staticTextVariant;
- wxStaticLine* m_staticline14;
- wxStaticText* m_staticText94;
- wxStaticBitmap* m_bitmapCreate;
- wxTextCtrl* m_textCtrlCreateL;
- wxStaticBitmap* m_bitmapUpdate;
- wxTextCtrl* m_textCtrlUpdateL;
- wxStaticBitmap* m_bitmapDelete;
- wxTextCtrl* m_textCtrlDeleteL;
- wxStaticText* m_staticText95;
- wxTextCtrl* m_textCtrlCreateR;
- wxTextCtrl* m_textCtrlUpdateR;
- wxTextCtrl* m_textCtrlDeleteR;
- 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();
-
+private:
+
+protected:
+ zen::BitmapButton* m_buttonStartSync;
+ wxStaticLine* m_staticline16;
+ wxStaticText* m_staticTextVariant;
+ wxStaticLine* m_staticline14;
+ wxStaticText* m_staticText94;
+ wxStaticBitmap* m_bitmapCreate;
+ wxTextCtrl* m_textCtrlCreateL;
+ wxStaticBitmap* m_bitmapUpdate;
+ wxTextCtrl* m_textCtrlUpdateL;
+ wxStaticBitmap* m_bitmapDelete;
+ wxTextCtrl* m_textCtrlDeleteL;
+ wxStaticText* m_staticText95;
+ wxTextCtrl* m_textCtrlCreateR;
+ wxTextCtrl* m_textCtrlUpdateR;
+ wxTextCtrl* m_textCtrlDeleteR;
+ 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();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class PopupFrameGenerated1
///////////////////////////////////////////////////////////////////////////////
-class PopupFrameGenerated1 : public wxFrame
+class PopupFrameGenerated1 : public wxFrame
{
- private:
-
- protected:
-
- public:
- wxStaticBitmap* m_bitmapLeft;
- wxStaticText* m_staticTextMain;
-
- PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER );
-
- ~PopupFrameGenerated1();
-
+private:
+
+protected:
+
+public:
+ wxStaticBitmap* m_bitmapLeft;
+ wxStaticText* m_staticTextMain;
+
+ PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER );
+
+ ~PopupFrameGenerated1();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SearchDialogGenerated
///////////////////////////////////////////////////////////////////////////////
-class SearchDialogGenerated : public wxDialog
+class SearchDialogGenerated : public wxDialog
{
- private:
-
- protected:
- wxStaticText* m_staticText101;
- wxTextCtrl* m_textCtrlSearchTxt;
- wxCheckBox* m_checkBoxMatchCase;
- wxButton* m_buttonFindNext;
- wxButton* m_button29;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnText( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnFindNext( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~SearchDialogGenerated();
-
+private:
+
+protected:
+ wxStaticText* m_staticText101;
+ wxTextCtrl* m_textCtrlSearchTxt;
+ wxCheckBox* m_checkBoxMatchCase;
+ wxButton* m_buttonFindNext;
+ wxButton* m_button29;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnText( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnFindNext( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~SearchDialogGenerated();
+
};
///////////////////////////////////////////////////////////////////////////////
/// Class SelectTimespanDlgGenerated
///////////////////////////////////////////////////////////////////////////////
-class SelectTimespanDlgGenerated : public wxDialog
+class SelectTimespanDlgGenerated : public wxDialog
{
- private:
-
- protected:
- wxCalendarCtrl* m_calendarFrom;
- wxCalendarCtrl* m_calendarTo;
- wxButton* m_buttonOkay;
- wxButton* m_button29;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); }
- virtual void OnChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); }
- virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select time span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
- ~SelectTimespanDlgGenerated();
-
+private:
+
+protected:
+ wxCalendarCtrl* m_calendarFrom;
+ wxCalendarCtrl* m_calendarTo;
+ wxButton* m_buttonOkay;
+ wxButton* m_button29;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); }
+ virtual void OnChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); }
+ virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+
+
+public:
+
+ SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select time span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+ ~SelectTimespanDlgGenerated();
+
};
#endif //__GUI_GENERATED_H__
diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp
index 3e2662e2..42c50671 100644
--- a/ui/gui_status_handler.cpp
+++ b/ui/gui_status_handler.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "gui_status_handler.h"
@@ -237,7 +237,7 @@ SyncStatusHandler::~SyncStatusHandler()
//finalize error log
if (abortIsRequested())
- errorLog.logMsg(_("Synchronization aborted!"), TYPE_ERROR);
+ errorLog.logMsg(_("Synchronization aborted!"), TYPE_FATAL_ERROR);
else if (totalErrors > 0)
errorLog.logMsg(_("Synchronization completed with errors!"), TYPE_WARNING);
else
diff --git a/ui/gui_status_handler.h b/ui/gui_status_handler.h
index 2e76d40b..1977e265 100644
--- a/ui/gui_status_handler.h
+++ b/ui/gui_status_handler.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef GUISTATUSHANDLER_H_INCLUDED
diff --git a/ui/main_dlg.cpp b/ui/main_dlg.cpp
index c7eabffc..24f1b06e 100644
--- a/ui/main_dlg.cpp
+++ b/ui/main_dlg.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "main_dlg.h"
@@ -17,8 +17,8 @@
#include <wx/display.h>
#include <wx/app.h>
#include <wx/dcmemory.h>
+#include <wx+/context_menu.h>
#include "folder_history_box.h"
-#include "../lib/custom_grid.h"
#include <wx+/button.h>
#include <wx+/dir_picker.h>
#include "../comparison.h"
@@ -44,6 +44,7 @@
#include "../lib/ffs_paths.h"
#include <wx+/toggle_button.h>
#include "folder_pair.h"
+#include <wx+/rtl.h>
#include "search.h"
#include "../lib/help_provider.h"
#include "batch_config.h"
@@ -70,23 +71,38 @@ struct wxClientDataString : public wxClientData //we need a wxClientData derived
};
}
-
class DirectoryNameMainImpl : public DirectoryName<FolderHistoryBox>
{
public:
DirectoryNameMainImpl(MainDialog& mainDlg,
wxWindow& dropWindow1,
- wxWindow& dropWindow2,
+ Grid& dropGrid,
+ size_t compPos, //accept left or right half only!
wxDirPickerCtrl& dirPicker,
FolderHistoryBox& dirName,
- wxStaticBoxSizer& staticBox) :
- DirectoryName(dropWindow1, dirPicker, dirName, &staticBox, &dropWindow2),
- mainDlg_(mainDlg) {}
+ wxStaticText& staticText) :
+ DirectoryName(dropWindow1, dirPicker, dirName, &staticText, &dropGrid.getMainWin()),
+ mainDlg_(mainDlg),
+ dropGrid_(dropGrid),
+ compPos_(compPos) {}
- virtual bool acceptDrop(const std::vector<wxString>& droppedFiles)
+ virtual bool acceptDrop(const std::vector<wxString>& droppedFiles, const wxPoint& clientPos, const wxWindow& wnd)
{
if (droppedFiles.empty())
- return true;
+ return false;
+
+ if (&wnd == &dropGrid_.getMainWin())
+ {
+ const wxPoint absPos = dropGrid_.CalcUnscrolledPosition(clientPos);
+
+
+ const Opt<std::pair<ColumnType, size_t>> colInfo = dropGrid_.Grid::getColumnAtPos(absPos.x);
+ const bool dropOnLeft = colInfo ? colInfo->second != gridview::COMP_RIGHT : true;
+
+ if ((compPos_ == gridview::COMP_LEFT && !dropOnLeft) || //accept left or right half of m_gridMain only!
+ (compPos_ == gridview::COMP_RIGHT && dropOnLeft)) //
+ return false;
+ }
switch (xmlAccess::getMergeType(droppedFiles)) //throw ()
{
@@ -101,12 +117,7 @@ public:
break;
}
- //disable the sync button
- mainDlg_.syncPreview->enableSynchronization(false);
-
- //clear grids
- mainDlg_.gridDataView->clearAllRows();
- mainDlg_.updateGuiGrid();
+ mainDlg_.clearGrid();
return true;
}
@@ -115,6 +126,8 @@ private:
DirectoryNameMainImpl& operator=(const DirectoryNameMainImpl&);
MainDialog& mainDlg_;
+ Grid& dropGrid_;
+ size_t compPos_;
};
//------------------------------------------------------------------
@@ -153,7 +166,7 @@ private:
virtual void OnAltCompCfgChange()
{
- mainDlg.applyCompareConfig(false); //false: not global level
+ mainDlg.applyCompareConfig(false); //false: do not change preview status
}
virtual void OnAltSyncCfgChange()
@@ -161,28 +174,28 @@ private:
mainDlg.applySyncConfig();
}
- virtual void OnAltCompCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeAltCompCfg()
{
- FolderPairPanelBasic<GuiPanel>::OnAltCompCfgRemoveConfirm(event);
- mainDlg.applyCompareConfig(false); //false: not global level
+ FolderPairPanelBasic<GuiPanel>::removeAltCompCfg();
+ mainDlg.applyCompareConfig(false); //false: do not change preview status
}
- virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeAltSyncCfg()
{
- FolderPairPanelBasic<GuiPanel>::OnAltSyncCfgRemoveConfirm(event);
+ FolderPairPanelBasic<GuiPanel>::removeAltSyncCfg();
mainDlg.applySyncConfig();
}
virtual void OnLocalFilterCfgChange()
{
- mainDlg.updateFilterConfig(); //re-apply filter
+ mainDlg.applyFilterConfig(); //re-apply filter
}
- virtual void OnLocalFilterCfgRemoveConfirm(wxCommandEvent& event)
+ virtual void removeLocalFilterCfg()
{
- FolderPairPanelBasic<GuiPanel>::OnLocalFilterCfgRemoveConfirm(event);
- mainDlg.updateFilterConfig(); //update filter
+ FolderPairPanelBasic<GuiPanel>::removeLocalFilterCfg();
+ mainDlg.applyFilterConfig(); //update filter
}
MainDialog& mainDlg;
@@ -228,17 +241,19 @@ public:
//prepare drag & drop
dirNameLeft(mainDialog,
- *mainDialog.m_panelLeft,
*mainDialog.m_panelTopLeft,
+ *mainDialog.m_gridMain,
+ gridview::COMP_LEFT,
*mainDialog.m_dirPickerLeft,
*mainDialog.m_directoryLeft,
- *mainDialog.sbSizerDirLeft),
+ *mainDialog.m_staticTextFinalPathLeft),
dirNameRight(mainDialog,
- *mainDialog.m_panelRight,
*mainDialog.m_panelTopRight,
+ *mainDialog.m_gridMain,
+ gridview::COMP_RIGHT,
*mainDialog.m_dirPickerRight,
*mainDialog.m_directoryRight,
- *mainDialog.sbSizerDirRight) {}
+ *mainDialog.m_staticTextFinalPathRight) {}
void setValues(const wxString& leftDir,
const wxString& rightDir,
@@ -432,10 +447,6 @@ MainDialog::~MainDialog()
//no need for wxEventHandler::Disconnect() here; event sources are components of this window and are destroyed, too
- m_gridLeft ->release(); //handle wxGrid-related callback on grid data after MainDialog has died... (Linux only)
- m_gridMiddle->release();
- m_gridRight ->release();
-
auiMgr.UnInit();
}
@@ -452,6 +463,8 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
xmlAccess::XmlGlobalSettings& settings,
bool startComparison)
{
+ syncPreviewEnabled = false;
+
folderHistoryLeft = std::make_shared<FolderHistory>(); //make sure it is always bound
folderHistoryRight = std::make_shared<FolderHistory>(); //
@@ -461,16 +474,16 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
wxWindowUpdateLocker dummy(this); //avoid display distortion
//--------- avoid mirroring this dialog in RTL languages like Hebrew or Arabic --------------------
- m_panelViewFilter ->SetLayoutDirection(wxLayout_LeftToRight);
- m_panelStatusBar ->SetLayoutDirection(wxLayout_LeftToRight);
- m_panelGrids ->SetLayoutDirection(wxLayout_LeftToRight);
- m_panelDirectoryPairs->SetLayoutDirection(wxLayout_LeftToRight);
+ //m_panelViewFilter ->SetLayoutDirection(wxLayout_LeftToRight);
+ //m_panelStatusBar ->SetLayoutDirection(wxLayout_LeftToRight);
+ //m_panelDirectoryPairs->SetLayoutDirection(wxLayout_LeftToRight);
//------------------------------------------------------------------------------------------------------
//---------------- support for dockable gui style --------------------------------
bSizerPanelHolder->Detach(m_panelTopButtons);
bSizerPanelHolder->Detach(m_panelDirectoryPairs);
- bSizerPanelHolder->Detach(m_panelGrids);
+ bSizerPanelHolder->Detach(m_gridNavi);
+ bSizerPanelHolder->Detach(m_gridMain);
bSizerPanelHolder->Detach(m_panelConfig);
bSizerPanelHolder->Detach(m_panelFilter);
bSizerPanelHolder->Detach(m_panelViewFilter);
@@ -482,36 +495,42 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
//caption required for all panes that can be manipulated by the users => used by context menu
auiMgr.AddPane(m_panelTopButtons,
- wxAuiPaneInfo().Name(wxT("Panel1")).Top().Caption(_("Main bar")).CaptionVisible(false).PaneBorder(false).Gripper().MinSize(-1, m_panelTopButtons->GetSize().GetHeight() - 5));
+ wxAuiPaneInfo().Name(wxT("Panel1")).Layer(4).Top().Caption(_("Main bar")).CaptionVisible(false).PaneBorder(false).Gripper().MinSize(-1, m_panelTopButtons->GetSize().GetHeight() - 5));
//note: min height is calculated incorrectly by wxAuiManager if panes with and without caption are in the same row => use smaller min-size
compareStatus.reset(new CompareStatus(*this)); //integrate the compare status panel (in hidden state)
auiMgr.AddPane(compareStatus->getAsWindow(),
- wxAuiPaneInfo().Name(wxT("Panel9")).Top().Row(1).CaptionVisible(false).PaneBorder(false).Hide()); //name "CmpStatus" used by context menu
+ wxAuiPaneInfo().Name(wxT("Panel9")).Layer(4).Top().Row(1).CaptionVisible(false).PaneBorder(false).Hide()); //name "CmpStatus" used by context menu
auiMgr.AddPane(m_panelDirectoryPairs,
- wxAuiPaneInfo().Name(wxT("Panel2")).Top().Row(2).Caption(_("Folder pairs")).CaptionVisible(false).PaneBorder(false).Gripper());
+ wxAuiPaneInfo().Name(wxT("Panel2")).Layer(2).Top().Row(2).Caption(_("Folder pairs")).CaptionVisible(false).PaneBorder(false).Gripper());
- auiMgr.AddPane(m_panelGrids,
+ auiMgr.AddPane(m_gridMain,
wxAuiPaneInfo().Name(wxT("Panel3")).CenterPane().PaneBorder(false));
+ auiMgr.AddPane(m_gridNavi,
+ wxAuiPaneInfo().Name(L"Panel10").Left().Layer(3).Caption(_("Compressed view")).MinSize(350, m_gridNavi->GetSize().GetHeight())); //MinSize(): just default size, see comment below
+
auiMgr.AddPane(m_panelConfig,
- wxAuiPaneInfo().Name(wxT("Panel4")).Bottom().Row(1).Position(0).Caption(_("Configuration")).MinSize(m_listBoxHistory->GetSize().GetWidth(), m_panelConfig->GetSize().GetHeight()));
+ wxAuiPaneInfo().Name(wxT("Panel4")).Layer(4).Bottom().Row(1).Position(0).Caption(_("Configuration")).MinSize(m_listBoxHistory->GetSize().GetWidth(), m_panelConfig->GetSize().GetHeight()));
auiMgr.AddPane(m_panelFilter,
- wxAuiPaneInfo().Name(wxT("Panel5")).Bottom().Row(1).Position(1).Caption(_("Filter files")).MinSize(m_bpButtonFilter->GetSize().GetWidth(), m_panelFilter->GetSize().GetHeight()));
+ wxAuiPaneInfo().Name(wxT("Panel5")).Layer(4).Bottom().Row(1).Position(1).Caption(_("Filter files")).MinSize(m_bpButtonFilter->GetSize().GetWidth(), m_panelFilter->GetSize().GetHeight()));
auiMgr.AddPane(m_panelViewFilter,
- wxAuiPaneInfo().Name(wxT("Panel6")).Bottom().Row(1).Position(2).Caption(_("Select view")).MinSize(m_bpButtonSyncDirNone->GetSize().GetWidth(), m_panelViewFilter->GetSize().GetHeight()));
+ wxAuiPaneInfo().Name(wxT("Panel6")).Layer(4).Bottom().Row(1).Position(2).Caption(_("Select view")).MinSize(m_bpButtonSyncDirNone->GetSize().GetWidth(), m_panelViewFilter->GetSize().GetHeight()));
auiMgr.AddPane(m_panelStatistics,
- wxAuiPaneInfo().Name(wxT("Panel7")).Bottom().Row(1).Position(3).Caption(_("Statistics")).MinSize(m_panelStatistics->GetSize().GetWidth() / 2, m_panelStatistics->GetSize().GetHeight()));
+ wxAuiPaneInfo().Name(wxT("Panel7")).Layer(4).Bottom().Row(1).Position(3).Caption(_("Statistics")).MinSize(m_panelStatistics->GetSize().GetWidth() / 2, m_panelStatistics->GetSize().GetHeight()));
auiMgr.AddPane(m_panelStatusBar,
- wxAuiPaneInfo().Name(wxT("Panel8")).Bottom().Row(0).Layer(4).CaptionVisible(false).PaneBorder(false).DockFixed());
+ wxAuiPaneInfo().Name(wxT("Panel8")).Layer(4).Bottom().Row(0).CaptionVisible(false).PaneBorder(false).DockFixed());
auiMgr.Update();
+ auiMgr.GetPane(m_gridNavi).MinSize(-1, -1); //we successfully tricked wxAuiManager into setting an initial Window size :> incomplete API anyone??
+ auiMgr.Update(); //
+
defaultPerspective = auiMgr.SavePerspective();
//----------------------------------------------------------------------------------
//register view layout context menu
@@ -524,27 +543,34 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
//----------------------------------------------------------------------------------
//register context: quick variant selection
- m_bpButtonCmpConfig ->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSelectCompVariant), NULL, this);
- m_bpButtonSyncConfig->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSelectSyncVariant), NULL, this);
+ m_bpButtonCmpConfig ->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnCompSettingsContext), NULL, this);
+ m_bpButtonSyncConfig->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnSyncSettingsContext), NULL, this);
+ m_bpButtonFilter ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(MainDialog::OnGlobalFilterContext), NULL, this);
+
+ //sort grids
+ m_gridMain->Connect(EVENT_GRID_COL_LABEL_MOUSE_LEFT, GridClickEventHandler(MainDialog::onGridLabelLeftClick ), NULL, this );
+ m_gridMain->Connect(EVENT_GRID_COL_LABEL_MOUSE_RIGHT, GridClickEventHandler(MainDialog::onGridLabelContext), NULL, this );
+
+ //grid context menu
+ m_gridMain->Connect(EVENT_GRID_MOUSE_RIGHT_UP, GridClickEventHandler(MainDialog::onMainGridContext), NULL, this);
+ m_gridNavi->Connect(EVENT_GRID_MOUSE_RIGHT_UP, GridClickEventHandler(MainDialog::onNaviGridContext), NULL, this);
+
+ m_gridMain->Connect(EVENT_GRID_MOUSE_LEFT_DOUBLE, GridClickEventHandler(MainDialog::onGridDoubleClick), NULL, this );
+
+ m_gridNavi->Connect(EVENT_GRID_SELECT_RANGE, GridRangeSelectEventHandler(MainDialog::onNaviSelection), NULL, this);
globalSettings = &settings;
gridDataView.reset(new zen::GridView);
- contextMenu.reset(new wxMenu); //initialize right-click context menu; will be dynamically re-created on each R-mouse-click
+ treeDataView.reset(new zen::TreeView);
cleanedUp = false;
processingGlobalKeyEvent = false;
- lastSortColumn = -1;
- lastSortGrid = NULL;
-
- updateFileIcons.reset(new IconUpdater(m_gridLeft, m_gridRight));
#ifdef FFS_WIN
new PanelMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere... //ownership passed to "this"
#endif
- syncPreview.reset(new SyncPreview(this));
-
SetIcon(GlobalResources::instance().programIcon); //set application icon
//notify about (logical) application main window => program won't quit, but stay on this dialog
@@ -555,18 +581,22 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
initViewFilterButtons();
+ //init grid settings
+ gridview::init(*m_gridMain, gridDataView);
+ treeview::init(*m_gridNavi, treeDataView);
+
//initialize and load configuration
readGlobalSettings();
setConfig(guiCfg);
//set icons for this dialog
- m_buttonCompare ->setBitmapFront(GlobalResources::getImage(wxT("compare")));
- m_bpButtonSyncConfig->SetBitmapLabel(GlobalResources::getImage(wxT("syncConfig")));
- m_bpButtonCmpConfig ->SetBitmapLabel(GlobalResources::getImage(wxT("cmpConfig")));
- m_bpButtonSave ->SetBitmapLabel(GlobalResources::getImage(wxT("save")));
- m_bpButtonLoad ->SetBitmapLabel(GlobalResources::getImage(wxT("load")));
- m_bpButtonAddPair ->SetBitmapLabel(GlobalResources::getImage(wxT("addFolderPair")));
- m_bitmap15 ->SetBitmap(GlobalResources::getImage(wxT("statusEdge")));
+ m_buttonCompare ->setBitmapFront(GlobalResources::getImage(L"compare"));
+ m_bpButtonSyncConfig->SetBitmapLabel(GlobalResources::getImage(L"syncConfig"));
+ m_bpButtonCmpConfig ->SetBitmapLabel(GlobalResources::getImage(L"cmpConfig"));
+ m_bpButtonSave ->SetBitmapLabel(GlobalResources::getImage(L"save"));
+ m_bpButtonLoad ->SetBitmapLabel(GlobalResources::getImage(L"load"));
+ m_bpButtonAddPair ->SetBitmapLabel(GlobalResources::getImage(L"addFolderPair"));
+ m_bitmapResizeCorner->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"statusEdge")));
{
IconBuffer tmp(IconBuffer::SIZE_SMALL);
const wxBitmap bmpFile = tmp.genericFileIcon();
@@ -578,10 +608,10 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
m_bitmapSmallFileRight ->SetBitmap(bmpFile);
}
- m_bitmapCreate->SetBitmap(GlobalResources::getImage(wxT("create")));
- m_bitmapUpdate->SetBitmap(GlobalResources::getImage(wxT("update")));
- m_bitmapDelete->SetBitmap(GlobalResources::getImage(wxT("delete")));
- m_bitmapData ->SetBitmap(GlobalResources::getImage(wxT("data")));
+ m_bitmapCreate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"create")));
+ m_bitmapUpdate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"update")));
+ m_bitmapDelete->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"delete")));
+ m_bitmapData ->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"data")));
m_panelTopButtons->Layout(); //wxButtonWithImage size might have changed
@@ -606,14 +636,14 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
#endif
//create language selection menu
- std::for_each(zen::ExistingTranslations::get().begin(), zen::ExistingTranslations::get().end(),
- [&](const zen::ExistingTranslations::Entry& entry)
+ std::for_each(zen::ExistingTranslations::get().begin(), ExistingTranslations::get().end(),
+ [&](const ExistingTranslations::Entry& entry)
{
wxMenuItem* newItem = new wxMenuItem(m_menuLanguages, wxID_ANY, entry.languageName, wxEmptyString, wxITEM_NORMAL );
newItem->SetBitmap(GlobalResources::getImage(entry.languageFlag));
//map menu item IDs with language IDs: evaluated when processing event handler
- languageMenuItemMap.insert(std::map<MenuItemID, LanguageID>::value_type(newItem->GetId(), entry.languageID));
+ languageMenuItemMap.insert(std::make_pair(newItem->GetId(), entry.languageID));
//connect event
this->Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnMenuLanguageSwitch));
@@ -621,22 +651,22 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
});
//support for CTRL + C and DEL on grids
- m_gridLeft ->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridLeftButtonEvent), NULL, this);
- m_gridRight ->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridRightButtonEvent), NULL, this);
- m_gridMiddle->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridMiddleButtonEvent), NULL, this);
+ m_gridMain->getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridButtonEvent), NULL, this);
+ m_gridNavi->getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onTreeButtonEvent), NULL, this);
//register global hotkeys (without explicit menu entry)
wxTheApp->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this);
wxTheApp->Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this); //capture direction keys
+ //drag & drop on navi panel
+ setupFileDrop(*m_gridNavi);
+ m_gridNavi->Connect(EVENT_DROP_FILE, FileDropEventHandler(MainDialog::onNaviPanelFilesDropped), NULL, this);
Connect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleEvent), NULL, this);
Connect(wxEVT_SIZE, wxSizeEventHandler(MainDialog::OnResize), NULL, this);
Connect(wxEVT_MOVE, wxSizeEventHandler(MainDialog::OnResize), NULL, this);
- m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(MainDialog::OnGlobalFilterOpenContext), NULL, this);
-
//calculate witdh of folder pair manually (if scrollbars are visible)
m_panelTopLeft->Connect(wxEVT_SIZE, wxEventHandler(MainDialog::OnResizeFolderPairs), NULL, this);
@@ -650,19 +680,11 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg,
OnResizeStatisticsPanel(dummy3); //
//event handler for manual (un-)checking of rows and setting of sync direction
- m_gridMiddle->Connect(FFS_CHECK_ROWS_EVENT, FFSCheckRowsEventHandler(MainDialog::OnCheckRows), NULL, this);
- m_gridMiddle->Connect(FFS_SYNC_DIRECTION_EVENT, FFSSyncDirectionEventHandler(MainDialog::OnSetSyncDirection), NULL, this);
-
- //init grid settings
- m_gridLeft ->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, gridDataView.get());
- m_gridMiddle->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, gridDataView.get());
- m_gridRight ->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, gridDataView.get());
-
- //disable sync button as long as "compare" hasn't been triggered.
- syncPreview->enableSynchronization(false);
+ m_gridMain->Connect(EVENT_GRID_CHECK_ROWS, CheckRowsEventHandler (MainDialog::onCheckRows), NULL, this);
+ m_gridMain->Connect(EVENT_GRID_SYNC_DIRECTION, SyncDirectionEventHandler(MainDialog::onSetSyncDirection), NULL, this);
//mainly to update row label sizes...
- updateGuiGrid();
+ updateGui();
//register regular check for update on next idle event
Connect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), NULL, this);
@@ -729,10 +751,14 @@ void MainDialog::readGlobalSettings()
Maximize(globalSettings->gui.isMaximized);
-
//set column attributes
- m_gridLeft ->setColumnAttributes(globalSettings->gui.columnAttribLeft);
- m_gridRight->setColumnAttributes(globalSettings->gui.columnAttribRight);
+ m_gridMain->setColumnConfig(gridview::convertConfig(globalSettings->gui.columnAttribLeft), gridview::COMP_LEFT);
+ m_gridMain->setColumnConfig(gridview::convertConfig(globalSettings->gui.columnAttribRight), gridview::COMP_RIGHT);
+
+ m_gridNavi->setColumnConfig(treeview::convertConfig(globalSettings->gui.columnAttribNavi));
+ treeview::setShowPercentage(*m_gridNavi, globalSettings->gui.showPercentBar);
+
+ treeDataView->setSortDirection(globalSettings->gui.naviLastSortColumn, globalSettings->gui.naviLastSortAscending);
//load list of last used configuration files
std::vector<wxString> cfgFileNames = globalSettings->gui.cfgFileHistory;
@@ -757,11 +783,7 @@ void MainDialog::readGlobalSettings()
}
return IconBuffer::SIZE_SMALL;
}();
-
- std::shared_ptr<IconBuffer> iconBuffer = std::make_shared<IconBuffer>(sz);
- m_gridLeft ->setIconManager(iconBuffer);
- m_gridMiddle->setIconManager(iconBuffer);
- m_gridRight ->setIconManager(iconBuffer);
+ gridview::setIconSize(*m_gridMain, sz);
//------------------------------------------------------------------------------------------------
//wxAuiManager erroneously loads panel captions, we don't want that
@@ -786,8 +808,15 @@ void MainDialog::writeGlobalSettings()
globalSettings->gui.isMaximized = IsMaximized();
//retrieve column attributes
- globalSettings->gui.columnAttribLeft = m_gridLeft->getColumnAttributes();
- globalSettings->gui.columnAttribRight = m_gridRight->getColumnAttributes();
+ globalSettings->gui.columnAttribLeft = gridview::convertConfig(m_gridMain->getColumnConfig(gridview::COMP_LEFT));
+ globalSettings->gui.columnAttribRight = gridview::convertConfig(m_gridMain->getColumnConfig(gridview::COMP_RIGHT));
+
+ globalSettings->gui.columnAttribNavi = treeview::convertConfig(m_gridNavi->getColumnConfig());
+ globalSettings->gui.showPercentBar = treeview::getShowPercentage(*m_gridNavi);
+
+ const auto sortInfo = treeDataView->getSortDirection();
+ globalSettings->gui.naviLastSortColumn = sortInfo.first;
+ globalSettings->gui.naviLastSortAscending = sortInfo.second;
//write list of last used configuration files
std::vector<wxString> cfgFileHistory;
@@ -806,48 +835,33 @@ void MainDialog::writeGlobalSettings()
}
-void MainDialog::setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const zen::SyncDirection dir)
+void MainDialog::setSyncDirManually(const std::vector<FileSystemObject*>& selection, SyncDirection direction)
{
- if (rowsToSetOnUiTable.size() > 0)
+ if (!selection.empty())
{
- for (std::set<size_t>::const_iterator i = rowsToSetOnUiTable.begin(); i != rowsToSetOnUiTable.end(); ++i)
+ std::for_each(selection.begin(), selection.end(),
+ [&](FileSystemObject* fsObj)
{
- FileSystemObject* fsObj = gridDataView->getObject(*i);
- if (fsObj)
- {
- setSyncDirectionRec(dir, *fsObj); //set new direction (recursively)
- zen::setActiveStatus(true, *fsObj); //works recursively for directories
- }
- }
+ setSyncDirectionRec(direction, *fsObj); //set new direction (recursively)
+ zen::setActiveStatus(true, *fsObj); //works recursively for directories
+ });
- updateGuiGrid();
+ updateGui();
}
}
-void MainDialog::filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTable, int leadingRow)
+void MainDialog::setManualFilter(const std::vector<FileSystemObject*>& selection, bool setIncluded)
{
- if (!rowsToFilterOnUiTable.empty())
- {
- bool newSelection = false; //default: deselect range
-
- //leadingRow determines de-/selection of all other rows
- const FileSystemObject* fsObj = gridDataView->getObject(leadingRow);
- if (!fsObj) fsObj = gridDataView->getObject(*rowsToFilterOnUiTable.begin()); //some fallback (usecase: reverse selection, starting with empty rows)
- if (fsObj)
- newSelection = !fsObj->isActive();
-
- //if hidefiltered is active, there should be no filtered elements on screen => current element was filtered out
- assert(!currentCfg.hideFilteredElements || !newSelection);
+ //if hidefiltered is active, there should be no filtered elements on screen => current element was filtered out
+ assert(!currentCfg.hideFilteredElements || !setIncluded);
- //get all lines that need to be filtered
- std::vector<FileSystemObject*> compRef;
- gridDataView->getAllFileRef(rowsToFilterOnUiTable, compRef); //everything in compRef is bound
-
- for (std::vector<FileSystemObject*>::iterator i = compRef.begin(); i != compRef.end(); ++i)
- zen::setActiveStatus(newSelection, **i); //works recursively for directories
+ if (!selection.empty())
+ {
+ std::for_each(selection.begin(), selection.end(),
+ [&](FileSystemObject* fsObj) { zen::setActiveStatus(setIncluded, *fsObj); }); //works recursively for directories
- refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts
+ updateGuiAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts
}
}
@@ -855,7 +869,7 @@ void MainDialog::filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTab
void MainDialog::OnIdleEvent(wxEvent& event)
{
//small routine to restore status information after some time
- if (stackObjects.size() > 0 ) //check if there is some work to do
+ if (!stackObjects.empty()) //check if there is some work to do
{
wxMilliClock_t currentTime = wxGetLocalTimeMillis();
if (currentTime - lastStatusChange > 2500) //restore stackObject after two seconds
@@ -882,57 +896,95 @@ typedef Zbase<wchar_t> zxString; //for use with UI texts
}
-void MainDialog::copySelectionToClipboard(CustomGrid& selectedGrid)
+void MainDialog::copySelectionToClipboard()
{
- const std::set<size_t> selectedRows = getSelectedRows(&selectedGrid);
- if (selectedRows.size() > 0)
- {
- zxString clipboardString; //perf: wxString doesn't model exponential growth and so is out
-
- const int colCount = selectedGrid.GetNumberCols();
+ zxString clipboardString; //perf: wxString doesn't model exponential growth and so is out
- for (std::set<size_t>::const_iterator i = selectedRows.begin(); i != selectedRows.end(); ++i)
+ auto addSelection = [&](size_t compPos)
+ {
+ auto prov = m_gridMain->getDataProvider(compPos);
+ if (prov)
{
- for (int k = 0; k < colCount; ++k)
+ std::vector<Grid::ColumnAttribute> colAttr = m_gridMain->getColumnConfig(compPos);
+ vector_remove_if(colAttr, [](const Grid::ColumnAttribute& ca) { return !ca.visible_; });
+ if (!colAttr.empty())
{
- clipboardString += copyStringTo<zxString>(selectedGrid.GetCellValue(static_cast<int>(*i), k));
- if (k != colCount - 1)
- clipboardString += wxT('\t');
+ const std::vector<int> selection = m_gridMain->getSelectedRows(compPos);
+ std::for_each(selection.begin(), selection.end(),
+ [&](int row)
+ {
+ std::for_each(colAttr.begin(), colAttr.end() - 1,
+ [&](const Grid::ColumnAttribute& ca)
+ {
+ clipboardString += copyStringTo<zxString>(prov->getValue(row, ca.type_));
+ clipboardString += L'\t';
+ });
+ clipboardString += copyStringTo<zxString>(prov->getValue(row, colAttr.back().type_));
+ clipboardString += L'\n';
+ });
}
- clipboardString += wxT('\n');
}
+ };
- if (!clipboardString.empty())
- // Write text to the clipboard
- if (wxTheClipboard->Open())
- {
- // these data objects are held by the clipboard,
- // so do not delete them in the app.
- wxTheClipboard->SetData(new wxTextDataObject(copyStringTo<wxString>(clipboardString)));
- wxTheClipboard->Close();
- }
- }
+ addSelection(gridview::COMP_LEFT);
+ addSelection(gridview::COMP_RIGHT);
+
+ //finally write to clipboard
+ if (!clipboardString.empty())
+ if (wxTheClipboard->Open())
+ {
+ wxTheClipboard->SetData(new wxTextDataObject(copyStringTo<wxString>(clipboardString))); //ownership passed
+ wxTheClipboard->Close();
+ }
}
-std::set<size_t> MainDialog::getSelectedRows(const CustomGrid* grid) const
+std::vector<FileSystemObject*> MainDialog::getGridSelection(bool fromLeft, bool fromRight) const
{
- std::set<size_t> output = grid->getAllSelectedRows();
+ std::set<size_t> selectedRows;
+
+ auto addSelection = [&](size_t compPos)
+ {
+ const std::vector<int>& sel = m_gridMain->getSelectedRows(compPos);
+ selectedRows.insert(sel.begin(), sel.end());
+ };
- //remove invalid rows
- output.erase(output.lower_bound(gridDataView->rowsOnView()), output.end());
+ if (fromLeft)
+ addSelection(gridview::COMP_LEFT);
- return output;
+ if (fromRight)
+ addSelection(gridview::COMP_RIGHT);
+
+ std::vector<FileSystemObject*> selection;
+ gridDataView->getAllFileRef(selectedRows, selection);
+ return selection;
}
-std::set<size_t> MainDialog::getSelectedRows() const
+std::vector<FileSystemObject*> MainDialog::getTreeSelection() const
{
- //merge selections from left and right grid
- std::set<size_t> selection = getSelectedRows(m_gridLeft);
- std::set<size_t> additional = getSelectedRows(m_gridRight);
- selection.insert(additional.begin(), additional.end());
- return selection;
+ const std::vector<int>& sel = m_gridNavi->getSelectedRows();
+
+ std::vector<FileSystemObject*> output;
+ std::for_each(sel.begin(), sel.end(),
+ [&](int row)
+ {
+ if (std::unique_ptr<TreeView::Node> node = treeDataView->getLine(row))
+ {
+ if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get()))
+ {
+ //select first level of child elements
+ std::transform(root->baseMap_.refSubDirs ().begin(), root->baseMap_.refSubDirs ().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; });
+ std::transform(root->baseMap_.refSubFiles().begin(), root->baseMap_.refSubFiles().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; });
+ std::transform(root->baseMap_.refSubLinks().begin(), root->baseMap_.refSubLinks().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; });
+ //for (auto& fsObj : root->baseMap_.refSubLinks()) output.push_back(&fsObj); -> seriously MSVC, stop this disgrace and implement "range for"!
+ }
+ else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
+ output.push_back(&(dir->dirObj_));
+ //else if (dynamic_cast<const TreeView::FilesNode*>(node.get())) -> ignore files/symlinks
+ }
+ });
+ return output;
}
@@ -1038,68 +1090,42 @@ private:
};
-void MainDialog::deleteSelectedFiles(const std::set<size_t>& viewSelectionLeft, const std::set<size_t>& viewSelectionRight)
+void MainDialog::deleteSelectedFiles(const std::vector<FileSystemObject*>& selectionLeft,
+ const std::vector<FileSystemObject*>& selectionRight)
{
- if (viewSelectionLeft.size() + viewSelectionRight.size())
+ if (!selectionLeft.empty() || !selectionRight.empty())
{
- //map lines from GUI view to grid line references
- std::vector<FileSystemObject*> compRefLeft;
- gridDataView->getAllFileRef(viewSelectionLeft, compRefLeft);
-
- std::vector<FileSystemObject*> compRefRight;
- gridDataView->getAllFileRef(viewSelectionRight, compRefRight);
-
-
wxWindow* oldFocus = wxWindow::FindFocus();
+ ZEN_ON_BLOCK_EXIT( if (oldFocus) oldFocus->SetFocus(); )
- if (zen::showDeleteDialog(compRefLeft,
- compRefRight,
- globalSettings->gui.deleteOnBothSides,
- globalSettings->gui.useRecyclerForManualDeletion) == ReturnSmallDlg::BUTTON_OKAY)
- {
- try
+ if (zen::showDeleteDialog(selectionLeft,
+ selectionRight,
+ globalSettings->gui.deleteOnBothSides,
+ globalSettings->gui.useRecyclerForManualDeletion) == ReturnSmallDlg::BUTTON_OKAY)
{
- //handle errors when deleting files/folders
- ManualDeletionHandler statusHandler(this);
-
- zen::deleteFromGridAndHD(compRefLeft,
- compRefRight,
- gridDataView->getDataTentative(),
- extractDirectionCfg(getConfig().mainCfg),
- globalSettings->gui.deleteOnBothSides,
- globalSettings->gui.useRecyclerForManualDeletion,
- statusHandler);
- }
- catch (AbortDeleteProcess&) {}
-
- //remove rows that are empty: just a beautification, invalid rows shouldn't cause issues
- gridDataView->removeInvalidRows();
-
- //redraw grid neccessary to update new dimensions and for UI-Backend data linkage
- updateGuiGrid(); //call immediately after deleteFromGridAndHD!!!
-
- m_gridLeft-> ClearSelection();
- m_gridMiddle->ClearSelection();
- m_gridRight-> ClearSelection();
- }
-
- if (oldFocus)
- oldFocus->SetFocus(); //restore focus before deletion
- }
-}
+ try
+ {
+ //handle errors when deleting files/folders
+ ManualDeletionHandler statusHandler(this);
+
+ zen::deleteFromGridAndHD(selectionLeft,
+ selectionRight,
+ folderCmp,
+ extractDirectionCfg(getConfig().mainCfg),
+ globalSettings->gui.deleteOnBothSides,
+ globalSettings->gui.useRecyclerForManualDeletion,
+ statusHandler);
+ }
+ catch (AbortDeleteProcess&) {}
+ //remove rows that are empty: just a beautification, invalid rows shouldn't cause issues
+ gridDataView->removeInvalidRows();
-void MainDialog::openExternalApplication(const wxString& commandline)
-{
- if (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid())
- {
- const CustomGrid* leadGrid = m_gridLeft->isLeadGrid() ?
- static_cast<CustomGrid*>(m_gridLeft) :
- static_cast<CustomGrid*>(m_gridRight);
- std::set<size_t> selection = getSelectedRows(leadGrid);
+ //redraw grid neccessary to update new dimensions and for UI-Backend data linkage
+ updateGui(); //call immediately after deleteFromGridAndHD!!!
- if (selection.size() == 1)
- openExternalApplication(*selection.begin(), m_gridLeft->isLeadGrid(), commandline);
+ gridview::clearSelection(*m_gridMain);
+ }
}
}
@@ -1116,7 +1142,7 @@ wxString extractLastValidDir(const FileSystemObject& fsObj)
}
-void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const wxString& commandline)
+void MainDialog::openExternalApplication(const FileSystemObject* fsObj, bool leftSide, const wxString& commandline)
{
if (commandline.empty())
return;
@@ -1126,16 +1152,13 @@ void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const
wxString dir;
wxString dirCo;
+ if (fsObj)
{
- const FileSystemObject* fsObj = gridDataView->getObject(rowNumber);
- if (fsObj)
- {
- name = toWx(fsObj->getFullName<LEFT_SIDE>()); //empty if obj not existing
- dir = toWx(beforeLast(fsObj->getFullName<LEFT_SIDE>(), FILE_NAME_SEPARATOR)); //small issue: if obj does not exist but parent exists, this one erronously returns empty
+ name = toWx(fsObj->getFullName<LEFT_SIDE>()); //empty if obj not existing
+ dir = toWx(beforeLast(fsObj->getFullName<LEFT_SIDE>(), FILE_NAME_SEPARATOR)); //small issue: if obj does not exist but parent exists, this one erronously returns empty
- nameCo = toWx(fsObj->getFullName<RIGHT_SIDE>());
- dirCo = toWx(beforeLast(fsObj->getFullName<RIGHT_SIDE>(), FILE_NAME_SEPARATOR));
- }
+ nameCo = toWx(fsObj->getFullName<RIGHT_SIDE>());
+ dirCo = toWx(beforeLast(fsObj->getFullName<RIGHT_SIDE>(), FILE_NAME_SEPARATOR));
}
if (!leftSide)
@@ -1158,7 +1181,7 @@ void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const
};
bool expandSuccess =
- /**/ tryReplace(L"%nameCo", nameCo); //attention: replace %nameCo, %dirCo BEFORE %name, %dir to handle dependency
+ /**/ tryReplace(L"%nameCo", nameCo); //attention: replace %nameCo, %dirCo BEFORE %name, %dir to handle dependency
expandSuccess = tryReplace(L"%dirCo", dirCo ) && expandSuccess; //
expandSuccess = tryReplace(L"%name", name ) && expandSuccess; //prevent short-cut behavior!
expandSuccess = tryReplace(L"%dir", dir ) && expandSuccess; //
@@ -1174,7 +1197,6 @@ void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const
else //support built-in fallback!
{
wxString fallbackDir;
- const FileSystemObject* fsObj = gridDataView->getObject(rowNumber);
if (fsObj)
fallbackDir = leftSide ?
extractLastValidDir<LEFT_SIDE >(*fsObj) :
@@ -1233,7 +1255,8 @@ void MainDialog::disableAllElements(bool enableAbort)
m_panelConfig ->Disable();
m_bpButtonSyncConfig ->Disable();
m_buttonStartSync ->Disable();
- m_panelGrids ->Disable();
+ m_gridMain ->Disable();
+ m_gridNavi ->Disable();
m_panelDirectoryPairs->Disable();
m_menubar1->EnableTop(0, false);
m_menubar1->EnableTop(1, false);
@@ -1266,7 +1289,8 @@ void MainDialog::enableAllElements()
m_panelConfig ->Enable();
m_bpButtonSyncConfig ->Enable();
m_buttonStartSync ->Enable();
- m_panelGrids ->Enable();
+ m_gridMain ->Enable();
+ m_gridNavi ->Enable();
m_panelDirectoryPairs->Enable();
m_menubar1->EnableTop(0, true);
m_menubar1->EnableTop(1, true);
@@ -1362,199 +1386,109 @@ void MainDialog::OnResizeFolderPairs(wxEvent& event)
}
-void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event)
+void MainDialog::onTreeButtonEvent(wxKeyEvent& event)
{
- const int keyCode = event.GetKeyCode();
+ int keyCode = event.GetKeyCode();
+ if (m_gridMain->GetLayoutDirection() == wxLayout_RightToLeft)
+ {
+ if (keyCode == WXK_LEFT)
+ keyCode = WXK_RIGHT;
+ else if (keyCode == WXK_RIGHT)
+ keyCode = WXK_LEFT;
+ else if (keyCode == WXK_NUMPAD_LEFT)
+ keyCode = WXK_NUMPAD_RIGHT;
+ else if (keyCode == WXK_NUMPAD_RIGHT)
+ keyCode = WXK_NUMPAD_LEFT;
+ }
if (event.ControlDown())
- switch (keyCode)
- {
- case 'C':
- case WXK_INSERT: //CTRL + C || CTRL + INS
- copySelectionToClipboard(*m_gridLeft);
- return; // -> swallow event! don't allow default grid commands!
-
- case 'A': //CTRL + A
- m_gridLeft->SelectAll();
- return;
-
- case WXK_NUMPAD_ADD: //CTRL + '+'
- m_gridLeft->autoSizeColumns();
- return;
- }
-
+ ;
else if (event.AltDown())
switch (keyCode)
{
+ case WXK_NUMPAD_LEFT:
case WXK_LEFT: //ALT + <-
- {
- wxCommandEvent dummy;
- OnContextSyncDirLeft(dummy);
- }
- return;
+ setSyncDirManually(getTreeSelection(), SYNC_DIR_LEFT);
+ return;
+ case WXK_NUMPAD_RIGHT:
case WXK_RIGHT: //ALT + ->
- {
- wxCommandEvent dummy;
- OnContextSyncDirRight(dummy);
- }
- return;
+ setSyncDirManually(getTreeSelection(), SYNC_DIR_RIGHT);
+ return;
+ case WXK_NUMPAD_UP:
+ case WXK_NUMPAD_DOWN:
case WXK_UP: /* ALT + /|\ */
case WXK_DOWN: /* ALT + \|/ */
- {
- wxCommandEvent dummy;
- OnContextSyncDirNone(dummy);
- }
- return;
+ setSyncDirManually(getTreeSelection(), SYNC_DIR_NONE);
+ return;
}
else
switch (keyCode)
{
- case WXK_DELETE:
- case WXK_NUMPAD_DELETE:
- {
- const std::set<size_t> viewSelectionLeft = getSelectedRows(m_gridLeft);
- const std::set<size_t> viewSelectionRight = getSelectedRows(m_gridRight);
- deleteSelectedFiles(viewSelectionLeft, viewSelectionRight);
- }
- return;
-
case WXK_SPACE:
case WXK_NUMPAD_SPACE:
{
- wxCommandEvent dummy;
- OnContextFilterTemp(dummy);
- }
- return;
-
- case WXK_RETURN:
- case WXK_NUMPAD_ENTER:
- {
- if (!globalSettings->gui.externelApplications.empty())
- openExternalApplication(globalSettings->gui.externelApplications[0].second); //open with first external application
- }
- return;
- }
-
- event.Skip(); //unknown keypress: propagate
-}
-
-
-void MainDialog::onGridMiddleButtonEvent(wxKeyEvent& event)
-{
- const int keyCode = event.GetKeyCode();
-
- if (event.ControlDown())
- switch (keyCode)
- {
- case 'C':
- case WXK_INSERT: //CTRL + C || CTRL + INS
- copySelectionToClipboard(*m_gridMiddle);
- return;
-
- case 'A': //CTRL + A
- m_gridMiddle->SelectAll();
- return;
- }
-
- else if (event.AltDown())
- switch (keyCode)
- {
- case WXK_LEFT: //ALT + <-
- {
- std::set<size_t> selection = getSelectedRows(m_gridMiddle);
- setSyncDirManually(selection, zen::SYNC_DIR_LEFT);
- }
- return;
-
- case WXK_RIGHT: //ALT + ->
- {
- std::set<size_t> selection = getSelectedRows(m_gridMiddle);
- setSyncDirManually(selection, zen::SYNC_DIR_RIGHT);
- }
- return;
-
- case WXK_UP: /* ALT + /|\ */
- case WXK_DOWN: /* ALT + \|/ */
- {
- std::set<size_t> selection = getSelectedRows(m_gridMiddle);
- setSyncDirManually(selection, zen::SYNC_DIR_NONE);
+ const auto& selection = getTreeSelection();
+ if (!selection.empty())
+ setManualFilter(selection, !selection[0]->isActive());
}
return;
- }
- else
- switch (keyCode)
- {
case WXK_DELETE:
case WXK_NUMPAD_DELETE:
- {
- std::set<size_t> selection = getSelectedRows(m_gridMiddle);
- deleteSelectedFiles(selection, selection);
- }
-
- return;
-
- case WXK_SPACE:
- case WXK_NUMPAD_SPACE:
- {
- std::set<size_t> selection = getSelectedRows(m_gridMiddle);
- filterRangeManually(selection, static_cast<int>(*selection.begin()));
- }
- return;
+ deleteSelectedFiles(getTreeSelection(), getTreeSelection());
+ return;
}
event.Skip(); //unknown keypress: propagate
}
-void MainDialog::onGridRightButtonEvent(wxKeyEvent& event)
+void MainDialog::onGridButtonEvent(wxKeyEvent& event)
{
- const int keyCode = event.GetKeyCode();
+ int keyCode = event.GetKeyCode();
+ if (m_gridMain->GetLayoutDirection() == wxLayout_RightToLeft)
+ {
+ if (keyCode == WXK_LEFT)
+ keyCode = WXK_RIGHT;
+ else if (keyCode == WXK_RIGHT)
+ keyCode = WXK_LEFT;
+ else if (keyCode == WXK_NUMPAD_LEFT)
+ keyCode = WXK_NUMPAD_RIGHT;
+ else if (keyCode == WXK_NUMPAD_RIGHT)
+ keyCode = WXK_NUMPAD_LEFT;
+ }
if (event.ControlDown())
switch (keyCode)
{
case 'C':
case WXK_INSERT: //CTRL + C || CTRL + INS
- copySelectionToClipboard(*m_gridRight);
- return;
-
- case 'A': //CTRL + A
- m_gridRight->SelectAll();
- return;
-
- case WXK_NUMPAD_ADD: //CTRL + '+'
- m_gridRight->autoSizeColumns();
- return;
+ copySelectionToClipboard();
+ return; // -> swallow event! don't allow default grid commands!
}
else if (event.AltDown())
switch (keyCode)
{
+ case WXK_NUMPAD_LEFT:
case WXK_LEFT: //ALT + <-
- {
- wxCommandEvent dummy;
- OnContextSyncDirLeft(dummy);
- }
- return;
+ setSyncDirManually(getGridSelection(), zen::SYNC_DIR_LEFT);
+ return;
+ case WXK_NUMPAD_RIGHT:
case WXK_RIGHT: //ALT + ->
- {
- wxCommandEvent dummy;
- OnContextSyncDirRight(dummy);
- }
- return;
+ setSyncDirManually(getGridSelection(), zen::SYNC_DIR_RIGHT);
+ return;
+ case WXK_NUMPAD_UP:
+ case WXK_NUMPAD_DOWN:
case WXK_UP: /* ALT + /|\ */
case WXK_DOWN: /* ALT + \|/ */
- {
- wxCommandEvent dummy;
- OnContextSyncDirNone(dummy);
- }
- return;
+ setSyncDirManually(getGridSelection(), zen::SYNC_DIR_NONE);
+ return;
}
else
@@ -1562,29 +1496,30 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event)
{
case WXK_DELETE:
case WXK_NUMPAD_DELETE:
- {
- const std::set<size_t> viewSelectionLeft = getSelectedRows(m_gridLeft);
- const std::set<size_t> viewSelectionRight = getSelectedRows(m_gridRight);
- deleteSelectedFiles(viewSelectionLeft, viewSelectionRight);
- }
-
- return;
+ deleteSelectedFiles(getGridSelection(true, false),
+ getGridSelection(false, true));
+ return;
case WXK_SPACE:
case WXK_NUMPAD_SPACE:
{
- wxCommandEvent dummy;
- OnContextFilterTemp(dummy);
+ const auto& selection = getGridSelection();
+ if (!selection.empty())
+ setManualFilter(selection, !selection[0]->isActive());
}
return;
case WXK_RETURN:
case WXK_NUMPAD_ENTER:
- {
if (!globalSettings->gui.externelApplications.empty())
- openExternalApplication(globalSettings->gui.externelApplications[0].second); //open with first external application
- }
- return;
+ {
+ const wxString commandline = globalSettings->gui.externelApplications[0].second; //open with first external application
+ auto cursorPos = m_gridMain->getGridCursor();
+ const int row = cursorPos.first;
+ const size_t compPos = cursorPos.second;
+ openExternalApplication(gridDataView->getObject(row), compPos == gridview::COMP_LEFT, commandline);
+ }
+ return;
}
event.Skip(); //unknown keypress: propagate
@@ -1608,7 +1543,7 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou
!IsShown() ||
!IsActive() ||
!IsEnabled() || //only handle if main window is in use
- !m_gridLeft->IsEnabled()) //
+ !m_gridMain->IsEnabled()) //
{
event.Skip();
return;
@@ -1625,7 +1560,7 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou
switch (keyCode)
{
case 'F': //CTRL + F
- zen::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase);
+ zen::startFind(*this, *m_gridMain, gridview::COMP_LEFT, gridview::COMP_RIGHT, globalSettings->gui.textSearchRespectCase);
return; //-> swallow event!
}
@@ -1633,7 +1568,7 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou
{
case WXK_F3: //F3
case WXK_NUMPAD_F3: //
- zen::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase);
+ zen::findNext(*this, *m_gridMain, gridview::COMP_LEFT, gridview::COMP_RIGHT, globalSettings->gui.textSearchRespectCase);
return; //-> swallow event!
//redirect certain (unhandled) keys directly to grid!
@@ -1656,16 +1591,15 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou
case WXK_NUMPAD_END:
{
const wxWindow* focus = wxWindow::FindFocus();
- if (!isPartOf(focus, m_gridLeft) && //don't propagate keyboard commands if grid is already in focus
- !isPartOf(focus, m_gridMiddle) &&
- !isPartOf(focus, m_gridRight) &&
+ if (!isPartOf(focus, m_gridMain ) && //don't propagate keyboard commands if grid is already in focus
!isPartOf(focus, m_listBoxHistory) && //don't propagate if selecting config
!isPartOf(focus, m_directoryLeft) && //don't propagate if changing directory field
!isPartOf(focus, m_directoryRight) &&
+ !isPartOf(focus, m_gridNavi ) &&
!isPartOf(focus, m_scrolledWindowFolderPairs))
{
- m_gridLeft->SetFocus();
- m_gridLeft->GetEventHandler()->ProcessEvent(event); //propagating event catched at wxTheApp to child leads to recursion, but we prevented it...
+ m_gridMain->SetFocus();
+ m_gridMain->GetEventHandler()->ProcessEvent(event); //propagating event catched at wxTheApp to child leads to recursion, but we prevented it...
event.Skip(false); //definitively handled now!
return;
}
@@ -1677,617 +1611,392 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou
}
-//------------------------------------------------------------
-//temporal variables used by exclude via context menu, transport string object to context menu handler
-struct CtxtSelectionString : public wxObject
+void MainDialog::onNaviSelection(GridRangeSelectEvent& event)
{
- CtxtSelectionString(const wxString& name) : objName(name) {}
- const wxString objName;
-};
+ //scroll m_gridMain to user's new selection on m_gridNavi
+ int leadRow = -1;
+ if (std::unique_ptr<TreeView::Node> node = treeDataView->getLine(event.rowFrom_))
+ {
+ if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get()))
+ leadRow = gridDataView->findRowFirstChild(&(root->baseMap_));
+ else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
+ {
+ leadRow = gridDataView->findRowDirect(&(dir->dirObj_));
+ if (leadRow < 0) //directory was filtered out! still on tree view (but NOT on grid view)
+ leadRow = gridDataView->findRowFirstChild(&(dir->dirObj_));
+ }
+ else if (const TreeView::FilesNode* files = dynamic_cast<const TreeView::FilesNode*>(node.get()))
+ leadRow = gridDataView->findRowDirect(files->firstFile_.getId());
+ }
-struct SelectedExtension : public wxObject
-{
- SelectedExtension(const Zstring& ext) : extension(ext) {}
+ if (leadRow >= 0)
+ m_gridMain->scrollTo(std::max(0, leadRow - 1)); //scroll one more row
- Zstring extension;
-};
+ //get selection on navigation tree and set corresponding markers on main grid
+ std::vector<const HierarchyObject*> markedFiles; //mark files/symlinks directly within a container
+ std::vector<const HierarchyObject*> markedContainer; //mark full container including child-objects
+ const std::vector<int>& selection = m_gridNavi->getSelectedRows();
+ std::for_each(selection.begin(), selection.end(),
+ [&](int row)
+ {
+ if (std::unique_ptr<TreeView::Node> node = treeDataView->getLine(row))
+ {
+ if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get()))
+ markedContainer.push_back(&(root->baseMap_));
+ else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
+ markedContainer.push_back(&(dir->dirObj_));
+ else if (const TreeView::FilesNode* files = dynamic_cast<const TreeView::FilesNode*>(node.get()))
+ markedFiles.push_back(&(files->firstFile_.parent()));
+ }
+ });
-struct CtxtSelectionIconSize : public wxObject
-{
- CtxtSelectionIconSize(xmlAccess::FileIconSize sz) : iconSize(sz) {}
- xmlAccess::FileIconSize iconSize;
-};
+ gridview::setNavigationMarker(*m_gridMain, std::move(markedFiles), std::move(markedContainer));
+ event.Skip();
+}
-typedef std::vector<std::pair<Zstring, bool> > FilterObjList; //relative name |-> "is directory flag"
-struct FilterObjContainer : public wxObject
+void MainDialog::onNaviGridContext(GridClickEvent& event)
{
- FilterObjContainer(const FilterObjList& objList) : selectedObjects(objList) {}
-
- FilterObjList selectedObjects;
-};
-//------------------------------------------------------------
+ ContextMenu menu;
+ const auto& selection = getTreeSelection(); //referenced by lambdas!
-
-void MainDialog::OnContextRim(wxGridEvent& event)
-{
- //usability: select row unter right-click if not already selected
- wxGrid* sourceGrid = dynamic_cast<wxGrid*>(event.GetEventObject());
- if (sourceGrid != NULL)
+ //----------------------------------------------------------------------------------------------------
+ if (syncPreviewEnabled && !selection.empty())
+ //std::find_if(selection.begin(), selection.end(), [](const FileSystemObject* fsObj){ return fsObj->getSyncOperation() != SO_EQUAL; }) != selection.end()) -> doesn't consider directories
{
- const int clickedRow = event.GetRow();
- const int clickedCol = event.GetCol();
- if (clickedRow >= 0 && clickedCol >= 0 && !sourceGrid->IsInSelection(clickedRow, 0))
+ auto getImage = [&](SyncDirection dir, SyncOperation soDefault)
{
- sourceGrid->SelectRow(clickedRow);
- sourceGrid->SetGridCursor(clickedRow, clickedCol);
-
- if (sourceGrid == m_gridLeft)
- m_gridRight->ClearSelection();
- else if (sourceGrid == m_gridRight)
- m_gridLeft->ClearSelection();
- }
- }
- //------------------------------------------------------------------------------
-
-
- std::set<size_t> selection;
-
+ return mirrorIfRtl(getSyncOpImage(selection[0]->getSyncOperation() != SO_EQUAL ?
+ selection[0]->testSyncOperation(dir, true) : soDefault));
+ };
+ const wxBitmap opRight = getImage(SYNC_DIR_RIGHT, SO_OVERWRITE_RIGHT);
+ const wxBitmap opNone = getImage(SYNC_DIR_NONE, SO_DO_NOTHING );
+ const wxBitmap opLeft = getImage(SYNC_DIR_LEFT, SO_OVERWRITE_LEFT );
+
+ wxString shortCutLeft = L"\tAlt+Left";
+ wxString shortCutRight = L"\tAlt+Right";
+ if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
+ std::swap(shortCutLeft, shortCutRight);
+
+ menu.addItem(_("Set direction:") + L" ->" + shortCutRight, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_RIGHT); }, &opRight);
+ menu.addItem(_("Set direction:") + L" -" L"\tAlt+Up", [this, &selection] { setSyncDirManually(selection, SYNC_DIR_NONE); }, &opNone);
+ menu.addItem(_("Set direction:") + L" <-" + shortCutLeft, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_LEFT); }, &opLeft);
+ //Gtk needs a direction, "<-", because it has no context menu icons!
+ //Gtk requires "no spaces" for shortcut identifiers!
+ menu.addSeparator();
+ }
+ //----------------------------------------------------------------------------------------------------
+ if (!selection.empty())
{
- const std::set<size_t> selectionLeft = getSelectedRows(m_gridLeft);
- const std::set<size_t> selectionRight = getSelectedRows(m_gridRight);
- selection.insert(selectionLeft .begin(), selectionLeft .end());
- selection.insert(selectionRight.begin(), selectionRight.end());
+ if (selection[0]->isActive())
+ menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, false); }, &GlobalResources::getImage(L"checkboxFalse"));
+ else
+ menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, true); }, &GlobalResources::getImage(L"checkboxTrue"));
}
+ else
+ menu.addItem(_("Exclude temporarily") + L"\tSpace", [] {}, NULL, false);
- const size_t selectionBegin = selection.size() == 0 ? 0 : *selection.begin();
+ //----------------------------------------------------------------------------------------------------
+ //CONTEXT_EXCLUDE_OBJ
+ if (selection.size() == 1)
+ menu.addItem(_("Exclude via filter:") + L" " + afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR),
+ [this, &selection] { excludeItems(selection); },
+ &GlobalResources::getImage(L"filterSmall"));
+ else if (selection.size() > 1)
+ menu.addItem(_("Exclude via filter:") + L" " + _("<multiple selection>"),
+ [this, &selection] { excludeItems(selection); },
+ &GlobalResources::getImage(L"filterSmall"));
+
+ //----------------------------------------------------------------------------------------------------
+ //CONTEXT_DELETE_FILES
+ menu.addSeparator();
+ menu.addItem(_("Delete") + L"\tDel", [&] { deleteSelectedFiles(selection, selection); }, NULL, !selection.empty());
- const FileSystemObject* fsObj = gridDataView->getObject(selectionBegin);
+ menu.popup(*this);
+}
- //#######################################################
- //re-create context menu
- contextMenu.reset(new wxMenu);
- if (syncPreview->previewIsEnabled() &&
- fsObj && fsObj->getSyncOperation() != SO_EQUAL)
- {
- if (selection.size() > 0)
- {
- //CONTEXT_SYNC_DIR_LEFT
- wxMenuItem* menuItemSyncDirLeft = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Set direction:")) +
- wxT(" <-") + wxT("\tAlt - Left")); //Linux needs a direction, "<-", because it has no context menu icons!
- menuItemSyncDirLeft->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_LEFT, true)));
- contextMenu->Append(menuItemSyncDirLeft);
- contextMenu->Connect(menuItemSyncDirLeft->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirLeft), NULL, this);
-
- //CONTEXT_SYNC_DIR_NONE
- wxMenuItem* menuItemSyncDirNone = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Set direction:")) +
- wxT(" -") + wxT("\tAlt - Up"));
- menuItemSyncDirNone->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_NONE, true)));
- contextMenu->Append(menuItemSyncDirNone);
- contextMenu->Connect(menuItemSyncDirNone->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirNone), NULL, this);
-
- //CONTEXT_SYNC_DIR_RIGHT
- wxMenuItem* menuItemSyncDirRight = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Set direction:")) +
- wxT(" ->") + wxT("\tAlt - Right"));
- menuItemSyncDirRight->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_RIGHT, true)));
- contextMenu->Append(menuItemSyncDirRight);
- contextMenu->Connect(menuItemSyncDirRight->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirRight), NULL, this);
-
- contextMenu->AppendSeparator();
- }
- }
+void MainDialog::onMainGridContext(GridClickEvent& event)
+{
+ ContextMenu menu;
+
+ const auto& selection = getGridSelection(); //referenced by lambdas!
- //CONTEXT_FILTER_TEMP
- if (fsObj && (selection.size() > 0))
+ if (event.compPos_ == gridview::COMP_LEFT ||
+ event.compPos_ == gridview::COMP_RIGHT)
{
- wxMenuItem* menuItemInExcl = NULL;
- if (fsObj->isActive())
+ //----------------------------------------------------------------------------------------------------
+ if (syncPreviewEnabled && !selection.empty())
{
- menuItemInExcl = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Exclude temporarily")) + wxT("\tSpace"));
- menuItemInExcl->SetBitmap(GlobalResources::getImage(wxT("checkboxFalse")));
+ auto getImage = [&](SyncDirection dir, SyncOperation soDefault)
+ {
+ return mirrorIfRtl(getSyncOpImage(selection[0]->getSyncOperation() != SO_EQUAL ?
+ selection[0]->testSyncOperation(dir, true) : soDefault));
+ };
+ const wxBitmap opRight = getImage(SYNC_DIR_RIGHT, SO_OVERWRITE_RIGHT);
+ const wxBitmap opNone = getImage(SYNC_DIR_NONE, SO_DO_NOTHING );
+ const wxBitmap opLeft = getImage(SYNC_DIR_LEFT, SO_OVERWRITE_LEFT );
+
+ wxString shortCutLeft = L"\tAlt+Left";
+ wxString shortCutRight = L"\tAlt+Right";
+ if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
+ std::swap(shortCutLeft, shortCutRight);
+
+ menu.addItem(_("Set direction:") + L" ->" + shortCutRight, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_RIGHT); }, &opRight);
+ menu.addItem(_("Set direction:") + L" -" L"\tAlt+Up", [this, &selection] { setSyncDirManually(selection, SYNC_DIR_NONE); }, &opNone);
+ menu.addItem(_("Set direction:") + L" <-" + shortCutLeft, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_LEFT); }, &opLeft);
+ //Gtk needs a direction, "<-", because it has no context menu icons!
+ //Gtk requires "no spaces" for shortcut identifiers!
+ menu.addSeparator();
+ }
+ //----------------------------------------------------------------------------------------------------
+ if (!selection.empty())
+ {
+ if (selection[0]->isActive())
+ menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, false); }, &GlobalResources::getImage(L"checkboxFalse"));
+ else
+ menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, true); }, &GlobalResources::getImage(L"checkboxTrue"));
}
else
- {
- menuItemInExcl = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Include temporarily")) + wxT("\tSpace"));
- menuItemInExcl->SetBitmap(GlobalResources::getImage(wxT("checkboxTrue")));
- }
+ menu.addItem(_("Exclude temporarily") + L"\tSpace", [] {}, NULL, false);
- contextMenu->Append(menuItemInExcl);
- contextMenu->Connect(menuItemInExcl->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextFilterTemp), NULL, this);
- }
- else
- {
- wxMenuItem* menuItemExcl = contextMenu->Append(wxID_ANY, wxString(_("Exclude temporarily")) + wxT("\tSpace")); //this element should always be visible
- contextMenu->Enable(menuItemExcl->GetId(), false);
- }
-
- //###############################################################################################
- //get list of relative file/dir-names for filtering
- FilterObjList exFilterCandidateObj;
-
- {
- class AddFilter : public FSObjectVisitor
+ //----------------------------------------------------------------------------------------------------
+ //CONTEXT_EXCLUDE_EXT
+ if (!selection.empty() &&
+ dynamic_cast<const DirMapping*>(selection[0]) == NULL) //non empty && no directory
{
- public:
- AddFilter(FilterObjList& fl) : filterList_(fl) {}
-
- virtual void visit(const FileMapping& fileObj)
- {
- filterList_.push_back(std::make_pair(fileObj.getObjRelativeName(), false));
- }
- virtual void visit(const SymLinkMapping& linkObj)
+ const Zstring filename = afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR);
+ if (filename.find(Zchar('.')) != Zstring::npos) //be careful: AfterLast would return the whole string if '.' were not found!
{
- filterList_.push_back(std::make_pair(linkObj.getObjRelativeName(), false));
+ const Zstring extension = afterLast(filename, Zchar('.'));
+
+ menu.addItem(_("Exclude via filter:") + L" *." + extension,
+ [this, extension] { excludeExtension(extension); },
+ &GlobalResources::getImage(L"filterSmall"));
}
- virtual void visit(const DirMapping& dirObj)
+ }
+ //----------------------------------------------------------------------------------------------------
+ //CONTEXT_EXCLUDE_OBJ
+ if (selection.size() == 1)
+ menu.addItem(_("Exclude via filter:") + L" " + afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR),
+ [this, &selection] { excludeItems(selection); },
+ &GlobalResources::getImage(L"filterSmall"));
+ else if (selection.size() > 1)
+ menu.addItem(_("Exclude via filter:") + L" " + _("<multiple selection>"),
+ [this, &selection] { excludeItems(selection); },
+ &GlobalResources::getImage(L"filterSmall"));
+
+ //----------------------------------------------------------------------------------------------------
+ //CONTEXT_EXTERNAL_APP
+ if (!globalSettings->gui.externelApplications.empty())
+ {
+ menu.addSeparator();
+
+ for (auto iter = globalSettings->gui.externelApplications.begin();
+ iter != globalSettings->gui.externelApplications.end();
+ ++iter)
{
- filterList_.push_back(std::make_pair(dirObj.getObjRelativeName(), true));
- }
+ //some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly"
+ wxString description = zen::implementation::translate(copyStringTo<std::wstring>(iter->first));
+ if (description.empty())
+ description = L" "; //wxWidgets doesn't like empty items
- private:
- FilterObjList& filterList_;
- }
- newFilterEntry(exFilterCandidateObj);
+ const wxString command = iter->second;
- for (std::set<size_t>::const_iterator i = selection.begin(); i != selection.end(); ++i)
- {
- const FileSystemObject* currObj = gridDataView->getObject(*i);
- if (currObj)
- currObj->accept(newFilterEntry);
+ auto openApp = [this, &selection, command, event] { openExternalApplication(selection.empty() ? NULL : selection[0], event.compPos_ == gridview::COMP_LEFT, command); };
+
+ if (iter == globalSettings->gui.externelApplications.begin())
+ menu.addItem(description + L"\tEnter", openApp);
+ else
+ menu.addItem(description, openApp, NULL, !selection.empty());
+ }
}
- }
- //###############################################################################################
+ //----------------------------------------------------------------------------------------------------
+ //CONTEXT_DELETE_FILES
+ menu.addSeparator();
- //CONTEXT_EXCLUDE_EXT
- if (exFilterCandidateObj.size() > 0 && !exFilterCandidateObj.begin()->second) //non empty && no directory
- {
- const Zstring filename = afterLast(exFilterCandidateObj.begin()->first, FILE_NAME_SEPARATOR);
- if (filename.find(Zchar('.')) != Zstring::npos) //be careful: AfterLast would return the whole string if '.' were not found!
+ menu.addItem(_("Delete") + L"\tDel", [this]
{
- const Zstring extension = afterLast(filename, Zchar('.'));
-
- //add context menu item
- wxMenuItem* menuItemExclExt = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude via filter:") + L" *." + extension);
- menuItemExclExt->SetBitmap(GlobalResources::getImage(wxT("filterSmall")));
- contextMenu->Append(menuItemExclExt);
-
- //connect event
- contextMenu->Connect(menuItemExclExt->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnContextExcludeExtension),
- new SelectedExtension(extension), //ownership passed!
- this);
- }
+ deleteSelectedFiles(
+ getGridSelection(true, false),
+ getGridSelection(false, true));
+ }, NULL, !selection.empty());
}
-
- //CONTEXT_EXCLUDE_OBJ
- wxMenuItem* menuItemExclObj = NULL;
- if (exFilterCandidateObj.size() == 1)
- menuItemExclObj = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude via filter:") + L" " + afterLast(exFilterCandidateObj.begin()->first, FILE_NAME_SEPARATOR));
- else if (exFilterCandidateObj.size() > 1)
- menuItemExclObj = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude via filter:") + L" " + _("<multiple selection>"));
-
- if (menuItemExclObj != NULL)
+ else if (event.compPos_ == gridview::COMP_MIDDLE)
{
- menuItemExclObj->SetBitmap(GlobalResources::getImage(wxT("filterSmall")));
- contextMenu->Append(menuItemExclObj);
+ menu.addItem(_("Include all"), [&]
+ {
+ zen::setActiveStatus(true, folderCmp);
+ updateGui();
+ }, NULL, gridDataView->rowsTotal() > 0);
- //connect event
- contextMenu->Connect(menuItemExclObj->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnContextExcludeObject),
- new FilterObjContainer(exFilterCandidateObj), //ownership passed!
- this);
+ menu.addItem(_("Exclude all"), [&]
+ {
+ zen::setActiveStatus(false, folderCmp);
+ updateGuiAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true
+ }, NULL, gridDataView->rowsTotal() > 0);
}
+ menu.popup(*this);
+}
- //CONTEXT_EXTERNAL_APP
- if (!globalSettings->gui.externelApplications.empty())
- {
- contextMenu->AppendSeparator();
-
- const bool externalAppEnabled = (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid()) &&
- selection.size() == 1;
+void MainDialog::excludeExtension(const Zstring& extension)
+{
+ const Zstring newExclude = Zstr("*.") + extension;
- for (xmlAccess::ExternalApps::iterator i = globalSettings->gui.externelApplications.begin();
- i != globalSettings->gui.externelApplications.end();
- ++i)
- {
- //some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly"
- //wxString description = wxGetTranslation(i->first);
- wxString description = zen::implementation::translate(std::wstring(i->first.c_str()));
- if (description.empty())
- description = wxT(" "); //wxWidgets doesn't like empty items
-
- wxMenuItem* itemExtApp = NULL;
- if (i == globalSettings->gui.externelApplications.begin())
- itemExtApp = contextMenu->Append(wxID_ANY, description + wxT("\t") + wxString(_("D-Click")) + wxT(" Enter"));
- else
- itemExtApp = contextMenu->Append(wxID_ANY, description);
- contextMenu->Enable(itemExtApp->GetId(), externalAppEnabled);
-
- contextMenu->Connect(itemExtApp->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnContextOpenWith),
- new CtxtSelectionString(i->second), //ownership passed!
- this);
- }
- }
+ //add to filter config
+ Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter;
+ if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr(";")))
+ excludeFilter += Zstr("\n");
+ excludeFilter += newExclude + Zstr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line
- contextMenu->AppendSeparator();
+ updateFilterButtons();
- //CONTEXT_DELETE_FILES
- wxMenuItem* menuItemDelFiles = contextMenu->Append(wxID_ANY, wxString(_("Delete")) + wxT("\tDel"));
- contextMenu->Enable(menuItemDelFiles->GetId(), selection.size() > 0);
- contextMenu->Connect(menuItemDelFiles->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextDeleteFiles), NULL, this);
+ //do not fully apply filter, just exclude new items
+ std::for_each(begin(folderCmp), end(folderCmp),
+ [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); });
- //show context menu
- PopupMenu(contextMenu.get());
+ //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative());
+ updateGui();
}
-void MainDialog::OnContextFilterTemp(wxCommandEvent& event)
+void MainDialog::excludeItems(const std::vector<FileSystemObject*>& selection)
{
- //merge selections from left and right grid
- std::set<size_t> selection = getSelectedRows();
- if (!selection.empty())
- filterRangeManually(selection, static_cast<int>(*selection.begin()));
-}
+ if (!selection.empty()) //check needed to determine if filtering is needed
+ {
+ Zstring newExclude;
+ for (auto iter = selection.begin(); iter != selection.end(); ++iter)
+ {
+ FileSystemObject* fsObj = *iter;
+ const bool isDir = dynamic_cast<const DirMapping*>(fsObj) != NULL;
+ if (iter != selection.begin())
+ newExclude += Zstr("\n");
-void MainDialog::OnContextExcludeExtension(wxCommandEvent& event)
-{
- SelectedExtension* selExtension = dynamic_cast<SelectedExtension*>(event.m_callbackUserData);
- if (selExtension)
- {
- const Zstring newExclude = Zstring(Zstr("*.")) + selExtension->extension;
+ newExclude += FILE_NAME_SEPARATOR + fsObj->getObjRelativeName();
+ if (isDir)
+ newExclude += FILE_NAME_SEPARATOR;
+ }
//add to filter config
Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter;
- if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr(";")))
+ if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr("\n")))
excludeFilter += Zstr("\n");
- excludeFilter += newExclude + Zstr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line
+ excludeFilter += newExclude;
updateFilterButtons();
//do not fully apply filter, just exclude new items
- std::for_each(begin(gridDataView->getDataTentative()), end(gridDataView->getDataTentative()),
+ std::for_each(begin(folderCmp), end(folderCmp),
[&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); });
//applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative());
- updateGuiGrid();
-
- if (currentCfg.hideFilteredElements)
- {
- m_gridLeft ->ClearSelection();
- m_gridRight ->ClearSelection();
- m_gridMiddle->ClearSelection();
- }
+ updateGui();
}
}
-void MainDialog::OnContextExcludeObject(wxCommandEvent& event)
+void MainDialog::onGridLabelContext(GridClickEvent& event)
{
- FilterObjContainer* objCont = dynamic_cast<FilterObjContainer*>(event.m_callbackUserData);
- if (objCont)
+ ContextMenu menu;
+
+ if (event.compPos_ == gridview::COMP_LEFT ||
+ event.compPos_ == gridview::COMP_RIGHT)
{
- if (objCont->selectedObjects.size() > 0) //check needed to determine if filtering is needed
+ auto toggleColumn = [&](const Grid::ColumnAttribute& ca, size_t compPos)
{
- Zstring newExclude;
- for (FilterObjList::const_iterator i = objCont->selectedObjects.begin(); i != objCont->selectedObjects.end(); ++i)
- {
- if (i != objCont->selectedObjects.begin())
- newExclude += Zstr("\n");
-
- newExclude += FILE_NAME_SEPARATOR + i->first;
- if (i->second) //is directory
- newExclude += FILE_NAME_SEPARATOR;
- }
-
- //add to filter config
- Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter;
- if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr("\n")))
- excludeFilter += Zstr("\n");
- excludeFilter += newExclude;
-
- updateFilterButtons();
+ auto colAttr = m_gridMain->getColumnConfig(compPos);
- //do not fully apply filter, just exclude new items
- std::for_each(begin(gridDataView->getDataTentative()), end(gridDataView->getDataTentative()),
- [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); });
-
- //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative());
- updateGuiGrid();
+ for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter)
+ if (iter->type_ == ca.type_)
+ {
+ iter->visible_ = !ca.visible_;
+ m_gridMain->setColumnConfig(colAttr, compPos);
+ return;
+ }
+ };
- if (currentCfg.hideFilteredElements)
+ if (auto prov = m_gridMain->getDataProvider(event.compPos_))
+ {
+ const auto& colAttr = m_gridMain->getColumnConfig(event.compPos_);
+ for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter)
{
- m_gridLeft ->ClearSelection();
- m_gridRight ->ClearSelection();
- m_gridMiddle->ClearSelection();
+ const Grid::ColumnAttribute& ca = *iter;
+ const size_t compPos = event.compPos_;
+
+ menu.addCheckBox(prov->getColumnLabel(ca.type_), [ca, compPos, toggleColumn] { toggleColumn(ca, compPos); },
+ ca.visible_, ca.type_ != static_cast<ColumnType>(COL_TYPE_FILENAME)); //do not allow user to hide file name column!
}
}
- }
-}
-
-
-
-void MainDialog::OnContextOpenWith(wxCommandEvent& event)
-{
- CtxtSelectionString* stringObj = dynamic_cast<CtxtSelectionString*>(event.m_callbackUserData);
- if (stringObj)
- openExternalApplication(stringObj->objName);
-}
-
-
-
-void MainDialog::OnContextDeleteFiles(wxCommandEvent& event)
-{
- const std::set<size_t> viewSelectionLeft = getSelectedRows(m_gridLeft);
- const std::set<size_t> viewSelectionRight = getSelectedRows(m_gridRight);
- deleteSelectedFiles(viewSelectionLeft, viewSelectionRight);
-}
-
-
-void MainDialog::OnContextSyncDirLeft(wxCommandEvent& event)
-{
- //merge selections from left and right grid
- const std::set<size_t> selection = getSelectedRows();
- setSyncDirManually(selection, zen::SYNC_DIR_LEFT);
-}
-
-
-void MainDialog::OnContextSyncDirNone(wxCommandEvent& event)
-{
- //merge selections from left and right grid
- const std::set<size_t> selection = getSelectedRows();
- setSyncDirManually(selection, zen::SYNC_DIR_NONE);
-}
+ //----------------------------------------------------------------------------------------------
+ menu.addSeparator();
-
-void MainDialog::OnContextSyncDirRight(wxCommandEvent& event)
-{
- //merge selections from left and right grid
- const std::set<size_t> selection = getSelectedRows();
- setSyncDirManually(selection, zen::SYNC_DIR_RIGHT);
-}
-
-
-void MainDialog::OnContextRimLabelLeft(wxGridEvent& event)
-{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* menuItemCustomize = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Customize..."));
- contextMenu->Append(menuItemCustomize);
- contextMenu->Connect(menuItemCustomize->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnLeft), NULL, this);
-
- if (m_gridLeft->getTypeAtPos(event.GetCol()) == xmlAccess::DATE)
- {
- wxMenuItem* menuItemSelectTs = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Select time span..."));
- contextMenu->Append(menuItemSelectTs);
- contextMenu->Connect(menuItemSelectTs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSelectTimeSpan), NULL, this);
- }
-
- contextMenu->AppendSeparator();
-
- wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
- contextMenu->Append(itemAutoAdjust);
- itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsLeft);
- contextMenu->Connect(itemAutoAdjust->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustLeft), NULL, this);
-
- //if (m_gridLeft->getTypeAtPos(event.GetCol()) == xmlAccess::FILENAME)
- {
- contextMenu->AppendSeparator();
-
- wxMenuItem* header = contextMenu->Append(wxID_ANY, _("Icon size:"));
- header->Enable(false);
-
- auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz)
+ auto setDefault = [&]
{
- wxMenuItem* newItem = contextMenu->Append(wxID_ANY, label, wxEmptyString, wxITEM_RADIO);
- contextMenu->Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetIconSize),
- new CtxtSelectionIconSize(sz), //ownership passed!
- this);
-
- if (globalSettings->gui.iconSize == sz)
- newItem->Check();
+ m_gridMain->setColumnConfig(gridview::convertConfig(event.compPos_ == gridview::COMP_LEFT ?
+ getDefaultColumnAttributesLeft() :
+ getDefaultColumnAttributesRight()), event.compPos_);
};
- addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL);
- addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM);
- addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE);
- }
-
- PopupMenu(contextMenu.get()); //show context menu
-}
-
-
-void MainDialog::OnContextRimLabelRight(wxGridEvent& event)
-{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* menuItemCustomize = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Customize..."));
- contextMenu->Append(menuItemCustomize);
- contextMenu->Connect(menuItemCustomize->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnRight), NULL, this);
-
- if (m_gridRight->getTypeAtPos(event.GetCol()) == xmlAccess::DATE)
- {
- wxMenuItem* menuItemSelectTs = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Select time span..."));
- contextMenu->Append(menuItemSelectTs);
- contextMenu->Connect(menuItemSelectTs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSelectTimeSpan), NULL, this);
- }
-
- contextMenu->AppendSeparator();
-
- wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK);
- contextMenu->Append(itemAutoAdjust);
- itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsRight);
- contextMenu->Connect(itemAutoAdjust->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustRight), NULL, this);
-
- //if (m_gridRight->getTypeAtPos(event.GetCol()) == xmlAccess::FILENAME)
- {
- contextMenu->AppendSeparator();
-
- wxMenuItem* header = contextMenu->Append(wxID_ANY, _("Icon size:"));
- header->Enable(false);
-
- auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz)
+ menu.addItem(_("&Default"), setDefault); //'&' -> reuse text from "default" buttons elsewhere
+ //----------------------------------------------------------------------------------------------
+ auto setIconSize = [&](xmlAccess::FileIconSize sz, IconBuffer::IconSize szAlias)
{
- wxMenuItem* newItem = contextMenu->Append(wxID_ANY, label, wxEmptyString, wxITEM_RADIO);
- contextMenu->Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetIconSize),
- new CtxtSelectionIconSize(sz), //ownership passed!
- this);
- if (globalSettings->gui.iconSize == sz)
- newItem->Check();
+ globalSettings->gui.iconSize = sz;
+ gridview::setIconSize(*m_gridMain, szAlias);
};
- addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL);
- addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM);
- addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE);
- }
-
- PopupMenu(contextMenu.get()); //show context menu
-}
-
-
-void MainDialog::OnContextCustColumnLeft(wxCommandEvent& event)
-{
- xmlAccess::ColumnAttributes colAttr = m_gridLeft->getColumnAttributes();
-
- if (zen::showCustomizeColsDlg(colAttr) == ReturnSmallDlg::BUTTON_OKAY)
- {
- m_gridLeft->setColumnAttributes(colAttr);
-
- 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));
- }
-}
-
-
-void MainDialog::OnContextCustColumnRight(wxCommandEvent& event)
-{
- xmlAccess::ColumnAttributes colAttr = m_gridRight->getColumnAttributes();
-
- if (zen::showCustomizeColsDlg(colAttr) == ReturnSmallDlg::BUTTON_OKAY)
- {
- m_gridRight->setColumnAttributes(colAttr);
-
- 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));
- }
-}
+ menu.addSeparator();
+ menu.addItem(_("Icon size:"), [] {}, NULL, false);
+ auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz, IconBuffer::IconSize szAlias)
+ {
+ auto setIconSize2 = setIconSize; //bring into scope
+ menu.addRadio(label, [sz, szAlias, setIconSize2] { setIconSize2(sz, szAlias); }, globalSettings->gui.iconSize == sz);
+ };
+ addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL , IconBuffer::SIZE_SMALL);
+ addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM, IconBuffer::SIZE_MEDIUM);
+ addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE , IconBuffer::SIZE_LARGE);
+ //----------------------------------------------------------------------------------------------
+ if (static_cast<ColumnTypeRim>(event.colType_) == COL_TYPE_DATE)
+ {
+ menu.addSeparator();
-void MainDialog::OnContextSelectTimeSpan(wxCommandEvent& event)
-{
- if (showSelectTimespanDlg(manualTimeSpanFrom, manualTimeSpanTo) == ReturnSmallDlg::BUTTON_OKAY)
- {
- applyTimeSpanFilter(gridDataView->getDataTentative(), manualTimeSpanFrom, manualTimeSpanTo); //overwrite current active/inactive settings
- refreshGridAfterFilterChange(400);
+ auto selectTimeSpan = [&]
+ {
+ if (showSelectTimespanDlg(manualTimeSpanFrom, manualTimeSpanTo) == ReturnSmallDlg::BUTTON_OKAY)
+ {
+ applyTimeSpanFilter(folderCmp, manualTimeSpanFrom, manualTimeSpanTo); //overwrite current active/inactive settings
+ updateGuiAfterFilterChange(400);
+ }
+ };
+ menu.addItem(_("Select time span..."), selectTimeSpan);
+ }
}
-}
-
-
-void MainDialog::OnContextAutoAdjustLeft(wxCommandEvent& event)
-{
- globalSettings->gui.autoAdjustColumnsLeft = !globalSettings->gui.autoAdjustColumnsLeft;
- updateGuiGrid();
-}
-
-
-void MainDialog::OnContextAutoAdjustRight(wxCommandEvent& event)
-{
- globalSettings->gui.autoAdjustColumnsRight = !globalSettings->gui.autoAdjustColumnsRight;
- updateGuiGrid();
-}
-
-void MainDialog::OnContextSetIconSize(wxCommandEvent& event)
-{
- CtxtSelectionIconSize* sizeObj = dynamic_cast<CtxtSelectionIconSize*>(event.m_callbackUserData);
- if (sizeObj)
+ else if (event.compPos_ == gridview::COMP_MIDDLE)
{
- globalSettings->gui.iconSize = sizeObj->iconSize;
-
- const IconBuffer::IconSize sz = [&]() -> IconBuffer::IconSize
- {
- switch (globalSettings->gui.iconSize)
- {
- case xmlAccess::ICON_SIZE_SMALL:
- return IconBuffer::SIZE_SMALL;
- case xmlAccess::ICON_SIZE_MEDIUM:
- return IconBuffer::SIZE_MEDIUM;
- case xmlAccess::ICON_SIZE_LARGE:
- return IconBuffer::SIZE_LARGE;
- }
- return IconBuffer::SIZE_SMALL;
- }();
-
- std::shared_ptr<IconBuffer> iconBuffer = std::make_shared<IconBuffer>(sz);
-
- m_gridLeft ->setIconManager(iconBuffer);
- m_gridMiddle->setIconManager(iconBuffer);
- m_gridRight ->setIconManager(iconBuffer);
+ menu.addItem(_("Synchronization Preview"), [&] { enablePreview(true ); }, syncPreviewEnabled ? &GlobalResources::getImage(L"syncViewSmall") : NULL);
+ menu.addItem(_("Comparison Result"), [&] { enablePreview(false); }, syncPreviewEnabled ? NULL : &GlobalResources::getImage(L"cmpViewSmall"));
}
-}
-
-
-void MainDialog::OnContextMiddle(wxGridEvent& event)
-{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* menuItemInclude = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Include all rows"));
- contextMenu->Append(menuItemInclude);
- if (gridDataView->rowsTotal() == 0)
- menuItemInclude->Enable(false);
- contextMenu->Connect(menuItemInclude->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextIncludeAll), NULL, this);
-
- wxMenuItem* menuItemExclude = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude all rows"));
- contextMenu->Append(menuItemExclude);
- if (gridDataView->rowsTotal() == 0)
- menuItemExclude->Enable(false);
- contextMenu->Connect(menuItemExclude->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextExcludeAll), NULL, this);
-
- PopupMenu(contextMenu.get()); //show context menu
-}
-
-
-void MainDialog::OnContextMiddleLabel(wxGridEvent& event)
-{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemSyncPreview = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Synchronization Preview"));
- contextMenu->Connect(itemSyncPreview->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncView), NULL, this);
-
- wxMenuItem* itemCmpResult = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Comparison Result"));
- contextMenu->Connect(itemCmpResult->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextComparisonView), NULL, this);
-
- if (syncPreview->previewIsEnabled())
- itemSyncPreview->SetBitmap(GlobalResources::getImage(wxT("syncViewSmall")));
- else
- itemCmpResult->SetBitmap(GlobalResources::getImage(wxT("cmpViewSmall")));
-
- contextMenu->Append(itemCmpResult);
- contextMenu->Append(itemSyncPreview);
-
- PopupMenu(contextMenu.get()); //show context menu
+ menu.popup(*this);
}
void MainDialog::OnContextSetLayout(wxMouseEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemReset = contextMenu->Append(wxID_ANY, _("Reset view"));
- contextMenu->Connect(itemReset->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetLayoutReset), NULL, this);
+ ContextMenu menu;
- typedef std::vector<std::pair<wxString, wxString> > CaptionNameMapping;
- CaptionNameMapping captionNameMap;
+ menu.addItem(_("Default view"), [&]
+ {
+ auiMgr.LoadPerspective(defaultPerspective);
+ updateGuiForFolderPair();
+ });
+ //----------------------------------------------------------------------------------------
+ std::vector<std::pair<wxString, wxString>> captionNameMap; //(caption, identifier)
const wxAuiPaneInfoArray& paneArray = auiMgr.GetAllPanes();
for (size_t i = 0; i < paneArray.size(); ++i)
@@ -2295,214 +2004,94 @@ void MainDialog::OnContextSetLayout(wxMouseEvent& event)
captionNameMap.push_back(std::make_pair(paneArray[i].caption, paneArray[i].name));
if (!captionNameMap.empty())
- {
- contextMenu->AppendSeparator();
-
- for (CaptionNameMapping::const_iterator i = captionNameMap.begin(); i != captionNameMap.end(); ++i)
- {
- wxString entry = _("Show \"%x\"");
- entry.Replace(wxT("%x"), i->first);
-
- wxMenuItem* newItem = contextMenu->Append(wxID_ANY, entry);
- contextMenu->Connect(newItem->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnContextSetLayoutShowPanel),
- new CtxtSelectionString(i->second), //ownership passed!
- this);
- }
- }
-
- PopupMenu(contextMenu.get()); //show context menu
-}
-
-
-void MainDialog::OnContextSetLayoutReset(wxCommandEvent& event)
-{
- auiMgr.LoadPerspective(defaultPerspective);
-}
-
+ menu.addSeparator();
-void MainDialog::OnContextSetLayoutShowPanel(wxCommandEvent& event)
-{
- CtxtSelectionString* stringObj = dynamic_cast<CtxtSelectionString*>(event.m_callbackUserData);
- if (stringObj)
+ auto showPanel = [&](const wxString& identifier)
{
- auiMgr.GetPane(stringObj->objName).Show();
+ auiMgr.GetPane(identifier).Show();
auiMgr.Update();
- }
-}
-
+ };
-void MainDialog::OnContextIncludeAll(wxCommandEvent& event)
-{
- zen::setActiveStatus(true, gridDataView->getDataTentative());
- refreshGridAfterFilterChange(0); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts break;
-}
+ for (auto iter = captionNameMap.begin(); iter != captionNameMap.end(); ++iter)
+ {
+ const wxString label = replaceCpy(_("Show \"%x\""), L"%x", iter->first);
+ const wxString identifier = iter->second;
+ menu.addItem(label, [showPanel, identifier] { showPanel(identifier); });
+ }
-void MainDialog::OnContextExcludeAll(wxCommandEvent& event)
-{
- zen::setActiveStatus(false, gridDataView->getDataTentative());
- refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts
+ menu.popup(*this);
}
-void MainDialog::OnContextComparisonView(wxCommandEvent& event)
+void MainDialog::OnCompSettingsContext(wxMouseEvent& event)
{
- syncPreview->enablePreview(false); //change view
-}
+ ContextMenu menu;
+ auto setVariant = [&](CompareVariant var)
+ {
+ currentCfg.mainCfg.cmpConfig.compareVar = var;
+ applyCompareConfig();
+ };
-void MainDialog::OnContextSyncView(wxCommandEvent& event)
-{
- syncPreview->enablePreview(true); //change view
-}
+ auto currentVar = getConfig().mainCfg.cmpConfig.compareVar;
+ menu.addRadio(_("File time and size"), [&] { setVariant(CMP_BY_TIME_SIZE); }, currentVar == CMP_BY_TIME_SIZE);
+ menu.addRadio(_("File content" ), [&] { setVariant(CMP_BY_CONTENT); }, currentVar == CMP_BY_CONTENT);
-struct CtxtSelectionCmpVar : public wxObject
-{
- CtxtSelectionCmpVar(CompareVariant var) : compareVar(var) {}
- CompareVariant compareVar;
-};
+ menu.popup(*this);
+}
-void MainDialog::OnContextSelectCompVariant(wxMouseEvent& event)
+void MainDialog::OnSyncSettingsContext(wxMouseEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemSizeDate = new wxMenuItem(contextMenu.get(), wxID_ANY, _("File time and size"), L"", wxITEM_RADIO);
- contextMenu->Append(itemSizeDate);
- contextMenu->Connect(itemSizeDate->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnSetCompVariant),
- new CtxtSelectionCmpVar(CMP_BY_TIME_SIZE), //ownership passed!
- this);
-
- wxMenuItem* itemContent = new wxMenuItem(contextMenu.get(), wxID_ANY, _("File content"), L"", wxITEM_RADIO);
- contextMenu->Append(itemContent);
- contextMenu->Connect(itemContent->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnSetCompVariant),
- new CtxtSelectionCmpVar(CMP_BY_CONTENT), //ownership passed!
- this);
+ ContextMenu menu;
- //---------------------------------------------------------------
- xmlAccess::XmlGuiConfig cfg = getConfig();
-
- switch (cfg.mainCfg.cmpConfig.compareVar)
+ auto setVariant = [&](DirectionConfig::Variant var)
{
- case CMP_BY_TIME_SIZE:
- itemSizeDate->Check();
- break;
- case CMP_BY_CONTENT:
- itemContent->Check();
- break;
- }
-
- PopupMenu(contextMenu.get()); //show context menu
-}
-
-
-struct CtxtSelectionSyncVar : public wxObject
-{
- CtxtSelectionSyncVar(DirectionConfig::Variant var) : syncVar(var) {}
- DirectionConfig::Variant syncVar;
-};
+ currentCfg.mainCfg.syncCfg.directionCfg.var = var;
+ applySyncConfig();
+ };
+ const auto currentVar = getConfig().mainCfg.syncCfg.directionCfg.var;
-void MainDialog::OnContextSelectSyncVariant(wxMouseEvent& event)
-{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemAuto = new wxMenuItem(contextMenu.get(), wxID_ANY, _("<Automatic>"), L"", wxITEM_RADIO);
- contextMenu->Append(itemAuto);
- contextMenu->Connect(itemAuto->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnSetSyncVariant),
- new CtxtSelectionSyncVar(DirectionConfig::AUTOMATIC), //ownership passed!
- this);
-
- wxMenuItem* itemMirror = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Mirror ->>"), L"", wxITEM_RADIO);
- contextMenu->Append(itemMirror);
- contextMenu->Connect(itemMirror->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnSetSyncVariant),
- new CtxtSelectionSyncVar(DirectionConfig::MIRROR), //ownership passed!
- this);
-
- wxMenuItem* itemUpdate = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Update ->"), L"", wxITEM_RADIO);
- contextMenu->Append(itemUpdate);
- contextMenu->Connect(itemUpdate->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnSetSyncVariant),
- new CtxtSelectionSyncVar(DirectionConfig::UPDATE), //ownership passed!
- this);
-
- wxMenuItem* itemCustom = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Custom"), L"", wxITEM_RADIO);
- contextMenu->Append(itemCustom);
- contextMenu->Connect(itemCustom->GetId(),
- wxEVT_COMMAND_MENU_SELECTED,
- wxCommandEventHandler(MainDialog::OnSetSyncVariant),
- new CtxtSelectionSyncVar(DirectionConfig::CUSTOM), //ownership passed!
- this);
-
- //---------------------------------------------------------------
- xmlAccess::XmlGuiConfig cfg = getConfig();
-
- switch (cfg.mainCfg.syncCfg.directionCfg.var)
- {
- case DirectionConfig::AUTOMATIC:
- itemAuto->Check();
- break;
- case DirectionConfig::MIRROR:
- itemMirror->Check();
- break;
- case DirectionConfig::UPDATE:
- itemUpdate->Check();
- break;
- case DirectionConfig::CUSTOM:
- itemCustom->Check();
- break;
- }
+ menu.addRadio(_("<Automatic>"), [&] { setVariant(DirectionConfig::AUTOMATIC); }, currentVar == DirectionConfig::AUTOMATIC);
+ menu.addRadio(_("Mirror ->>") , [&] { setVariant(DirectionConfig::MIRROR); }, currentVar == DirectionConfig::MIRROR);
+ menu.addRadio(_("Update ->") , [&] { setVariant(DirectionConfig::UPDATE); }, currentVar == DirectionConfig::UPDATE);
+ menu.addRadio(_("Custom") , [&] { setVariant(DirectionConfig::CUSTOM); }, currentVar == DirectionConfig::CUSTOM);
- PopupMenu(contextMenu.get()); //show context menu
+ menu.popup(*this);
}
-void MainDialog::OnSetCompVariant(wxCommandEvent& event)
+void MainDialog::OnDirSelected(wxFileDirPickerEvent& event)
{
- CtxtSelectionCmpVar* selection = dynamic_cast<CtxtSelectionCmpVar*>(event.m_callbackUserData);
- if (selection)
- {
- currentCfg.mainCfg.cmpConfig.compareVar = selection->compareVar;
- applyCompareConfig();
- }
-}
+ //left and right directory text-control and dirpicker are synchronized by MainFolderDragDrop automatically
+ clearGrid(); //disable the sync button
-void MainDialog::OnSetSyncVariant(wxCommandEvent& event)
-{
- CtxtSelectionSyncVar* selection = dynamic_cast<CtxtSelectionSyncVar*>(event.m_callbackUserData);
- if (selection)
- {
- currentCfg.mainCfg.syncCfg.directionCfg.var = selection->syncVar;
- applySyncConfig();
- }
+ event.Skip();
}
-void MainDialog::OnDirSelected(wxFileDirPickerEvent& event)
+void MainDialog::onNaviPanelFilesDropped(FileDropEvent& event)
{
- //left and right directory text-control and dirpicker are synchronized by MainFolderDragDrop automatically
+ const auto& droppedFiles = event.getFiles();
- //disable the sync button
- syncPreview->enableSynchronization(false);
+ switch (xmlAccess::getMergeType(droppedFiles)) //throw ()
+ {
+ case xmlAccess::MERGE_BATCH:
+ case xmlAccess::MERGE_GUI:
+ case xmlAccess::MERGE_GUI_BATCH:
+ loadConfiguration(droppedFiles);
+ return;
- //clear grids
- gridDataView->clearAllRows();
- updateGuiGrid();
+ case xmlAccess::MERGE_OTHER:
+ break;
+ }
event.Skip();
+
}
@@ -2832,38 +2421,42 @@ void MainDialog::OnClose(wxCloseEvent& event)
}
-void MainDialog::OnCheckRows(FFSCheckRowsEvent& event)
+void MainDialog::onCheckRows(CheckRowsEvent& event)
{
- const int lowerBound = std::max(std::min(event.rowFrom, event.rowTo), 0);
- const int upperBound = std::min(std::max(event.rowFrom, event.rowTo), static_cast<int>(gridDataView->rowsOnView()) - 1);
+ const int rowFirst = std::min(event.rowFrom_, event.rowTo_); // [rowFirst, rowLast)
+ int rowLast = std::max(event.rowFrom_, event.rowTo_) + 1; //
+ rowLast = std::min(rowLast, static_cast<int>(gridDataView->rowsOnView())); //consider dummy rows
+
+ if (0 <= rowFirst && rowFirst < rowLast)
+ {
+ std::set<size_t> selectedRows;
+ for (int i = rowFirst; i < rowLast; ++i)
+ selectedRows.insert(i);
- std::set<size_t> selectedRowsOnView;
- for (int i = lowerBound; i <= upperBound; ++i)
- selectedRowsOnView.insert(i);
+ std::vector<FileSystemObject*> objects;
+ gridDataView->getAllFileRef(selectedRows, objects);
- if (!selectedRowsOnView.empty())
- filterRangeManually(selectedRowsOnView, event.rowFrom);
+ setManualFilter(objects, event.setIncluded_);
+ }
}
-void MainDialog::OnSetSyncDirection(FFSSyncDirectionEvent& event)
+void MainDialog::onSetSyncDirection(SyncDirectionEvent& event)
{
- const int lowerBound = std::min(event.rowFrom, event.rowTo);
- const int upperBound = std::max(event.rowFrom, event.rowTo);
+ const int rowFirst = std::min(event.rowFrom_, event.rowTo_); // [rowFirst, rowLast)
+ int rowLast = std::max(event.rowFrom_, event.rowTo_) + 1; //
+ rowLast = std::min(rowLast, static_cast<int>(gridDataView->rowsOnView())); //consider dummy rows
- if (0 <= lowerBound)
+ if (0 <= rowFirst && rowFirst < rowLast)
{
- for (int i = lowerBound; i <= std::min(upperBound, int(gridDataView->rowsOnView()) - 1); ++i)
- {
- FileSystemObject* fsObj = gridDataView->getObject(i);
- if (fsObj)
- {
- setSyncDirectionRec(event.direction, *fsObj); //set new direction (recursively)
- zen::setActiveStatus(true, *fsObj); //works recursively for directories
- }
- }
+ std::set<size_t> selectedRows;
+ for (int i = rowFirst; i < rowLast; ++i)
+ selectedRows.insert(i);
+
+ std::vector<FileSystemObject*> objects;
+ gridDataView->getAllFileRef(selectedRows, objects);
- updateGuiGrid();
+ setSyncDirManually(objects, event.direction_);
}
}
@@ -2894,17 +2487,12 @@ void MainDialog::setLastUsedConfig(const std::vector<wxString>& filenames,
void MainDialog::setConfig(const xmlAccess::XmlGuiConfig& newGuiCfg)
{
+ clearGrid();
+
currentCfg = newGuiCfg;
//evaluate new settings...
- //disable the sync button
- syncPreview->enableSynchronization(false);
-
- //clear grids
- gridDataView->clearAllRows();
- updateGuiGrid();
-
//(re-)set view filter buttons
initViewFilterButtons();
@@ -2930,7 +2518,7 @@ void MainDialog::setConfig(const xmlAccess::XmlGuiConfig& newGuiCfg)
//read GUI layout
m_checkBoxHideFilt->SetValue(currentCfg.hideFilteredElements);
- syncPreview->enablePreview(currentCfg.syncPreviewEnabled);
+ enablePreview(currentCfg.syncPreviewEnabled);
//###########################################################
//update compare variant name
@@ -2972,7 +2560,7 @@ xmlAccess::XmlGuiConfig MainDialog::getConfig() const
std::back_inserter(guiCfg.mainCfg.additionalPairs), getEnhancedPair);
//sync preview
- guiCfg.syncPreviewEnabled = syncPreview->previewIsEnabled();
+ guiCfg.syncPreviewEnabled = syncPreviewEnabled;
return guiCfg;
}
@@ -2985,27 +2573,18 @@ const wxString& MainDialog::lastRunConfigName()
}
-void MainDialog::refreshGridAfterFilterChange(int delay)
+void MainDialog::updateGuiAfterFilterChange(int delay)
{
//signal UI that grids need to be refreshed on next Update()
- m_gridLeft ->ForceRefresh();
- m_gridMiddle->ForceRefresh();
- m_gridRight ->ForceRefresh();
-
- m_gridLeft ->Update(); //
- m_gridMiddle->Update(); //show changes resulting from ForceRefresh() - required for last, possibly half-visible, row only
- m_gridRight ->Update(); //
if (currentCfg.hideFilteredElements)
{
+ m_gridMain->Refresh();
+ m_gridMain->Update();
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();
+
+ updateGui();
}
@@ -3016,11 +2595,7 @@ void MainDialog::OnHideFilteredButton(wxCommandEvent& event)
//make sure, checkbox and "hideFiltered" are in sync
m_checkBoxHideFilt->SetValue(currentCfg.hideFilteredElements);
- m_gridLeft->ClearSelection();
- m_gridRight->ClearSelection();
- updateGuiGrid();
-
- // event.Skip();
+ updateGui();
}
@@ -3030,132 +2605,125 @@ void MainDialog::OnConfigureFilter(wxCommandEvent& event)
currentCfg.mainCfg.globalFilter) == ReturnSmallDlg::BUTTON_OKAY)
{
updateFilterButtons(); //refresh global filter icon
- updateFilterConfig(); //re-apply filter
+ applyFilterConfig(); //re-apply filter
}
//event.Skip()
}
-void MainDialog::OnGlobalFilterOpenContext(wxCommandEvent& event)
+void MainDialog::OnGlobalFilterContext(wxCommandEvent& event)
{
- contextMenu.reset(new wxMenu); //re-create context menu
-
- wxMenuItem* itemClear = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Clear filter settings"));
- contextMenu->Append(itemClear);
- contextMenu->Connect(itemClear->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnGlobalFilterRemConfirm), NULL, this);
-
- if (isNullFilter(currentCfg.mainCfg.globalFilter))
- contextMenu->Enable(itemClear->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway
-
- PopupMenu(contextMenu.get()); //show context menu
-}
+ ContextMenu menu;
+ auto clearFilter = [&]
+ {
+ currentCfg.mainCfg.globalFilter = FilterConfig();
-void MainDialog::OnGlobalFilterRemConfirm(wxCommandEvent& event)
-{
- currentCfg.mainCfg.globalFilter = FilterConfig();
+ updateFilterButtons(); //refresh global filter icon
+ applyFilterConfig(); //re-apply filter
+ };
+ menu.addItem( _("Clear filter settings"), clearFilter, NULL, !isNullFilter(currentCfg.mainCfg.globalFilter));
- updateFilterButtons(); //refresh global filter icon
- updateFilterConfig(); //re-apply filter
+ menu.popup(*this);
}
void MainDialog::OnLeftOnlyFiles(wxCommandEvent& event)
{
m_bpButtonLeftOnly->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnLeftNewerFiles(wxCommandEvent& event)
{
m_bpButtonLeftNewer->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnDifferentFiles(wxCommandEvent& event)
{
m_bpButtonDifferent->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnRightNewerFiles(wxCommandEvent& event)
{
m_bpButtonRightNewer->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnRightOnlyFiles(wxCommandEvent& event)
{
m_bpButtonRightOnly->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnEqualFiles(wxCommandEvent& event)
{
m_bpButtonEqual->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnConflictFiles(wxCommandEvent& event)
{
m_bpButtonConflict->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnSyncCreateLeft(wxCommandEvent& event)
{
m_bpButtonSyncCreateLeft->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnSyncCreateRight(wxCommandEvent& event)
{
m_bpButtonSyncCreateRight->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnSyncDeleteLeft(wxCommandEvent& event)
{
m_bpButtonSyncDeleteLeft->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnSyncDeleteRight(wxCommandEvent& event)
{
m_bpButtonSyncDeleteRight->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnSyncDirLeft(wxCommandEvent& event)
{
m_bpButtonSyncDirOverwLeft->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnSyncDirRight(wxCommandEvent& event)
{
m_bpButtonSyncDirOverwRight->toggle();
- updateGuiGrid();
+ updateGui();
}
void MainDialog::OnSyncDirNone(wxCommandEvent& event)
{
m_bpButtonSyncDirNone->toggle();
- updateGuiGrid();
+ updateGui();
}
@@ -3163,7 +2731,9 @@ inline
wxBitmap buttonPressed(const std::string& name)
{
wxBitmap background = GlobalResources::getImage(wxT("buttonPressed"));
- return layOver(GlobalResources::getImage(utf8CvrtTo<wxString>(name)), background);
+ return mirrorIfRtl(
+ layOver(
+ GlobalResources::getImage(utf8CvrtTo<wxString>(name)), background));
}
@@ -3174,7 +2744,7 @@ wxBitmap buttonReleased(const std::string& name)
zen::move(output, 0, -1); //move image right one pixel
brighten(output, 80);
- return output;
+ return mirrorIfRtl(output);
}
@@ -3290,11 +2860,11 @@ void MainDialog::updateFilterButtons()
firstFolderPair->refreshButtons();
//update folder pairs
- for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
+ std::for_each(additionalFolderPairs.begin(), additionalFolderPairs.end(),
+ [&](DirectoryPair* dirPair)
{
- DirectoryPair* dirPair = *i;
dirPair->refreshButtons();
- }
+ });
}
@@ -3305,9 +2875,8 @@ void MainDialog::OnCompare(wxCommandEvent& event)
wxBusyCursor dummy; //show hourglass cursor
+ clearGrid(false); //-> don't resize grid to keep scroll position!
//prevent temporary memory peak by clearing old result list
- gridDataView->clearAllRows();
- //updateGuiGrid(); -> don't resize grid to keep scroll position!
try
{
@@ -3332,10 +2901,7 @@ void MainDialog::OnCompare(wxCommandEvent& event)
statusHandler);
//technical representation of comparison data
- zen::FolderComparison newCompareData;
- compProc.startCompareProcess(cmpConfig, newCompareData);
-
- gridDataView->setData(newCompareData); //newCompareData is invalidated after this call
+ compProc.startCompareProcess(cmpConfig, folderCmp); //throw
//play (optional) sound notification after sync has completed (GUI and batch mode)
const wxString soundFile = toWx(zen::getResourceDir()) + wxT("Compare_Complete.wav");
@@ -3344,76 +2910,60 @@ void MainDialog::OnCompare(wxCommandEvent& event)
}
catch (GuiAbortProcess&)
{
- //disable the sync button
- syncPreview->enableSynchronization(false);
if (m_buttonCompare->IsShownOnScreen()) m_buttonCompare->SetFocus();
- updateGuiGrid(); //refresh grid in ANY case! (also on abort)
+ updateGui(); //refresh grid in ANY case! (also on abort)
return;
}
- //once compare is finished enable the sync button
- syncPreview->enableSynchronization(true);
- if (m_buttonStartSync->IsShownOnScreen()) m_buttonStartSync->SetFocus();
-
- //hide sort direction indicator on GUI grids
- m_gridLeft ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
- m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
- m_gridRight ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
+ gridDataView->setData(folderCmp); //update view on data
+ treeDataView->setData(folderCmp); //
+ updateGui();
+ updateSyncEnabledStatus(); //enable the sync button
- //reset last sort selection: used for determining sort direction
- lastSortColumn = -1;
- lastSortGrid = NULL;
+ if (m_buttonStartSync->IsShownOnScreen())
+ m_buttonStartSync->SetFocus();
- m_gridLeft-> ClearSelection();
- m_gridMiddle->ClearSelection();
- m_gridRight-> ClearSelection();
+ gridview::clearSelection(*m_gridMain);
+ m_gridNavi->clearSelection();
//add to folder history after successful comparison only
folderHistoryLeft ->addItem(toZ(m_directoryLeft->GetValue()));
folderHistoryRight->addItem(toZ(m_directoryRight->GetValue()));
- //refresh grid in ANY case! (also on abort)
- updateGuiGrid();
-
//prepare status information
- if (allElementsEqual(gridDataView->getDataTentative()))
+ if (allElementsEqual(folderCmp))
pushStatusInformation(_("All directories in sync!"));
}
-void MainDialog::updateGuiGrid()
+void MainDialog::updateGui()
{
- wxWindowUpdateLocker dummy(m_panelStatusBar); //avoid display distortion
-
updateGridViewData(); //update gridDataView and write status information
- //all three grids retrieve their data directly via gridDataView
- //the only thing left to do is notify the grids to updafte their sizes (nr of rows), since this has to be communicated by the grids via messages
- m_gridLeft ->updateGridSizes();
- m_gridMiddle->updateGridSizes();
- m_gridRight ->updateGridSizes();
-
- //support for column auto adjustment
- if (globalSettings->gui.autoAdjustColumnsLeft)
- m_gridLeft->autoSizeColumns();
- if (globalSettings->gui.autoAdjustColumnsRight)
- m_gridRight->autoSizeColumns();
-
//update sync preview statistics
updateStatistics();
auiMgr.Update(); //fix small display distortion, if view filter panel is empty
+}
- m_gridLeft ->Refresh();
- m_gridMiddle->Refresh();
- m_gridRight ->Refresh();
+
+void MainDialog::clearGrid(bool refreshGrid)
+{
+ folderCmp.clear();
+ gridDataView->setData(folderCmp);
+ treeDataView->setData(folderCmp);
+
+ updateSyncEnabledStatus();
+
+ if (refreshGrid)
+ updateGui();
}
void MainDialog::updateStatistics()
{
//update preview of bytes to be transferred:
- const SyncStatistics st(gridDataView->getDataTentative());
+ const SyncStatistics st(folderCmp);
const wxString toCreate = zen::toStringSep(st.getCreate());
const wxString toUpdate = zen::toStringSep(st.getUpdate());
const wxString toDelete = zen::toStringSep(st.getDelete());
@@ -3426,10 +2976,10 @@ void MainDialog::updateStatistics()
}
-void MainDialog::OnSwitchView(wxCommandEvent& event)
-{
- syncPreview->enablePreview(!syncPreview->previewIsEnabled());
-}
+//void MainDialog::OnSwitchView(wxCommandEvent& event)
+//{
+// enablePreview(!syncPreviewEnabled);
+//}
void MainDialog::OnSyncSettings(wxCommandEvent& event)
@@ -3449,33 +2999,29 @@ void MainDialog::OnSyncSettings(wxCommandEvent& event)
}
-void MainDialog::applyCompareConfig(bool globalLevel)
+void MainDialog::applyCompareConfig(bool changePreviewStatus)
{
//update compare variant name
m_staticTextCmpVariant->SetLabel(getConfig().mainCfg.getCompVariantName());
m_panelTopButtons->Layout(); //adapt layout for variant text
- if (globalLevel)
+ if (changePreviewStatus)
{
- //disable the sync button
- syncPreview->enableSynchronization(false);
-
- //clear grids
- gridDataView->clearAllRows();
- updateGuiGrid();
+ clearGrid();
//convenience: change sync view
switch (currentCfg.mainCfg.cmpConfig.compareVar)
{
case CMP_BY_TIME_SIZE:
- syncPreview->enablePreview(true);
+ enablePreview(true);
break;
case CMP_BY_CONTENT:
- syncPreview->enablePreview(false);
+ enablePreview(false);
break;
}
- if (m_buttonCompare->IsShownOnScreen()) m_buttonCompare->SetFocus();
+ if (m_buttonCompare->IsShownOnScreen())
+ m_buttonCompare->SetFocus();
}
}
@@ -3501,13 +3047,13 @@ void MainDialog::OnCmpSettings(wxCommandEvent& event)
void MainDialog::OnStartSync(wxCommandEvent& event)
{
- if (!syncPreview->synchronizationIsEnabled())
+ if (folderCmp.empty())
{
//quick sync: simulate button click on "compare"
wxCommandEvent dummy2(wxEVT_COMMAND_BUTTON_CLICKED);
m_buttonCompare->GetEventHandler()->ProcessEvent(dummy2); //synchronous call
- if (!syncPreview->synchronizationIsEnabled()) //check if user aborted or error occured, ect...
+ if (folderCmp.empty()) //check if user aborted or error occured, ect...
return;
//pushStatusInformation(_("Please run a Compare first before synchronizing!"));
//return;
@@ -3520,7 +3066,7 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
if (zen::showSyncPreviewDlg(
getConfig().mainCfg.getSyncVariantName(),
- zen::SyncStatistics(gridDataView->getDataTentative()),
+ zen::SyncStatistics(folderCmp),
dontShowAgain) != ReturnSmallDlg::BUTTON_OKAY)
return;
@@ -3545,15 +3091,13 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
guiCfg.mainCfg.onCompletion,
globalSettings->gui.onCompletionHistory);
- FolderComparison& dataToSync = gridDataView->getDataTentative();
-
//GUI mode: place directory locks on directories isolated(!) during both comparison and synchronization
LockHolder dummy2(true); //allow pw prompt
- for (auto i = begin(dataToSync); i != end(dataToSync); ++i)
+ for (auto iter = begin(folderCmp); iter != end(folderCmp); ++iter)
{
- dummy2.addDir(i->getBaseDirPf<LEFT_SIDE >(), statusHandler);
- dummy2.addDir(i->getBaseDirPf<RIGHT_SIDE>(), statusHandler);
+ dummy2.addDir(iter->getBaseDirPf<LEFT_SIDE >(), statusHandler);
+ dummy2.addDir(iter->getBaseDirPf<RIGHT_SIDE>(), statusHandler);
}
//start synchronization and mark all elements processed
@@ -3568,10 +3112,10 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
const std::vector<zen::FolderPairSyncCfg> syncProcessCfg = zen::extractSyncCfg(guiCfg.mainCfg);
//make sure syncProcessCfg and dataToSync have same size and correspond!
- if (syncProcessCfg.size() != dataToSync.size())
+ if (syncProcessCfg.size() != folderCmp.size())
throw std::logic_error("Programming Error: Contract violation!"); //should never happen: sync button is deactivated if they are not in sync
- syncProc.startSynchronizationProcess(syncProcessCfg, dataToSync);
+ syncProc.startSynchronizationProcess(syncProcessCfg, folderCmp);
//play (optional) sound notification after sync has completed (GUI and batch mode)
const wxString soundFile = toWx(zen::getResourceDir()) + wxT("Sync_Complete.wav");
@@ -3586,173 +3130,51 @@ void MainDialog::OnStartSync(wxCommandEvent& event)
//remove rows that empty: just a beautification, invalid rows shouldn't cause issues
gridDataView->removeInvalidRows();
- updateGuiGrid();
-
- m_gridLeft-> ClearSelection();
- m_gridMiddle->ClearSelection();
- m_gridRight-> ClearSelection();
+ updateGui();
}
-void MainDialog::OnLeftGridDoubleClick(wxGridEvent& event)
+void MainDialog::onGridDoubleClick(GridClickEvent& event)
{
if (!globalSettings->gui.externelApplications.empty())
- openExternalApplication(event.GetRow(), true, globalSettings->gui.externelApplications[0].second);
- // event.Skip();
+ openExternalApplication(gridDataView->getObject(event.row_), //optional
+ event.compPos_ == gridview::COMP_LEFT,
+ globalSettings->gui.externelApplications[0].second);
}
-void MainDialog::OnRightGridDoubleClick(wxGridEvent& event)
+void MainDialog::onGridLabelLeftClick(GridClickEvent& event)
{
- if (!globalSettings->gui.externelApplications.empty())
- openExternalApplication(event.GetRow(), false, globalSettings->gui.externelApplications[0].second);
- // event.Skip();
-}
-
-
-void MainDialog::OnSortLeftGrid(wxGridEvent& event)
-{
- //determine direction for std::sort()
- const int currentSortColumn = event.GetCol();
- if (0 <= currentSortColumn && currentSortColumn < int(xmlAccess::COLUMN_TYPE_COUNT))
+ auto sortSide = [&](bool onLeft)
{
- static bool sortDefault = true;
- if (lastSortColumn != currentSortColumn || lastSortGrid != m_gridLeft)
- sortDefault = true;
- else
- sortDefault = !sortDefault;
-
- lastSortColumn = currentSortColumn;
- lastSortGrid = m_gridLeft;
-
- GridView::SortType st = GridView::SORT_BY_REL_NAME;
-
- const xmlAccess::ColumnTypes columnType = m_gridLeft->getTypeAtPos(currentSortColumn);
- switch (columnType)
- {
- case xmlAccess::FULL_PATH:
- st = GridView::SORT_BY_REL_NAME;
- break;
- case xmlAccess::FILENAME:
- st = GridView::SORT_BY_FILENAME;
- break;
- case xmlAccess::REL_PATH:
- st = GridView::SORT_BY_REL_NAME;
- break;
- case xmlAccess::DIRECTORY:
- st = GridView::SORT_BY_DIRECTORY;
- break;
- case xmlAccess::SIZE:
- st = GridView::SORT_BY_FILESIZE;
- break;
- case xmlAccess::DATE:
- st = GridView::SORT_BY_DATE;
- break;
- case xmlAccess::EXTENSION:
- st = GridView::SORT_BY_EXTENSION;
- break;
- }
-
- const bool sortAscending = sortDefault ?
- GridView::getDefaultDirection(st) :
- !GridView::getDefaultDirection(st);
-
- gridDataView->sortView(st, true, sortAscending);
+ auto sortInfo = gridDataView->getSortInfo();
- //set sort direction indicator on UI
- 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));
+ ColumnTypeRim type = static_cast<ColumnTypeRim>(event.colType_);
- updateGuiGrid(); //refresh gridDataView
- }
-}
+ bool sortAscending = GridView::getDefaultSortDirection(type);
+ if (sortInfo && sortInfo->onLeft_ == onLeft && sortInfo->type_ == type)
+ sortAscending = !sortInfo->ascending_;
+ gridDataView->sortView(type, onLeft, sortAscending);
-void MainDialog::OnSortMiddleGrid(wxGridEvent& event)
-{
- //sorting middle grid is more or less useless: therefore let's toggle view instead!
- syncPreview->enablePreview(!syncPreview->previewIsEnabled()); //toggle view
-
- // //determine direction for std::sort()
- // static bool sortDefault = true;
- // if (lastSortColumn != 0 || lastSortGrid != m_gridMiddle)
- // sortDefault = true;
- // else
- // sortDefault = !sortDefault;
- // lastSortColumn = 0;
- // lastSortGrid = m_gridMiddle;
- //
- // //start sort
- // if (syncPreview->previewIsEnabled())
- // gridDataView->sortView(GridView::SORT_BY_SYNC_DIRECTION, true, sortDefault);
- // else
- // gridDataView->sortView(GridView::SORT_BY_CMP_RESULT, true, sortDefault);
- //
- // updateGuiGrid(); //refresh gridDataView
- //
- // //set sort direction indicator on UI
- // m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
- // m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING));
- // m_gridMiddle->setSortMarker(CustomGrid::SortMarker(0, sortDefault ? CustomGrid::ASCENDING : CustomGrid::DESCENDING));
-}
-
+ gridview::clearSelection(*m_gridMain);
+ updateGui(); //refresh gridDataView
+ };
-void MainDialog::OnSortRightGrid(wxGridEvent& event)
-{
- //determine direction for std::sort()
- const int currentSortColumn = event.GetCol();
- if (0 <= currentSortColumn && currentSortColumn < int(xmlAccess::COLUMN_TYPE_COUNT))
+ switch (event.compPos_)
{
- static bool sortDefault = true;
- if (lastSortColumn != currentSortColumn || lastSortGrid != m_gridRight)
- sortDefault = true;
- else
- sortDefault = !sortDefault;
-
- lastSortColumn = currentSortColumn;
- lastSortGrid = m_gridRight;
-
- GridView::SortType st = GridView::SORT_BY_REL_NAME;
-
- const xmlAccess::ColumnTypes columnType = m_gridRight->getTypeAtPos(currentSortColumn);
- switch (columnType)
- {
- case xmlAccess::FULL_PATH:
- st = GridView::SORT_BY_REL_NAME;
- break;
- case xmlAccess::FILENAME:
- st = GridView::SORT_BY_FILENAME;
- break;
- case xmlAccess::REL_PATH:
- st = GridView::SORT_BY_REL_NAME;
- break;
- case xmlAccess::DIRECTORY:
- st = GridView::SORT_BY_DIRECTORY;
- break;
- case xmlAccess::SIZE:
- st = GridView::SORT_BY_FILESIZE;
- break;
- case xmlAccess::DATE:
- st = GridView::SORT_BY_DATE;
- break;
- case xmlAccess::EXTENSION:
- st = GridView::SORT_BY_EXTENSION;
- break;
- }
-
- const bool sortAscending = sortDefault ?
- GridView::getDefaultDirection(st) :
- !GridView::getDefaultDirection(st);
-
- gridDataView->sortView(st, false, sortAscending);
+ case gridview::COMP_LEFT:
+ sortSide(true);
+ break;
- //set sort direction indicator on UI
- 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));
+ case gridview::COMP_MIDDLE:
+ //sorting middle grid is more or less useless: therefore let's toggle view instead!
+ enablePreview(!syncPreviewEnabled); //toggle view
+ break;
- updateGuiGrid(); //refresh gridDataView
+ case gridview::COMP_RIGHT:
+ sortSide(false);
+ break;
}
}
@@ -3767,9 +3189,9 @@ void MainDialog::OnSwapSides(wxCommandEvent& event)
firstFolderPair->getAltFilterConfig());
//additional pairs
- for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i)
+ for (auto iter = additionalFolderPairs.begin(); iter != additionalFolderPairs.end(); ++iter)
{
- DirectoryPair* dirPair = *i;
+ DirectoryPair* dirPair = *iter;
dirPair->setValues(dirPair->getRightDir(), // swap directories
dirPair->getLeftDir(), //
dirPair->getAltCompConfig(),
@@ -3786,7 +3208,6 @@ void MainDialog::OnSwapSides(wxCommandEvent& event)
m_bpButtonLeftNewer->setActive(m_bpButtonRightNewer->isActive());
m_bpButtonRightNewer->setActive(tmp);
-
tmp = m_bpButtonSyncCreateLeft->isActive();
m_bpButtonSyncCreateLeft->setActive(m_bpButtonSyncCreateRight->isActive());
m_bpButtonSyncCreateRight->setActive(tmp);
@@ -3800,8 +3221,9 @@ void MainDialog::OnSwapSides(wxCommandEvent& event)
m_bpButtonSyncDirOverwRight->setActive(tmp);
//swap grid information
- zen::swapGrids(getConfig().mainCfg, gridDataView->getDataTentative());
- updateGuiGrid();
+ zen::swapGrids(getConfig().mainCfg, folderCmp);
+
+ updateGui();
}
@@ -3832,7 +3254,7 @@ void MainDialog::updateGridViewData()
m_bpButtonSyncDirNone-> Show(false);
- if (syncPreview->previewIsEnabled())
+ if (syncPreviewEnabled)
{
const GridView::StatusSyncPreview result = gridDataView->updateSyncPreview(currentCfg.hideFilteredElements,
m_bpButtonSyncCreateLeft-> isActive(),
@@ -3844,7 +3266,6 @@ void MainDialog::updateGridViewData()
m_bpButtonSyncDirNone-> isActive(),
m_bpButtonEqual-> isActive(),
m_bpButtonConflict-> isActive());
-
filesOnLeftView = result.filesOnLeftView;
foldersOnLeftView = result.foldersOnLeftView;
filesOnRightView = result.filesOnRightView;
@@ -3891,7 +3312,6 @@ void MainDialog::updateGridViewData()
m_bpButtonDifferent-> isActive(),
m_bpButtonEqual-> isActive(),
m_bpButtonConflict-> isActive());
-
filesOnLeftView = result.filesOnLeftView;
foldersOnLeftView = result.foldersOnLeftView;
filesOnRightView = result.filesOnRightView;
@@ -3922,43 +3342,73 @@ void MainDialog::updateGridViewData()
else
m_panelViewFilter->Hide();
}
+ //all three grids retrieve their data directly via gridDataView
+ m_gridMain->Refresh();
+
+ //navigation tree
+ if (syncPreviewEnabled)
+ treeDataView->updateSyncPreview(currentCfg.hideFilteredElements,
+ m_bpButtonSyncCreateLeft-> isActive(),
+ m_bpButtonSyncCreateRight-> isActive(),
+ m_bpButtonSyncDeleteLeft-> isActive(),
+ m_bpButtonSyncDeleteRight-> isActive(),
+ m_bpButtonSyncDirOverwLeft-> isActive(),
+ m_bpButtonSyncDirOverwRight->isActive(),
+ m_bpButtonSyncDirNone-> isActive(),
+ m_bpButtonEqual-> isActive(),
+ m_bpButtonConflict-> isActive());
+ else
+ treeDataView->updateCmpResult(currentCfg.hideFilteredElements,
+ m_bpButtonLeftOnly-> isActive(),
+ m_bpButtonRightOnly-> isActive(),
+ m_bpButtonLeftNewer-> isActive(),
+ m_bpButtonRightNewer->isActive(),
+ m_bpButtonDifferent-> isActive(),
+ m_bpButtonEqual-> isActive(),
+ m_bpButtonConflict-> isActive());
+ m_gridNavi->Refresh();
+
+
+ //status bar
+ wxWindowUpdateLocker dummy(m_panelStatusBar); //avoid display distortion
- //clear status information
clearStatusBar();
//#################################################
- //format numbers to text:
-
- //show status information on "root" level.
+ //update status information
bSizerStatusLeftDirectories->Show(foldersOnLeftView > 0);
bSizerStatusLeftFiles ->Show(filesOnLeftView > 0);
- setText(*m_staticTextStatusLeftDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnLeftView), L"%x", zen::toStringSep(foldersOnLeftView), false));
- setText(*m_staticTextStatusLeftFiles, replaceCpy(_P("1 file", "%x files", filesOnLeftView), L"%x", zen::toStringSep(filesOnLeftView), false));
- setText(*m_staticTextStatusLeftBytes, zen::filesizeToShortString(to<Int64>(filesizeLeftView)));
+ setText(*m_staticTextStatusLeftDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnLeftView), L"%x", toStringSep(foldersOnLeftView), false));
+ setText(*m_staticTextStatusLeftFiles, replaceCpy(_P("1 file", "%x files", filesOnLeftView), L"%x", toStringSep(filesOnLeftView), false));
+ setText(*m_staticTextStatusLeftBytes, filesizeToShortString(to<Int64>(filesizeLeftView)));
{
- wxString statusMiddleNew = _P("%x of 1 row in view", "%x of %y rows in view", gridDataView->rowsTotal());
- replace(statusMiddleNew, L"%x", toStringSep(gridDataView->rowsOnView()), false);
- replace(statusMiddleNew, L"%y", toStringSep(gridDataView->rowsTotal()), false);
+ wxString statusMiddleNew;
+ if (gridDataView->rowsTotal() > 0)
+ {
+ statusMiddleNew = _P("%x of 1 row in view", "%x of %y rows in view", gridDataView->rowsTotal());
+ replace(statusMiddleNew, L"%x", toStringSep(gridDataView->rowsOnView()), false);
+ replace(statusMiddleNew, L"%y", toStringSep(gridDataView->rowsTotal ()), false);
+ }
setText(*m_staticTextStatusMiddle, statusMiddleNew);
}
bSizerStatusRightDirectories->Show(foldersOnRightView > 0);
bSizerStatusRightFiles ->Show(filesOnRightView > 0);
- setText(*m_staticTextStatusRightDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnRightView), L"%x", zen::toStringSep(foldersOnRightView), false));
- setText(*m_staticTextStatusRightFiles, replaceCpy(_P("1 file", "%x files", filesOnRightView), L"%x", zen::toStringSep(filesOnRightView), false));
- setText(*m_staticTextStatusRightBytes, zen::filesizeToShortString(to<Int64>(filesizeRightView)));
+ setText(*m_staticTextStatusRightDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnRightView), L"%x", toStringSep(foldersOnRightView), false));
+ setText(*m_staticTextStatusRightFiles, replaceCpy(_P("1 file", "%x files", filesOnRightView), L"%x", toStringSep(filesOnRightView), false));
+ setText(*m_staticTextStatusRightBytes, filesizeToShortString(to<Int64>(filesizeRightView)));
m_panelStatusBar->Layout();
}
-void MainDialog::updateFilterConfig()
+void MainDialog::applyFilterConfig()
{
- applyFiltering(gridDataView->getDataTentative(), getConfig().mainCfg);
- refreshGridAfterFilterChange(400);
+ applyFiltering(folderCmp, getConfig().mainCfg);
+ updateGuiAfterFilterChange(400);
}
@@ -3968,32 +3418,19 @@ void MainDialog::applySyncConfig()
m_staticTextSyncVariant->SetLabel(getConfig().mainCfg.getSyncVariantName());
m_panelTopButtons->Layout(); //adapt layout for variant text
-
- class RedetermineCallback : public DeterminationProblem
+ zen::redetermineSyncDirection(getConfig().mainCfg, folderCmp,
+ [&](const std::wstring& warning)
{
- public:
- RedetermineCallback(bool& warningSyncDatabase, wxWindow* parent) :
- warningSyncDatabase_(warningSyncDatabase),
- parent_(parent) {}
-
- virtual void reportWarning(const std::wstring& text)
+ bool& warningActive = globalSettings->optDialogs.warningSyncDatabase;
+ if (warningActive)
{
- if (warningSyncDatabase_)
- {
- bool dontWarnAgain = false;
- if (showWarningDlg(ReturnWarningDlg::BUTTON_IGNORE,
- text,
- dontWarnAgain) == ReturnWarningDlg::BUTTON_IGNORE)
- warningSyncDatabase_ = !dontWarnAgain;
- }
+ bool dontWarnAgain = false;
+ if (showWarningDlg(ReturnWarningDlg::BUTTON_IGNORE, warning, dontWarnAgain) == ReturnWarningDlg::BUTTON_IGNORE)
+ warningActive = !dontWarnAgain;
}
- private:
- bool& warningSyncDatabase_;
- wxWindow* parent_;
- } redetCallback(globalSettings->optDialogs.warningSyncDatabase, this);
+ });
- zen::redetermineSyncDirection(getConfig().mainCfg, gridDataView->getDataTentative(), &redetCallback);
- updateGuiGrid();
+ updateGui();
}
@@ -4019,7 +3456,7 @@ void MainDialog::OnAddFolderPair(wxCommandEvent& event)
void MainDialog::OnRemoveTopFolderPair(wxCommandEvent& event)
{
- if (additionalFolderPairs.size() > 0)
+ if (!additionalFolderPairs.empty())
{
wxWindowUpdateLocker dummy(this); //avoid display distortion
@@ -4054,15 +3491,17 @@ void MainDialog::OnRemoveFolderPair(wxCommandEvent& event)
void MainDialog::updateGuiForFolderPair()
{
+ wxWindowUpdateLocker dummy(this);
+
//adapt delete top folder pair button
- if (additionalFolderPairs.size() == 0)
+ if (additionalFolderPairs.empty())
m_bpButtonRemovePair->Hide();
else
m_bpButtonRemovePair->Show();
m_panelTopLeft->Layout();
//adapt local filter and sync cfg for first folder pair
- if (additionalFolderPairs.size() == 0 &&
+ if (additionalFolderPairs.empty() &&
firstFolderPair->getAltCompConfig().get() == NULL &&
firstFolderPair->getAltSyncConfig().get() == NULL &&
isNullFilter(firstFolderPair->getAltFilterConfig()))
@@ -4071,7 +3510,7 @@ void MainDialog::updateGuiForFolderPair()
m_bpButtonAltSyncCfg ->Hide();
m_bpButtonLocalFilter->Hide();
- setImage(*m_bpButtonSwapSides, GlobalResources::getImage(wxT("swap")));
+ setImage(*m_bpButtonSwapSides, GlobalResources::getImage(L"swap"));
}
else
{
@@ -4079,13 +3518,13 @@ void MainDialog::updateGuiForFolderPair()
m_bpButtonAltSyncCfg ->Show();
m_bpButtonLocalFilter->Show();
- setImage(*m_bpButtonSwapSides, GlobalResources::getImage(wxT("swapSlim")));
+ setImage(*m_bpButtonSwapSides, GlobalResources::getImage(L"swapSlim"));
}
m_panelTopMiddle->Layout();
int addPairMinimalHeight = 0;
int addPairOptimalHeight = 0;
- if (additionalFolderPairs.size() > 0)
+ if (!additionalFolderPairs.empty())
{
int pairHeight = additionalFolderPairs[0]->GetSize().GetHeight();
addPairMinimalHeight = std::min<double>(1.5, additionalFolderPairs.size()) * pairHeight; //have 0.5 * height indicate that more folders are there
@@ -4097,7 +3536,9 @@ void MainDialog::updateGuiForFolderPair()
//########################################################################################################################
//wxAUI hack: set minimum height to desired value, then call wxAuiPaneInfo::Fixed() to apply it
- auiMgr.GetPane(m_panelDirectoryPairs).MinSize(-1, m_panelTopLeft->GetSize().GetHeight() + addPairOptimalHeight);
+ const int panelNewHeight = m_panelDirectoryPairs->ClientToWindowSize(m_panelTopLeft->GetSize()).GetHeight(); //respect m_panelDirectoryPairs window borders!
+
+ auiMgr.GetPane(m_panelDirectoryPairs).MinSize(-1, panelNewHeight + addPairOptimalHeight);
auiMgr.GetPane(m_panelDirectoryPairs).Fixed();
auiMgr.Update();
@@ -4120,7 +3561,9 @@ void MainDialog::updateGuiForFolderPair()
void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool addFront)
{
wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion
- wxWindowUpdateLocker dummy2(m_panelGrids); //
+ //wxWindowUpdateLocker dummy2(m_panelGrids); //
+
+ std::vector<DirectoryPair*> newEntries;
std::for_each(newPairs.begin(), newPairs.end(),
[&](const FolderPairEnh& enhPair)
@@ -4136,45 +3579,43 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool
const int width = m_panelTopLeft->GetSize().GetWidth();
newPair->m_panelLeft->SetMinSize(wxSize(width, -1));
-
if (addFront)
{
- bSizerAddFolderPairs->Insert(0, newPair, 0, wxEXPAND, 5);
+ bSizerAddFolderPairs->Insert(0, newPair, 0, wxEXPAND);
additionalFolderPairs.insert(additionalFolderPairs.begin(), newPair);
}
else
{
- bSizerAddFolderPairs->Add(newPair, 0, wxEXPAND, 5);
+ bSizerAddFolderPairs->Add(newPair, 0, wxEXPAND);
additionalFolderPairs.push_back(newPair);
}
+ newEntries.push_back(newPair);
//register events
newPair->m_bpButtonRemovePair->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainDialog::OnRemoveFolderPair), NULL, this);
-
- //set alternate configuration
- newPair->setValues(toWx(enhPair.leftDirectory),
- toWx(enhPair.rightDirectory),
- enhPair.altCmpConfig,
- enhPair.altSyncConfig,
- enhPair.localFilter);
});
+ //wxComboBox screws up miserably if width/height is smaller than the magic number 4! Problem occurs when trying to set tooltip
+ //so we have to update window sizes before setting configuration
updateGuiForFolderPair();
- //disable the sync button
- syncPreview->enableSynchronization(false);
+ for (auto iter = newPairs.begin(); iter != newPairs.end(); ++iter)//set alternate configuration
+ newEntries[iter - newPairs.begin()]->setValues(toWx(iter->leftDirectory),
+ toWx(iter->rightDirectory),
+ iter->altCmpConfig,
+ iter->altSyncConfig,
+ iter->localFilter);
- //clear grids
- gridDataView->clearAllRows();
+ clearGrid();
applySyncConfig(); //mainly to update sync dir description text
- applyCompareConfig(false); //false: not global level
+ applyCompareConfig(false); //false: do not change preview status
}
void MainDialog::removeAddFolderPair(size_t pos)
{
wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion
- wxWindowUpdateLocker dummy2(m_panelGrids); //
+ //wxWindowUpdateLocker dummy2(m_panelGrids); //
if (pos < additionalFolderPairs.size())
{
@@ -4201,19 +3642,16 @@ void MainDialog::removeAddFolderPair(size_t pos)
//------------------------------------------------------------------
//disable the sync button
- syncPreview->enableSynchronization(false);
-
- //clear grids
- gridDataView->clearAllRows();
+ clearGrid();
applySyncConfig(); //mainly to update sync dir description text
- applyCompareConfig(false); //false: not global level
+ applyCompareConfig(false); //false: do not change preview status
}
void MainDialog::clearAddFolderPairs()
{
wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion
- wxWindowUpdateLocker dummy2(m_panelGrids); //
+ //wxWindowUpdateLocker dummy2(m_panelGrids); //
additionalFolderPairs.clear();
bSizerAddFolderPairs->Clear(true);
@@ -4229,20 +3667,6 @@ void MainDialog::clearAddFolderPairs()
void MainDialog::OnMenuGlobalSettings(wxCommandEvent& event)
{
zen::showGlobalSettingsDlg(*globalSettings);
-
- //event.Skip();
-}
-
-namespace
-{
-inline
-void addCellValue(zxString& exportString, const wxString& cellVal)
-{
- if (cellVal.find(wxT(';')) != wxString::npos)
- exportString += wxT('\"') + copyStringTo<zxString>(cellVal) + wxT('\"');
- else
- exportString += copyStringTo<zxString>(cellVal);
-}
}
@@ -4265,7 +3689,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event)
//write legend
exportString += copyStringTo<zxString>(_("Legend")) + wxT('\n');
- if (syncPreview->previewIsEnabled())
+ if (syncPreviewEnabled)
{
exportString += wxT("\"") + copyStringTo<zxString>(getSyncOpDescription(SO_EQUAL)) + wxT("\";") + copyStringTo<zxString>(getSymbol(SO_EQUAL)) + wxT('\n');
exportString += wxT("\"") + copyStringTo<zxString>(getSyncOpDescription(SO_CREATE_NEW_LEFT)) + wxT("\";") + copyStringTo<zxString>(getSymbol(SO_CREATE_NEW_LEFT)) + wxT('\n');
@@ -4289,70 +3713,98 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event)
}
exportString += wxT('\n');
- //write header
- const int colsLeft = m_gridLeft->GetNumberCols();
- for (int k = 0; k < colsLeft; ++k)
+ auto addCellValue = [&](const wxString& val)
{
- addCellValue(exportString, m_gridLeft->GetColLabelValue(k));
- exportString += wxT(';');
- }
+ if (val.find(wxT(';')) != wxString::npos)
+ exportString += wxT('\"') + copyStringTo<zxString>(val) + wxT('\"');
+ else
+ exportString += copyStringTo<zxString>(val);
+ };
- const int colsMiddle = m_gridMiddle->GetNumberCols();
- for (int k = 0; k < colsMiddle; ++k)
- {
- addCellValue(exportString, m_gridMiddle->GetColLabelValue(k));
- exportString += wxT(';');
- }
+ //write header
+ auto provLeft = m_gridMain->getDataProvider(gridview::COMP_LEFT);
+ auto provMiddle = m_gridMain->getDataProvider(gridview::COMP_MIDDLE);
+ auto provRight = m_gridMain->getDataProvider(gridview::COMP_RIGHT);
- const int colsRight = m_gridRight->GetNumberCols();
- for (int k = 0; k < colsRight; ++k)
- {
- addCellValue(exportString, m_gridRight->GetColLabelValue(k));
- if (k != m_gridRight->GetNumberCols() - 1)
- exportString += wxT(';');
- }
- exportString += wxT('\n');
+ auto colAttrLeft = m_gridMain->getColumnConfig(gridview::COMP_LEFT);
+ auto colAttrMiddle = m_gridMain->getColumnConfig(gridview::COMP_MIDDLE);
+ auto colAttrRight = m_gridMain->getColumnConfig(gridview::COMP_RIGHT);
+
+ vector_remove_if(colAttrLeft , [](const Grid::ColumnAttribute& ca) { return !ca.visible_; });
+ vector_remove_if(colAttrMiddle, [](const Grid::ColumnAttribute& ca) { return !ca.visible_; });
+ vector_remove_if(colAttrRight , [](const Grid::ColumnAttribute& ca) { return !ca.visible_; });
- //begin work
- const int rowsTotal = m_gridLeft->GetNumberRows();
- for (int i = 0; i < rowsTotal; ++i)
+ if (provLeft && provMiddle && provRight)
{
- for (int k = 0; k < colsLeft; ++k)
+ std::for_each(colAttrLeft.begin(), colAttrLeft.end(),
+ [&](const Grid::ColumnAttribute& ca)
{
- addCellValue(exportString, m_gridLeft->GetCellValue(i, k));
- exportString += wxT(';');
- }
-
- for (int k = 0; k < colsMiddle; ++k)
+ addCellValue(provLeft->getColumnLabel(ca.type_));
+ exportString += L';';
+ });
+ std::for_each(colAttrMiddle.begin(), colAttrMiddle.end(),
+ [&](const Grid::ColumnAttribute& ca)
+ {
+ addCellValue(provMiddle->getColumnLabel(ca.type_));
+ exportString += L';';
+ });
+ if (!colAttrRight.empty())
{
- addCellValue(exportString, m_gridMiddle->GetCellValue(i, k));
- exportString += wxT(';');
+ std::for_each(colAttrRight.begin(), colAttrRight.end() - 1,
+ [&](const Grid::ColumnAttribute& ca)
+ {
+ addCellValue(provRight->getColumnLabel(ca.type_));
+ exportString += L';';
+ });
+ addCellValue(provRight->getColumnLabel(colAttrRight.back().type_));
}
+ exportString += L'\n';
- for (int k = 0; k < colsRight; ++k)
+ //main grid
+ const size_t rowCount = m_gridMain->getRowCount();
+ for (size_t row = 0; row < rowCount; ++row)
{
- addCellValue(exportString, m_gridRight->GetCellValue(i, k));
- if (k != colsRight - 1)
- exportString += wxT(';');
+ std::for_each(colAttrLeft.begin(), colAttrLeft.end(),
+ [&](const Grid::ColumnAttribute& ca)
+ {
+ addCellValue(provLeft->getValue(row, ca.type_));
+ exportString += L';';
+ });
+ std::for_each(colAttrMiddle.begin(), colAttrMiddle.end(),
+ [&](const Grid::ColumnAttribute& ca)
+ {
+ addCellValue(provMiddle->getValue(row, ca.type_));
+ exportString += L';';
+ });
+ if (!colAttrRight.empty())
+ {
+ std::for_each(colAttrRight.begin(), colAttrRight.end() - 1,
+ [&](const Grid::ColumnAttribute& ca)
+ {
+ addCellValue(provRight->getValue(row, ca.type_));
+ exportString += L';';
+ });
+ addCellValue(provRight->getValue(row, colAttrRight.back().type_));
+ }
+ exportString += L'\n';
}
- exportString += wxT('\n');
- }
- //write export file
- wxFFile output(newFileName.c_str(), wxT("w")); //don't write in binary mode
- if (output.IsOpened())
- {
- //generate UTF8 representation
- size_t bufferSize = 0;
- const wxCharBuffer utf8buffer = wxConvUTF8.cWC2MB(exportString.c_str(), exportString.size(), &bufferSize);
+ //write export file
+ wxFFile output(newFileName.c_str(), wxT("w")); //don't write in binary mode
+ if (output.IsOpened())
+ {
+ //generate UTF8 representation
+ size_t bufferSize = 0;
+ const wxCharBuffer utf8buffer = wxConvUTF8.cWC2MB(exportString.c_str(), exportString.size(), &bufferSize);
- output.Write(BYTE_ORDER_MARK_UTF8, sizeof(BYTE_ORDER_MARK_UTF8) - 1);
- output.Write(utf8buffer, bufferSize);
- pushStatusInformation(_("File list exported!"));
- }
- else
- {
- wxMessageBox(wxString(_("Error writing file:")) + wxT(" \"") + newFileName + wxT("\""), _("Error"), wxOK | wxICON_ERROR);
+ output.Write(BYTE_ORDER_MARK_UTF8, sizeof(BYTE_ORDER_MARK_UTF8) - 1);
+ output.Write(utf8buffer, bufferSize);
+ pushStatusInformation(_("File list exported!"));
+ }
+ else
+ {
+ wxMessageBox(wxString(_("Error writing file:")) + wxT(" \"") + newFileName + wxT("\""), _("Error"), wxOK | wxICON_ERROR);
+ }
}
}
}
@@ -4456,49 +3908,28 @@ void MainDialog::OnMenuLanguageSwitch(wxCommandEvent& event)
//#########################################################################################################
-MainDialog::SyncPreview::SyncPreview(MainDialog* mainDlg) :
- mainDlg_(mainDlg),
- syncPreviewEnabled(false),
- synchronizationEnabled(false) {}
-
-
-bool MainDialog::SyncPreview::previewIsEnabled() const
-{
- return syncPreviewEnabled;
-}
-
-
-void MainDialog::SyncPreview::enablePreview(bool value)
+void MainDialog::enablePreview(bool value)
{
syncPreviewEnabled = value;
//toggle display of sync preview in middle grid
- mainDlg_->m_gridMiddle->enableSyncPreview(value);
- // mainDlg_->Refresh();
+ gridview::setSyncPreviewActive(*m_gridMain, value);
- mainDlg_->updateGuiGrid();
+ updateGui();
}
-void MainDialog::SyncPreview::enableSynchronization(bool value)
+void MainDialog::updateSyncEnabledStatus()
{
- synchronizationEnabled = value;
-
- if (value)
+ if (folderCmp.empty())
{
- mainDlg_->m_buttonStartSync->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
- mainDlg_->m_buttonStartSync->setBitmapFront(GlobalResources::getImage(wxT("sync")));
+ m_buttonStartSync->SetForegroundColour(wxColor(128, 128, 128)); //Some colors seem to have problems with 16Bit color depth, well this one hasn't!
+ m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"syncDisabled"));
}
else
{
- mainDlg_->m_buttonStartSync->SetForegroundColour(wxColor(128, 128, 128)); //Some colors seem to have problems with 16Bit color depth, well this one hasn't!
- mainDlg_->m_buttonStartSync->setBitmapFront(GlobalResources::getImage(wxT("syncDisabled")));
+ m_buttonStartSync->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
+ m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"sync"));
}
}
-
-bool MainDialog::SyncPreview::synchronizationIsEnabled() const
-{
- return synchronizationEnabled;
-}
-
diff --git a/ui/main_dlg.h b/ui/main_dlg.h
index 0d0239da..c13887ed 100644
--- a/ui/main_dlg.h
+++ b/ui/main_dlg.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef MAINDIALOG_H
@@ -15,24 +15,14 @@
#include <stack>
#include "gui_generated.h"
#include "../lib/process_xml.h"
+#include "custom_grid.h"
+#include "tree_view.h"
+#include <wx+/file_drop.h>
class FolderHistory;
-class CustomGrid;
-class FFSCheckRowsEvent;
-class FFSSyncDirectionEvent;
-class IconUpdater;
class DirectoryPair;
-class DirectoryPairFirst;
class CompareStatus;
-class SyncStatusHandler;
-class PanelMoveWindow;
-
-
-namespace zen
-{
-class CustomLocale;
-class GridView;
-}
+class DirectoryPairFirst;
class MainDialog : public MainDialogGenerated
@@ -103,19 +93,20 @@ private:
void updateGuiForFolderPair(); //helper method: add usability by showing/hiding buttons related to folder pairs
//main method for putting gridDataView on UI: updates data respecting current view settings
- void updateGuiGrid();
+ void updateGui();
void updateGridViewData();
//context menu functions
- std::set<size_t> getSelectedRows(const CustomGrid* grid) const;
- std::set<size_t> getSelectedRows() const;
- void setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const zen::SyncDirection dir);
- void filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTable, int leadingRow);
- void copySelectionToClipboard(CustomGrid& selectedGrid);
- void deleteSelectedFiles(const std::set<size_t>& viewSelectionLeft, const std::set<size_t>& viewSelectionRight);
+ std::vector<zen::FileSystemObject*> getGridSelection(bool fromLeft = true, bool fromRight = true) const;
+ std::vector<zen::FileSystemObject*> getTreeSelection() const;
- void openExternalApplication(const wxString& commandline);
- void openExternalApplication(size_t rowNumber, bool leftSide, const wxString& commandline);
+ void setSyncDirManually(const std::vector<zen::FileSystemObject*>& selection, zen::SyncDirection direction);
+ void setManualFilter(const std::vector<zen::FileSystemObject*>& selection, bool setIncluded);
+ void copySelectionToClipboard();
+ void deleteSelectedFiles(const std::vector<zen::FileSystemObject*>& selectionLeft,
+ const std::vector<zen::FileSystemObject*>& selectionRight);
+
+ void openExternalApplication(const zen::FileSystemObject* fsObj, bool leftSide, const wxString& commandline); //fsObj is optional!
//work to be done in idle time
void OnIdleEvent(wxEvent& event);
@@ -125,57 +116,32 @@ private:
void clearStatusBar();
//events
- void onGridLeftButtonEvent( wxKeyEvent& event);
- void onGridRightButtonEvent( wxKeyEvent& event);
- void onGridMiddleButtonEvent( wxKeyEvent& event);
- void OnContextRimLabelLeft( wxGridEvent& event);
- void OnContextRimLabelRight( wxGridEvent& event);
- void OnContextMiddle( wxGridEvent& event);
- void OnContextMiddleLabel( wxGridEvent& event);
- void OnContextSetLayout( wxMouseEvent& event);
- void OnGlobalKeyEvent( wxKeyEvent& event);
-
- void OnContextSelectCompVariant( wxMouseEvent& event);
- void OnContextSelectSyncVariant( wxMouseEvent& event);
+ void onGridButtonEvent (wxKeyEvent& event);
+ void onTreeButtonEvent (wxKeyEvent& event);
+ void OnContextSetLayout (wxMouseEvent& event);
+ void OnGlobalKeyEvent (wxKeyEvent& event);
- void applyCompareConfig(bool globalLevel = true);
+ void OnCompSettingsContext(wxMouseEvent& event);
+ void OnSyncSettingsContext(wxMouseEvent& event);
+ void OnGlobalFilterContext(wxCommandEvent& event);
- void OnSetCompVariant(wxCommandEvent& event);
- void OnSetSyncVariant(wxCommandEvent& event);
+ void applyCompareConfig(bool changePreviewStatus = true);
//context menu handler methods
- void OnContextFilterTemp (wxCommandEvent& event);
- void OnContextExcludeExtension (wxCommandEvent& event);
- void OnContextExcludeObject (wxCommandEvent& event);
- void OnContextOpenWith (wxCommandEvent& event);
- void OnContextDeleteFiles (wxCommandEvent& event);
- void OnContextSyncDirLeft (wxCommandEvent& event);
- void OnContextSyncDirNone (wxCommandEvent& event);
- void OnContextSyncDirRight (wxCommandEvent& event);
- void OnContextCustColumnLeft (wxCommandEvent& event);
- void OnContextCustColumnRight (wxCommandEvent& event);
- void OnContextSelectTimeSpan (wxCommandEvent& event);
- void OnContextAutoAdjustLeft (wxCommandEvent& event);
- void OnContextAutoAdjustRight (wxCommandEvent& event);
- void OnContextSetIconSize (wxCommandEvent& event);
- void OnContextIncludeAll (wxCommandEvent& event);
- void OnContextExcludeAll (wxCommandEvent& event);
- void OnContextComparisonView (wxCommandEvent& event);
- void OnContextSyncView (wxCommandEvent& event);
- void OnContextSetLayoutReset (wxCommandEvent& event);
- void OnContextSetLayoutShowPanel(wxCommandEvent& event);
-
- void OnContextRim(wxGridEvent& event);
+ void onMainGridContext(zen::GridClickEvent& event);
+ void onNaviGridContext(zen::GridClickEvent& event);
+
+ void onNaviSelection(zen::GridRangeSelectEvent& event);
+
+ void onNaviPanelFilesDropped(zen::FileDropEvent& event);
void OnDirSelected(wxFileDirPickerEvent& event);
- void OnCheckRows(FFSCheckRowsEvent& event);
- void OnSetSyncDirection(FFSSyncDirectionEvent& event);
+ void onCheckRows (zen::CheckRowsEvent& event);
+ void onSetSyncDirection(zen::SyncDirectionEvent& event);
- void OnLeftGridDoubleClick( wxGridEvent& event);
- void OnRightGridDoubleClick(wxGridEvent& event);
- void OnSortLeftGrid( wxGridEvent& event);
- void OnSortMiddleGrid( wxGridEvent& event);
- void OnSortRightGrid( wxGridEvent& event);
+ void onGridDoubleClick (zen::GridClickEvent& event);
+ void onGridLabelLeftClick (zen::GridClickEvent& event);
+ void onGridLabelContext(zen::GridClickEvent& event);
void OnLeftOnlyFiles( wxCommandEvent& event);
void OnRightOnlyFiles( wxCommandEvent& event);
@@ -202,8 +168,6 @@ private:
void OnRegularUpdateCheck( wxIdleEvent& event);
void OnLayoutWindowAsync( wxIdleEvent& event);
- void refreshGridAfterFilterChange(int delay);
-
void OnResize( wxSizeEvent& event);
void OnResizeFolderPairs( wxEvent& event);
void OnResizeConfigPanel( wxEvent& event);
@@ -213,22 +177,25 @@ private:
void OnConfigureFilter( wxCommandEvent& event);
void OnSwapSides( wxCommandEvent& event);
void OnCompare( wxCommandEvent& event);
- void OnSwitchView( wxCommandEvent& event);
void OnSyncSettings( wxCommandEvent& event);
void OnCmpSettings( wxCommandEvent& event);
void OnStartSync( wxCommandEvent& event);
void OnClose( wxCloseEvent& event);
- void OnGlobalFilterOpenContext(wxCommandEvent& event);
- void OnGlobalFilterRemConfirm(wxCommandEvent& event);
+ void updateGuiAfterFilterChange(int delay);
+
+ void excludeExtension(const Zstring& extension);
+ void excludeItems(const std::vector<zen::FileSystemObject*>& selection);
void updateStatistics();
+ void updateSyncEnabledStatus();
+
void OnAddFolderPair( wxCommandEvent& event);
void OnRemoveFolderPair( wxCommandEvent& event);
void OnRemoveTopFolderPair( wxCommandEvent& event);
- void updateFilterConfig();
+ void applyFilterConfig();
void applySyncConfig();
//menu events
@@ -251,10 +218,16 @@ private:
//application variables are stored here:
//global settings used by GUI and batch mode
- xmlAccess::XmlGlobalSettings* globalSettings; //always bound
+ xmlAccess::XmlGlobalSettings* globalSettings; //always bound!
+
+ //UI view of FolderComparison structure (partially owns folderCmp)
+ std::shared_ptr<zen::GridView> gridDataView; //always bound!
+ std::shared_ptr<zen::TreeView> treeDataView; //
- //UI view of FolderComparison structure
- std::unique_ptr<zen::GridView> gridDataView;
+ //the prime data structure of this tool *bling*:
+ zen::FolderComparison folderCmp; //optional!: sync button not available if empty
+
+ void clearGrid(bool refreshGrid = true);
//-------------------------------------
//functional configuration
@@ -267,8 +240,6 @@ private:
//***********************************************
- std::unique_ptr<wxMenu> contextMenu;
-
//status information
wxLongLong lastStatusChange;
std::stack<wxString> stackObjects;
@@ -278,33 +249,11 @@ private:
bool cleanedUp;
- //remember last sort executed (for determination of sort order)
- int lastSortColumn;
- const wxGrid* lastSortGrid;
-
- //update icons periodically: one updater instance for both left and right grids
- std::unique_ptr<IconUpdater> updateFileIcons;
-
bool processingGlobalKeyEvent; //indicator to notify recursion in OnGlobalKeyEvent()
- //encapsulation of handling of sync preview
- class SyncPreview //encapsulates MainDialog functionality for synchronization preview (friend class)
- {
- public:
- SyncPreview(MainDialog* mainDlg);
-
- void enablePreview(bool value);
- bool previewIsEnabled() const;
-
- void enableSynchronization(bool value);
- bool synchronizationIsEnabled() const;
-
- private:
- MainDialog* mainDlg_;
- bool syncPreviewEnabled; //toggle to display configuration preview instead of comparison result
- bool synchronizationEnabled; //determines whether synchronization should be allowed
- };
- std::unique_ptr<SyncPreview> syncPreview; //always bound
+ bool syncPreviewEnabled; //toggle to display configuration preview instead of comparison result
+ //use this methods when changing values!
+ void enablePreview(bool value);
wxAuiManager auiMgr; //implement dockable GUI design
diff --git a/ui/msg_popup.cpp b/ui/msg_popup.cpp
index e5540082..e86b6cf2 100644
--- a/ui/msg_popup.cpp
+++ b/ui/msg_popup.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "msg_popup.h"
diff --git a/ui/msg_popup.h b/ui/msg_popup.h
index f9588a0b..29606a41 100644
--- a/ui/msg_popup.h
+++ b/ui/msg_popup.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef MESSAGEPOPUP_H_INCLUDED
diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp
index 03ec9ca0..ee24b28b 100644
--- a/ui/progress_indicator.cpp
+++ b/ui/progress_indicator.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "progress_indicator.h"
@@ -396,7 +396,7 @@ class LogControl : public LogControlGenerated
public:
LogControl(wxWindow* parent, const ErrorLogging& log) : LogControlGenerated(parent), log_(log)
{
- const int errorCount = log_.typeCount(TYPE_ERROR) + log_.typeCount(TYPE_FATAL_ERROR);
+ const int errorCount = log_.typeCount(TYPE_ERROR | TYPE_FATAL_ERROR);
const int warningCount = log_.typeCount(TYPE_WARNING);
const int infoCount = log_.typeCount(TYPE_INFO);
@@ -812,6 +812,9 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb,
//Fit() height only:
//fitHeight(*this);
+
+ m_staticTextSpeed ->SetLabel(L""); //clear "dummy" values
+ m_staticTextRemTime->SetLabel(L""); //
}
@@ -1211,6 +1214,8 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id,
//at the LATEST(!) to prevent access to currentStatusHandler
//enable okay and close events; may be set in this method ONLY
+ wxWindowUpdateLocker dummy(this); //badly needed
+
abortCb_ = NULL; //avoid callback to (maybe) deleted parent process
setCurrentStatus(id);
@@ -1257,7 +1262,7 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id,
updateStatusDialogNow(false); //keep this sequence to avoid display distortion, if e.g. only 1 item is sync'ed
- //changed meaning: overall speed: -> make sure to call after "updateStatusDialogNow"
+ //changed meaning: from current to overall speed: -> make sure to call after "updateStatusDialogNow"
const long timeElapMs = timeElapsed.Time();
m_staticTextSpeed->SetLabel(timeElapMs <= 0 ? L"-" : zen::filesizeToShortString(currentData * 1000 / timeElapMs) + _("/sec"));
@@ -1275,10 +1280,15 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id,
m_listbookResult->AddPage(m_panelProgress, _("Statistics"), true); //AddPage() takes ownership!
//2. log file
+ const size_t posLog = 1;
LogControl* logControl = new LogControl(m_listbookResult, log);
m_listbookResult->AddPage(logControl, _("Logging"), false);
//bSizerHoldStretch->Insert(0, logControl, 1, wxEXPAND);
+ //show log instead of graph if fatal errors occured! (not required for ignored warnings or errors!)
+ if (log.typeCount(TYPE_FATAL_ERROR) > 0)
+ m_listbookResult->ChangeSelection(posLog);
+
m_panelBackground->Layout(); //we use a dummy panel as actual background: replaces simple "Layout()" call
//Raise(); -> don't! user may be watching a movie in the meantime ;)
@@ -1435,6 +1445,7 @@ SyncStatus::SyncStatus(AbortCallback& abortCb,
{
pimpl->Show();
pimpl->updateStatusDialogNow(false); //update visual statistics to get rid of "dummy" texts
+ pimpl->Update(); //don't wait until next idle event (who knows what blocking process comes next?)
}
else
pimpl->minimizeToTray();
diff --git a/ui/progress_indicator.h b/ui/progress_indicator.h
index db580936..3fa3f8f9 100644
--- a/ui/progress_indicator.h
+++ b/ui/progress_indicator.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef PROGRESSINDICATOR_H_INCLUDED
diff --git a/ui/search.cpp b/ui/search.cpp
index 2b33bc64..8112db6c 100644
--- a/ui/search.cpp
+++ b/ui/search.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "search.h"
@@ -11,6 +11,8 @@
#include <utility>
#include <wx+/mouse_move_dlg.h>
+using namespace zen;
+
class SearchDlg : public SearchDialogGenerated
{
@@ -23,8 +25,8 @@ public:
};
private:
- void OnClose(wxCloseEvent& event);
- void OnCancel(wxCommandEvent& event);
+ void OnClose (wxCloseEvent& event) { EndModal(0); }
+ void OnCancel(wxCommandEvent& event) { EndModal(0); }
void OnFindNext(wxCommandEvent& event);
void OnText(wxCommandEvent& event);
@@ -50,18 +52,6 @@ SearchDlg::SearchDlg(wxWindow& parentWindow, wxString& searchText, bool& respect
}
-void SearchDlg::OnClose(wxCloseEvent& event)
-{
- EndModal(0);
-}
-
-
-void SearchDlg::OnCancel(wxCommandEvent& event)
-{
- EndModal(0);
-}
-
-
void SearchDlg::OnFindNext(wxCommandEvent& event)
{
respectCase_ = m_checkBoxMatchCase->GetValue();
@@ -81,13 +71,15 @@ void SearchDlg::OnText(wxCommandEvent& event)
}
//###########################################################################################
+template <bool respectCase>
+class FindInText;
template <bool respectCase>
class FindInText
{
public:
- FindInText(const wxString& textToFind);
- bool found(const wxString& phrase) const;
+ FindInText(const wxString& textToFind) : textToFind_(textToFind) {}
+ bool found(const wxString& phrase) const { return phrase.Find(textToFind_) != wxNOT_FOUND; }
private:
wxString textToFind_;
@@ -95,104 +87,58 @@ private:
template <>
-FindInText<true>::FindInText(const wxString& textToFind) :
- textToFind_(textToFind) {}
-
-
-template <>
-inline
-bool FindInText<true>::found(const wxString& phrase) const
+class FindInText<false>
{
- return phrase.Find(textToFind_) != wxNOT_FOUND;
-}
-
-
-template <>
-FindInText<false>::FindInText(const wxString& textToFind) :
- textToFind_(textToFind)
-{
- textToFind_.MakeUpper();
-}
+public:
+ FindInText(const wxString& textToFind) : textToFind_(textToFind) { textToFind_.MakeUpper(); }
+ bool found(wxString&& phrase) const
+ {
+ //wxWidgets::MakeUpper() is inefficient! But performance is not THAT important for this high-level search functionality
+ phrase.MakeUpper();
+ return phrase.Find(textToFind_) != wxNOT_FOUND;
+ }
+private:
+ wxString textToFind_;
+};
-template <>
-inline
-bool FindInText<false>::found(const wxString& phrase) const
-{
- wxString phraseTmp = phrase; //wxWidgets::MakeUpper() is inefficient!
- phraseTmp.MakeUpper(); //But performance is not THAT important for this high-level search functionality
- return phraseTmp.Find(textToFind_) != wxNOT_FOUND;
-}
//###########################################################################################
template <bool respectCase>
-std::pair<int, int> searchGrid(const wxGrid& grid,
- const wxString& searchString,
- bool fromBeginToCursor, //specify area to search
- bool afterCursorToEnd) //
+int findRow(const Grid& grid, //return -1 if no matching row found
+ size_t compPos,
+ const wxString& searchString,
+ int rowFirst, //specify area to search:
+ int rowLast) // [rowFirst, rowLast)
{
- const int rowCount = const_cast<wxGrid&>(grid).GetNumberRows();
- const int columnCount = const_cast<wxGrid&>(grid).GetNumberCols();
-
- //consistency checks on ints: wxGrid uses ints, so we have to use them, too
- if (rowCount <= 0 || columnCount <= 0)
- return std::make_pair(-1, -1);
-
- int cursorRow = const_cast<wxGrid&>(grid).GetGridCursorRow();
- int cursorColumn = const_cast<wxGrid&>(grid).GetGridCursorCol();
-
- if (cursorRow < 0 ||
- cursorRow >= rowCount ||
- cursorColumn < 0 ||
- cursorColumn >= columnCount)
+ auto prov = grid.getDataProvider(compPos);
+ std::vector<Grid::ColumnAttribute> colAttr = grid.getColumnConfig(compPos);
+ vector_remove_if(colAttr, [](const Grid::ColumnAttribute& ca) { return !ca.visible_; });
+ if (!colAttr.empty() && prov)
{
- //cursor not on valid position...
- cursorRow = 0;
- cursorColumn = 0;
- }
+ const FindInText<respectCase> searchTxt(searchString);
- const FindInText<respectCase> searchTxt(searchString);
-
- if (fromBeginToCursor)
- {
- for (int row = 0; row < cursorRow; ++row)
- for (int col = 0; col < columnCount; ++col)
- if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(row, col)))
- return std::make_pair(row, col);
-
- for (int col = 0; col <= cursorColumn; ++col)
- if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(cursorRow, col)))
- return std::make_pair(cursorRow, col);
- }
-
- if (afterCursorToEnd)
- {
- //begin search after cursor cell...
- for (int col = cursorColumn + 1; col < columnCount; ++col)
- if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(cursorRow, col)))
- return std::make_pair(cursorRow, col);
-
- for (int row = cursorRow + 1; row < rowCount; ++row)
- for (int col = 0; col < columnCount; ++col)
- if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(row, col)))
- return std::make_pair(row, col);
+ for (int row = rowFirst; row < rowLast; ++row)
+ for (auto iterCol = colAttr.begin(); iterCol != colAttr.end(); ++iterCol)
+ if (searchTxt.found(prov->getValue(row, iterCol->type_)))
+ return row;
}
-
- return std::make_pair(-1, -1);
+ return -1;
}
//syntactic sugar...
-std::pair<int, int> searchGrid(const wxGrid& grid,
- bool respectCase,
- const wxString& searchString,
- bool fromBeginToCursor, //specify area to search
- bool afterCursorToEnd) //
+int findRow(const Grid& grid,
+ size_t compPos,
+ bool respectCase,
+ const wxString& searchString,
+ int rowFirst, //specify area to search:
+ int rowLast) // [rowFirst, rowLast)
{
return respectCase ?
- searchGrid<true>( grid, searchString, fromBeginToCursor, afterCursorToEnd) :
- searchGrid<false>(grid, searchString, fromBeginToCursor, afterCursorToEnd);
+ findRow<true>( grid, compPos, searchString, rowFirst, rowLast) :
+ findRow<false>(grid, compPos, searchString, rowFirst, rowLast);
}
@@ -202,8 +148,8 @@ wxString lastSearchString; //this variable really is conceptionally global...
void executeSearch(bool forceShowDialog,
bool& respectCase,
wxWindow& parentWindow,
- wxGrid& leftGrid,
- wxGrid& rightGrid)
+ Grid& grid,
+ size_t compPosLeft, size_t compPosRight)
{
bool searchDialogWasShown = false;
@@ -216,61 +162,57 @@ void executeSearch(bool forceShowDialog,
searchDialogWasShown = true;
}
- wxGrid* targetGrid = NULL; //filled if match is found
- std::pair<int, int> targetPos; //
+ const int rowCount = grid.getRowCount();
+ auto cursorPos = grid.getGridCursor(); //(row, component pos)
+
+ int cursorRow = cursorPos.first;
+ if (cursorRow < 0 || cursorRow >= rowCount)
+ cursorRow = 0;
+
+ if (cursorPos.second == compPosRight)
+ std::swap(compPosLeft, compPosRight); //select side to start with
+ else if (cursorPos.second != compPosLeft)
+ cursorRow = 0;
+
{
wxBusyCursor showHourGlass;
- const bool startLeft = wxWindow::FindFocus() != rightGrid.GetGridWindow();
- wxGrid& firstGrid = startLeft ? leftGrid : rightGrid;
- wxGrid& secondGrid = startLeft ? rightGrid : leftGrid;
-
- //begin with first grid after cursor
- targetGrid = &firstGrid;
- targetPos = searchGrid(firstGrid, respectCase, lastSearchString, false, true);
- if (targetPos.first == -1)
+ auto finishSearch = [&](size_t compPos, int rowFirst, int rowLast) -> bool
{
- //scan second grid completely
- targetGrid = &secondGrid;
- targetPos = searchGrid(secondGrid, respectCase, lastSearchString, true, true);
-
- //scan first grid up to cursor
- if (targetPos.first == -1)
+ const int targetRow = findRow(grid, compPos, respectCase, lastSearchString, rowFirst, rowLast);
+ if (targetRow >= 0)
{
- targetGrid = &firstGrid;
- targetPos = searchGrid(firstGrid, respectCase, lastSearchString, true, false);
+ grid.setGridCursor(targetRow, compPos);
+ grid.SetFocus();
+ return true;
}
- }
- }
+ return false;
+ };
- if (targetPos.first != -1 && targetPos.second != -1) //new position found
- {
- targetGrid->SetFocus();
- targetGrid->SetGridCursor( targetPos.first, targetPos.second);
- targetGrid->SelectRow( targetPos.first);
- targetGrid->MakeCellVisible(targetPos.first, targetPos.second);
+ if (finishSearch(compPosLeft , cursorRow + 1, rowCount) ||
+ finishSearch(compPosRight, 0, rowCount) ||
+ finishSearch(compPosLeft , 0, cursorRow + 1))
+ return;
}
- else
- {
- wxString messageNotFound = _("Cannot find %x");
- messageNotFound.Replace(wxT("%x"), wxString(wxT("\"")) + lastSearchString + wxT("\""), false);
- wxMessageBox(messageNotFound, _("Find"), wxOK);
- //show search dialog again
- if (searchDialogWasShown)
- executeSearch(true, respectCase, parentWindow, leftGrid, rightGrid);
- }
+ wxString messageNotFound = _("Cannot find %x");
+ messageNotFound.Replace(wxT("%x"), wxString(wxT("\"")) + lastSearchString + wxT("\""), false);
+ wxMessageBox(messageNotFound, _("Find"), wxOK);
+
+ //show search dialog again
+ if (searchDialogWasShown)
+ executeSearch(true, respectCase, parentWindow, grid, compPosLeft, compPosRight);
}
//###########################################################################################
-void zen::startFind(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //Strg + F
+void zen::startFind(wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase) //Strg + F
{
- executeSearch(true, respectCase, parentWindow, leftGrid, rightGrid);
+ executeSearch(true, respectCase, parentWindow, grid, compPosLeft, compPosRight);
}
-void zen::findNext(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //F3
+void zen::findNext(wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase) //F3
{
- executeSearch(false, respectCase, parentWindow, leftGrid, rightGrid);
+ executeSearch(false, respectCase, parentWindow, grid, compPosLeft, compPosRight);
}
diff --git a/ui/search.h b/ui/search.h
index 93c3159f..1c26ea78 100644
--- a/ui/search.h
+++ b/ui/search.h
@@ -1,20 +1,18 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef SEARCH_H_INCLUDED
#define SEARCH_H_INCLUDED
-class wxGrid;
-class wxWindow;
-
+#include <wx+/grid.h>
namespace zen
{
-void startFind(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase); //Strg + F
-void findNext( wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase); //F3
+void startFind(wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase); //Strg + F
+void findNext( wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase); //F3
}
#endif // SEARCH_H_INCLUDED
diff --git a/ui/small_dlgs.cpp b/ui/small_dlgs.cpp
index 62ccb9d7..55a7021a 100644
--- a/ui/small_dlgs.cpp
+++ b/ui/small_dlgs.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "gui_generated.h"
@@ -13,12 +13,13 @@
#include <wx+/format_unit.h>
#include <wx+/choice_enum.h>
#include "../synchronization.h"
-#include "../lib/custom_grid.h"
+#include "custom_grid.h"
#include <wx+/button.h>
#include <zen/build_info.h>
#include <wx/wupdlock.h>
#include <wx/msgdlg.h>
#include <wx+/mouse_move_dlg.h>
+#include <wx+/rtl.h>
#include "../lib/help_provider.h"
#include <wx+/image_tools.h>
#include <zen/stl_tools.h>
@@ -40,28 +41,29 @@ private:
AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
{
- m_bitmap9->SetBitmap(GlobalResources::getImage(wxT("website")));
- m_bitmap10->SetBitmap(GlobalResources::getImage(wxT("email")));
- m_bitmap11->SetBitmap(GlobalResources::getImage(wxT("logo")));
- m_bitmap13->SetBitmap(GlobalResources::getImage(wxT("gpl")));
- m_bitmapTransl->SetBitmap(GlobalResources::getImage(wxT("translation")));
+ m_bitmap9 ->SetBitmap(GlobalResources::getImage(L"website"));
+ m_bitmap10->SetBitmap(GlobalResources::getImage(L"email"));
+ m_bitmap11->SetBitmap(GlobalResources::getImage(L"logo"));
+ m_bitmap13->SetBitmap(GlobalResources::getImage(L"gpl"));
+ //m_bitmapTransl->SetBitmap(GlobalResources::getImage(wxT("translation")));
+ m_bitmapPaypal->SetBitmap(GlobalResources::getImage(L"paypal"));
//create language credits
- for (std::vector<ExistingTranslations::Entry>::const_iterator i = ExistingTranslations::get().begin(); i != ExistingTranslations::get().end(); ++i)
+ for (auto iter = ExistingTranslations::get().begin(); iter != ExistingTranslations::get().end(); ++iter)
{
//flag
- wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, GlobalResources::getImage(i->languageFlag), wxDefaultPosition, wxSize(-1, 11), 0 );
- fgSizerTranslators->Add(staticBitmapFlag, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL, 5 );
+ wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, GlobalResources::getImage(iter->languageFlag), wxDefaultPosition, wxSize(-1, 11), 0 );
+ fgSizerTranslators->Add(staticBitmapFlag, 0, wxALIGN_CENTER);
//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);
+ wxStaticText* staticTextLanguage = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, iter->languageName, wxDefaultPosition, wxDefaultSize, 0 );
+ staticTextLanguage->Wrap(-1);
+ fgSizerTranslators->Add(staticTextLanguage, 0, wxALIGN_CENTER_VERTICAL);
//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);
+ wxStaticText* staticTextTranslator = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, iter->translatorName, wxDefaultPosition, wxDefaultSize, 0 );
+ staticTextTranslator->Wrap(-1);
+ fgSizerTranslators->Add(staticTextTranslator, 0, wxALIGN_CENTER_VERTICAL);
}
bSizerTranslators->Fit(m_scrolledWindowTranslators);
@@ -87,8 +89,8 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent)
m_build->SetLabel(buildFormatted);
- m_animationControl1->SetAnimation(GlobalResources::instance().animationMoney);
- m_animationControl1->Play();
+ //m_animationControl1->SetAnimation(GlobalResources::instance().animationMoney);
+ //m_animationControl1->Play();
m_buttonOkay->SetFocus();
Fit();
@@ -434,140 +436,9 @@ ReturnSmallDlg::ButtonPressed zen::showDeleteDialog(const std::vector<zen::FileS
useRecycleBin);
return static_cast<ReturnSmallDlg::ButtonPressed>(confirmDeletion.ShowModal());
}
-//########################################################################################
-
-
-class CustomizeColsDlg : public CustomizeColsDlgGenerated
-{
-public:
- CustomizeColsDlg(wxWindow* parent, xmlAccess::ColumnAttributes& attr);
-
-private:
- void OnOkay(wxCommandEvent& event);
- void OnDefault(wxCommandEvent& event);
- void OnCancel(wxCommandEvent& event);
- void OnClose(wxCloseEvent& event);
-
- void OnMoveUp(wxCommandEvent& event);
- void OnMoveDown(wxCommandEvent& event);
-
- xmlAccess::ColumnAttributes& output;
-};
-
-
-CustomizeColsDlg::CustomizeColsDlg(wxWindow* parent, xmlAccess::ColumnAttributes& attr) :
- CustomizeColsDlgGenerated(parent),
- output(attr)
-{
-#ifdef FFS_WIN
- new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this"
-#endif
-
- m_bpButton29->SetBitmapLabel(GlobalResources::getImage(wxT("moveUp")));
- m_bpButton30->SetBitmapLabel(GlobalResources::getImage(wxT("moveDown")));
-
- xmlAccess::ColumnAttributes columnSettings = attr;
-
- sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByPositionOnly);
-
- for (xmlAccess::ColumnAttributes::const_iterator i = columnSettings.begin(); i != columnSettings.end(); ++i) //love these iterators!
- {
- m_checkListColumns->Append(CustomGridRim::getTypeName(i->type));
- m_checkListColumns->Check(i - columnSettings.begin(), i->visible);
- }
-
- m_checkListColumns->SetSelection(0);
- Fit();
-}
-
-void CustomizeColsDlg::OnOkay(wxCommandEvent& event)
-{
- for (int i = 0; i < int(m_checkListColumns->GetCount()); ++i)
- {
- const wxString label = m_checkListColumns->GetString(i);
- for (xmlAccess::ColumnAttributes::iterator j = output.begin(); j != output.end(); ++j)
- {
- if (CustomGridRim::getTypeName(j->type) == label) //not nice but short and no performance issue
- {
- j->position = i;
- j->visible = m_checkListColumns->IsChecked(i);;
- break;
- }
- }
- }
-
- EndModal(ReturnSmallDlg::BUTTON_OKAY);
-}
-
-
-void CustomizeColsDlg::OnDefault(wxCommandEvent& event)
-{
- xmlAccess::ColumnAttributes defaultColumnAttr = CustomGridRim::getDefaultColumnAttributes();
-
- m_checkListColumns->Clear();
- for (xmlAccess::ColumnAttributes::const_iterator i = defaultColumnAttr.begin(); i != defaultColumnAttr.end(); ++i)
- {
- m_checkListColumns->Append(CustomGridRim::getTypeName(i->type));
- m_checkListColumns->Check(i - defaultColumnAttr.begin(), i->visible);
- }
-}
-
-
-void CustomizeColsDlg::OnCancel(wxCommandEvent& event)
-{
- EndModal(0);
-}
-
-
-void CustomizeColsDlg::OnClose(wxCloseEvent& event)
-{
- EndModal(0);
-}
-
-
-void CustomizeColsDlg::OnMoveUp(wxCommandEvent& event)
-{
- const int pos = m_checkListColumns->GetSelection();
- if (1 <= pos && pos < int(m_checkListColumns->GetCount()))
- {
- const bool checked = m_checkListColumns->IsChecked(pos);
- const wxString label = m_checkListColumns->GetString(pos);
-
- m_checkListColumns->SetString(pos, m_checkListColumns->GetString(pos - 1));
- m_checkListColumns->Check(pos, m_checkListColumns->IsChecked(pos - 1));
- m_checkListColumns->SetString(pos - 1, label);
- m_checkListColumns->Check(pos - 1, checked);
- m_checkListColumns->Select(pos - 1);
- }
-}
-
-
-void CustomizeColsDlg::OnMoveDown(wxCommandEvent& event)
-{
- const int pos = m_checkListColumns->GetSelection();
- if (0 <= pos && pos < int(m_checkListColumns->GetCount()) - 1)
- {
- const bool checked = m_checkListColumns->IsChecked(pos);
- const wxString label = m_checkListColumns->GetString(pos);
-
- m_checkListColumns->SetString(pos, m_checkListColumns->GetString(pos + 1));
- m_checkListColumns->Check(pos, m_checkListColumns->IsChecked(pos + 1));
- m_checkListColumns->SetString(pos + 1, label);
- m_checkListColumns->Check(pos + 1, checked);
- m_checkListColumns->Select(pos + 1);
- }
-}
-
-
-ReturnSmallDlg::ButtonPressed zen::showCustomizeColsDlg(xmlAccess::ColumnAttributes& attr)
-{
- CustomizeColsDlg customizeDlg(NULL, attr);
- return static_cast<ReturnSmallDlg::ButtonPressed>(customizeDlg.ShowModal());
-}
//########################################################################################
-
class SyncPreviewDlg : public SyncPreviewDlgGenerated
{
public:
@@ -599,10 +470,11 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parent,
using zen::toStringSep;
m_buttonStartSync->setBitmapFront(GlobalResources::getImage(wxT("startSync")));
- m_bitmapCreate->SetBitmap(GlobalResources::getImage(wxT("create")));
- m_bitmapUpdate->SetBitmap(GlobalResources::getImage(wxT("update")));
- m_bitmapDelete->SetBitmap(GlobalResources::getImage(wxT("delete")));
- m_bitmapData->SetBitmap(GlobalResources::getImage(wxT("data")));
+
+ m_bitmapCreate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"create")));
+ m_bitmapUpdate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"update")));
+ m_bitmapDelete->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"delete")));
+ m_bitmapData ->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"data")));
m_staticTextVariant->SetLabel(variantName);
m_textCtrlData->SetValue(zen::filesizeToShortString(statistics.getDataToProcess()));
diff --git a/ui/small_dlgs.h b/ui/small_dlgs.h
index 9abcba6c..b42f56eb 100644
--- a/ui/small_dlgs.h
+++ b/ui/small_dlgs.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef SMALLDIALOGS_H_INCLUDED
@@ -33,8 +33,6 @@ ReturnSmallDlg::ButtonPressed showDeleteDialog(
bool& deleteOnBothSides,
bool& useRecycleBin);
-ReturnSmallDlg::ButtonPressed showCustomizeColsDlg(xmlAccess::ColumnAttributes& attr);
-
ReturnSmallDlg::ButtonPressed showSyncPreviewDlg(
const wxString& variantName,
const SyncStatistics& statistics,
diff --git a/ui/sorting.h b/ui/sorting.h
index 596dfd53..15e04a62 100644
--- a/ui/sorting.h
+++ b/ui/sorting.h
@@ -1,15 +1,16 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef SORTING_H_INCLUDED
#define SORTING_H_INCLUDED
-#include "../file_hierarchy.h"
-#include "../synchronization.h"
#include <zen/assert_static.h>
+#include "../file_hierarchy.h"
+#include <zen/type_tools.h>
+//#include "../synchronization.h"
namespace zen
@@ -18,9 +19,9 @@ namespace
{
struct CompileTimeReminder : public FSObjectVisitor
{
- virtual void visit(const FileMapping& fileObj) {}
+ virtual void visit(const FileMapping& fileObj ) {}
virtual void visit(const SymLinkMapping& linkObj) {}
- virtual void visit(const DirMapping& dirObj) {}
+ virtual void visit(const DirMapping& dirObj ) {}
} checkDymanicCasts; //just a compile-time reminder to check dynamic casts in this file
}
@@ -31,28 +32,6 @@ bool isDirectoryMapping(const FileSystemObject& fsObj)
}
-template <bool ascending>
-struct Compare
-{
- template <class T>
- bool isSmallerThan(T a, T b)
- {
- assert_static(sizeof(T) <= 2 * sizeof(int)); //use for comparing (small) INTEGRAL types only!
- return a < b;
- }
-};
-template <>
-struct Compare<false>
-{
- template <class T>
- bool isSmallerThan(T a, T b)
- {
- assert_static(sizeof(T) <= 2 * sizeof(int)); //use for comparing (small) INTEGRAL types only!
- return a > b;
- }
-};
-
-
template <bool ascending, SelectedSide side> inline
bool lessShortFileName(const FileSystemObject& a, const FileSystemObject& b)
{
@@ -75,8 +54,7 @@ bool lessShortFileName(const FileSystemObject& a, const FileSystemObject& b)
if (isDirectoryMapping(b))
return true;
else
- return Compare<ascending>().isSmallerThan(
- cmpFileName(a.getShortName<side>(), b.getShortName<side>()), 0);
+ return makeSortDirection(LessFilename(), Int2Type<ascending>())(a.getShortName<side>(), b.getShortName<side>());
}
}
@@ -97,7 +75,7 @@ bool lessRelativeName(const FileSystemObject& a, const FileSystemObject& b)
//compare relative names without filenames first
const int rv = cmpFileName(relDirNameA, relDirNameB);
if (rv != 0)
- return Compare<ascending>().isSmallerThan(rv, 0);
+ return makeSortDirection(std::less<int>(), Int2Type<ascending>())(rv, 0);
else //compare the filenames
{
if (isDirectoryB) //directories shall appear before files
@@ -138,7 +116,7 @@ bool lessFilesize(const FileSystemObject& a, const FileSystemObject& b)
return true;
//return list beginning with largest files first
- return Compare<ascending>().isSmallerThan(fileObjA->getFileSize<side>(), fileObjB->getFileSize<side>());
+ return makeSortDirection(std::less<UInt64>(), Int2Type<ascending>())(fileObjA->getFileSize<side>(), fileObjB->getFileSize<side>());
}
@@ -166,7 +144,7 @@ bool lessFiletime(const FileSystemObject& a, const FileSystemObject& b)
zen::Int64 dateB = fileObjB ? fileObjB->getLastWriteTime<side>() : linkObjB->getLastWriteTime<side>();
//return list beginning with newest files first
- return Compare<ascending>().isSmallerThan(dateA, dateB);
+ return makeSortDirection(std::less<Int64>(), Int2Type<ascending>())(dateA, dateB);
}
@@ -187,7 +165,7 @@ bool lessExtension(const FileSystemObject& a, const FileSystemObject& b)
else if (fileObjB == NULL)
return true; //directories last
- return Compare<ascending>().isSmallerThan(cmpFileName(fileObjA->getExtension<side>(), fileObjB->getExtension<side>()), 0);
+ return makeSortDirection(LessFilename(), Int2Type<ascending>())(fileObjA->getExtension<side>(), fileObjB->getExtension<side>());
}
@@ -200,14 +178,14 @@ bool lessCmpResult(const FileSystemObject& a, const FileSystemObject& b)
if (b.getCategory() == FILE_EQUAL)
return true;
- return Compare<ascending>().isSmallerThan(a.getCategory(), b.getCategory());
+ return makeSortDirection(std::less<CompareFilesResult>(), Int2Type<ascending>())(a.getCategory(), b.getCategory());
}
template <bool ascending> inline
bool lessSyncDirection(const FileSystemObject& a, const FileSystemObject& b)
{
- return Compare<ascending>().isSmallerThan(a.getSyncOperation(), b.getSyncOperation());
+ return makeSortDirection(std::less<SyncOperation>(), Int2Type<ascending>())(a.getSyncOperation(), b.getSyncOperation());
}
}
diff --git a/ui/switch_to_gui.h b/ui/switch_to_gui.h
index 70ef90d3..a9a717cb 100644
--- a/ui/switch_to_gui.h
+++ b/ui/switch_to_gui.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef SWITCHTOGUI_H_INCLUDED
diff --git a/ui/sync_cfg.cpp b/ui/sync_cfg.cpp
index e8411244..4da98b8e 100644
--- a/ui/sync_cfg.cpp
+++ b/ui/sync_cfg.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "sync_cfg.h"
@@ -12,6 +12,7 @@
#include <wx+/mouse_move_dlg.h>
#include <wx+/string_conv.h>
#include <wx+/dir_picker.h>
+#include <wx+/rtl.h>
#include "gui_generated.h"
#include <wx+/choice_enum.h>
#include <wx+/image_tools.h>
@@ -97,15 +98,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg,
switch (dirCfg.exLeftSideOnly)
{
case SYNC_DIR_RIGHT:
- buttonLeftOnly->SetBitmapLabel(GlobalResources::getImage(wxT("createRight")));
+ buttonLeftOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"createRight")));
buttonLeftOnly->SetToolTip(getSyncOpDescription(SO_CREATE_NEW_RIGHT));
break;
case SYNC_DIR_LEFT:
- buttonLeftOnly->SetBitmapLabel(GlobalResources::getImage(wxT("deleteLeft")));
+ buttonLeftOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"deleteLeft")));
buttonLeftOnly->SetToolTip(getSyncOpDescription(SO_DELETE_LEFT));
break;
case SYNC_DIR_NONE:
- buttonLeftOnly->SetBitmapLabel(GlobalResources::getImage(wxT("none")));
+ buttonLeftOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none")));
buttonLeftOnly->SetToolTip(getSyncOpDescription(SO_DO_NOTHING));
break;
}
@@ -113,15 +114,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg,
switch (dirCfg.exRightSideOnly)
{
case SYNC_DIR_RIGHT:
- buttonRightOnly->SetBitmapLabel(GlobalResources::getImage(wxT("deleteRight")));
+ buttonRightOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"deleteRight")));
buttonRightOnly->SetToolTip(getSyncOpDescription(SO_DELETE_RIGHT));
break;
case SYNC_DIR_LEFT:
- buttonRightOnly->SetBitmapLabel(GlobalResources::getImage(wxT("createLeft")));
+ buttonRightOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"createLeft")));
buttonRightOnly->SetToolTip(getSyncOpDescription(SO_CREATE_NEW_LEFT));
break;
case SYNC_DIR_NONE:
- buttonRightOnly->SetBitmapLabel(GlobalResources::getImage(wxT("none")));
+ buttonRightOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none")));
buttonRightOnly->SetToolTip(getSyncOpDescription(SO_DO_NOTHING));
break;
}
@@ -129,15 +130,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg,
switch (dirCfg.leftNewer)
{
case SYNC_DIR_RIGHT:
- buttonLeftNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight")));
+ buttonLeftNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight")));
buttonLeftNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT));
break;
case SYNC_DIR_LEFT:
- buttonLeftNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft")));
+ buttonLeftNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft")));
buttonLeftNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT));
break;
case SYNC_DIR_NONE:
- buttonLeftNewer->SetBitmapLabel(GlobalResources::getImage(wxT("none")));
+ buttonLeftNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none")));
buttonLeftNewer->SetToolTip(getSyncOpDescription(SO_DO_NOTHING));
break;
}
@@ -145,15 +146,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg,
switch (dirCfg.rightNewer)
{
case SYNC_DIR_RIGHT:
- buttonRightNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight")));
+ buttonRightNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight")));
buttonRightNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT));
break;
case SYNC_DIR_LEFT:
- buttonRightNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft")));
+ buttonRightNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft")));
buttonRightNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT));
break;
case SYNC_DIR_NONE:
- buttonRightNewer->SetBitmapLabel(GlobalResources::getImage(wxT("none")));
+ buttonRightNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none")));
buttonRightNewer->SetToolTip(getSyncOpDescription(SO_DO_NOTHING));
break;
}
@@ -161,15 +162,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg,
switch (dirCfg.different)
{
case SYNC_DIR_RIGHT:
- buttonDifferent->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight")));
+ buttonDifferent->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight")));
buttonDifferent->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT));
break;
case SYNC_DIR_LEFT:
- buttonDifferent->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft")));
+ buttonDifferent->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft")));
buttonDifferent->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT));
break;
case SYNC_DIR_NONE:
- buttonDifferent->SetBitmapLabel(GlobalResources::getImage(wxT("none")));
+ buttonDifferent->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none")));
buttonDifferent->SetToolTip(getSyncOpDescription(SO_DO_NOTHING));
break;
}
@@ -177,15 +178,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg,
switch (dirCfg.conflict)
{
case SYNC_DIR_RIGHT:
- buttonConflict->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight")));
+ buttonConflict->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight")));
buttonConflict->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT));
break;
case SYNC_DIR_LEFT:
- buttonConflict->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft")));
+ buttonConflict->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft")));
buttonConflict->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT));
break;
case SYNC_DIR_NONE:
- buttonConflict->SetBitmapLabel(GlobalResources::getImage(wxT("conflict")));
+ buttonConflict->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"conflict")));
buttonConflict->SetToolTip(_("Leave as unresolved conflict"));
break;
}
@@ -249,12 +250,12 @@ SyncCfgDialog::SyncCfgDialog(wxWindow* window,
updateGui();
//set icons for this dialog
- m_bitmapLeftOnly ->SetBitmap(greyScale(GlobalResources::getImage(L"leftOnly" )));
- m_bitmapRightOnly ->SetBitmap(greyScale(GlobalResources::getImage(L"rightOnly" )));
- m_bitmapLeftNewer ->SetBitmap(greyScale(GlobalResources::getImage(L"leftNewer" )));
- m_bitmapRightNewer->SetBitmap(greyScale(GlobalResources::getImage(L"rightNewer")));
- m_bitmapDifferent ->SetBitmap(greyScale(GlobalResources::getImage(L"different" )));
- m_bitmapConflict ->SetBitmap(greyScale(GlobalResources::getImage(L"conflict" )));
+ m_bitmapLeftOnly ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"leftOnly" ))));
+ m_bitmapRightOnly ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"rightOnly" ))));
+ m_bitmapLeftNewer ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"leftNewer" ))));
+ m_bitmapRightNewer->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"rightNewer"))));
+ m_bitmapDifferent ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"different" ))));
+ m_bitmapConflict ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"conflict" ))));
m_bitmapDatabase ->SetBitmap(GlobalResources::getImage(wxT("database")));
bSizer201->Layout(); //wxButtonWithImage size might have changed
diff --git a/ui/sync_cfg.h b/ui/sync_cfg.h
index 1f746709..dae79d1d 100644
--- a/ui/sync_cfg.h
+++ b/ui/sync_cfg.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef SYNCCONFIG_H_INCLUDED
diff --git a/ui/taskbar.cpp b/ui/taskbar.cpp
index caab300c..7219be14 100644
--- a/ui/taskbar.cpp
+++ b/ui/taskbar.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
//
#include "taskbar.h"
diff --git a/ui/taskbar.h b/ui/taskbar.h
index d34dae30..bf40adde 100644
--- a/ui/taskbar.h
+++ b/ui/taskbar.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef TASKBARPROGRESS_H_INCLUDED
diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp
index 5e3fa5cb..26556742 100644
--- a/ui/tray_icon.cpp
+++ b/ui/tray_icon.cpp
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "tray_icon.h"
diff --git a/ui/tray_icon.h b/ui/tray_icon.h
index 30405465..e9778d1e 100644
--- a/ui/tray_icon.h
+++ b/ui/tray_icon.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef TRAYICON_H_INCLUDED
diff --git a/ui/tree_view.cpp b/ui/tree_view.cpp
new file mode 100644
index 00000000..cd29938e
--- /dev/null
+++ b/ui/tree_view.cpp
@@ -0,0 +1,1176 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#include <set>
+#include "tree_view.h"
+#include <wx/settings.h>
+#include <wx/menu.h>
+#include <zen/i18n.h>
+#include <zen/stl_tools.h>
+#include <wx+/format_unit.h>
+#include <wx+/rtl.h>
+#include <wx+/context_menu.h>
+#include "../lib/icon_buffer.h"
+#include "../lib/resources.h"
+
+using namespace zen;
+
+
+template <class Function> //(const FileSystemObject&) -> bool
+void TreeView::extractVisibleSubtree(HierarchyObject& hierObj, //in
+ TreeView::Container& cont, //out
+ Function pred)
+{
+ auto getBytes = [](const FileMapping& fileObj) -> UInt64 //MSVC screws up miserably if we put this lambda into std::for_each
+ {
+ //give accumulated bytes the semantics of a sync preview!
+ if (fileObj.isActive())
+ switch (fileObj.getSyncDir())
+ {
+ case SYNC_DIR_LEFT:
+ return fileObj.getFileSize<RIGHT_SIDE>();
+ case SYNC_DIR_RIGHT:
+ return fileObj.getFileSize<LEFT_SIDE>();
+ case SYNC_DIR_NONE:
+ break;
+ }
+ return std::max(fileObj.getFileSize<LEFT_SIDE>(), fileObj.getFileSize<RIGHT_SIDE>());
+ };
+
+
+ cont.firstFile = NULL;
+ std::for_each(hierObj.refSubFiles().begin(), hierObj.refSubFiles().end(),
+ [&](FileMapping& fileObj)
+ {
+ if (pred(fileObj))
+ {
+ cont.bytesNet += getBytes(fileObj);
+
+ if (!cont.firstFile)
+ cont.firstFile = fileObj.getId();
+ }
+ });
+ cont.bytesGross += cont.bytesNet;
+
+ if (!cont.firstFile)
+ std::find_if(hierObj.refSubLinks().begin(), hierObj.refSubLinks().end(),
+ [&](SymLinkMapping& linkObj) -> bool
+ {
+ if (pred(linkObj))
+ {
+ cont.firstFile = linkObj.getId();
+ return true;
+ }
+ return false;
+ });
+
+ cont.subDirs.reserve(hierObj.refSubDirs().size()); //avoid expensive reallocations!
+
+ std::for_each(hierObj.refSubDirs().begin(), hierObj.refSubDirs().end(),
+ [&cont, pred](DirMapping& subDirObj)
+ {
+ cont.subDirs.push_back(TreeView::DirNodeImpl()); //
+ auto& subDirView = cont.subDirs.back();
+ TreeView::extractVisibleSubtree(subDirObj, subDirView, pred);
+ cont.bytesGross += subDirView.bytesGross;
+
+ if (pred(subDirObj) || subDirView.firstFile || !subDirView.subDirs.empty())
+ {
+ subDirView.objId = subDirObj.getId();
+
+ //------------------- small hack --------------------------------------------
+ //remove single-element sub-trees (*after* inclusion check!!!)
+ if (subDirView.subDirs.empty() ||
+ (subDirView.firstFile == NULL && subDirView.subDirs.size() == 1 && subDirView.subDirs[0].subDirs.empty() && subDirView.subDirs[0].firstFile == NULL))
+ {
+ subDirView.subDirs.clear();
+ subDirView.firstFile = NULL;
+ }
+ }
+ else
+ cont.subDirs.pop_back();
+ });
+}
+
+
+namespace
+{
+//generate nice percentage numbers which sum up to 100
+void calcPercentage(std::vector<std::pair<UInt64, int*>>& workList)
+{
+ const UInt64 total = std::accumulate(workList.begin(), workList.end(), UInt64(),
+ [](UInt64 val, const std::pair<UInt64, int*>& pair) { return val + pair.first; });
+
+ if (total == 0U) //this case doesn't work with the error minimizing algorithm below
+ {
+ std::for_each(workList.begin(), workList.end(),
+ [&](std::pair<UInt64, int*>& pair) { *pair.second = 0; });
+ return;
+ }
+
+ int remainingPercent = 100;
+ std::for_each(workList.begin(), workList.end(),
+ [&](std::pair<UInt64, int*>& pair)
+ {
+ *pair.second = to<double>(pair.first) * 100 / to<double>(total); //round down
+ remainingPercent -= *pair.second;
+ });
+
+ //sort descending by absolute error
+ std::sort(workList.begin(), workList.end(),
+ [&](const std::pair<UInt64, int*>& lhs, const std::pair<UInt64, int*>& rhs)
+ {
+ //return std::abs(*lhs.second - to<double>(lhs.first) * 100 / total) > std::abs(*rhs.second - to<double>(rhs.first) * 100 / total);
+ return (to<double>(lhs.first) - to<double>(rhs.first)) * 100 / to<double>(total) > *lhs.second - *rhs.second;
+ });
+
+ //distribute remaining percent so that overall error is minimized as much as possible
+ remainingPercent = std::min(std::max(0, remainingPercent), static_cast<int>(workList.size()));
+ std::for_each(workList.begin(), workList.begin() + remainingPercent,
+ [&](std::pair<UInt64, int*>& pair) { ++*pair.second; });
+}
+}
+
+
+template <bool ascending>
+struct TreeView::LessShortName
+{
+ bool operator()(const TreeLine& lhs, const TreeLine& rhs)
+ {
+ //files last (irrespective of sort direction)
+ if (lhs.type_ == TreeView::TYPE_FILES)
+ return false;
+ else if (rhs.type_ == TreeView::TYPE_FILES)
+ return true;
+
+ if (lhs.type_ != rhs.type_) //
+ return lhs.type_ < rhs.type_; //shouldn't happen! Root nodes are never sorted
+
+ switch (lhs.type_)
+ {
+ case TreeView::TYPE_ROOT:
+ return false;
+
+ case TreeView::TYPE_DIRECTORY:
+ {
+ const auto* dirObjL = dynamic_cast<const DirMapping*>(FileSystemObject::retrieve(static_cast<const TreeView::DirNodeImpl*>(lhs.node_)->objId));
+ const auto* dirObjR = dynamic_cast<const DirMapping*>(FileSystemObject::retrieve(static_cast<const TreeView::DirNodeImpl*>(rhs.node_)->objId));
+
+ if (!dirObjL) //might be pathologic, but it's covered
+ return false;
+ else if (!dirObjR)
+ return true;
+
+ return makeSortDirection(LessFilename(), Int2Type<ascending>())(dirObjL->getObjShortName(), dirObjR->getObjShortName());
+ }
+
+ case TreeView::TYPE_FILES:
+ break;
+ }
+ assert(false);
+ return false; //:= all equal
+ }
+};
+
+
+template <bool ascending>
+void TreeView::sortSingleLevel(std::vector<TreeLine>& items, ColumnTypeNavi columnType)
+{
+ auto getBytes = [](const TreeLine& line) -> UInt64
+ {
+ switch (line.type_)
+ {
+ case TreeView::TYPE_ROOT:
+ case TreeView::TYPE_DIRECTORY:
+ return line.node_->bytesGross;
+ case TreeView::TYPE_FILES:
+ return line.node_->bytesNet;
+ }
+ assert(false);
+ return 0U;
+ };
+
+ const auto lessBytes = [&](const TreeLine& lhs, const TreeLine& rhs) { return getBytes(lhs) < getBytes(rhs); };
+
+ switch (columnType)
+ {
+ case COL_TYPE_NAVI_BYTES:
+ std::sort(items.begin(), items.end(), makeSortDirection(lessBytes, Int2Type<ascending>()));
+ break;
+
+ case COL_TYPE_NAVI_DIRECTORY:
+ std::sort(items.begin(), items.end(), LessShortName<ascending>());
+ break;
+ }
+}
+
+
+void TreeView::getChildren(const Container& cont, size_t level, std::vector<TreeLine>& output)
+{
+ output.clear();
+ output.reserve(cont.subDirs.size() + 1); //keep pointers in "workList" valid
+ std::vector<std::pair<UInt64, int*>> workList;
+
+ std::for_each(cont.subDirs.begin(), cont.subDirs.end(),
+ [&output, level, &workList](const DirNodeImpl& subDir)
+ {
+ output.push_back(TreeView::TreeLine(level, 0, &subDir, TreeView::TYPE_DIRECTORY));
+ workList.push_back(std::make_pair(subDir.bytesGross, &output.back().percent_));
+ });
+
+ if (cont.firstFile)
+ {
+ output.push_back(TreeLine(level, 0, &cont, TreeView::TYPE_FILES));
+ workList.push_back(std::make_pair(cont.bytesNet, &output.back().percent_));
+ }
+ calcPercentage(workList);
+
+ if (sortAscending)
+ sortSingleLevel<true>(output, sortColumn);
+ else
+ sortSingleLevel<false>(output, sortColumn);
+}
+
+
+void TreeView::applySubView(std::vector<RootNodeImpl>&& newView)
+{
+ //preserve current node expansion status
+ auto getHierAlias = [](const TreeView::TreeLine& tl) -> const HierarchyObject*
+ {
+ switch (tl.type_)
+ {
+ case TreeView::TYPE_ROOT:
+ return static_cast<const RootNodeImpl*>(tl.node_)->baseMap.get();
+
+ case TreeView::TYPE_DIRECTORY:
+ if (auto dirObj = dynamic_cast<const DirMapping*>(FileSystemObject::retrieve(static_cast<const DirNodeImpl*>(tl.node_)->objId)))
+ return dirObj;
+ break;
+
+ case TreeView::TYPE_FILES:
+ break; //none!!!
+ }
+ return NULL;
+ };
+
+ zen::hash_set<const HierarchyObject*> expandedNodes;
+ if (!flatTree.empty())
+ {
+ auto iter = flatTree.begin();
+ for (auto iterNext = flatTree.begin() + 1; iterNext != flatTree.end(); ++iterNext, ++iter)
+ if (iter->level_ < iterNext->level_)
+ if (auto hierObj = getHierAlias(*iter))
+ expandedNodes.insert(hierObj);
+ }
+
+ //update view on full data
+ folderCmpView.swap(newView); //newView may be an alias for folderCmpView! see sorting!
+
+ //set default flat tree
+ flatTree.clear();
+
+ if (folderCmpView.size() == 1)
+ getChildren(folderCmpView[0], 0, flatTree); //do not show root
+ else
+ {
+ std::vector<std::pair<UInt64, int*>> workList;
+ flatTree.reserve(folderCmpView.size()); //keep pointers in "workList" valid
+
+ std::for_each(folderCmpView.begin(), folderCmpView.end(),
+ [&](const RootNodeImpl& root)
+ {
+ flatTree.push_back(TreeView::TreeLine(0, 0, &root, TreeView::TYPE_ROOT));
+ workList.push_back(std::make_pair(root.bytesGross, &flatTree.back().percent_));
+ });
+
+ calcPercentage(workList);
+ }
+
+ //restore node expansion status
+ for (size_t row = 0; row < flatTree.size(); ++row) //flatTree size changes within loop!
+ {
+ const TreeLine& line = flatTree[row];
+
+ if (auto hierObj = getHierAlias(line))
+ if (expandedNodes.find(hierObj) != expandedNodes.end())
+ {
+ std::vector<TreeLine> newLines;
+ getChildren(*line.node_, line.level_ + 1, newLines);
+
+ flatTree.insert(flatTree.begin() + row + 1, newLines.begin(), newLines.end());
+ }
+ }
+}
+
+
+template <class Predicate>
+void TreeView::updateView(Predicate pred)
+{
+ //update view on full data
+ std::vector<RootNodeImpl> newView;
+ newView.reserve(folderCmp.size()); //avoid expensive reallocations!
+
+ std::for_each(folderCmp.begin(), folderCmp.end(),
+ [&](const std::shared_ptr<BaseDirMapping>& baseObj)
+ {
+ if (!baseObj->getBaseDirPf<LEFT_SIDE>().empty() || !baseObj->getBaseDirPf<RIGHT_SIDE>().empty())
+ {
+ newView.push_back(TreeView::RootNodeImpl());
+ RootNodeImpl& root = newView.back();
+ root.baseMap = baseObj;
+ this->extractVisibleSubtree(*baseObj, root, pred); //"this->" is bogus for a static method, but GCC screws this one up
+ }
+ });
+
+ applySubView(std::move(newView));
+}
+
+
+void TreeView::setSortDirection(ColumnTypeNavi colType, bool ascending) //apply permanently!
+{
+ sortColumn = colType;
+ sortAscending = ascending;
+
+ //reapply current view
+ applySubView(std::move(folderCmpView));
+}
+
+
+bool TreeView::getDefaultSortDirection(ColumnTypeNavi colType)
+{
+ switch (colType)
+ {
+ case COL_TYPE_NAVI_BYTES:
+ return false;
+ case COL_TYPE_NAVI_DIRECTORY:
+ return true;
+ }
+ assert(false);
+ return true;
+}
+
+
+TreeView::NodeStatus TreeView::getStatus(size_t row) const
+{
+ if (row < flatTree.size())
+ {
+ if (row + 1 < flatTree.size() && flatTree[row + 1].level_ > flatTree[row].level_)
+ return TreeView::STATUS_EXPANDED;
+
+ //it's either reduced or empty
+ switch (flatTree[row].type_)
+ {
+ case TreeView::TYPE_DIRECTORY:
+ case TreeView::TYPE_ROOT:
+ return flatTree[row].node_->firstFile || !flatTree[row].node_->subDirs.empty() ? TreeView::STATUS_REDUCED : TreeView::STATUS_EMPTY;
+
+ case TreeView::TYPE_FILES:
+ return TreeView::STATUS_EMPTY;
+ }
+ }
+ return TreeView::STATUS_EMPTY;
+}
+
+
+void TreeView::expandNode(size_t row)
+{
+ if (row < flatTree.size())
+ {
+ std::vector<TreeLine> newLines;
+
+ switch (flatTree[row].type_)
+ {
+ case TreeView::TYPE_ROOT:
+ case TreeView::TYPE_DIRECTORY:
+ getChildren(*flatTree[row].node_, flatTree[row].level_ + 1, newLines);
+ break;
+ case TreeView::TYPE_FILES:
+ break;
+ }
+ flatTree.insert(flatTree.begin() + row + 1, newLines.begin(), newLines.end());
+ }
+}
+
+
+void TreeView::reduceNode(size_t row)
+{
+ if (row < flatTree.size())
+ {
+ const size_t parentLevel = flatTree[row].level_;
+
+ bool done = false;
+ flatTree.erase(std::remove_if(flatTree.begin() + row + 1, flatTree.end(),
+ [&](const TreeLine& line) -> bool
+ {
+ if (done)
+ return false;
+ if (line.level_ > parentLevel)
+ return true;
+ else
+ {
+ done = true;
+ return false;
+ }
+ }), flatTree.end());
+ }
+}
+
+
+int TreeView::getParent(size_t row) const
+{
+ if (row < flatTree.size())
+ {
+ const size_t level = flatTree[row].level_;
+
+ for (; row > 0; --row)
+ if (flatTree[row - 1].level_ < level)
+ return row - 1;
+ }
+ return -1;
+}
+
+
+void TreeView::updateCmpResult(bool hideFiltered,
+ bool leftOnlyFilesActive,
+ bool rightOnlyFilesActive,
+ bool leftNewerFilesActive,
+ bool rightNewerFilesActive,
+ bool differentFilesActive,
+ bool equalFilesActive,
+ bool conflictFilesActive)
+{
+ updateView([&](const FileSystemObject& fsObj) -> bool
+ {
+ if (hideFiltered && !fsObj.isActive())
+ return false;
+
+ switch (fsObj.getCategory())
+ {
+ case FILE_LEFT_SIDE_ONLY:
+ return leftOnlyFilesActive;
+ case FILE_RIGHT_SIDE_ONLY:
+ return rightOnlyFilesActive;
+ case FILE_LEFT_NEWER:
+ return leftNewerFilesActive;
+ case FILE_RIGHT_NEWER:
+ return rightNewerFilesActive;
+ case FILE_DIFFERENT:
+ return differentFilesActive;
+ case FILE_EQUAL:
+ return equalFilesActive;
+ case FILE_CONFLICT:
+ case FILE_DIFFERENT_METADATA:
+ return conflictFilesActive;
+ }
+ assert(false);
+ return true;
+ });
+}
+
+
+void TreeView::updateSyncPreview(bool hideFiltered,
+ bool syncCreateLeftActive,
+ bool syncCreateRightActive,
+ bool syncDeleteLeftActive,
+ bool syncDeleteRightActive,
+ bool syncDirOverwLeftActive,
+ bool syncDirOverwRightActive,
+ bool syncDirNoneActive,
+ bool syncEqualActive,
+ bool conflictFilesActive)
+{
+ updateView([&](const FileSystemObject& fsObj) -> bool
+ {
+ if (hideFiltered && !fsObj.isActive())
+ return false;
+
+ switch (fsObj.getSyncOperation())
+ {
+ case SO_CREATE_NEW_LEFT:
+ case SO_MOVE_LEFT_TARGET:
+ return syncCreateLeftActive;
+ case SO_CREATE_NEW_RIGHT:
+ case SO_MOVE_RIGHT_TARGET:
+ return syncCreateRightActive;
+ case SO_DELETE_LEFT:
+ case SO_MOVE_LEFT_SOURCE:
+ return syncDeleteLeftActive;
+ case SO_DELETE_RIGHT:
+ case SO_MOVE_RIGHT_SOURCE:
+ return syncDeleteRightActive;
+ case SO_OVERWRITE_RIGHT:
+ case SO_COPY_METADATA_TO_RIGHT:
+ return syncDirOverwRightActive;
+ case SO_OVERWRITE_LEFT:
+ case SO_COPY_METADATA_TO_LEFT:
+ return syncDirOverwLeftActive;
+ case SO_DO_NOTHING:
+ return syncDirNoneActive;
+ case SO_EQUAL:
+ return syncEqualActive;
+ case SO_UNRESOLVED_CONFLICT:
+ return conflictFilesActive;
+ }
+ assert(false);
+ return true;
+ });
+}
+
+
+void TreeView::setData(FolderComparison& newData)
+{
+ std::vector<TreeLine >().swap(flatTree); //free mem
+ std::vector<RootNodeImpl>().swap(folderCmpView); //
+ folderCmp = newData;
+}
+
+
+std::unique_ptr<TreeView::Node> TreeView::getLine(size_t row) const
+{
+ if (row < flatTree.size())
+ {
+ const auto level = flatTree[row].level_;
+
+ const int percent = flatTree[row].percent_;
+ switch (flatTree[row].type_)
+ {
+ case TreeView::TYPE_ROOT:
+ {
+ const auto* root = static_cast<const TreeView::RootNodeImpl*>(flatTree[row].node_);
+ return make_unique<TreeView::RootNode>(percent, getStatus(row), root->bytesGross, *(root->baseMap));
+ }
+ break;
+
+ case TreeView::TYPE_DIRECTORY:
+ {
+ const auto* dir = static_cast<const TreeView::DirNodeImpl*>(flatTree[row].node_);
+ if (auto dirObj = dynamic_cast<DirMapping*>(FileSystemObject::retrieve(dir->objId)))
+ return make_unique<TreeView::DirNode>(percent, level, getStatus(row), dir->bytesGross, *dirObj);
+ }
+ break;
+
+ case TreeView::TYPE_FILES:
+ {
+ const auto* parentDir = flatTree[row].node_;
+ if (auto firstFile = FileSystemObject::retrieve(parentDir->firstFile))
+ return make_unique<TreeView::FilesNode>(percent, level, parentDir->bytesNet, *firstFile);
+ }
+ break;
+ }
+ }
+ return NULL;
+}
+
+//##########################################################################################################
+
+namespace
+{
+const wxColour COLOR_LEVEL0(0xcc, 0xcc, 0xff);
+const wxColour COLOR_LEVEL1(0xcc, 0xff, 0xcc);
+const wxColour COLOR_LEVEL2(0xff, 0xff, 0x99);
+
+const wxColour COLOR_LEVEL3(0xcc, 0xff, 0xff);
+const wxColour COLOR_LEVEL4(0xff, 0xcc, 0xff);
+const wxColour COLOR_LEVEL5(0x99, 0xff, 0xcc);
+
+const wxColour COLOR_LEVEL6(0xcc, 0xcc, 0x99);
+const wxColour COLOR_LEVEL7(0xff, 0xcc, 0xcc);
+const wxColour COLOR_LEVEL8(0xcc, 0xff, 0x99);
+
+const wxColour COLOR_LEVEL9 (0xff, 0xff, 0xcc);
+const wxColour COLOR_LEVEL10(0xcc, 0xcc, 0xcc);
+const wxColour COLOR_LEVEL11(0xff, 0xcc, 0x99);
+
+const wxColour COLOR_PERCENTAGE_BORDER(198, 198, 198);
+const wxColour COLOR_PERCENTAGE_BACKGROUND(0xf8, 0xf8, 0xf8);
+
+//const wxColor COLOR_TREE_SELECTION_GRADIENT_FROM = wxColor( 89, 255, 99); //green: H:88 S:255 V:172
+//const wxColor COLOR_TREE_SELECTION_GRADIENT_TO = wxColor(225, 255, 227); // H:88 S:255 V:240
+const wxColor COLOR_TREE_SELECTION_GRADIENT_FROM = getColorSelectionGradientFrom();
+const wxColor COLOR_TREE_SELECTION_GRADIENT_TO = getColorSelectionGradientTo ();
+
+
+class GridDataNavi : private wxEvtHandler, public GridData
+{
+public:
+ GridDataNavi(Grid& grid, const std::shared_ptr<TreeView>& treeDataView) : treeDataView_(treeDataView),
+ fileIcon(IconBuffer(IconBuffer::SIZE_SMALL).genericFileIcon()),
+ dirIcon (IconBuffer(IconBuffer::SIZE_SMALL).genericDirIcon ()),
+ rootBmp(GlobalResources::getImage(L"rootFolder").ConvertToImage().Scale(fileIcon.GetWidth(), fileIcon.GetHeight(), wxIMAGE_QUALITY_HIGH)),
+ widthNodeIcon(fileIcon.GetWidth()),
+ widthLevelStep(widthNodeIcon),
+ widthNodeStatus(GlobalResources::getImage(L"nodeExpanded").GetWidth()),
+ grid_(grid),
+ showPercentBar(true)
+ {
+ grid.getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(GridDataNavi::onKeyDown), NULL, this);
+ grid.Connect(EVENT_GRID_MOUSE_LEFT_DOWN, GridClickEventHandler(GridDataNavi::onMouseLeft ), NULL, this);
+ grid.Connect(EVENT_GRID_MOUSE_LEFT_DOUBLE, GridClickEventHandler(GridDataNavi::onMouseLeftDouble ), NULL, this);
+ grid.Connect(EVENT_GRID_COL_LABEL_MOUSE_RIGHT, GridClickEventHandler(GridDataNavi::onGridLabelContext), NULL, this );
+ grid.Connect(EVENT_GRID_COL_LABEL_MOUSE_LEFT, GridClickEventHandler(GridDataNavi::onGridLabelLeftClick ), NULL, this );
+ }
+
+ void setShowPercentage(bool value) { showPercentBar = value; grid_.Refresh(); }
+ bool getShowPercentage() const { return showPercentBar; }
+
+private:
+ virtual size_t getRowCount() const { return treeDataView_ ? treeDataView_->linesTotal() : 0; }
+
+ virtual wxString getValue(int row, ColumnType colType) const
+ {
+ if (treeDataView_)
+ {
+ if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(row))
+ switch (static_cast<ColumnTypeNavi>(colType))
+ {
+ case COL_TYPE_NAVI_BYTES:
+ return filesizeToShortString(to<Int64>(node->bytes_));
+
+ case COL_TYPE_NAVI_DIRECTORY:
+ if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get()))
+ {
+ const wxString dirLeft = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<LEFT_SIDE >(), FILE_NAME_SEPARATOR));
+ const wxString dirRight = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<RIGHT_SIDE>(), FILE_NAME_SEPARATOR));
+
+ if (dirLeft.empty())
+ return dirRight;
+ else if (dirRight.empty())
+ return dirLeft;
+ else
+ return utf8CvrtTo<wxString>(dirLeft + L" \x2212 " + dirRight); //\x2212 = unicode minus
+ }
+ else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
+ return utf8CvrtTo<wxString>(dir->dirObj_.getObjShortName());
+ else if (dynamic_cast<const TreeView::FilesNode*>(node.get()))
+ return _("Files");
+ break;
+ }
+ }
+ return wxEmptyString;
+ }
+
+ virtual void renderColumnLabel(Grid& tree, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted)
+ {
+ wxRect rectInside = drawColumnLabelBorder(dc, rect);
+ drawColumnLabelBackground(dc, rectInside, highlighted);
+
+ const int COLUMN_BORDER_LEFT = 4;
+
+ rectInside.x += COLUMN_BORDER_LEFT;
+ rectInside.width -= COLUMN_BORDER_LEFT;
+ drawColumnLabelText(dc, rectInside, getColumnLabel(colType));
+
+ if (treeDataView_) //draw sort marker
+ {
+ auto sortInfo = treeDataView_->getSortDirection();
+ if (colType == static_cast<ColumnType>(sortInfo.first))
+ {
+ const wxBitmap& marker = GlobalResources::getImage(sortInfo.second ? L"sortAscending" : L"sortDescending");
+ wxPoint markerBegin = rectInside.GetTopLeft() + wxPoint((rectInside.width - marker.GetWidth()) / 2, 0);
+ dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel border
+ }
+ }
+ }
+
+ static const int CELL_BORDER = 2;
+
+ virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus)
+ {
+ if (enabled)
+ {
+ if (selected)
+ dc.GradientFillLinear(rect, COLOR_TREE_SELECTION_GRADIENT_FROM, COLOR_TREE_SELECTION_GRADIENT_TO, wxEAST);
+ //ignore focus
+ else
+ clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+ }
+ else
+ clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+ }
+
+ virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType)
+ {
+ //wxRect rectTmp= drawCellBorder(dc, rect);
+ wxRect rectTmp = rect;
+
+ // Partitioning:
+ // ___________________________________________________________________________________________
+ // | space | border | percentage bar | 2 x border | node status | border |icon | border | rest |
+ // --------------------------------------------------------------------------------------------
+ // -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft()
+
+ if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_)
+ {
+ if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(row))
+ {
+ ////clear first secion:
+ //clearArea(dc, wxRect(rect.GetTopLeft(), wxSize(
+ // node->level_ * widthLevelStep + CELL_BORDER + //width
+ // (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0) + //
+ // widthNodeStatus + CELL_BORDER + widthNodeIcon + CELL_BORDER, //
+ // rect.height)), wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+
+ //consume space
+ rectTmp.x += node->level_ * widthLevelStep;
+ rectTmp.width -= node->level_ * widthLevelStep;
+
+ rectTmp.x += CELL_BORDER;
+ rectTmp.width -= CELL_BORDER;
+
+ if (rectTmp.width > 0)
+ {
+ //percentage bar
+ if (showPercentBar)
+ {
+ const wxColour brushCol = [&]() -> wxColour
+ {
+ switch (node->level_ % 12)
+ {
+ case 0:
+ return COLOR_LEVEL0;
+ case 1:
+ return COLOR_LEVEL1;
+ case 2:
+ return COLOR_LEVEL2;
+ case 3:
+ return COLOR_LEVEL3;
+ case 4:
+ return COLOR_LEVEL4;
+ case 5:
+ return COLOR_LEVEL5;
+ case 6:
+ return COLOR_LEVEL6;
+ case 7:
+ return COLOR_LEVEL7;
+ case 8:
+ return COLOR_LEVEL8;
+ case 9:
+ return COLOR_LEVEL9;
+ case 10:
+ return COLOR_LEVEL10;
+ default:
+ return COLOR_LEVEL11;
+ }
+ }();
+
+ const wxRect areaPerc(rectTmp.x, rectTmp.y + 2, widthPercentBar, rectTmp.height - 4);
+ {
+ //background
+ wxDCPenChanger dummy(dc, *wxTRANSPARENT_PEN);
+ wxDCBrushChanger dummy2(dc, COLOR_PERCENTAGE_BACKGROUND);
+ dc.DrawRectangle(areaPerc);
+
+ //inner area
+ dc.SetBrush(brushCol);
+
+ wxRect areaPercTmp = areaPerc;
+ areaPercTmp.width -= 2; //do not include left/right border
+ areaPercTmp.x += 1; //
+ areaPercTmp.width *= node->percent_ / 100.0;
+ dc.DrawRectangle(areaPercTmp);
+
+ //outer border
+ dc.SetPen(COLOR_PERCENTAGE_BORDER);
+ dc.SetBrush(*wxTRANSPARENT_BRUSH);
+ dc.DrawRectangle(areaPerc);
+ }
+ dc.DrawLabel(toString<wxString>(node->percent_) + L"%", areaPerc, wxALIGN_CENTER);
+
+ rectTmp.x += widthPercentBar + 2 * CELL_BORDER;
+ rectTmp.width -= widthPercentBar + 2 * CELL_BORDER;
+ }
+ if (rectTmp.width > 0)
+ {
+ //node status
+ auto drawStatus = [&](const wchar_t* image)
+ {
+ const wxBitmap& bmp = GlobalResources::getImage(image);
+
+ wxRect rectStat(rectTmp.GetTopLeft(), wxSize(bmp.GetWidth(), bmp.GetHeight()));
+ rectStat.y += (rectTmp.height - rectStat.height) / 2;
+
+ clearArea(dc, rectStat, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+ drawBitmapRtlMirror(dc, bmp, rectStat, wxALIGN_CENTER, buffer);
+ };
+
+ switch (node->status_)
+ {
+ case TreeView::STATUS_EXPANDED:
+ drawStatus(L"nodeExpanded");
+ break;
+ case TreeView::STATUS_REDUCED:
+ drawStatus(L"nodeReduced");
+ break;
+ case TreeView::STATUS_EMPTY:
+ break;
+ }
+
+ rectTmp.x += widthNodeStatus + CELL_BORDER;
+ rectTmp.width -= widthNodeStatus + CELL_BORDER;
+ if (rectTmp.width > 0)
+ {
+ bool isActive = true;
+ //icon
+ if (dynamic_cast<const TreeView::RootNode*>(node.get()))
+ drawBitmapRtlNoMirror(dc, rootBmp, rectTmp, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, buffer);
+ else if (auto dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
+ {
+ drawIconRtlNoMirror(dc, dirIcon, rectTmp.GetTopLeft() + wxPoint(0, (rectTmp.height - dirIcon.GetHeight()) / 2), buffer);
+ isActive = dir->dirObj_.isActive();
+ }
+ else if (dynamic_cast<const TreeView::FilesNode*>(node.get()))
+ drawIconRtlNoMirror(dc, fileIcon, rectTmp.GetTopLeft() + wxPoint(0, (rectTmp.height - fileIcon.GetHeight()) / 2), buffer);
+
+ //convert icon to greyscale if row is not active
+ if (!isActive)
+ {
+ wxBitmap bmp(widthNodeIcon, rectTmp.height);
+ wxMemoryDC memDc(bmp);
+ memDc.Blit(0, 0, widthNodeIcon, rectTmp.height, &dc, rectTmp.x, rectTmp.y); //blit in
+
+ bmp = wxBitmap(bmp.ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3)); //treat all channels equally!
+ memDc.SelectObject(bmp);
+
+ dc.Blit(rectTmp.x, rectTmp.y, widthNodeIcon, rectTmp.height, &memDc, 0, 0); //blit out
+ }
+
+ rectTmp.x += widthNodeIcon + CELL_BORDER;
+ rectTmp.width -= widthNodeIcon + CELL_BORDER;
+
+ if (rectTmp.width > 0)
+ drawCellText(dc, rectTmp, getValue(row, colType), grid.IsEnabled(), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ int alignment = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL;
+
+ //have file size right-justified (but don't change for RTL languages)
+ if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_BYTES && grid.GetLayoutDirection() != wxLayout_RightToLeft)
+ {
+ rectTmp.width -= 2 * CELL_BORDER;
+ alignment = wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL;
+ }
+ else //left-justified
+ {
+ rectTmp.x += 2 * CELL_BORDER;
+ rectTmp.width -= 2 * CELL_BORDER;
+ }
+
+ drawCellText(dc, rectTmp, getValue(row, colType), grid.IsEnabled(), alignment);
+ }
+ }
+
+ virtual size_t getBestSize(wxDC& dc, int row, ColumnType colType)
+ {
+ // -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft()
+
+ if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_)
+ {
+ if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(row))
+ return node->level_ * widthLevelStep + CELL_BORDER + (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0) + widthNodeStatus + CELL_BORDER
+ + widthNodeIcon + CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() +
+ CELL_BORDER; //additional border from right
+ else
+ return 0;
+ }
+ else
+ return 2 * CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() +
+ 2 * CELL_BORDER; //include border from right!
+ }
+
+ virtual wxString getColumnLabel(ColumnType colType) const
+ {
+ switch (static_cast<ColumnTypeNavi>(colType))
+ {
+ case COL_TYPE_NAVI_BYTES:
+ return _("Size");
+ case COL_TYPE_NAVI_DIRECTORY:
+ return _("Name");
+ }
+ return wxEmptyString;
+ }
+
+ void onMouseLeft(GridClickEvent& event)
+ {
+ if (treeDataView_)
+ {
+ bool clickOnNodeStatus = false;
+ if (static_cast<ColumnTypeNavi>(event.colType_) == COL_TYPE_NAVI_DIRECTORY)
+ if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(event.row_))
+ {
+ const int absX = grid_.CalcUnscrolledPosition(event.GetPosition()).x;
+ const wxRect cellArea = grid_.getCellArea(event.row_, event.colType_);
+ if (cellArea.width > 0 && cellArea.height > 0)
+ {
+ const int tolerance = 1;
+ const int xNodeStatusFirst = -tolerance + cellArea.x + node->level_ * widthLevelStep + CELL_BORDER + (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0);
+ const int xNodeStatusLast = xNodeStatusFirst + widthNodeStatus + 2 * tolerance;
+ // -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft()
+
+ if (xNodeStatusFirst <= absX && absX < xNodeStatusLast)
+ clickOnNodeStatus = true;
+ }
+ }
+ //--------------------------------------------------------------------------------------------------
+
+ if (clickOnNodeStatus && event.row_ >= 0)
+ switch (treeDataView_->getStatus(event.row_))
+ {
+ case TreeView::STATUS_EXPANDED:
+ return reduceNode(event.row_);
+ case TreeView::STATUS_REDUCED:
+ return expandNode(event.row_);
+ case TreeView::STATUS_EMPTY:
+ break;
+ }
+ }
+ event.Skip();
+ }
+
+ void onMouseLeftDouble(GridClickEvent& event)
+ {
+ if (event.row_ >= 0 && treeDataView_)
+ switch (treeDataView_->getStatus(event.row_))
+ {
+ case TreeView::STATUS_EXPANDED:
+ return reduceNode(event.row_);
+ case TreeView::STATUS_REDUCED:
+ return expandNode(event.row_);
+ case TreeView::STATUS_EMPTY:
+ break;
+ }
+ event.Skip();
+ }
+
+ void onKeyDown(wxKeyEvent& event)
+ {
+ int keyCode = event.GetKeyCode();
+ if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft)
+ {
+ if (keyCode == WXK_LEFT)
+ keyCode = WXK_RIGHT;
+ else if (keyCode == WXK_RIGHT)
+ keyCode = WXK_LEFT;
+ else if (keyCode == WXK_NUMPAD_LEFT)
+ keyCode = WXK_NUMPAD_RIGHT;
+ else if (keyCode == WXK_NUMPAD_RIGHT)
+ keyCode = WXK_NUMPAD_LEFT;
+ }
+
+ int row = grid_.getGridCursor().first;
+ if (row < 0)
+ {
+ row = 0;
+ grid_.setGridCursor(0);
+ }
+ else
+ {
+ if (event.ShiftDown())
+ ;
+ else if (event.ControlDown())
+ ;
+ else
+ switch (keyCode)
+ {
+ case WXK_LEFT:
+ case WXK_NUMPAD_LEFT:
+ if (treeDataView_)
+ switch (treeDataView_->getStatus(row))
+ {
+ case TreeView::STATUS_EXPANDED:
+ return reduceNode(row);
+ case TreeView::STATUS_REDUCED:
+ case TreeView::STATUS_EMPTY:
+
+ const int parentRow = treeDataView_->getParent(row);
+ if (parentRow >= 0)
+ grid_.setGridCursor(parentRow);
+ break;
+ }
+ return; //swallow event
+
+ case WXK_RIGHT:
+ case WXK_NUMPAD_RIGHT:
+ if (treeDataView_)
+ switch (treeDataView_->getStatus(row))
+ {
+ case TreeView::STATUS_EXPANDED:
+ grid_.setGridCursor(std::min(static_cast<int>(grid_.getRowCount()) - 1, row + 1));
+ break;
+ case TreeView::STATUS_REDUCED:
+ return expandNode(row);
+ case TreeView::STATUS_EMPTY:
+ break;
+ }
+ return; //swallow event
+ }
+ }
+
+ event.Skip();
+ }
+
+ void onGridLabelContext(GridClickEvent& event)
+ {
+ ContextMenu menu;
+
+ //--------------------------------------------------------------------------------------------------------
+ auto toggleColumn = [&](const Grid::ColumnAttribute& ca)
+ {
+ auto colAttr = grid_.getColumnConfig();
+
+ for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter)
+ if (iter->type_ == ca.type_)
+ {
+ iter->visible_ = !ca.visible_;
+ grid_.setColumnConfig(colAttr);
+ return;
+ }
+ };
+
+ const auto& colAttr = grid_.getColumnConfig();
+ for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter)
+ {
+ const Grid::ColumnAttribute& ca = *iter;
+
+ menu.addCheckBox(getColumnLabel(ca.type_), [ca, toggleColumn]() { toggleColumn(ca); },
+ ca.visible_, ca.type_ != static_cast<ColumnType>(COL_TYPE_NAVI_DIRECTORY)); //do not allow user to hide file name column!
+ }
+ //--------------------------------------------------------------------------------------------------------
+ menu.addCheckBox(_("Percentage"), [this] { setShowPercentage(!getShowPercentage()); }, getShowPercentage());
+ //--------------------------------------------------------------------------------------------------------
+ menu.addSeparator();
+
+ auto setDefaultColumns = [&]
+ {
+ setShowPercentage(defaultValueShowPercentage);
+ grid_.setColumnConfig(treeview::convertConfig(getDefaultColumnAttributesNavi()));
+ };
+ menu.addItem(_("&Default"), setDefaultColumns); //'&' -> reuse text from "default" buttons elsewhere
+
+ menu.popup(grid_);
+
+ event.Skip();
+ }
+
+ void onGridLabelLeftClick(GridClickEvent& event)
+ {
+ if (treeDataView_)
+ {
+ const auto colTypeNavi = static_cast<ColumnTypeNavi>(event.colType_);
+ bool sortAscending = TreeView::getDefaultSortDirection(colTypeNavi);
+
+ const auto sortInfo = treeDataView_->getSortDirection();
+ if (sortInfo.first == colTypeNavi)
+ sortAscending = !sortInfo.second;
+
+ treeDataView_->setSortDirection(colTypeNavi, sortAscending);
+ grid_.clearSelection();
+ grid_.Refresh();
+ }
+ }
+
+ void expandNode(int row)
+ {
+ treeDataView_->expandNode(row);
+ grid_.Refresh(); //this one clears selection (changed row count)
+ grid_.setGridCursor(row);
+ //grid_.autoSizeColumns(); -> doesn't look as good as expected
+ }
+
+ void reduceNode(int row)
+ {
+ treeDataView_->reduceNode(row);
+ grid_.Refresh(); //this one clears selection (changed row count)
+ grid_.setGridCursor(row);
+ //grid_.autoSizeColumns(); -> doesn't look as good as expected
+ }
+
+ std::shared_ptr<TreeView> treeDataView_;
+ const wxIcon fileIcon;
+ const wxIcon dirIcon;
+ const wxBitmap rootBmp;
+ std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable
+ const int widthNodeIcon;
+ const int widthLevelStep;
+ const int widthNodeStatus;
+ static const int widthPercentBar = 60;
+ Grid& grid_;
+ bool showPercentBar;
+};
+}
+
+
+void treeview::init(Grid& grid, const std::shared_ptr<TreeView>& treeDataView)
+{
+ grid.setDataProvider(std::make_shared<GridDataNavi>(grid, treeDataView));
+ grid.showRowLabel(false);
+ grid.setRowHeight(IconBuffer(IconBuffer::SIZE_SMALL).getSize() + 2); //add some space
+}
+
+
+void treeview::setShowPercentage(Grid& grid, bool value)
+{
+ if (auto* prov = dynamic_cast<GridDataNavi*>(grid.getDataProvider()))
+ prov->setShowPercentage(value);
+ else
+ assert(false);
+}
+
+
+bool treeview::getShowPercentage(const Grid& grid)
+{
+ if (auto* prov = dynamic_cast<const GridDataNavi*>(grid.getDataProvider()))
+ return prov->getShowPercentage();
+ assert(false);
+ return true;
+}
+
+
+namespace
+{
+std::vector<ColumnAttributeNavi> makeConsistent(const std::vector<ColumnAttributeNavi>& attribs)
+{
+ std::set<ColumnTypeNavi> usedTypes;
+
+ std::vector<ColumnAttributeNavi> output;
+ //remove duplicates
+ std::copy_if(attribs.begin(), attribs.end(), std::back_inserter(output),
+ [&](const ColumnAttributeNavi& a) { return usedTypes.insert(a.type_).second; });
+
+ //make sure each type is existing!
+ const auto& defAttr = getDefaultColumnAttributesNavi();
+ std::copy_if(defAttr.begin(), defAttr.end(), std::back_inserter(output),
+ [&](const ColumnAttributeNavi& a) { return usedTypes.insert(a.type_).second; });
+
+ return output;
+}
+}
+
+std::vector<Grid::ColumnAttribute> treeview::convertConfig(const std::vector<ColumnAttributeNavi>& attribs)
+{
+ const auto& attribClean = makeConsistent(attribs);
+
+ std::vector<Grid::ColumnAttribute> output;
+ std::transform(attribClean.begin(), attribClean.end(), std::back_inserter(output),
+ [&](const ColumnAttributeNavi& a) { return Grid::ColumnAttribute(static_cast<ColumnType>(a.type_), a.width_, a.visible_); });
+
+ return output;
+}
+
+
+std::vector<ColumnAttributeNavi> treeview::convertConfig(const std::vector<Grid::ColumnAttribute>& attribs)
+{
+ std::vector<ColumnAttributeNavi> output;
+
+ std::transform(attribs.begin(), attribs.end(), std::back_inserter(output),
+ [&](const Grid::ColumnAttribute& ca) { return ColumnAttributeNavi(static_cast<ColumnTypeNavi>(ca.type_), ca.width_, ca.visible_); });
+
+ return makeConsistent(output);
+}
diff --git a/ui/tree_view.h b/ui/tree_view.h
new file mode 100644
index 00000000..9f8cb526
--- /dev/null
+++ b/ui/tree_view.h
@@ -0,0 +1,176 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
+// **************************************************************************
+
+#ifndef TREE_H_INCLUDED_841703190201835280256673425
+#define TREE_H_INCLUDED_841703190201835280256673425
+
+#include <wx+/grid.h>
+#include "../file_hierarchy.h"
+#include "column_attr.h"
+#include <zen/optional.h>
+
+namespace zen
+{
+//tree view of FolderComparison
+class TreeView
+{
+public:
+ TreeView() :
+ sortColumn(defaultValueLastSortColumn),
+ sortAscending(defaultValueLastSortAscending) {}
+
+ void setData(FolderComparison& newData); //set data, taking (partial) ownership
+
+ //apply view filter: comparison results
+ void updateCmpResult(bool hideFiltered,
+ bool leftOnlyFilesActive,
+ bool rightOnlyFilesActive,
+ bool leftNewerFilesActive,
+ bool rightNewerFilesActive,
+ bool differentFilesActive,
+ bool equalFilesActive,
+ bool conflictFilesActive);
+
+ //apply view filter: synchronization preview
+ void updateSyncPreview(bool hideFiltered,
+ bool syncCreateLeftActive,
+ bool syncCreateRightActive,
+ bool syncDeleteLeftActive,
+ bool syncDeleteRightActive,
+ bool syncDirOverwLeftActive,
+ bool syncDirOverwRightActive,
+ bool syncDirNoneActive,
+ bool syncEqualActive,
+ bool conflictFilesActive);
+
+ enum NodeStatus
+ {
+ STATUS_EXPANDED,
+ STATUS_REDUCED,
+ STATUS_EMPTY
+ };
+
+ //---------------------------------------------------------------------
+ struct Node
+ {
+ Node(int percent, size_t level, NodeStatus status, UInt64 bytes) :
+ percent_(percent), level_(level), status_(status), bytes_(bytes) {}
+ virtual ~Node() {}
+
+ const int percent_; //[0, 100]
+ const size_t level_;
+ const NodeStatus status_;
+ const UInt64 bytes_;
+ };
+
+ struct FilesNode : public Node
+ {
+ FilesNode(int percent, size_t level, UInt64 bytes, FileSystemObject& firstFile) : Node(percent, level, STATUS_EMPTY, bytes), firstFile_(firstFile) {}
+ FileSystemObject& firstFile_; //or symlink
+ };
+
+ struct DirNode : public Node
+ {
+ DirNode(int percent, size_t level, NodeStatus status, UInt64 bytes, DirMapping& dirObj) : Node(percent, level, status, bytes), dirObj_(dirObj) {}
+ DirMapping& dirObj_;
+ };
+
+ struct RootNode : public Node
+ {
+ RootNode(int percent, NodeStatus status, UInt64 bytes, BaseDirMapping& baseMap) : Node(percent, 0, status, bytes), baseMap_(baseMap) {}
+ BaseDirMapping& baseMap_;
+ };
+
+ std::unique_ptr<Node> getLine(size_t row) const; //return NULL on error
+ size_t linesTotal() const { return flatTree.size(); }
+
+ void expandNode(size_t row);
+ void reduceNode(size_t row);
+ NodeStatus getStatus(size_t row) const;
+ int getParent(size_t row) const; //return < 0 if none
+
+ void setSortDirection(ColumnTypeNavi colType, bool ascending); //apply permanently!
+ std::pair<ColumnTypeNavi, bool> getSortDirection() { return std::make_pair(sortColumn, sortAscending); }
+ static bool getDefaultSortDirection(ColumnTypeNavi colType); //ascending?
+
+private:
+ struct DirNodeImpl;
+
+ struct Container
+ {
+ Container() : firstFile(NULL) {}
+ UInt64 bytesGross;
+ UInt64 bytesNet; //files in this directory only
+ std::vector<DirNodeImpl> subDirs;
+ FileSystemObject::ObjectId firstFile; //weak pointer to first FileMapping or SymLinkMapping
+ };
+
+ struct DirNodeImpl : public Container
+ {
+ DirNodeImpl() : objId(NULL) {}
+ FileSystemObject::ObjectId objId; //weak pointer to DirMapping
+ };
+
+ struct RootNodeImpl : public Container
+ {
+ RootNodeImpl() {}
+ std::shared_ptr<BaseDirMapping> baseMap;
+ };
+
+ enum NodeType
+ {
+ TYPE_ROOT, //-> RootNodeImpl
+ TYPE_DIRECTORY, //-> DirNodeImpl
+ TYPE_FILES //-> Container
+ };
+
+ struct TreeLine
+ {
+ TreeLine(unsigned int level, int percent, const Container* node, enum NodeType type) : level_(level), percent_(percent), node_(node), type_(type) {}
+
+ unsigned int level_;
+ int percent_; //[0, 100]
+ const Container* node_; //
+ NodeType type_; //we choose to increase size of "flatTree" rather than "folderCmpView" by not using dynamic polymorphism!
+ };
+
+ template <class Function>
+ static void extractVisibleSubtree(HierarchyObject& hierObj, Container& cont, Function includeObject);
+ void getChildren(const Container& cont, size_t level, std::vector<TreeLine>& output);
+ template <class Predicate> void updateView(Predicate pred);
+ void applySubView(std::vector<RootNodeImpl>&& newView);
+
+ template <bool ascending> static void sortSingleLevel(std::vector<TreeLine>& items, ColumnTypeNavi columnType);
+ template <bool ascending> struct LessShortName;
+
+ std::vector<TreeLine> flatTree; //collapsable/expandable sub-tree of partial view -> always sorted!
+ /* /|\
+ | (update...)
+ | */
+ std::vector<RootNodeImpl> folderCmpView; //partial view on folderCmp -> unsorted(cannot be, because of files!)
+ /* /|\
+ | (update...)
+ | */
+ std::vector<std::shared_ptr<BaseDirMapping>> folderCmp; //full raw data
+
+ ColumnTypeNavi sortColumn;
+ bool sortAscending;
+};
+
+
+namespace treeview
+{
+void init(Grid& grid, const std::shared_ptr<TreeView>& treeDataView);
+
+void setShowPercentage(Grid& grid, bool value);
+bool getShowPercentage(const Grid& grid);
+
+std::vector<Grid::ColumnAttribute> convertConfig(const std::vector<ColumnAttributeNavi >& attribs); //+ make consistent
+std::vector<ColumnAttributeNavi> convertConfig(const std::vector<Grid::ColumnAttribute>& attribs); //
+}
+}
+
+#endif //TREE_H_INCLUDED_841703190201835280256673425
diff --git a/ui/wx_form_build_hide_warnings.h b/ui/wx_form_build_hide_warnings.h
index 5988aa12..5b852e0f 100644
--- a/ui/wx_form_build_hide_warnings.h
+++ b/ui/wx_form_build_hide_warnings.h
@@ -1,7 +1,7 @@
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) *
+// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef WX_FORM_BUILD_230948324234234
bgstack15