From 32cb97237e7691d31977ab503c6ea4511e8eb3a8 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:18:53 +0200 Subject: 5.0 --- Application.cpp | 2 +- Application.h | 2 +- BUILD/Changelog.txt | 10 +- BUILD/FreeFileSync.chm | Bin 640380 -> 640434 bytes BUILD/Help/html/ExternalApp.html | 14 +- BUILD/Languages/chinese_simple.lng | 166 +- BUILD/Languages/chinese_traditional.lng | 209 +- BUILD/Languages/croatian.lng | 169 +- BUILD/Languages/czech.lng | 164 +- BUILD/Languages/danish.lng | 169 +- BUILD/Languages/dutch.lng | 169 +- BUILD/Languages/english_uk.lng | 166 +- BUILD/Languages/finnish.lng | 166 +- BUILD/Languages/french.lng | 207 +- BUILD/Languages/german.lng | 178 +- BUILD/Languages/greek.lng | 169 +- BUILD/Languages/hebrew.lng | 242 +- BUILD/Languages/hungarian.lng | 205 +- BUILD/Languages/italian.lng | 183 +- BUILD/Languages/japanese.lng | 168 +- BUILD/Languages/korean.lng | 169 +- BUILD/Languages/polish.lng | 183 +- BUILD/Languages/portuguese.lng | 167 +- BUILD/Languages/portuguese_br.lng | 185 +- BUILD/Languages/romanian.lng | 184 +- BUILD/Languages/russian.lng | 171 +- BUILD/Languages/slovenian.lng | 169 +- BUILD/Languages/spanish.lng | 169 +- BUILD/Languages/swedish.lng | 166 +- BUILD/Languages/turkish.lng | 168 +- BUILD/Languages/ukrainian.lng | 166 +- BUILD/Resources.zip | Bin 273019 -> 287958 bytes Cleanup.cmd | 70 - FreeFileSync.cbp | 36 +- FreeFileSync.vcxproj | 310 +- Makefile | 137 +- RealtimeSync/application.cpp | 2 +- RealtimeSync/application.h | 2 +- RealtimeSync/gui_generated.cpp | 70 +- RealtimeSync/gui_generated.h | 11 +- RealtimeSync/main_dlg.cpp | 10 +- RealtimeSync/main_dlg.h | 4 +- RealtimeSync/makefile | 73 +- RealtimeSync/resources.cpp | 2 +- RealtimeSync/resources.h | 2 +- RealtimeSync/tray_menu.cpp | 2 +- RealtimeSync/tray_menu.h | 2 +- RealtimeSync/watcher.cpp | 2 +- RealtimeSync/watcher.h | 2 +- RealtimeSync/xml_ffs.cpp | 2 +- RealtimeSync/xml_ffs.h | 2 +- RealtimeSync/xml_proc.cpp | 2 +- RealtimeSync/xml_proc.h | 2 +- algorithm.cpp | 76 +- algorithm.h | 22 +- comparison.cpp | 28 +- comparison.h | 2 +- file_hierarchy.cpp | 16 +- file_hierarchy.h | 44 +- lib/IFileOperation/dll_main.cpp | 2 +- lib/IFileOperation/file_op.cpp | 2 +- lib/IFileOperation/file_op.h | 2 +- lib/ShadowCopy/LockFile.cpp | 2 +- lib/ShadowCopy/dll_main.cpp | 2 +- lib/ShadowCopy/shadow.cpp | 39 +- lib/ShadowCopy/shadow.h | 2 +- lib/Thumbnail/dll_main.cpp | 2 +- lib/Thumbnail/thumbnail.cpp | 2 +- lib/Thumbnail/thumbnail.h | 2 +- lib/binary.cpp | 2 +- lib/binary.h | 2 +- lib/custom_grid.cpp | 2422 ---------- lib/custom_grid.h | 370 -- lib/db_file.cpp | 4 +- lib/db_file.h | 2 +- lib/dir_exist_async.h | 2 +- lib/dir_lock.cpp | 5 + lib/dir_lock.h | 5 + lib/error_log.cpp | 2 +- lib/error_log.h | 2 +- lib/ffs_paths.h | 2 +- lib/hard_filter.cpp | 2 +- lib/hard_filter.h | 2 +- lib/help_provider.h | 2 +- lib/icon_buffer.cpp | 4 +- lib/icon_buffer.h | 2 +- lib/localization.cpp | 12 +- lib/localization.h | 2 +- lib/norm_filter.h | 2 +- lib/parallel_scan.cpp | 2 +- lib/parallel_scan.h | 4 +- lib/parse_lng.h | 2 +- lib/parse_plural.h | 2 +- lib/process_xml.cpp | 116 +- lib/process_xml.h | 69 +- lib/recycler.cpp | 2 +- lib/recycler.h | 2 +- lib/resolve_path.cpp | 2 +- lib/resolve_path.h | 2 +- lib/resources.cpp | 6 +- lib/resources.h | 4 +- lib/shadow.cpp | 4 +- lib/shadow.h | 2 +- lib/soft_filter.h | 2 +- lib/statistics.cpp | 2 +- lib/statistics.h | 2 +- lib/status_handler.cpp | 2 +- lib/status_handler.h | 5 +- lib/xml_base.cpp | 2 +- lib/xml_base.h | 2 +- structures.cpp | 8 +- structures.h | 2 +- synchronization.cpp | 98 +- synchronization.h | 2 +- ui/Taskbar_Seven/dll_main.cpp | 2 +- ui/Taskbar_Seven/taskbar.cpp | 2 +- ui/Taskbar_Seven/taskbar.h | 2 +- ui/batch_config.cpp | 93 +- ui/batch_config.h | 2 +- ui/batch_status_handler.cpp | 7 +- ui/batch_status_handler.h | 2 +- ui/check_version.cpp | 2 +- ui/check_version.h | 2 +- ui/column_attr.h | 120 + ui/custom_grid.cpp | 1414 ++++++ ui/custom_grid.h | 83 + ui/dir_name.cpp | 51 +- ui/dir_name.h | 17 +- ui/exec_finished_box.cpp | 2 +- ui/exec_finished_box.h | 2 +- ui/folder_history_box.cpp | 2 +- ui/folder_history_box.h | 2 +- ui/folder_pair.h | 64 +- ui/grid_view.cpp | 387 +- ui/grid_view.h | 103 +- ui/gui_generated.cpp | 7503 +++++++++++++++---------------- ui/gui_generated.h | 1690 ++++--- ui/gui_status_handler.cpp | 4 +- ui/gui_status_handler.h | 2 +- ui/main_dlg.cpp | 2563 ++++------- ui/main_dlg.h | 157 +- ui/msg_popup.cpp | 2 +- ui/msg_popup.h | 2 +- ui/progress_indicator.cpp | 17 +- ui/progress_indicator.h | 2 +- ui/search.cpp | 220 +- ui/search.h | 10 +- ui/small_dlgs.cpp | 178 +- ui/small_dlgs.h | 4 +- ui/sorting.h | 48 +- ui/switch_to_gui.h | 2 +- ui/sync_cfg.cpp | 51 +- ui/sync_cfg.h | 2 +- ui/taskbar.cpp | 2 +- ui/taskbar.h | 2 +- ui/tray_icon.cpp | 2 +- ui/tray_icon.h | 2 +- ui/tree_view.cpp | 1176 +++++ ui/tree_view.h | 176 + ui/wx_form_build_hide_warnings.h | 2 +- version/version.h | 2 +- version/version.rc | 4 +- wx+/app_main.h | 2 +- wx+/button.cpp | 2 +- wx+/button.h | 2 +- wx+/choice_enum.h | 2 +- wx+/context_menu.h | 81 + wx+/file_drop.h | 39 +- wx+/format_unit.cpp | 5 +- wx+/format_unit.h | 2 +- wx+/graph.cpp | 47 +- wx+/graph.h | 5 +- wx+/grid.cpp | 2052 +++++++++ wx+/grid.h | 312 +- wx+/image_tools.h | 2 +- wx+/mouse_move_dlg.cpp | 2 +- wx+/mouse_move_dlg.h | 2 +- wx+/no_flicker.h | 2 +- wx+/pch.h | 2 +- wx+/rtl.h | 121 + wx+/serialize.h | 2 +- wx+/shell_execute.h | 2 +- wx+/string_conv.h | 2 +- wx+/timespan.h | 2 +- wx+/toggle_button.h | 2 +- wx+/tooltip.cpp | 31 +- wx+/tooltip.h | 5 +- wxWidgets-Fix/apply-patches.cmd | 6 - wxWidgets-Fix/grid.cpp.patch | 71 - wxWidgets-Fix/grid.h.patch | 10 - wxWidgets-Fix/settings.cpp.patch | 54 +- zen/FindFilePlus/dll_main.cpp | 2 +- zen/FindFilePlus/find_file_plus.cpp | 2 +- zen/FindFilePlus/find_file_plus.h | 2 +- zen/FindFilePlus/init_dll_binding.h | 2 +- zen/FindFilePlus/load_dll.cpp | 2 +- zen/FindFilePlus/load_dll.h | 2 +- zen/assert_static.h | 2 +- zen/base64.h | 2 +- zen/basic_math.h | 25 +- zen/build_info.h | 2 +- zen/com_error.h | 2 +- zen/com_ptr.h | 3 +- zen/com_util.h | 2 +- zen/debug_log.h | 2 +- zen/debug_new.cpp | 2 +- zen/debug_new.h | 2 +- zen/deprecate.h | 2 +- zen/dir_watcher.cpp | 2 +- zen/dir_watcher.h | 2 +- zen/dll.h | 4 +- zen/dst_hack.cpp | 2 +- zen/file_error.h | 2 +- zen/file_handling.cpp | 54 +- zen/file_handling.h | 5 +- zen/file_id.cpp | 2 +- zen/file_id.h | 2 +- zen/file_id_def.h | 2 +- zen/file_io.cpp | 2 +- zen/file_io.h | 2 +- zen/file_traverser.cpp | 6 +- zen/file_traverser.h | 2 +- zen/fixed_list.h | 13 +- zen/guid.h | 2 +- zen/i18n.h | 2 +- zen/int64.h | 25 +- zen/last_error.h | 2 +- zen/long_path_prefix.h | 3 +- zen/notify_removal.cpp | 2 +- zen/notify_removal.h | 2 +- zen/optional.h | 62 + zen/perf.h | 2 +- zen/privilege.h | 2 +- zen/read_txt.h | 2 +- zen/scope_guard.h | 2 +- zen/stl_tools.h | 40 +- zen/string_base.h | 2 +- zen/string_tools.h | 2 +- zen/string_traits.h | 2 +- zen/symlink_target.h | 2 +- zen/thread.h | 2 +- zen/time.h | 2 +- zen/type_tools.h | 32 +- zen/type_traits.h | 2 +- zen/utf8.h | 2 +- zen/warn_static.h | 2 +- zen/win.h | 2 +- zen/win_ver.h | 2 +- zen/zstring.cpp | 12 +- zen/zstring.h | 9 +- 250 files changed, 14839 insertions(+), 13438 deletions(-) delete mode 100644 Cleanup.cmd delete mode 100644 lib/custom_grid.cpp delete mode 100644 lib/custom_grid.h create mode 100644 ui/column_attr.h create mode 100644 ui/custom_grid.cpp create mode 100644 ui/custom_grid.h create mode 100644 ui/tree_view.cpp create mode 100644 ui/tree_view.h create mode 100644 wx+/context_menu.h create mode 100644 wx+/grid.cpp create mode 100644 wx+/rtl.h delete mode 100644 wxWidgets-Fix/grid.cpp.patch delete mode 100644 wxWidgets-Fix/grid.h.patch create mode 100644 zen/optional.h diff --git a/Application.cpp b/Application.cpp index eb81c2de..18eb2265 100644 --- a/Application.cpp +++ b/Application.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 "application.h" diff --git a/Application.h b/Application.h index 6c3d1a9e..4940c910 100644 --- a/Application.h +++ b/Application.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 FREEFILESYNCAPP_H diff --git a/BUILD/Changelog.txt b/BUILD/Changelog.txt index 97bb5b6e..0fca0d39 100644 --- a/BUILD/Changelog.txt +++ b/BUILD/Changelog.txt @@ -2,6 +2,14 @@ |FreeFileSync| -------------- +Changelog v5.0 +-------------- +New grid control +New tree control +Revised Right to Left layout for Hebrew +Updated translation files + + Changelog v4.6 -------------- Execute user-defined command after synchronization @@ -872,4 +880,4 @@ Updated German translation Changelog v1.0 -------------- -Initial release \ No newline at end of file +Initial release diff --git a/BUILD/FreeFileSync.chm b/BUILD/FreeFileSync.chm index 2e6e6f3c..9f4bc7d9 100644 Binary files a/BUILD/FreeFileSync.chm and b/BUILD/FreeFileSync.chm differ diff --git a/BUILD/Help/html/ExternalApp.html b/BUILD/Help/html/ExternalApp.html index 8a7c6bb6..01d3269a 100644 --- a/BUILD/Help/html/ExternalApp.html +++ b/BUILD/Help/html/ExternalApp.html @@ -5,7 +5,7 @@ - + @@ -29,17 +29,17 @@ applications

By default FreeFileSync opens the operating system's standard file -browser on each double-click by invoking "explorer +browser on each mouse double-click by invoking "explorer /select, "%name"" on Windows and "xdg-open "%dir"" on Linux.

However -the user is free to integrate other external applications into +you are free to integrate other external applications into FreeFileSync: navigate to "Menu -> Advanced -> Global settings: External Applications" -and add or replace a command string. The first entry is used when -double-clicking a row while all other entries are only available via -right-click context menu on main dialog. The following macros are -available:

+and add or replace a command string. The first entry is executed when +double-clicking a row on main grid while all other entries are only +available via right-click context menu. The following macros may be +used:

%name   - full diff --git a/BUILD/Languages/chinese_simple.lng b/BUILD/Languages/chinese_simple.lng index 974b1d1e..4b0d6151 100644 --- a/BUILD/Languages/chinese_simple.lng +++ b/BUILD/Languages/chinese_simple.lng @@ -138,36 +138,6 @@ %x 字节 - -<符号连接> - - -<目录> - -Size -大小 - -Date -日期 - -Full path -完整路径 - -Filename -文件名 - -Relative path -相对路径 - -Directory -目录 - -Extension -扩展名 - -Comparison Result -比较结果 - Initial synchronization: 初始化同步: @@ -351,6 +321,24 @@ The command line is executed each time: Logging 记录 +File time and size +文件时间和日期 + +File content +文件内容 + + +<自动> + +Mirror ->> +镜像 ->> + +Update -> +更新 -> + +Custom +自定义 + FreeFileSync batch file FreeFileSync 批处理文件 @@ -408,6 +396,36 @@ The command line is executed each time: (Requires an Internet connection!) (需要因特网连接!) + +<符号连接> + + +<目录> + +Full path +完整路径 + +Name +文件名 + +Relative path +相对路径 + +Directory +目录 + +Size +大小 + +Date +日期 + +Extension +扩展名 + +Comparison Result +比较结果 + Drag && drop 拖放 @@ -579,27 +597,15 @@ The command line is executed each time: Select variant: 选择变化的: - -<自动> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. 使用一个数据库来识别和传播两边的改变. 删除,重命名和冲突会自动检测. -Mirror ->> -镜像 ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. 镜像备份左边的文件夹.同步后右边的文件夹被修改为和左边文件夹精确匹配. -Update -> -更新 -> - Copy new or updated files to right folder. 复制新的或修改过的文件到右侧文件夹 -Custom -自定义 - Configure your own synchronization rules. 配置你自己的同步规则. @@ -655,9 +661,6 @@ are the same 是相同的 -File time and size -文件时间和日期 - Files are found equal if - file content @@ -669,9 +672,6 @@ is the same 相同 -File content -文件内容 - Symbolic Link handling 符号连接处理方式 @@ -687,32 +687,29 @@ is the same Source code written in C++ utilizing: 源代码用如下C++工具写成: -Big thanks for localizing FreeFileSync goes out to: -非常感谢以下本地化 FreeFileSync 的工作人员: +Feedback and suggestions are welcome +欢迎反馈意见和提出建议 -Feedback and suggestions are welcome at: -欢迎在下面提出反馈意见和建议: +Homepage +主页 FreeFileSync at Sourceforge Sourceforge上的FreeFileSync -Homepage -主页 +Email +邮箱 + +Big thanks for localizing FreeFileSync goes out to: +非常感谢以下本地化 FreeFileSync 的工作人员: -If you like FFS -如果你喜欢 FFS +If you like FreeFileSync +如果你喜欢 FreeFileSync Donate with PayPal 通过PayPal捐赠 -Email -邮箱 - -Report translation error -报告翻译错误 - -Published under the GNU General Public License: -在GNU通用公共许可下发布: +Published under the GNU General Public License +在GNU通用公共许可下发布 Ignore subsequent errors 忽略随后的错误 @@ -861,6 +858,9 @@ Exclude: \stuff\temp\* Folder pairs 文件夹对 +Compressed view +压缩视图 + Select view 选择视图 @@ -879,20 +879,14 @@ Exclude: \stuff\temp\* <多选> -D-Click -双击 - Delete 删除 -Customize... -自定义... +Include all +包括所有 -Select time span... -选择时间跨度... - -Auto-adjust columns -自动调整栏宽 +Exclude all +排除所有 Icon size: 图标大小: @@ -906,14 +900,11 @@ Exclude: \stuff\temp\* Large -Include all rows -包括所有行 - -Exclude all rows -排除所有行 +Select time span... +选择时间跨度... -Reset view -重置视图 +Default view +默认视图 Show "%x" 显示 "%x" @@ -1188,6 +1179,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory 移动文件到时间标记子目录 +Files +文件 + +Percentage +百分比 + %x TB %x TB @@ -1314,6 +1311,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: 目录有依赖性!在设立同步规则时请小心: +Preparing synchronization... +正在准备同步... + Memory allocation failed! 内存分配失败! @@ -1431,8 +1431,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! 目标目录名不能为空! -User-defined directory for deletion was not specified! -用于删除的用户定义目录没有指定! +Directory for file versioning was not supplied! +用于保存文件历史版本的目录没有提供! Source directory does not exist anymore: 源目录已经不存在: diff --git a/BUILD/Languages/chinese_traditional.lng b/BUILD/Languages/chinese_traditional.lng index 821a3a43..082cbea6 100644 --- a/BUILD/Languages/chinese_traditional.lng +++ b/BUILD/Languages/chinese_traditional.lng @@ -113,10 +113,10 @@ 無效的命令列:%x Windows Error Code %x: -Windows 錯誤代碼 %x: +Windows錯誤代碼 %x: Linux Error Code %x: -Linux 錯誤代碼 %x: +Linux錯誤代碼 %x: Error resolving symbolic link: 解析錯誤的符號連結: @@ -138,41 +138,11 @@ %x 位元組 - -<符號連結> - - -<目錄> - -Size -大小 - -Date -日期 - -Full path -完整路徑 - -Filename -檔案名稱 - -Relative path -相對路徑 - -Directory -目錄 - -Extension -擴展 - -Comparison Result -比對結果 - Initial synchronization: 初始化同步: One of the FreeFileSync database files is not yet existing: -其中一個 FreeFileSync 資料庫檔案不存在: +其中一個FreeFileSync資料庫檔案不存在: Incompatible synchronization database format: 同步資料庫格式不相容: @@ -224,7 +194,7 @@ Invalid FreeFileSync config file! -無效的 FreeFileSync 配置檔案! +無效的FreeFileSync配置檔案! Error parsing configuration file: 分析配置檔案錯誤: @@ -239,7 +209,7 @@ 讀取卷影複製服務時錯誤! Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version. -不支援製作 WOW64 上的卷影副本。請使用 FreeFileSync 64位元版本。 +不支援製作WOW64上的卷影副本。請使用FreeFileSync 64位元版本。 Could not determine volume name for file: 無法判斷此檔案的卷標名稱: @@ -254,7 +224,7 @@ 檔案不存在: Could not read values for the following XML nodes: -無法讀取 XML 之後節點的值: +無法讀取XML之後節點的值: S&ave configuration... 儲存配置(&A)... @@ -351,14 +321,32 @@ The command line is executed each time: Logging 日誌記錄 +File time and size +檔案大小和日期 + +File content +檔案内容 + + +<自動> + +Mirror ->> +鏡像 ->> + +Update -> +更新 -> + +Custom +自訂 + FreeFileSync batch file -FreeFileSync 批次檔 +FreeFileSync批次檔 FreeFileSync configuration -FreeFileSync 配置 +FreeFileSync配置 FreeFileSync Batch Job -FreeFileSync 批次處理作業 +FreeFileSync批次處理作業 Unable to create log file! 無法新建日誌檔! @@ -382,16 +370,16 @@ The command line is executed each time: 已成功的完成同步! Press "Switch" to open FreeFileSync GUI mode. -按下 "切換" 開啟 FreeFileSync 圖形介面操作方式。 +按下 "切換" 開啟FreeFileSync圖形介面操作方式。 Switching to FreeFileSync GUI mode... -切換 FreeFileSync 圖形介面操作方式... +切換FreeFileSync圖形介面操作方式... Unable to connect to sourceforge.net! -無法連接到 sourceforge.net! +無法連接到sourceforge.net! A newer version of FreeFileSync is available: -有較新版本的 FreeFileSync 可用: +有較新版本的FreeFileSync可用: Download now? 要立即下載嗎? @@ -400,14 +388,44 @@ The command line is executed each time: 訊息 FreeFileSync is up to date! -FreeFileSync 已經是最新版本! +FreeFileSync已經是最新版本! Do you want FreeFileSync to automatically check for updates every week? -要每週自動檢查更新 FreeFileSync 嗎? +要每週自動檢查更新FreeFileSync嗎? (Requires an Internet connection!) (需要連接到網際網路!) + +<符號連結> + + +<目錄> + +Full path +完整路徑 + +Name +名稱 + +Relative path +相對路徑 + +Directory +目錄 + +Size +大小 + +Date +日期 + +Extension +擴展 + +Comparison Result +比對結果 + Drag && drop 拖放 @@ -432,9 +450,6 @@ The command line is executed each time: 2. &Synchronize... 2. 同步(&S)... -S&witch view -切換檢視(&W) - &New 新增專案(&N) @@ -508,7 +523,7 @@ The command line is executed each time: 一些檔案和目錄將被刪除 Total amount of data that will be transferred -將要傳輸的全部資料量 +將被傳輸的總資料量 Operation: 操作: @@ -579,27 +594,15 @@ The command line is executed each time: Select variant: 選擇變數: - -<自動> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. 對兩邊使用同一個資料庫的識別和傳送更改。自動檢測刪除和衝突部份。 -Mirror ->> -鏡像 ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. 鏡像備份的左邊的資料夾。同步後,右邊的資料夾進行修改以完全相配左邊的資料夾。 -Update -> -更新 -> - Copy new or updated files to right folder. 將新的或更新過的檔案複製到右邊的資料夾中。 -Custom -自訂 - Configure your own synchronization rules. 配置你自己的同步規則。 @@ -650,9 +653,6 @@ are the same 如果檔案大小和最後修改時間和日期相同則判斷兩者相同 -File time and size -檔案大小和日期 - Files are found equal if - file content @@ -660,9 +660,6 @@ is the same 如果檔案内容相同則判斷兩者相同 -File content -檔案内容 - Symbolic Link handling 符號連結處理 @@ -678,32 +675,29 @@ is the same Source code written in C++ utilizing: 使用C++編寫的原始碼 -Big thanks for localizing FreeFileSync goes out to: -非常感謝 FreeFileSync 當地語系化的工作人員: - -Feedback and suggestions are welcome at: -歡迎在下面提出回報和建議: - -FreeFileSync at Sourceforge -FreeFileSync 在 Sourceforge +Feedback and suggestions are welcome +歡迎反饋意見和建議 Homepage 首頁 -If you like FFS -如果你喜歡 FFS - -Donate with PayPal -使用 PayPal 捐贈 +FreeFileSync at Sourceforge +FreeFileSync在Sourceforge Email 信箱 -Report translation error -回報翻譯錯誤 +Big thanks for localizing FreeFileSync goes out to: +非常感謝FreeFileSync當地語系化的工作人員: + +If you like FreeFileSync +如果你喜歡FreeFileSync + +Donate with PayPal +使用PayPal捐款 -Published under the GNU General Public License: -在GNU通用公共許可證下發佈: +Published under the GNU General Public License +在GNU通用公共許可證下發佈 Ignore subsequent errors 忽略後續錯誤 @@ -772,7 +766,7 @@ Exclude: \stuff\temp\* Synchronize all .doc, .zip and .exe files except everything in subfolder "temp". -同步所有 .doc, .zip 和 .exe 檔案,除了"temp"子資料夾中的所有檔案。 +同步所有 .doc、.zip 和 .exe 檔案,除了 "temp" 子資料夾中的所有檔案。 Include 包括 @@ -799,7 +793,7 @@ Exclude: \stuff\temp\* 異動檔案副本 Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error. -第一次將檔寫入到一個暫存 (*.ffs_tmp) 順便將它們重新命名。即使在嚴重錯誤的情況下,還可確保一致的狀態。 +第一次將檔寫入到一個暫存(*.ffs_tmp),順便將它們重新命名。即使在嚴重錯誤的情況下,還可確保一致的狀態。 Copy locked files 複製被鎖定的檔案 @@ -852,6 +846,9 @@ Exclude: \stuff\temp\* Folder pairs 資料夾對 +Compressed view +壓縮檢視 + Select view 選擇檢視 @@ -870,20 +867,14 @@ Exclude: \stuff\temp\* <多重選擇> -D-Click -點兩下 - Delete 刪除 -Customize... -自訂... - -Select time span... -選擇時間範圍... +Include all +包括所有 -Auto-adjust columns -自動調整欄寬 +Exclude all +排除所有 Icon size: 圖示大小: @@ -897,14 +888,11 @@ Exclude: \stuff\temp\* Large -Include all rows -包括所有行 - -Exclude all rows -排除所有行 +Select time span... +選擇時間範圍... -Reset view -重置檢視 +Default view +預設檢視 Show "%x" 顯示 "%x" @@ -1125,7 +1113,7 @@ Exclude: \stuff\temp\* 遵循 Copy NTFS permissions -複製 NTFS 權限 +複製NTFS權限 Integrate external applications into context menu. The following macros are available: 整合上下文功能表中的外部應用程式。可以使用下面的巨集: @@ -1179,6 +1167,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory 移動檔案到一個時間標記的子目錄 +Files +檔案 + +Percentage +百分比 + %x TB %x TB @@ -1305,6 +1299,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: 目錄有依靠性!請小心設定同步規則: +Preparing synchronization... +正在準備同步... + Memory allocation failed! 記憶體分配失敗! @@ -1422,8 +1419,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! 目標目錄名稱不能空白! -User-defined directory for deletion was not specified! -未指定要刪除的自定義目錄! +Directory for file versioning was not supplied! +版本控制檔的目錄不提供! Source directory does not exist anymore: 來源目錄不存在: diff --git a/BUILD/Languages/croatian.lng b/BUILD/Languages/croatian.lng index 766bb978..6bd28bc4 100644 --- a/BUILD/Languages/croatian.lng +++ b/BUILD/Languages/croatian.lng @@ -140,36 +140,6 @@ %x Bajtova - - - - - - -Size -Veličina - -Date -Datum - -Full path -Puna putanja - -Filename -Ime datoteke - -Relative path -Relativna Putanja - -Directory -Direktorij - -Extension -Ekstenzija - -Comparison Result -Rezultati usporedbe - Initial synchronization: Početna sinkronizacija: @@ -357,6 +327,24 @@ Naredba će biti izvršena kada: Logging Zapisivanje +File time and size +Vrijeme i veličina datoteke + +File content +Sadržaj datoteke + + + + +Mirror ->> +Zrcalno ->> + +Update -> +Ažuriraj -> + +Custom +Uobičajeno + FreeFileSync batch file FreeFileSync batch datoteka @@ -414,6 +402,36 @@ Naredba će biti izvršena kada: (Requires an Internet connection!) (Zahtjeva vezu na Internet!) + + + + + + +Full path +Puna putanja + +Name +Naziv + +Relative path +Relativna Putanja + +Directory +Direktorij + +Size +Veličina + +Date +Datum + +Extension +Ekstenzija + +Comparison Result +Rezultati usporedbe + Drag && drop Povuci && ispusti @@ -438,9 +456,6 @@ Naredba će biti izvršena kada: 2. &Synchronize... 2. &Sinkroniziraj... -S&witch view -Pr&omjeni pogled - &New &Novo @@ -585,27 +600,15 @@ Naredba će biti izvršena kada: Select variant: Izaberite varijantu: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identificiraj i izvedi promjene na obje strane koristeći bazu podataka. Brisanja, preimenovanja i sukobi se automatski detektiraju -Mirror ->> -Zrcalno ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Zrcalna pričuva lijeve mape. Desna mapa je uređena da bi bila jednaka lijevom folderu nakon sinkronizacije. -Update -> -Ažuriraj -> - Copy new or updated files to right folder. Kopiraj nove ili ažurirane datoteke u desnu mapu. -Custom -Uobičajeno - Configure your own synchronization rules. Konfigurirajte vaša vlastita sinkronizacijska pravila. @@ -661,9 +664,6 @@ Datoteke se smatraju jednake ako su im jednaki -File time and size -Vrijeme i veličina datoteke - Files are found equal if - file content @@ -675,9 +675,6 @@ Datoteke se smatraju jednake ako im je jednak -File content -Sadržaj datoteke - Symbolic Link handling Upravljanje simboličnim poveznicama @@ -693,32 +690,29 @@ jednak Source code written in C++ utilizing: Izvorni kod napisan u C++ uz korištenje: -Big thanks for localizing FreeFileSync goes out to: -Zahvale za prijevod FreeFileSync idu: +Feedback and suggestions are welcome +Povratne informacije i prijedlozi su dobrodošli -Feedback and suggestions are welcome at: -Povratne informacije i prijedlozi su dobrodošli na: +Homepage +Početna stranica FreeFileSync at Sourceforge FreeFileSync na Sourceforge -Homepage -Početna stranica +Email +Email -If you like FFS -Ako volite FFS +Big thanks for localizing FreeFileSync goes out to: +Zahvale za prijevod FreeFileSync idu: + +If you like FreeFileSync +Ako volite FreeFileSync Donate with PayPal Doniraj s PayPal -Email -Email - -Report translation error -Prijavi grešku u prijevodu - -Published under the GNU General Public License: -Objavljeno pod licencom GNU General Public: +Published under the GNU General Public License +Objavljeno pod licencom GNU General Public Ignore subsequent errors Ignoriraj naknadne greške @@ -867,6 +861,9 @@ Isključi: \stuff\temp\* Folder pairs Par mape +Compressed view +Prikaz zauzeća + Select view Izaberite pogled @@ -885,20 +882,14 @@ Isključi: \stuff\temp\* -D-Click -D-Klik - Delete Izbriši -Customize... -Prilagodi... - -Select time span... -Izaberite vremenski raspon... +Include all +Uključi sve -Auto-adjust columns -Samo-prilagodi stupce +Exclude all +Izdvoji sve Icon size: Veličina Ikone @@ -912,14 +903,11 @@ Isključi: \stuff\temp\* Large Veliko -Include all rows -Uključi sve redove - -Exclude all rows -Isključi sve redove +Select time span... +Izaberite vremenski raspon... -Reset view -Resetiraj pogled +Default view +Standardni prikaz Show "%x" Prikaži "%x" @@ -1206,6 +1194,12 @@ Isključi: \stuff\temp\* Move files into a time-stamped subdirectory Premjesti datoteke u vremenski-označen podfolder +Files +Datoteke + +Percentage +Postotak + %x TB %x TB @@ -1338,6 +1332,9 @@ Isključi: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Direktoriji su u ovisnosti! Budite oprezni pri postavljanju sinkronizacijskih pravila: +Preparing synchronization... +Pripremam sinkronizaciju + Memory allocation failed! Neuspješno dodjeljivanje memorije! @@ -1455,8 +1452,8 @@ Isključi: \stuff\temp\* Target directory name must not be empty! Ime ciljnog direktorija ne smije biti prazno! -User-defined directory for deletion was not specified! -Korisnički definiran direktorij za brisanje nije definiran! +Directory for file versioning was not supplied! +Mapa za ovakvu datoteku nije isporučena Source directory does not exist anymore: Izvorni direktorij više ne postoji: diff --git a/BUILD/Languages/czech.lng b/BUILD/Languages/czech.lng index ee155c43..adcaaf17 100644 --- a/BUILD/Languages/czech.lng +++ b/BUILD/Languages/czech.lng @@ -140,36 +140,6 @@ %x B - - - - - - -Size -Velikost - -Date -Čas - -Full path -Plná cesta - -Filename -Jméno - -Relative path -Relativní cesta - -Directory -Adresář - -Extension -Přípona - -Comparison Result -Výsledek porovnání - Initial synchronization: Prvotní synchronizace: @@ -357,6 +327,24 @@ Příkazová řádka je spuštěna pokaždé když: Logging Záznam zpracování +File time and size +Podle velikosti a data souboru + +File content +Podle obsahu souboru + + +<- Automaticky -> + +Mirror ->> +Zrcadlení ->> + +Update -> +Aktualizuj -> + +Custom +Vlastní + FreeFileSync batch file FreeFileSync dávkový soubor @@ -414,6 +402,36 @@ Příkazová řádka je spuštěna pokaždé když: (Requires an Internet connection!) (Vyžaduje připojení k internetu!) + + + + + + +Full path +Plná cesta + +Name +Jméno + +Relative path +Relativní cesta + +Directory +Adresář + +Size +Velikost + +Date +Čas + +Extension +Přípona + +Comparison Result +Výsledek porovnání + Drag && drop Drag && Drop @@ -585,27 +603,15 @@ Příkazová řádka je spuštěna pokaždé když: Select variant: Vyberte variantu: - -<- Automaticky -> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Rozpoznat a provést změny na obou stranách pomocí databáze. Odstraněné nebo přejmenované soubory a konflikty budou detekovány automaticky. -Mirror ->> -Zrcadlení ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Zrcadlení levého adresáře. Pravý adresář bude změněn tak, aby po synchronizaci byl totožný s levým. -Update -> -Aktualizuj -> - Copy new or updated files to right folder. Kopírovat nové nebo aktualizované soubory do adresáře vpravo. -Custom -Vlastní - Configure your own synchronization rules. Nastavení vlastních pravidel synchronizace. @@ -661,9 +667,6 @@ Soubory jsou shodné jestliže jsou stejné -File time and size -Podle velikosti a data souboru - Files are found equal if - file content @@ -675,9 +678,6 @@ Soubory jsou shodné jestliže je stejný -File content -Podle obsahu souboru - Symbolic Link handling Zpracování symbolických odkazů @@ -693,32 +693,29 @@ je stejný Source code written in C++ utilizing: Zdrojový kód byl napsán kompletně v C++ s pomocí: -Big thanks for localizing FreeFileSync goes out to: -Poděkování za překlad FreeFileSync: +Feedback and suggestions are welcome +Komentáře a náměty jsou vždy vítány -Feedback and suggestions are welcome at: -Komentáře a náměty zasílejte na: +Homepage +Navštivte FreeFileSync at Sourceforge FreeFileSync na Sourceforge -Homepage -Homepage +Email +Napište + +Big thanks for localizing FreeFileSync goes out to: +Poděkování za překlad FreeFileSync: -If you like FFS -Pokud se Vám FSS líbí +If you like FreeFileSync +Pokud se Vám FreeFileSync líbí Donate with PayPal Přispět pomocí PayPal -Email -Email - -Report translation error -Hlásit chyby překladu - -Published under the GNU General Public License: -Vydáno podle GNU General Public License (GPL): +Published under the GNU General Public License +Vydáno pod GNU General Public License (GPL) Ignore subsequent errors Přeskočit další chyby @@ -867,6 +864,9 @@ Vynechat: \někde\něco\* Folder pairs Adresářové páry +Compressed view +Navigační zobrazení + Select view Vyberte zobrazení @@ -885,20 +885,14 @@ Vynechat: \někde\něco\* -D-Click -Dvojklik - Delete Smazat -Customize... -Vlastní.... - -Select time span... -Zadejte časové rozmezí... +Include all +Zahrnout vše -Auto-adjust columns -Automaticky přizpůsobit šířku +Exclude all +Vynechat vše Icon size: Velikost ikon: @@ -912,13 +906,10 @@ Vynechat: \někde\něco\* Large Velké -Include all rows -Použít všechny řádky - -Exclude all rows -Vynechat všechny řádky +Select time span... +Zadejte časové rozmezí... -Reset view +Default view Výchozí zobrazení Show "%x" @@ -1206,6 +1197,12 @@ Vynechat: \někde\něco\* Move files into a time-stamped subdirectory Přesunout soubory do časově označeného podadresáře +Files +Soubory + +Percentage +Procentní podíl + %x TB %x TB @@ -1338,6 +1335,9 @@ Vynechat: \někde\něco\* Directories are dependent! Be careful when setting up synchronization rules: Adresáře jsou závislé! Buďte opatrní s definicí synchronizačních pravidel: +Preparing synchronization... +Příprava synchronizace... + Memory allocation failed! Chyba přidělení paměti! @@ -1455,8 +1455,8 @@ Vynechat: \někde\něco\* Target directory name must not be empty! Není zadán cílový adresář! -User-defined directory for deletion was not specified! -Uživatelsky definovaný adresář pro mazání nebyl zadán! +Directory for file versioning was not supplied! +Nebyl zadán adresář pro verzování souborů! Source directory does not exist anymore: Zdrojový adresář již neexistuje: diff --git a/BUILD/Languages/danish.lng b/BUILD/Languages/danish.lng index 40d1c752..c82d1920 100644 --- a/BUILD/Languages/danish.lng +++ b/BUILD/Languages/danish.lng @@ -139,36 +139,6 @@ %x Bytes - - - - - - -Size -Størrelse - -Date -Dato - -Full path -Fuld Sti - -Filename -Filnavne - -Relative path -Filsti - -Directory -Bibliotek - -Extension -Udvidelse - -Comparison Result -Sammenlignings Resultat - Initial synchronization: Indledende synkronisering: @@ -354,6 +324,24 @@ Kommando linjen bliver afviklet hver gang: Logging Logger +File time and size +Fil tid og størrelse + +File content +Fil indhold + + + + +Mirror ->> +Spejl ->> + +Update -> +Opdater -> + +Custom +Brugerdefineret + FreeFileSync batch file FreeFileSync batch fil @@ -411,6 +399,36 @@ Kommando linjen bliver afviklet hver gang: (Requires an Internet connection!) (Kræver en Internet forbindelse!) + + + + + + +Full path +Fuld Sti + +Name +Navn + +Relative path +Filsti + +Directory +Bibliotek + +Size +Størrelse + +Date +Dato + +Extension +Udvidelse + +Comparison Result +Sammenlignings Resultat + Drag && drop Træk && slip @@ -435,9 +453,6 @@ Kommando linjen bliver afviklet hver gang: 2. &Synchronize... 2. &Synkroniser... -S&witch view -S&kift udseende - &New &Ny @@ -582,27 +597,15 @@ Kommando linjen bliver afviklet hver gang: Select variant: Vælg variant: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. find ændringer på begge sider via. database. Sletninger, omdøbninger og konflikter bliver automatisk fundet. -Mirror ->> -Spejl ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Spejling af venstre mappe. Højre mappe tilpasses så den ligner den venstre efter synkronisering. -Update -> -Opdater -> - Copy new or updated files to right folder. Kopier nye eller opdaterede filer til højre mappe. -Custom -Brugerdefineret - Configure your own synchronization rules. Konfigurer dine egne synkroniserings regler. @@ -658,9 +661,6 @@ Filer bliver set som ens hvis er ens -File time and size -Fil tid og størrelse - Files are found equal if - file content @@ -672,9 +672,6 @@ Filer er ens hvis er det samme -File content -Fil indhold - Symbolic Link handling Link håndtering @@ -690,32 +687,29 @@ er det samme Source code written in C++ utilizing: Source code skrevet i C++: -Big thanks for localizing FreeFileSync goes out to: -Stor tak for lokalisering af FreeFileSync går til: +Feedback and suggestions are welcome +Feedback og forslag er velkomne -Feedback and suggestions are welcome at: -Feedback og forslag er velkommen på: +Homepage +Hjemmeside FreeFileSync at Sourceforge FreeFileSync på Sourceforge -Homepage -Hjemmeside +Email +E-mail -If you like FFS -Hvis du kan lide FFS +Big thanks for localizing FreeFileSync goes out to: +Stor tak for lokalisering af FreeFileSync går til: + +If you like FreeFileSync +Hvis du kan lide FreeFileSync Donate with PayPal Doner med PayPal -Email -E-mail - -Report translation error -Rapporter oversættelses fejl - -Published under the GNU General Public License: -Udgivet under GNU General Public Licence: +Published under the GNU General Public License +Udgivet under GNU General Public Licence Ignore subsequent errors Ignorer underliggende fejl @@ -864,6 +858,9 @@ Udeluk: \ting\temp\* Folder pairs Mappe par +Compressed view +Komprimmeret tilstand + Select view Vælg udseende @@ -882,20 +879,14 @@ Udeluk: \ting\temp\* -D-Click -Dobbelt-klik - Delete Slet -Customize... -Tilpas... - -Select time span... -Vælg tidsområde... +Include all +Vælg alle -Auto-adjust columns -Auto-juster kolonner +Exclude all +Fravælg alle Icon size: Ikon størrelse: @@ -909,14 +900,11 @@ Udeluk: \ting\temp\* Large Stor -Include all rows -Inkluder alle rækker - -Exclude all rows -Ekskluder alle rækker +Select time span... +Vælg tidsområde... -Reset view -Nulstil udseende +Default view +Standard tilstand Show "%x" Vis "%x" @@ -1197,6 +1185,12 @@ Udeluk: \ting\temp\* Move files into a time-stamped subdirectory Flyt filer til et datomærket underbibliotek +Files +Filer + +Percentage +Procent + %x TB %x TB @@ -1326,6 +1320,9 @@ Udeluk: \ting\temp\* Directories are dependent! Be careful when setting up synchronization rules: Biblioteker er afhængige! Vær forsigtig når du laver synkroniserings reglerne: +Preparing synchronization... +Forbereder synkronisering... + Memory allocation failed! Hukommelses fejl! @@ -1443,8 +1440,8 @@ Udeluk: \ting\temp\* Target directory name must not be empty! Navnet på destinations biblioteket må ikke være tomt! -User-defined directory for deletion was not specified! -Bruger-defineret bibliotek til sletning ikke defineret! +Directory for file versioning was not supplied! +Fil versions biblioteket blev ikke angivet! Source directory does not exist anymore: Kilde biblioteket findes ikke mere: diff --git a/BUILD/Languages/dutch.lng b/BUILD/Languages/dutch.lng index b21b8e7d..5e47f202 100644 --- a/BUILD/Languages/dutch.lng +++ b/BUILD/Languages/dutch.lng @@ -139,36 +139,6 @@ %x Bytes - - - - - - -Size -Grootte - -Date -Datum - -Full path -Volledig pad - -Filename -Bestandsnaam - -Relative path -Relatief pad - -Directory -Map - -Extension -Extensie - -Comparison Result -Resultaat vergelijken - Initial synchronization: Initiële synchronisatie: @@ -354,6 +324,24 @@ De opdrachtregel wordt telkens uitgevoerd indien: Logging Loggen +File time and size +Bestands tijd-en grootte + +File content +Bestandsinhoud + + + + +Mirror ->> +Spiegelen ->> + +Update -> +Bijwerken -> + +Custom +Aangepast + FreeFileSync batch file FreeFileSync taakbestand @@ -411,6 +399,36 @@ De opdrachtregel wordt telkens uitgevoerd indien: (Requires an Internet connection!) (Vereist een internetverbinding!) + + + + + + +Full path +Volledig pad + +Name +Naam + +Relative path +Relatief pad + +Directory +Map + +Size +Grootte + +Date +Datum + +Extension +Extensie + +Comparison Result +Resultaat vergelijken + Drag && drop Drag en drop @@ -435,9 +453,6 @@ De opdrachtregel wordt telkens uitgevoerd indien: 2. &Synchronize... 2. &Synchroniseer... -S&witch view -&Wijzig weergave - &New &Nieuw @@ -582,27 +597,15 @@ De opdrachtregel wordt telkens uitgevoerd indien: Select variant: Selecteer een variant: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identificeer en verspreid veranderingen aan beide kanten met behulp van een database. Verwijderingen, hernoemingen en conflicten worden automatisch gedetecteerd. -Mirror ->> -Spiegelen ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Spiegel backup van linker map. Rechter map is bewerkt om na synchronisatie een exacte kopie te zijn van de linker map. -Update -> -Bijwerken -> - Copy new or updated files to right folder. Kopiëer nieuwe of geupdate bestanden naar de rechter map. -Custom -Aangepast - Configure your own synchronization rules. Configureer uw eigen synchronisatieregels. @@ -658,9 +661,6 @@ Bestanden worden als gelijk bevonden indien, gelijk zijn -File time and size -Bestands tijd-en grootte - Files are found equal if - file content @@ -672,9 +672,6 @@ Bestanden worden als gelijk beschouwd indien, overeenkomt -File content -Bestandsinhoud - Symbolic Link handling Afhandeling van snelkoppelingen @@ -690,32 +687,29 @@ overeenkomt Source code written in C++ utilizing: Broncode geschreven in C++ met behulp van: -Big thanks for localizing FreeFileSync goes out to: -Extra dank voor het vertalen van FreeFileSync gaat naar: +Feedback and suggestions are welcome +Feedback en suggesties zijn welkom -Feedback and suggestions are welcome at: -Tips en suggesties zijn welkom op: +Homepage +Homepage FreeFileSync at Sourceforge FreeFileSync op Sourceforge -Homepage -Homepage +Email +E-mail -If you like FFS +Big thanks for localizing FreeFileSync goes out to: +Extra dank voor het vertalen van FreeFileSync gaat naar: + +If you like FreeFileSync Indien FreeFileSync u bevalt Donate with PayPal Doneer met PayPal -Email -E-mail - -Report translation error -Rapporteer een vertaalfout - -Published under the GNU General Public License: -Gepubliceerd onder de GNU General Public License: +Published under the GNU General Public License +Gepubliceerd onder de GNU General Public License Ignore subsequent errors Negeer erop volgende foutmeldingen @@ -864,8 +858,11 @@ Uitsluiten: \stuff\temp\* Folder pairs Map paren +Compressed view +Compacte weergave + Select view -Kies weergave +Selecteer weergave Set direction: Stel richting in: @@ -882,20 +879,14 @@ Uitsluiten: \stuff\temp\* -D-Click -Dubbele klik - Delete Verwijderen -Customize... -Aanpassen... - -Select time span... -Selecteer tijdsspanne... +Include all +Alles insluiten -Auto-adjust columns -Kolommen automatisch aanpassen +Exclude all +Alles uitsluiten Icon size: Icoon grootte: @@ -909,14 +900,11 @@ Uitsluiten: \stuff\temp\* Large Groot -Include all rows -Alle rijen opnemen - -Exclude all rows -Sluit alle rijen uit +Select time span... +Selecteer tijdsspanne... -Reset view -Stel weergave opnieuw in +Default view +Standaard weergave Show "%x" Toon "%x" @@ -1197,6 +1185,12 @@ Uitsluiten: \stuff\temp\* Move files into a time-stamped subdirectory Verplaats de bestanden naar een tijd-gemarkeerde submap +Files +Bestanden + +Percentage +Percentage + %x TB %x TB @@ -1326,6 +1320,9 @@ Uitsluiten: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Mappen zijn afhankelijk van elkaar! Wees voorzichtig met het maken van synchronisatieregels: +Preparing synchronization... +Synchronisatie voorbereiden + Memory allocation failed! RAM geheugen error! @@ -1443,8 +1440,8 @@ Uitsluiten: \stuff\temp\* Target directory name must not be empty! Doel mapnaam mag niet leeg zijn! -User-defined directory for deletion was not specified! -De door de gebruiker gedefinieerde map ter verwijdering was niet opgegeven! +Directory for file versioning was not supplied! +Map voor bestands versiebeheer is niet ingegeven! Source directory does not exist anymore: Bronmap bestaat niet meer: diff --git a/BUILD/Languages/english_uk.lng b/BUILD/Languages/english_uk.lng index 24422534..40321b96 100644 --- a/BUILD/Languages/english_uk.lng +++ b/BUILD/Languages/english_uk.lng @@ -139,36 +139,6 @@ %x Bytes - - - - - - -Size -Size - -Date -Date - -Full path -Full path - -Filename -Filename - -Relative path -Relative path - -Directory -Directory - -Extension -Extension - -Comparison Result -Comparison Result - Initial synchronization: Initial synchronisation: @@ -354,6 +324,24 @@ The command line is executed each time: Logging Logging +File time and size +File time and size + +File content +File content + + + + +Mirror ->> +Mirror ->> + +Update -> +Update -> + +Custom +Custom + FreeFileSync batch file FreeFileSync batch file @@ -411,6 +399,36 @@ The command line is executed each time: (Requires an Internet connection!) (Requires an Internet connection!) + + + + + + +Full path +Full path + +Name +Name + +Relative path +Relative path + +Directory +Directory + +Size +Size + +Date +Date + +Extension +Extension + +Comparison Result +Comparison Result + Drag && drop Drag && drop @@ -582,27 +600,15 @@ The command line is executed each time: Select variant: Select variant: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. -Mirror ->> -Mirror ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronisation. -Update -> -Update -> - Copy new or updated files to right folder. Copy new or updated files to right folder. -Custom -Custom - Configure your own synchronization rules. Configure your own synchronisation rules. @@ -658,9 +664,6 @@ Files are found equal if are the same -File time and size -File time and size - Files are found equal if - file content @@ -672,9 +675,6 @@ Files are found equal if is the same -File content -File content - Symbolic Link handling Symbolic Link handling @@ -690,32 +690,29 @@ is the same Source code written in C++ utilizing: Source code written in C++ utilising: -Big thanks for localizing FreeFileSync goes out to: -Big thanks for localising FreeFileSync goes out to: +Feedback and suggestions are welcome +Feedback and suggestions are welcome -Feedback and suggestions are welcome at: -Feedback and suggestions are welcome at: +Homepage +Homepage FreeFileSync at Sourceforge FreeFileSync at Sourceforge -Homepage -Homepage +Email +E-mail -If you like FFS -If you like FFS +Big thanks for localizing FreeFileSync goes out to: +Big thanks for localising FreeFileSync goes out to: + +If you like FreeFileSync +If you like FreeFileSync Donate with PayPal Donate with PayPal -Email -E-mail - -Report translation error -Report translation error - -Published under the GNU General Public License: -Published under the GNU General Public Licence: +Published under the GNU General Public License +Published under the GNU General Public Licence Ignore subsequent errors Ignore subsequent errors @@ -864,6 +861,9 @@ Exclude: \stuff\temp\* Folder pairs Folder pairs +Compressed view +Compressed view + Select view Select view @@ -882,20 +882,14 @@ Exclude: \stuff\temp\* -D-Click -D-Click - Delete Delete -Customize... -Customise... - -Select time span... -Select time span... +Include all +Include all -Auto-adjust columns -Auto-adjust columns +Exclude all +Exclude all Icon size: Icon size: @@ -909,14 +903,11 @@ Exclude: \stuff\temp\* Large Large -Include all rows -Include all rows - -Exclude all rows -Exclude all rows +Select time span... +Select time span... -Reset view -Reset view +Default view +Default view Show "%x" Show "%x" @@ -1197,6 +1188,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory Move files into a time-stamped subdirectory +Files +Files + +Percentage +Percentage + %x TB %x TB @@ -1326,6 +1323,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Directories are dependent! Be careful when setting up synchronisation rules: +Preparing synchronization... +Preparing synchronisation... + Memory allocation failed! Memory allocation failed! @@ -1443,8 +1443,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! Target directory name must not be empty! -User-defined directory for deletion was not specified! -User-defined directory for deletion was not specified! +Directory for file versioning was not supplied! +Directory for file versioning was not supplied! Source directory does not exist anymore: Source directory does not exist anymore: diff --git a/BUILD/Languages/finnish.lng b/BUILD/Languages/finnish.lng index d2202f11..29cfcb60 100644 --- a/BUILD/Languages/finnish.lng +++ b/BUILD/Languages/finnish.lng @@ -139,36 +139,6 @@ %x tavua - - - - - - -Size -Koko - -Date -Päiväys - -Full path -Koko polku - -Filename -Tiedostonimi - -Relative path -Suhteellinen polku - -Directory -Hakemisto - -Extension -Laajennus - -Comparison Result -Vertailun tulos - Initial synchronization: Ensi täsmäytys: @@ -354,6 +324,24 @@ Komento suoritetaan kun: Logging Kirjaa +File time and size +Tiedoston aika ja koko + +File content +Tiedoston sisältö + + +<- Automaattinen -> + +Mirror ->> +Peilaava ->> + +Update -> +Päivittävä -> + +Custom +Oma määritelmä + FreeFileSync batch file FreeFileSync eräajotiedosto @@ -411,6 +399,36 @@ Komento suoritetaan kun: (Requires an Internet connection!) (Vaatii Internet-yhteyden!) + + + + + + +Full path +Koko polku + +Name + + +Relative path +Suhteellinen polku + +Directory +Hakemisto + +Size +Koko + +Date +Päiväys + +Extension +Laajennus + +Comparison Result +Vertailun tulos + Drag && drop Vedä ja pudota @@ -582,27 +600,15 @@ Komento suoritetaan kun: Select variant: Valitse vaihtoehto: - -<- Automaattinen -> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Tunnista ja monista muutokset tietokannalla molemmille puolille. Poisto/Poikkeama/Uudelleen nimeäminan tunnistetaan automaattisesti. -Mirror ->> -Peilaava ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Peilaava varmuuskopio. Oikeanpuoleinen hakemisto muutetaan täsmäytyksessä vastaamaan tarkasti vasenta. -Update -> -Päivittävä -> - Copy new or updated files to right folder. Kopioidaan uudet tai muuttuneet tiedostot oikeaan hakemistoon. -Custom -Oma määritelmä - Configure your own synchronization rules. Määrittele oma täsmäyssääntö. @@ -658,9 +664,6 @@ Tiedostot samat jos ovat samat -File time and size -Tiedoston aika ja koko - Files are found equal if - file content @@ -672,9 +675,6 @@ Tiedostot samat jos, on sama -File content -Tiedoston sisältö - Symbolic Link handling Pikakuvakkeiden hallinta @@ -690,32 +690,29 @@ on sama Source code written in C++ utilizing: Koodikieli on C++ käyttäen: -Big thanks for localizing FreeFileSync goes out to: -Suuret kiitokset FreeFileSync:n kääntämisestä: +Feedback and suggestions are welcome + -Feedback and suggestions are welcome at: -Palaute ja ehdotukset saa lähettää: +Homepage +Kotisivu FreeFileSync at Sourceforge FreeFileSync Sourceforge:lla -Homepage -Kotisivu +Email +S-posti + +Big thanks for localizing FreeFileSync goes out to: +Suuret kiitokset FreeFileSync:n kääntämisestä: -If you like FFS -Jos pidät FFS:tä +If you like FreeFileSync +Jos pidät FreeFileSync:tä Donate with PayPal Lahjoita PayPal:lla -Email -S-posti - -Report translation error -Ilmoita käännösvirheestä - -Published under the GNU General Public License: -Julkaistu lisenssillä GNU General Public License: +Published under the GNU General Public License +Julkaistu lisenssillä GNU General Public License Ignore subsequent errors Jätä toistuvia virheitä huomiotta @@ -864,6 +861,9 @@ Sulje pois: \stuff\temp\* Folder pairs Hakemistoparit +Compressed view + + Select view Valitse näkymä @@ -882,20 +882,14 @@ Sulje pois: \stuff\temp\* -D-Click -2*Klikkaa - Delete Poista -Customize... -Sovita... - -Select time span... -Valitse aikajana... +Include all + -Auto-adjust columns -Säädä sarakeleveys automaattisesti +Exclude all + Icon size: Koko, kuvake: @@ -909,14 +903,11 @@ Sulje pois: \stuff\temp\* Large Iso -Include all rows -Sisällytä kaikki rivit - -Exclude all rows -Sulje pois, kaikki rivit +Select time span... +Valitse aikajana... -Reset view -Palauta näkymä +Default view + Show "%x" Näytä "%x" @@ -1197,6 +1188,12 @@ Sulje pois: \stuff\temp\* Move files into a time-stamped subdirectory Siirrä tiedostot aikaleimattuun hakemistoon +Files + + +Percentage + + %x TB %x TB @@ -1326,6 +1323,9 @@ Sulje pois: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Hakemistot riippuvuussuhteessa! Aseta täsmäyssääntöjä varovasti: +Preparing synchronization... + + Memory allocation failed! Muistin varaus epäonnistui! @@ -1443,8 +1443,8 @@ Sulje pois: \stuff\temp\* Target directory name must not be empty! Kohdehakemisto ei saa olla tyhjä! -User-defined directory for deletion was not specified! -Poistolle ei ole valittu hakemistoa! +Directory for file versioning was not supplied! + Source directory does not exist anymore: Lähdehakemisto puuttuu: diff --git a/BUILD/Languages/french.lng b/BUILD/Languages/french.lng index e77fe7de..bf7620ba 100644 --- a/BUILD/Languages/french.lng +++ b/BUILD/Languages/french.lng @@ -38,7 +38,7 @@ Supprimer les paramètres de rechange Clear filter settings -Effecer la configuration du filtrage +Effacer la configuration du filtrage Create a batch job Créer un traitement batch @@ -80,7 +80,7 @@ Chercher Select time span -choisir un intervalle de temps +Choisir un intervalle de temps Show pop-up Montrer les boîtes de dialogue @@ -113,10 +113,10 @@ Ligne de commande incorrecte : %x Windows Error Code %x: -Code erreur Windows %x: +Code erreur Windows %x : Linux Error Code %x: -Code erreur Linux %x: +Code erreur Linux %x : Error resolving symbolic link: Erreur lors de la résolution du lien symbolique : @@ -139,36 +139,6 @@ %x octets - - - - - - -Size -Taille - -Date -Date - -Full path -Chemin complet - -Filename -Nom du fichier - -Relative path -Chemin relatif - -Directory -Répertoire - -Extension -Extension - -Comparison Result -Résultat de la comparaison - Initial synchronization: Première synchronisation : @@ -354,6 +324,24 @@ La ligne de commande est exécutée chaque fois que : Logging Connexion +File time and size +Date et heure de modification du fichier + +File content +Contenu du fichier + + + + +Mirror ->> +Miroir ->> + +Update -> +Mise à Jour -> + +Custom +Personnaliser + FreeFileSync batch file FreeFileSync fichier de commandes @@ -411,23 +399,53 @@ La ligne de commande est exécutée chaque fois que : (Requires an Internet connection!) (Nécessite une connexion Internet) + + + + + + +Full path +Chemin complet + +Name +Nom + +Relative path +Chemin relatif + +Directory +Répertoire + +Size +Taille + +Date +Date + +Extension +Extension + +Comparison Result +Résultat de la comparaison + Drag && drop Glisser && Déposer Close progress dialog - +Fermer la fenêtre de progression Shut down - +Arrêter Log off - +Quitter Standby - +Pause Hibernate - +Figer 1. &Compare 1. &Comparer @@ -435,9 +453,6 @@ La ligne de commande est exécutée chaque fois que : 2. &Synchronize... 2. &Synchroniser... -S&witch view -Changer de &vue - &New &Nouveau @@ -556,7 +571,7 @@ La ligne de commande est exécutée chaque fois que : Retour d'informations Show progress dialog - +Montrer la fenêtre de prograssion Error handling Erreur de gestion de fichiers @@ -582,27 +597,15 @@ La ligne de commande est exécutée chaque fois que : Select variant: Choisissez une variante : - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. - - -Mirror ->> -Miroir ->> +Identifie et propage les modifications des deux côtés à l'aide d'une base de données. Les suppressions, renommage et conflits sont détectés automatiquement. Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Copie miroir du dossier de gauche. Le dossier de droite est modifié pour être strictement identique après la synchronisation. -Update -> -Mise à Jour -> - Copy new or updated files to right folder. Copie les fichiers nouveaux ou modifiés dans le dossier de droite. -Custom -Personnaliser - Configure your own synchronization rules. Paramétrage de vos règles de synchronisation. @@ -610,7 +613,7 @@ La ligne de commande est exécutée chaque fois que : Gestion des suppressions On completion: - +A la fin : Configuration Configuration @@ -658,9 +661,6 @@ Les fichiers sont considérés comme identiques si sont les mêmes -File time and size -Date et heure de modification du fichier - Files are found equal if - file content @@ -672,9 +672,6 @@ Les fichiers sont considérés comme identiques si est identique -File content -Contenu du fichier - Symbolic Link handling Gestion des Liens Symboliques @@ -690,32 +687,29 @@ est identique Source code written in C++ utilizing: Code source écrit en C++ utilisant : -Big thanks for localizing FreeFileSync goes out to: -Pour les traductions de FreeFileSync, un grand merci à : +Feedback and suggestions are welcome +Vos commentaires et vos suggestions sont les bienvenus -Feedback and suggestions are welcome at: -Commentaires et suggestions sont les bienvenus à : +Homepage +Accueil FreeFileSync at Sourceforge FreeFileSync par Sourceforge -Homepage -Accueil +Email +Email + +Big thanks for localizing FreeFileSync goes out to: +Pour les traductions de FreeFileSync, un grand merci à : -If you like FFS -Si vous aimez FFS +If you like FreeFileSync +Si vous aimez FreeFileSync Donate with PayPal Faites un don avec PayPal -Email -Email - -Report translation error -Etat des erreurs de transfert - -Published under the GNU General Public License: -Publié sous licence GNU General Public License : +Published under the GNU General Public License +Publié sous licence GNU General Public License Ignore subsequent errors Ignorer les erreurs ultérieures @@ -811,7 +805,7 @@ Exclude: \stuff\temp\* Copie de fichiers transactionnelle Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error. - +Ecrit d'abord dans un fichier temporaire (*.ffs_tmp), puis le renomme. Ceci guarantit la cohérence des données même en cas d'erreur fatale. Copy locked files Copier les fichiers verrouillés @@ -864,6 +858,9 @@ Exclude: \stuff\temp\* Folder pairs Paires de dossiers +Compressed view +Vue compressé + Select view Choisissez une vue @@ -882,41 +879,32 @@ Exclude: \stuff\temp\* -D-Click -Clic Droit - Delete Supprimer -Customize... -Personnaliser... +Include all +Inclure tout -Select time span... -choisir un intervalle de temps... - -Auto-adjust columns -Auto-ajustement des colonnes +Exclude all +Exclure tout Icon size: - +Taille des icônes : Small - +Petit Medium - +Moyen Large - - -Include all rows -Inclure toutes les lignes +Grand -Exclude all rows -Exclure toutes les lignes +Select time span... +choisir un intervalle de temps... -Reset view -Réinitialiser la vue +Default view +Vue par défaut Show "%x" Afficher "%x" @@ -1197,6 +1185,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory Déplacer les fichiers vers un sous-répertoire daté +Files +Fichiers + +Percentage +Pourcentage + %x TB %x To @@ -1326,6 +1320,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Les répertoires sont imbriqués ! Attention à la mise à jour des règles de synchronisation : +Preparing synchronization... +Synchronisation en cours de préparation ... + Memory allocation failed! Erreur d'allocation de mémoire! @@ -1369,10 +1366,10 @@ Exclude: \stuff\temp\* Supprimer les fichiers/dossiers de droite Move file on left - +Déplacer les fichiers à gauche Move file on right - +Déplacer les fichiers à droite Overwrite left file/folder with right one Remplacer le fichier/dossier de gauche avec celui de droite @@ -1443,8 +1440,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! Le répertoire destination ne doit pas être vide ! -User-defined directory for deletion was not specified! -Le répertoire défini par l'utilisateur pour la suppression n'a pas été indiqué ! +Directory for file versioning was not supplied! +Le répertoire des versions de fichiers n'a pas été indiqué ! Source directory does not exist anymore: Le répertoire source n'existe plus : diff --git a/BUILD/Languages/german.lng b/BUILD/Languages/german.lng index f9491cf0..6603115e 100644 --- a/BUILD/Languages/german.lng +++ b/BUILD/Languages/german.lng @@ -139,36 +139,6 @@ %x Bytes - - - - - - -Size -Größe - -Date -Datum - -Full path -Absoluter Pfad - -Filename -Dateiname - -Relative path -Relativer Pfad - -Directory -Verzeichnis - -Extension -Dateiendung - -Comparison Result -Ergebnis des Vergleichs - Initial synchronization: Erstmalige Synchronisation: @@ -354,6 +324,24 @@ Die Befehlszeile wird ausgeführt wenn: Logging Protokoll +File time and size +Datum und Größe + +File content +Dateiinhalt + + + + +Mirror ->> +Spiegeln ->> + +Update -> +Aktualisieren -> + +Custom +Eigene + FreeFileSync batch file FreeFileSync Batchdatei @@ -391,7 +379,7 @@ Die Befehlszeile wird ausgeführt wenn: Wechsle in die graphische Ansicht... Unable to connect to sourceforge.net! -Es konnte keine Verbindung zu sourceforge.net aufgebaut werden! +Es konnte keine Verbindung zu Sourceforge.net aufgebaut werden! A newer version of FreeFileSync is available: Eine neuere Version von FreeFileSync ist verfügbar: @@ -411,6 +399,36 @@ Die Befehlszeile wird ausgeführt wenn: (Requires an Internet connection!) (Eine Internetverbindung wird benötigt!) + + + + + + +Full path +Absoluter Pfad + +Name +Name + +Relative path +Relativer Pfad + +Directory +Verzeichnis + +Size +Größe + +Date +Datum + +Extension +Dateiendung + +Comparison Result +Ergebnis des Vergleichs + Drag && drop Drag && Drop @@ -582,27 +600,15 @@ Die Befehlszeile wird ausgeführt wenn: Select variant: Variante auswählen: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identifiziere und propagiere Änderungen auf beiden Seiten mit Hilfe einer Datenbank. Löschungen, Umbenennungen und Konflikte werden automatisch erkannt. -Mirror ->> -Spiegeln ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Spiegelkopie des linken Verzeichnisses erstellen. Das rechte Verzeichnis wird dem linken exakt angeglichen. -Update -> -Aktualisieren -> - Copy new or updated files to right folder. Neue oder aktualisierte Dateien vom linken in das rechte Verzeichnis kopieren. -Custom -Eigene - Configure your own synchronization rules. Eigene Synchronisationsregeln definieren. @@ -658,9 +664,6 @@ Dateien gelten als gleich, wenn gleich sind -File time and size -Dateizeit und -größe - Files are found equal if - file content @@ -672,9 +675,6 @@ Dateien gelten als gleich, wenn gleich ist -File content -Dateiinhalt - Symbolic Link handling Behandlung Symbolischer Links @@ -690,32 +690,29 @@ gleich ist Source code written in C++ utilizing: Sourcecode in C++ geschrieben mit Hilfe von: -Big thanks for localizing FreeFileSync goes out to: -Vielen Dank für die Lokalisation von FreeFileSync an: +Feedback and suggestions are welcome +Feedback und Vorschläge sind willkommen -Feedback and suggestions are welcome at: -Feedback und Vorschläge sind willkommen unter: +Homepage +Homepage FreeFileSync at Sourceforge FreeFileSync auf Sourceforge -Homepage -Homepage +Email +Email -If you like FFS -FFS unterstützen +Big thanks for localizing FreeFileSync goes out to: +Vielen Dank für die Lokalisation von FreeFileSync an: + +If you like FreeFileSync +Wenn Sie FreeFileSync mögen Donate with PayPal Mit PayPal spenden -Email -Email - -Report translation error -Übersetzungsfehler melden - -Published under the GNU General Public License: -Veröffentlicht unter der GNU General Public License: +Published under the GNU General Public License +Veröffentlicht unter der Allgemeinen Öffentlichen GNU-Lizenz Ignore subsequent errors Nachfolgende Fehler ignorieren @@ -808,10 +805,10 @@ Ausschließen: \stuff\temp\* Spalte nach unten verschieben Transactional file copy -Kopiere Dateien als Transaktion +Dateien als Transaktion kopieren Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error. -Dateien zuerst temporär schreiben (*.ffs_tmp), anschließend umbenennen. Dadurch wird ein konsistenter Status auch im größten Fehlerfall sichergestellt. +Schreibe zunächst in eine temporäre Datei (*.ffs_tmp) und benenne diese anschließend um. Dadurch wird ein konsistenter Status auch im größten Fehlerfall sichergestellt. Copy locked files Gesperrte Dateien kopieren @@ -864,6 +861,9 @@ Ausschließen: \stuff\temp\* Folder pairs Verzeichnispaare +Compressed view +Komprimierte Ansicht + Select view Ansicht auswählen @@ -882,20 +882,14 @@ Ausschließen: \stuff\temp\* -D-Click -D-Klick - Delete Löschen -Customize... -Anpassen... - -Select time span... -Zeitspanne auswählen... +Include all +Alle einschließen -Auto-adjust columns -Spalten automatisch ausrichten +Exclude all +Alle ausschließen Icon size: Symbolgröße @@ -909,14 +903,11 @@ Ausschließen: \stuff\temp\* Large Groß -Include all rows -Alle Zeilen einschließen - -Exclude all rows -Alle Zeilen ausschließen +Select time span... +Zeitspanne auswählen... -Reset view -Ansicht zurücksetzen +Default view +Standardansicht Show "%x" Zeige "%x" @@ -1027,7 +1018,7 @@ Ausschließen: \stuff\temp\* Vor der Synchronisation bitte zuerst einen Vergleich ausführen! Comma separated list -Kommagetrennte Liste +Durch Komma getrennte Liste Legend Legende @@ -1073,8 +1064,8 @@ Ausschließen: \stuff\temp\* %x of %y rows in view -%x von 1 Zeile zur Ansicht -%x von %y Zeilen zur Ansicht +Zeige %x von 1 Zeile +Zeige %x von %y Zeilen Scanning... @@ -1197,6 +1188,12 @@ Ausschließen: \stuff\temp\* Move files into a time-stamped subdirectory Verschiebe Dateien in ein Unterverzeichnis mit Zeitstempel +Files +Dateien + +Percentage +Prozent + %x TB %x TB @@ -1326,6 +1323,9 @@ Ausschließen: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Die Verzeichnisse sind voneinander abhängig! Achtung beim Festlegen der Synchronisationseinstellungen: +Preparing synchronization... +Bereite Synchronisation vor... + Memory allocation failed! Speicherallokation fehlgeschlagen! @@ -1443,8 +1443,8 @@ Ausschließen: \stuff\temp\* Target directory name must not be empty! Der Zielverzeichnisname darf nicht leer sein! -User-defined directory for deletion was not specified! -Kein benutzerdefiniertes Verzeichnis zum Löschen angegeben! +Directory for file versioning was not supplied! +Das Verzeichnis für die Versionierung wurde nicht angegeben! Source directory does not exist anymore: Quellverzeichnis existiert nicht mehr: diff --git a/BUILD/Languages/greek.lng b/BUILD/Languages/greek.lng index 83814b45..3e436b26 100644 --- a/BUILD/Languages/greek.lng +++ b/BUILD/Languages/greek.lng @@ -139,36 +139,6 @@ %x Bytes - -<Συμβολικός δεσμός> - - -<Υποκατάλογος> - -Size -Μέγεθος - -Date -Ημερομηνία - -Full path -Πλήρης διαδρομή - -Filename -Όνομα αρχείου - -Relative path -Σχετική διαδρομή - -Directory -Υποκατάλογος - -Extension -Επέκταση - -Comparison Result -Αποτέλεσμα της σύγκρισης - Initial synchronization: Αρχικός συγχρονισμός: @@ -354,6 +324,24 @@ The command line is executed each time: Logging Καταγραφή μηνυμάτων +File time and size +Ημερομηνία και μέγεθος αρχείων + +File content +Περιεχόμενο αρχείων + + +<Αυτόματα> + +Mirror ->> +Κατοπτρισμός ->> + +Update -> +Ενημέρωση -> + +Custom +Εξατομίκευση + FreeFileSync batch file FreeFileSync αρχείο δέσμης @@ -411,6 +399,36 @@ The command line is executed each time: (Requires an Internet connection!) (Απαιτεί σύνδεση με το Internet) + +<Συμβολικός δεσμός> + + +<Υποκατάλογος> + +Full path +Πλήρης διαδρομή + +Name +Όνομα + +Relative path +Σχετική διαδρομή + +Directory +Υποκατάλογος + +Size +Μέγεθος + +Date +Ημερομηνία + +Extension +Επέκταση + +Comparison Result +Αποτέλεσμα της σύγκρισης + Drag && drop Μεταφορά && Απόθεση @@ -435,9 +453,6 @@ The command line is executed each time: 2. &Synchronize... 2. &Συγχρονισμός... -S&witch view -Α&λλαγή εμφάνισης - &New &Δημιουργία @@ -582,27 +597,15 @@ The command line is executed each time: Select variant: Επιλέξτε μια μέθοδο: - -<Αυτόματα> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Αναγνώριση και αναπαραγωγή των αλλαγών και στις δύο πλευρές με τη χρήση μιας βάσης δεδομένων. Διαγραφές, μετονομασίες και διενέξεις ανιχνεύονται αυτόματα. -Mirror ->> -Κατοπτρισμός ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Κατοπτρικό αντίγραφο του αριστερού υποκαταλόγου. Ο υποκατάλογος δεξιά θα τροποποιηθεί και θα αντιστοιχεί εξολοκλήρου στον αριστερό μετά το συγχρονισμό -Update -> -Ενημέρωση -> - Copy new or updated files to right folder. Αντιγραφή των νέων ή πιο πρόσφατων αρχείων στον υποκατάλογο δεξιά. -Custom -Εξατομίκευση - Configure your own synchronization rules. Ορίστε τους δικούς σας κανόνες συγχρονισμού. @@ -658,9 +661,6 @@ are the same είναι ίδια -File time and size -Ημερομηνία και μέγεθος αρχείων - Files are found equal if - file content @@ -672,9 +672,6 @@ is the same είναι ίδιο -File content -Περιεχόμενο αρχείων - Symbolic Link handling Τρόπος διαχείρισης των συμβολικών δεσμών @@ -690,32 +687,29 @@ is the same Source code written in C++ utilizing: Ο πηγαίος κώδικας γράφτηκε σε C++ χρησιμοποιώντας τα: -Big thanks for localizing FreeFileSync goes out to: -Για τις μεταφράσεις του FreeFileSync, ευχαριστούμε τους: +Feedback and suggestions are welcome +Τα σχόλια και οι προτάσεις σας είναι ευπρόσδεκτα -Feedback and suggestions are welcome at: -Σχόλια και προτάσεις είναι ευπρόσδεκτα στα: +Homepage +Ιστοσελίδα FreeFileSync at Sourceforge Το FreeFileSync στο Sourceforge -Homepage -Ιστοσελίδα +Email +Email -If you like FFS -Αν σας αρέσει το FFS +Big thanks for localizing FreeFileSync goes out to: +Για τις μεταφράσεις του FreeFileSync, ευχαριστούμε τους: + +If you like FreeFileSync +Αν σας αρέσει το FreeFileSync Donate with PayPal Κάντε μια δωρεά μέσω PayPal -Email -Email - -Report translation error -Αναφέρετε λάθη μετάφρασης - -Published under the GNU General Public License: -Διανέμεται υπό την Γενική Άδεια Δημόσιας Χρήσης GNU: +Published under the GNU General Public License +Διανέμεται υπό την Γενική Άδεια Δημόσιας Χρήσης GNU Ignore subsequent errors Παράβλεψη των επόμενων σφαλμάτων @@ -864,6 +858,9 @@ Exclude: \stuff\temp\* Folder pairs Ζεύγη υποκαταλόγων +Compressed view +Συμπιεσμένη εμφάνιση + Select view Επιλογή εμφάνισης @@ -882,20 +879,14 @@ Exclude: \stuff\temp\* <πολλαπλή επιλογή> -D-Click -Διπλό κλικ - Delete Διαγραφή -Customize... -Προσαρμογή... - -Select time span... -Επιλέξτε το χρονικό εύρος... +Include all +Συμπερίληψη όλων -Auto-adjust columns -Αυτόματη προσαρμογή των στηλών +Exclude all +Εξαίρεση όλων Icon size: Μέγεθος εικονιδίων: @@ -909,14 +900,11 @@ Exclude: \stuff\temp\* Large Μεγάλο -Include all rows -Συμπερίληψη όλων των γραμμών - -Exclude all rows -Εξαίρεση όλων των γραμμών +Select time span... +Επιλέξτε το χρονικό εύρος... -Reset view -Επαναφορά αρχικής εμφάνισης +Default view +Προεπιλεγμένη εμφάνιση Show "%x" Εμφάνιση της γραμμής "%x" @@ -1197,6 +1185,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory Μεταφορά των αρχείων σε έναν υποκατάλογο με ένδειξη ώρας +Files +Αρχεία + +Percentage +Ποσοστό + %x TB %x TB @@ -1326,6 +1320,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Οι υποκατάλογοι είναι εξαρτώμενοι. Προσοχή κατά την εισαγωγή των κανόνων συγχρονισμού: +Preparing synchronization... +Προετοιμασία του συγχρονισμού... + Memory allocation failed! Η δέσμευση χώρου μνήμης απέτυχε! @@ -1443,8 +1440,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! Το όνομα του υποκαταλόγου προορισμού πρέπει να μην είναι κενό! -User-defined directory for deletion was not specified! -Δεν ορίστηκε από τον χρήστη υποκατάλογος για τα αρχεία προς διαγραφή! +Directory for file versioning was not supplied! +Δεν έχει οριστεί υποκατάλογος για τη διατήρηση παλιών εκδόσεων! Source directory does not exist anymore: Ο υποκατάλογος προέλευσης δεν υπάρχει πλέον: diff --git a/BUILD/Languages/hebrew.lng b/BUILD/Languages/hebrew.lng index a3d4ca3c..8122b0b1 100644 --- a/BUILD/Languages/hebrew.lng +++ b/BUILD/Languages/hebrew.lng @@ -139,36 +139,6 @@ %x בייט - -<קשור סימבולי> - - -<מחיצה> - -Size -גודל - -Date -תארין - -Full path -נתיב מלא - -Filename -שם קובץ - -Relative path -נתיב יחסי - -Directory -מחיצה - -Extension -סיומת - -Comparison Result -תוצאות ההשוואה - Initial synchronization: סנכרון ראשוני: @@ -354,6 +324,24 @@ The command line is executed each time: Logging רישום ביומן +File time and size +זמן וגודל קובץ + +File content +תכולת הקובץ + + +<אוטומטי> + +Mirror ->> +מראה ->> + +Update -> +שדרג -> + +Custom +מותאם + FreeFileSync batch file FreeFileSync קובץ אצווה @@ -411,6 +399,36 @@ The command line is executed each time: (Requires an Internet connection!) (מחייב קישור אינטרנטי פעיל!) + +<קשור סימבולי> + + +<מחיצה> + +Full path +נתיב מלא + +Name +שם + +Relative path +נתיב יחסי + +Directory +מחיצה + +Size +גודל + +Date +תארין + +Extension +סיומת + +Comparison Result +תוצאות ההשוואה + Drag && drop גרור והשלך @@ -544,10 +562,10 @@ The command line is executed each time: קבצי המסנן Left -שמאל +ימין Right -ימין +שמאל Overview מבט כללי @@ -582,26 +600,14 @@ The command line is executed each time: Select variant: בחר משתנה: - -<אוטומטי> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. זהה והפץ שינויים בשני הצדדים באמצעות שימוש בבסיס נתונים. מחיקות, שינויי שמות וסתירות מתגלים באופן אוטומטי. -Mirror ->> -<<- מראה - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. -גיבוי מראה של מחיצה שמאלית. מחיצה ימנית תהיה זהה לשמאלית לאחר הסינכרון. - -Update -> -<- שדרג +גיבוי מראה של מחיצה ימנית. מחיצה שמאלית תתעדכן ותהיה זהה לימנית לאחר הסינכרון. Copy new or updated files to right folder. -העתק קבצים חדשים או מעודכנים למחיצה הימנית. - -Custom -מותאם +העתק קבצים חדשים או מעודכנים למחיצה השמאלית. Configure your own synchronization rules. סדר את כללי הסנכרון שלך. @@ -622,16 +628,16 @@ The command line is executed each time: פעולה File/folder exists on left side only -קובץ\מחיצה קיים בצד שמאל בלבד +קובץ\מחיצה קיים בצד ימין בלבד File/folder exists on right side only -קובץ\מחיצה קיים בצד ימין בלבד +קובץ\מחיצה קיים בצד שמאל בלבד Left file is newer -צד שמאל חדש יותר +קובץ בצד ימין חדש יותר Right file is newer -צד ימין חדש יותר +צד שמאל חדש יותר Files have different content הקבצים בעלי תכולה שונה @@ -658,9 +664,6 @@ are the same הם זהים -File time and size -זמן וגודל קובץ - Files are found equal if - file content @@ -672,9 +675,6 @@ is the same היא זהה -File content -תכולת הקובץ - Symbolic Link handling טיפול בקישור סימבולי @@ -690,32 +690,29 @@ is the same Source code written in C++ utilizing: קוד מקור נכתב ב- C++ באמצעות: -Big thanks for localizing FreeFileSync goes out to: -תודות עבור עבודות התרגום של תוכנת הסנכרון: +Feedback and suggestions are welcome +משוב והצעות יתקבלו בברכה -Feedback and suggestions are welcome at: -תגובות והצעות ותקבלו בברכה: +Homepage +אתר-הבית: FreeFileSync at Sourceforge FreeFileSync ב Sourceforge -Homepage -אתר-הבית: +Email +דוא"ל: + +Big thanks for localizing FreeFileSync goes out to: +תודות עבור עבודות התרגום של תוכנת הסנכרון: -If you like FFS -במידה ו-FFS מוצאת חן בעינכם +If you like FreeFileSync +במידה ו-FreeFileSync מוצאת חן בעינכם Donate with PayPal תרום עם פייפל -Email -דוא"ל: - -Report translation error -דווח שגיאת תרגום: - -Published under the GNU General Public License: -מפורסם במסגרת GNU General Public License: +Published under the GNU General Public License +מפורסם במסגרת GNU General Public License Ignore subsequent errors התעלם משגיאות נישנות @@ -864,6 +861,9 @@ Exclude: \stuff\temp\* Folder pairs זוגות מחיצות +Compressed view +תצוגה מכווצת + Select view בחר תצוגה @@ -882,20 +882,14 @@ Exclude: \stuff\temp\* <בחירה מרובה> -D-Click -לחיצה-כפולה - Delete מחק -Customize... -מותאם אישית... +Include all +הכלל הכל -Select time span... -בחר תחום זמן... - -Auto-adjust columns -עימוד אוטומטי +Exclude all +הוצא מן הכלל הכל Icon size: גודל סמל: @@ -909,14 +903,11 @@ Exclude: \stuff\temp\* Large גדול -Include all rows -כלול את כל השורות - -Exclude all rows -אל תכלול את כל השורות +Select time span... +בחר תחום זמן... -Reset view -אפס תצוגה +Default view +תצוגה בתצורת ברירת מחדל Show "%x" הראה "%x" @@ -937,28 +928,28 @@ Exclude: \stuff\temp\* סנכרון קבצים ומחיצות Hide files that exist on left side only -הסתר קבצים הקימים אך ורק בצד שמאל +הסתר קבצים הקימים אך ורק בצד ימין Show files that exist on left side only -הראה קבצים הנמצאים אך ורק בצד שמאל +הראה קבצים הנמצאים אך ורק בצד ימין Hide files that exist on right side only -הסתר קבצים הקימים אך ורק בצד ימין +הסתר קבצים הקימים אך ורק בצד שמאל Show files that exist on right side only -הראה קבצים הנמצאים אך ורק בצד ימין +הראה קבצים הנמצאים אך ורק בצד שמאל Hide files that are newer on left -הסתר קבצים חדשים יותר בצד שמאל +הסתר קבצים חדשים יותר בצד ימין Show files that are newer on left -הראה קבצים חדשים יותר בצד שמאל +הראה קבצים חדשים יותר בצד ימין Hide files that are newer on right -הסתר קבצים חדשים יותר בצד ימין +הסתר קבצים חדשים יותר בצד שמאל Show files that are newer on right -הראה קבצים חדשים יותר בצד ימין +הראה קבצים חדשים יותר בצד שמאל Hide files that are equal הסתר קבצים שאינם שווים @@ -979,40 +970,40 @@ Exclude: \stuff\temp\* הראה קונפליקטים Hide files that will be created on the left side -הסתר קבצים שייוצרו בצד שמאל +הסתר קבצים שייוצרו בצד ימין Show files that will be created on the left side -הראה קבצים שיווצרו בצד שמאל +הראה קבצים שיווצרו בצד ימין Hide files that will be created on the right side -הסתר קבצים שייוצרו בצד ימין +הסתר קבצים שייוצרו בצד שמאל Show files that will be created on the right side -הראה קבצים שיווצרו בצד ימין +הראה קבצים שיווצרו בצד שמאל Hide files that will be deleted on the left side -הסתר קבצים שימחקו בצד שמאל +הסתר קבצים שימחקו בצד ימין Show files that will be deleted on the left side -הראה קבצים שימחקו בצד שמאל +הראה קבצים שימחקו בצד ימין Hide files that will be deleted on the right side -הסתר קבצים שימחקו בצד ימין +הסתר קבצים שימחקו בצד שמאל Show files that will be deleted on the right side -הראה קבצים שימחקו בצד ימין +הראה קבצים שימחקו בצד שמאל Hide files that will be overwritten on left side -הסתר קבצים שידרסו בצד שמאל +הסתר קבצים שידרסו בצד ימין Show files that will be overwritten on left side -הראה קבצים שידרסו בצד שמאל +הראה קבצים שידרסו בצד ימין Hide files that will be overwritten on right side -הסתר קבצים שידרסו בצד ימין +הסתר קבצים שידרסו בצד שמאל Show files that will be overwritten on right side -הראה קבצים שידרסו בצד ימין +הראה קבצים שידרסו בצד שמאל Hide files that won't be copied הסתר קבצים אשר לא יועתקו @@ -1197,6 +1188,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory העבר קבצים לתוך מחיצות עם שם המכיל טביעת זמן ותאריך +Files +קבצים + +Percentage +אחוז + %x TB %x טרה בייט @@ -1326,6 +1323,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: מחיצות תלויות! זהירות בהגדרת כללי סנכרון: +Preparing synchronization... +מכין סינכרון... + Memory allocation failed! הקצאת זכרון נכשלה! @@ -1357,37 +1357,37 @@ Exclude: \stuff\temp\* קבצים\מחיצות שונים בערכי התכונות בלבד Copy new file/folder to left -העתק קובץ\מחיצה חדש\ה מימין לשמאל +העתק קובץ\מחיצה חדש\ה משמאל לימין Copy new file/folder to right -העתק קובץ\מחיצה חדש\ה משמאל לימין +העתק קובץ\מחיצה חדש\ה מימין לשמאל Delete left file/folder -מחק קובץ\מחיצה בצד שמאל +מחק קובץ\מחיצה בצד ימין Delete right file/folder -מחק קובץ\מחיצה בצד ימין +מחק קובץ\מחיצה בצד שמאל Move file on left -העבר קובץ בצד שמאל +העבר קובץ בצד ימין Move file on right -העבר קובץ בצד ימין +העבר קובץ בצד שמאל Overwrite left file/folder with right one -העתק ודרוס קובץ\מחיצה מימין לשמאל +העתק ודרוס קובץ\מחיצה משמאל לימין Overwrite right file/folder with left one -העתק ודרוס קובץ\מחיצה משמאל לימין +העתק ודרוס קובץ\מחיצה מימין לשמאל Do nothing אל תעשה כלום Copy file attributes only to left -העתק תכונות קובץ בלבד מימין לשמאל +העתק תכונות קובץ בלבד משמאל לימין Copy file attributes only to right -העתק תכונות קובץ בלבד משמאל לימין +העתק תכונות קובץ בלבד מימין לשמאל Multiple... הכפל... @@ -1443,8 +1443,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! שם של מחיצת מטרה אינו יכול להיות ריק! -User-defined directory for deletion was not specified! -מחיצה מוגדרת משתמש למחיקה לא מוגדרת! +Directory for file versioning was not supplied! +לא סופקה מחיצה לרישום גרסאות קבצים Source directory does not exist anymore: מחיצת המקור לא נמצאת: diff --git a/BUILD/Languages/hungarian.lng b/BUILD/Languages/hungarian.lng index ad9c3eb0..07738505 100644 --- a/BUILD/Languages/hungarian.lng +++ b/BUILD/Languages/hungarian.lng @@ -139,36 +139,6 @@ %x Bájt - - - - - - -Size -Méret - -Date -Dátum - -Full path -Teljes elérési útvonal - -Filename -Fájlnév - -Relative path -Relatív útvonal - -Directory -Mappa - -Extension -Kiterjesztés - -Comparison Result -Az összehasonlítás eredménye - Initial synchronization: Első szinkronizáció: @@ -354,6 +324,24 @@ A parancssor végrehajtódik minden alkalommal, ha: Logging Naplózás +File time and size +Fájl dátuma és mérete + +File content +fájl tartalma alapján + + + + +Mirror ->> +Tükrözés ->> + +Update -> +Frissítés -> + +Custom +Egyedi + FreeFileSync batch file FreeFileSync kötegelt fájl @@ -411,23 +399,53 @@ A parancssor végrehajtódik minden alkalommal, ha: (Requires an Internet connection!) (Internetkapcsolat szükséges!) + + + + + + +Full path +Teljes elérési útvonal + +Name +Név + +Relative path +Relatív útvonal + +Directory +Mappa + +Size +Méret + +Date +Dátum + +Extension +Kiterjesztés + +Comparison Result +Az összehasonlítás eredménye + Drag && drop Húzd && Ejtsd Close progress dialog - +Folyamatjelző párbeszédablak bezárása Shut down - +Gép leállítása Log off - +Kijelentkezés Standby - +Készenléti állapot Hibernate - +Hibernálás 1. &Compare 1. &Összehasonlítás @@ -435,9 +453,6 @@ A parancssor végrehajtódik minden alkalommal, ha: 2. &Synchronize... 2. &Szinkronizálás -S&witch view -Nézet v&áltása - &New &Új @@ -556,7 +571,7 @@ A parancssor végrehajtódik minden alkalommal, ha: Státusz visszajelzés Show progress dialog - +Folyamatjelző párbeszédablak mutatása Error handling Hibakezelés @@ -582,27 +597,15 @@ A parancssor végrehajtódik minden alkalommal, ha: Select variant: Változat kiválasztása: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. - - -Mirror ->> -Tükrözés ->> +Változások azonosítása és végrehajtása mindkét oldalon adatbázis segítségével. Automatikusan felismerődnek a törlések, átnevezések és ütközések. Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. A bal oldali mappa tükrözött másolata. A jobb oldali mappa úgy lesz megváltoztatva, hogy a szinkronizáció után pontosan megegyezzen a bal oldalival. -Update -> -Frissítés -> - Copy new or updated files to right folder. Új vagy frissített fájlok másolása a jobb oldali mappába. -Custom -Egyedi - Configure your own synchronization rules. Saját szinkronizálási szabályok beállítása. @@ -610,7 +613,7 @@ A parancssor végrehajtódik minden alkalommal, ha: Törlések kezelése On completion: - +Végrehajtás után: Configuration Beállítás @@ -657,9 +660,6 @@ A fájlok egyezőnek tekintendők, ha megegyezik - a fájlméret -File time and size -Fájl dátuma és mérete - Files are found equal if - file content @@ -670,9 +670,6 @@ A fájlok megegyeznek, ha megegyezik - a fájlok tartalma -File content -fájl tartalma alapján - Symbolic Link handling Symlink kezelés @@ -688,35 +685,32 @@ A fájlok megegyeznek, ha megegyezik Source code written in C++ utilizing: A programot C++-ban fejlesztették a következők felhasználásával: -Big thanks for localizing FreeFileSync goes out to: - -Nagy köszönet a FreeFileSync lokalizációjáért -a következő személyeknek: - +Feedback and suggestions are welcome +Várjuk a visszajelzéseket és az ötleteket -Feedback and suggestions are welcome at: -A visszajelzéseket és javaslatokat ide várjuk: +Homepage +Honlap FreeFileSync at Sourceforge FreeFileSync a Sourceforge-on -Homepage -Honlap +Email +E-mail + +Big thanks for localizing FreeFileSync goes out to: + +Nagy köszönet a FreeFileSync lokalizációjáért +a következő személyeknek: + -If you like FFS -FFS támogatása +If you like FreeFileSync +FreeFileSync támogatása Donate with PayPal Ha szereted a FreeFileSync-et, támogasd a PayPal segítségével. -Email -E-mail - -Report translation error -Fordítói hiba bejelentése - -Published under the GNU General Public License: -Kiadva a GNU General Public License alatt: +Published under the GNU General Public License +Kiadva a GNU General Public License alatt Ignore subsequent errors Későbbi hibák figyelmen kívül hagyása @@ -812,7 +806,7 @@ Kizárni: \stuff\temp\* Tranzakciós fájlmásolás Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error. - +Írás egy ideiglenes fájlba (*.ffs_tmp), majd annak átnevezése. Ez egyező állapotot garantál még végzetes hiba esetén is. Copy locked files Zárolt fájlok másolása @@ -865,6 +859,9 @@ Kizárni: \stuff\temp\* Folder pairs Mappa párok +Compressed view +Tömörített nézet + Select view Nézet kiválasztása @@ -883,41 +880,32 @@ Kizárni: \stuff\temp\* -D-Click -D-Klikk - Delete Törlés -Customize... -Testreszabás... +Include all +Csatolni az összeset -Select time span... -Időintervallum kiválasztása... - -Auto-adjust columns -Oszlopok automatikus igazítása +Exclude all +Kizárni az összeset Icon size: - +Ikon mérete: Small - +Kicsi Medium - +Közepes Large - - -Include all rows -Minden sort csatolni +Nagy -Exclude all rows -Minden sor kizárása +Select time span... +Időintervallum kiválasztása... -Reset view -Nézet visszaállítása +Default view +Alapértelmezett nézet Show "%x" "%x" mutatása @@ -1198,6 +1186,12 @@ Kizárni: \stuff\temp\* Move files into a time-stamped subdirectory Fájlok másolása időbélyeggel ellátott almappába +Files +Fájlok + +Percentage +Százalék + %x TB %x TB @@ -1327,6 +1321,9 @@ Kizárni: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: A mappák függenek egymástól! Legyen óvatos, amikor megadja a szinkronizálási szabályokat: +Preparing synchronization... +Szinkronizálás előkészítése... + Memory allocation failed! Sikertelen memóriafoglalás! @@ -1370,10 +1367,10 @@ Kizárni: \stuff\temp\* Jobb oldali fájl/mappa törlése Move file on left - +Bal oldali fájl mozgatása Move file on right - +Jobb oldali fájl mozgatása Overwrite left file/folder with right one Bal oldali fájl/mappa felülírása a jobb oldalival @@ -1444,8 +1441,8 @@ Kizárni: \stuff\temp\* Target directory name must not be empty! A célmappa neve nem lehet üres! -User-defined directory for deletion was not specified! -A törléshez nem lett mappa megadva a felhasználó által! +Directory for file versioning was not supplied! +Nem lett megadva mappa a fájlok verziókezeléséhez! Source directory does not exist anymore: A forrásként megadott mappa többé nem létezik: diff --git a/BUILD/Languages/italian.lng b/BUILD/Languages/italian.lng index 35c4cd9c..c7775fc8 100644 --- a/BUILD/Languages/italian.lng +++ b/BUILD/Languages/italian.lng @@ -139,36 +139,6 @@ %x Byte - - - - - - -Size -Dimensione - -Date -Data - -Full path -Percorso completo - -Filename -Nome del file - -Relative path -Percorso relativo - -Directory -Directory - -Extension -Estensione - -Comparison Result -Risultato della comparazione - Initial synchronization: Prima sincronizzazione: @@ -354,6 +324,24 @@ La linea di comando è eseguita ogni volta che: Logging Logging +File time and size +Ora e dimensione file + +File content +Contenuto del file + + + + +Mirror ->> +Mirror ->> + +Update -> +Aggiorna -> + +Custom +Personalizza + FreeFileSync batch file FreeFileSync batch file @@ -411,23 +399,53 @@ La linea di comando è eseguita ogni volta che: (Requires an Internet connection!) (Richiede una connessione Internet!) + + + + + + +Full path +Percorso completo + +Name +Nome + +Relative path +Percorso relativo + +Directory +Directory + +Size +Dimensione + +Date +Data + +Extension +Estensione + +Comparison Result +Risultato della comparazione + Drag && drop Drag && drop Close progress dialog - +Chiudi stato di avanzamento Shut down - +Arresta Log off - +Termina sessione Standby - +Sospendi Hibernate - +Iberna 1. &Compare 1. &Compara @@ -435,9 +453,6 @@ La linea di comando è eseguita ogni volta che: 2. &Synchronize... 2. &Sincronizza... -S&witch view -C&ommuta vista - &New &Nuovo @@ -556,7 +571,7 @@ La linea di comando è eseguita ogni volta che: Feedback di stato Show progress dialog - +Mostra stato di avanzamento Error handling Gestione degli errori @@ -582,27 +597,15 @@ La linea di comando è eseguita ogni volta che: Select variant: Selezionare una variante: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identifica e propaga modifiche su entrambi i lati usando un database. Cancellazioni, ridenominazioni e conflitti sono rilevati automaticamente. -Mirror ->> -Mirror ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Mirror backup della cartella di sinistra. La cartella destra verrà modificata per corrispondere esattamente alla cartella di sinistra dopo la sincronizzazione. -Update -> -Aggiorna -> - Copy new or updated files to right folder. Copia file nuovi o aggiornati nella cartella di destra. -Custom -Personalizza - Configure your own synchronization rules. Configura le tue regole di sincronizzazione. @@ -610,7 +613,7 @@ La linea di comando è eseguita ogni volta che: Gestione cancellazione On completion: - +In completamento: Configuration Configurazione @@ -658,9 +661,6 @@ I file sono considerati identici se sono identici -File time and size -Ora e dimensione file - Files are found equal if - file content @@ -672,9 +672,6 @@ I file sono considerati identici se è identico -File content -Contenuto del file - Symbolic Link handling Gestione Link Simbolico @@ -690,32 +687,29 @@ I file sono considerati identici se Source code written in C++ utilizing: Codice sorgente scritto in C++ utilizzando: -Big thanks for localizing FreeFileSync goes out to: -Per la traduzione di FreeFileSync, un grazie va a: +Feedback and suggestions are welcome +Ogni commento o suggerimento è ben accetto -Feedback and suggestions are welcome at: -Commenti e suggerimenti sono i benvenuti: +Homepage +Homepage FreeFileSync at Sourceforge FreeFileSync su Sourceforge -Homepage -Homepage +Email +Email -If you like FFS -Se ti piace FFS +Big thanks for localizing FreeFileSync goes out to: +Per la traduzione di FreeFileSync, un grazie va a: + +If you like FreeFileSync +Se ti piace FreeFileSync Donate with PayPal Fai una donazione con PayPal -Email -Email - -Report translation error -Segnala errori di traduzione - -Published under the GNU General Public License: -Pubblicato sotto licenza GNU General Public: +Published under the GNU General Public License +Pubblicato sotto licenza GNU General Public Ignore subsequent errors Ignora gli errori successivi @@ -864,6 +858,9 @@ Escludi: \stuff\temp\* Folder pairs Coppia di cartelle +Compressed view +Vista compressa + Select view Seleziona vista @@ -882,20 +879,14 @@ Escludi: \stuff\temp\* -D-Click -D-Click - Delete Cancella -Customize... -Personalizza... - -Select time span... -Seleziona intervallo di tempo... +Include all +Includi tutto -Auto-adjust columns -Larghezza automatica colonne +Exclude all +Escludi tutto Icon size: Dimensione icona: @@ -909,14 +900,11 @@ Escludi: \stuff\temp\* Large Grande -Include all rows -Includi tutte le righe - -Exclude all rows -Escludi tutte le righe +Select time span... +Seleziona intervallo di tempo... -Reset view -Resetta vista +Default view +Vista normale Show "%x" Mostra "%x" @@ -1197,6 +1185,12 @@ Escludi: \stuff\temp\* Move files into a time-stamped subdirectory Sposta file in una sotto-cartella datata +Files +Files + +Percentage +Percentuale + %x TB %x TB @@ -1326,6 +1320,9 @@ Escludi: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Le directory sono dipendenti! Fai attenzione quando configuri le regole di sincronizzazione: +Preparing synchronization... +Preparazione sincronizzazione... + Memory allocation failed! Allocazione di memoria fallita! @@ -1443,8 +1440,8 @@ Escludi: \stuff\temp\* Target directory name must not be empty! Il nome della cartella di destinazione non può essere nullo! -User-defined directory for deletion was not specified! -Directory personalizzata per la cancellazione non specificata! +Directory for file versioning was not supplied! +Non è stata indicata una cartella per il file delle versioni! Source directory does not exist anymore: La directory sorgente non è più esistente: diff --git a/BUILD/Languages/japanese.lng b/BUILD/Languages/japanese.lng index 59820383..7bcd766c 100644 --- a/BUILD/Languages/japanese.lng +++ b/BUILD/Languages/japanese.lng @@ -138,36 +138,6 @@ %x バイト - -<シンボリックリンク> - - -<ディレクトリ> - -Size -サイズ - -Date -日付 - -Full path -フルパス - -Filename -ファイル名 - -Relative path -相対パス - -Directory -ディレクトリ - -Extension -拡張子 - -Comparison Result -比較結果 - Initial synchronization: 同期処理の初期化: @@ -351,6 +321,24 @@ The command line is executed each time: Logging ログ +File time and size +ファイル時刻とサイズ + +File content +ファイルの内容 + + +<自動> + +Mirror ->> +ミラー >> + +Update -> +更新 -> + +Custom +カスタム + FreeFileSync batch file FreeFileSync バッチファイル @@ -408,6 +396,36 @@ The command line is executed each time: (Requires an Internet connection!) (インターネット接続を必要とします!) + +<シンボリックリンク> + + +<ディレクトリ> + +Full path +フルパス + +Name +名前 + +Relative path +相対パス + +Directory +ディレクトリ + +Size +サイズ + +Date +日付 + +Extension +拡張子 + +Comparison Result +比較結果 + Drag && drop ドラッグ && ドロップ @@ -579,27 +597,15 @@ The command line is executed each time: Select variant: 変数を選択: - -<自動> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. 両側の識別、プロパティの変更特定にデータベースを使用します。削除、リネーム及び競合などは自動的に検出されます -Mirror ->> -ミラー >> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. 左側に合わせてバックアップ. 右側のフォルダ内容が同期処理後に左側と同じになるようにします。 -Update -> -更新 -> - Copy new or updated files to right folder. 新しい(更新)ファイルを右フォルダにコピー -Custom -カスタム - Configure your own synchronization rules. あなたの設定した同期規則を使用します。 @@ -655,9 +661,6 @@ are the same で判断する -File time and size -ファイル時刻とサイズ - Files are found equal if - file content @@ -669,9 +672,6 @@ is the same で判断する -File content -ファイルの内容 - Symbolic Link handling シンボリック・リンクの取り扱い @@ -687,32 +687,29 @@ is the same Source code written in C++ utilizing: ソースコードは C++ で書かれています -Big thanks for localizing FreeFileSync goes out to: -FreeFileSync のローカライズへの協力に感謝します: +Feedback and suggestions are welcome +フィードバック、提案などはこちらから -Feedback and suggestions are welcome at: -フィードバック、提案など: +Homepage +ホームページ FreeFileSync at Sourceforge FreeFileSync at Sourceforge -Homepage -ホームページ +Email +E-メール -If you like FFS -FFS が気に入った場合 +Big thanks for localizing FreeFileSync goes out to: +FreeFileSync のローカライズへの協力に感謝します: + +If you like FreeFileSync +FreeFileSync が気に入った場合 Donate with PayPal PayPal から寄付する -Email -E-メール - -Report translation error -翻訳エラーの詳細 - -Published under the GNU General Public License: -Published under the GNU General Public Licence: +Published under the GNU General Public License +GNU 一般共有使用許諾に基づき公開されています Ignore subsequent errors 以降のエラーを無視 @@ -861,6 +858,9 @@ Exclude: \stuff\temp\* Folder pairs フォルダ・ペア +Compressed view +簡易表示 + Select view 表示選択 @@ -879,20 +879,14 @@ Exclude: \stuff\temp\* <複数選択> -D-Click -W-クリック - Delete 削除 -Customize... -カスタマイズ... - -Select time span... -タイムスパンを選択... +Include all +すべて含める -Auto-adjust columns -列の自動調整 +Exclude all +すべて除外 Icon size: アイコンサイズ: @@ -906,17 +900,14 @@ Exclude: \stuff\temp\* Large -Include all rows -すべての行を含める - -Exclude all rows -すべての行を除外 +Select time span... +タイムスパンを選択... -Reset view -表示リセット +Default view +デフォルト表示 Show "%x" -"%x" を表示 +"%x" で表示 <最後のセッション> @@ -1188,6 +1179,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory ファイルをタイムスタンプ名のサブフォルダに移動 +Files +ファイル + +Percentage +パーセント + %x TB %x TB @@ -1314,6 +1311,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: ディレクトリが依存関係にあります! 同期規則の設定時には注意してください: +Preparing synchronization... +同期処理の準備中... + Memory allocation failed! メモリ割り当てに失敗! @@ -1431,8 +1431,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! 対象ディレクトリ名が空白です! -User-defined directory for deletion was not specified! -ユーザ定義ディレクトリが指定されていません! +Directory for file versioning was not supplied! +ファイルバージョンが利用できないディレクトリです! Source directory does not exist anymore: ソースディレクトリが存在しません: diff --git a/BUILD/Languages/korean.lng b/BUILD/Languages/korean.lng index 7e2cf645..29aa46e9 100644 --- a/BUILD/Languages/korean.lng +++ b/BUILD/Languages/korean.lng @@ -138,36 +138,6 @@ %x 바이트 - -<심링크> - - -<디렉토리> - -Size -크기 - -Date -날짜 - -Full path -전체 경로 - -Filename -파일 이름 - -Relative path -대상 경로 - -Directory -디렉토리 - -Extension -확장자 - -Comparison Result -비교 결과 - Initial synchronization: 초기 동기화 : @@ -351,6 +321,24 @@ The command line is executed each time: Logging 로그 중 +File time and size +파일 시간 및 크기 + +File content +파일 내용 + + +<자동> + +Mirror ->> +미러 ->> + +Update -> +업데이트 -> + +Custom +개인 설정 + FreeFileSync batch file FreeFileSync 일괄 파일 @@ -408,6 +396,36 @@ The command line is executed each time: (Requires an Internet connection!) (인터넷 연결이 필요합니다!) + +<심링크> + + +<디렉토리> + +Full path +전체 경로 + +Name +이름 + +Relative path +대상 경로 + +Directory +디렉토리 + +Size +크기 + +Date +날짜 + +Extension +확장자 + +Comparison Result +비교 결과 + Drag && drop 드래그 && 드랍 (마우스로 파일 끌어다 놓기) @@ -432,9 +450,6 @@ The command line is executed each time: 2. &Synchronize... 2. 동기화 -S&witch view -보기 전환 - &New 신규 작업 @@ -579,27 +594,15 @@ The command line is executed each time: Select variant: 옵션 선택 : - -<자동> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. 데이터베이스를 활용하여 양측의 변경사항을 확인하고 반영합니다. 파일 삭제/명칭 변경/충돌은 자동으로 감지됩니다. -Mirror ->> -미러 ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. 좌측 폴더 백업 미러. 동기화 이후 우측 폴더는 좌측 폴더와 완전히 똑같이 매치 되도록 변경 됩니다. -Update -> -업데이트 -> - Copy new or updated files to right folder. 신규 또는 업데이트 된 파일을 우측 폴더로 복사 -Custom -개인 설정 - Configure your own synchronization rules. 개인 동기화 규칙 설정 @@ -655,9 +658,6 @@ are the same 동일한 파일로 간주됩니다. -File time and size -파일 시간 및 크기 - Files are found equal if - file content @@ -669,9 +669,6 @@ is the same 동일한 파일로 간주됩니다. -File content -파일 내용 - Symbolic Link handling 심볼릭 링크 처리 @@ -687,32 +684,29 @@ is the same Source code written in C++ utilizing: 소스코드는 C++ 언어로 아래 툴을 사용하여 작성되었습니다 : -Big thanks for localizing FreeFileSync goes out to: -FreeFileSync 현지화에 도움을 주신 분들께 감사 드립니다 : +Feedback and suggestions are welcome +모든 의견 및 건의/제안을 환영합니다 -Feedback and suggestions are welcome at: -피드백 및 제안사항은 아래로 보내 주십시오 : +Homepage +홈페이지 FreeFileSync at Sourceforge FreeFileSync at Sourceforge [오픈소스 보기] -Homepage -홈페이지 +Email +이메일 -If you like FFS -기부하기^^ +Big thanks for localizing FreeFileSync goes out to: +FreeFileSync 현지화에 도움을 주신 분들께 감사 드립니다 : + +If you like FreeFileSync +FreeFileSync를 위한 기부 Donate with PayPal PayPal로 기부하기 -Email -이메일 - -Report translation error -번역 관련 오류 보고 - -Published under the GNU General Public License: -GNU 일반 공용 라이센스에 의한 출시 : +Published under the GNU General Public License +GNU 일반 공용 라이센스에 의한 출시 Ignore subsequent errors 이후 일어나는 오류 무시 @@ -861,6 +855,9 @@ Exclude: \stuff\temp\* Folder pairs 폴더 페어(짝) +Compressed view +압축 보기 + Select view 보기 선택 @@ -879,20 +876,14 @@ Exclude: \stuff\temp\* <복수 선택> -D-Click -D-클릭 - Delete 삭제 -Customize... -개인 설정화... - -Select time span... -시간간격(타임스팬) 선택... +Include all +모두 포함 -Auto-adjust columns -열 자동정렬 +Exclude all +모두 제외 Icon size: 아이콘 크기 @@ -906,14 +897,11 @@ Exclude: \stuff\temp\* Large 크게 -Include all rows -모든 행 포함 - -Exclude all rows -전체 행 제외 +Select time span... +시간간격(타임스팬) 선택... -Reset view -보기 리셋 +Default view +기본 보기 Show "%x" "%x" 표시 @@ -1188,6 +1176,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory 파일을 타임스탬프 된 서브 폴더로 이동 +Files +파일 + +Percentage +퍼센티지(백분율) + %x TB %x TB @@ -1314,6 +1308,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: 디렉토리가 의존 관계에 있습니다. 동기화 규칙 설정시 주의하십시오. +Preparing synchronization... +동기화 준비 중... + Memory allocation failed! 메모리 할당 실패! @@ -1431,8 +1428,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! 대상 디렉토리 이름이 비어서는 안 됩니다! -User-defined directory for deletion was not specified! -삭제하려는 사용자 지정 디렉토리가 정해지지 않았습니다! +Directory for file versioning was not supplied! +파일 버저닝을 위한 디렉토리가 제공되지 않았습니다! Source directory does not exist anymore: 소스 디렉토리가 더 이상 존재하지 않습니다 : diff --git a/BUILD/Languages/polish.lng b/BUILD/Languages/polish.lng index 160573e1..b646108a 100644 --- a/BUILD/Languages/polish.lng +++ b/BUILD/Languages/polish.lng @@ -140,36 +140,6 @@ %x Bajtów - - - - - - -Size -Rozmiar - -Date -Data - -Full path -Pełna scieżka - -Filename -Nazwa pliku - -Relative path -Relatywna ścieżka - -Directory -Katalog - -Extension -Rozszerzenie - -Comparison Result -Rezultat porównywania - Initial synchronization: Wstępna synchronizacja: @@ -357,6 +327,24 @@ Komenda jest wykonwywana za każdym razem gdy: Logging Tworzenie logów +File time and size +Czas modyfikacji i rozmiar + +File content +Zawartość pliku + + + + +Mirror ->> +Lustrzana ->> + +Update -> +Uaktualnij -> + +Custom +Własne + FreeFileSync batch file FreeFileSync plik wsadowy @@ -414,23 +402,53 @@ Komenda jest wykonwywana za każdym razem gdy: (Requires an Internet connection!) (Wymaga połączenia z Internetem!) + + + + + + +Full path +Pełna scieżka + +Name +Nazwa + +Relative path +Relatywna ścieżka + +Directory +Katalog + +Size +Rozmiar + +Date +Data + +Extension +Rozszerzenie + +Comparison Result +Rezultat porównywania + Drag && drop Drag && Drop Close progress dialog - +Zamknij okno postępu Shut down - +Wyłącz komputer Log off - +Wyloguj użytkownika Standby - +Przejdź w stan uśpienia Hibernate - +Przejdź w stan hibernacji 1. &Compare 1. &Porównaj @@ -438,9 +456,6 @@ Komenda jest wykonwywana za każdym razem gdy: 2. &Synchronize... 2. &Synchronizuj... -S&witch view -P&rzełącz widok - &New &Nowy @@ -559,7 +574,7 @@ Komenda jest wykonwywana za każdym razem gdy: Opinia statusu Show progress dialog - +Pokaż okno postępu Error handling Obsługa błędów @@ -585,27 +600,15 @@ Komenda jest wykonwywana za każdym razem gdy: Select variant: Wybierz wariant: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Znajdź i zastosuj zmiany po obu stronach przy pomocy bazy danych. Usunięnia, zmiany nazwy plików oraz konflikty są usuwane automatycznie. -Mirror ->> -Lustrzana ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Lustrzana kopia lewego folderu. Prawy folder po synchronizacji jest lustrzaną kopią lewego folderu. -Update -> -Uaktualnij -> - Copy new or updated files to right folder. Kopiuj nowe lub aktualniejsze pliki na prawą stronę. -Custom -Własne - Configure your own synchronization rules. Skonfiguruj swoje własne zasady synchronizacji. @@ -613,7 +616,7 @@ Komenda jest wykonwywana za każdym razem gdy: Obsługa usuwania On completion: - +Po zakończeniu: Configuration Konfiguracja @@ -661,9 +664,6 @@ Pliki są równe jeżeli są równe -File time and size -Czas modyfikacji i rozmiar - Files are found equal if - file content @@ -675,9 +675,6 @@ Pliki są jednakowe jeżeli jest identyczna -File content -Zawartość pliku - Symbolic Link handling Obsługa dowiązań symbolicznych @@ -693,32 +690,29 @@ jest identyczna Source code written in C++ utilizing: Kod stworzony w C++ z wykorzystaniem: -Big thanks for localizing FreeFileSync goes out to: -Podziękowania za tłumaczenie FreeFileSync: +Feedback and suggestions are welcome +Wszelkie opinie i sugestie mile widziane -Feedback and suggestions are welcome at: -Komentarze i sugestie mile widziane na: +Homepage +Strona domowa FreeFileSync at Sourceforge FreeFileSync na Sourceforge -Homepage -Strona domowa +Email +Poczta -If you like FFS -Jeżeli Ci się podoba +Big thanks for localizing FreeFileSync goes out to: +Podziękowania za tłumaczenie FreeFileSync: + +If you like FreeFileSync +Podoba Ci się FreeFileSync? Donate with PayPal Wesprzyj z PayPal -Email -Poczta - -Report translation error -Zgłoś błąd w tłumaczeniu - -Published under the GNU General Public License: -Udostępnione na zasadach licencji GNU General Public License: +Published under the GNU General Public License +Udostępnione na zasadach licencji GNU General Public License Ignore subsequent errors Ignoruj kolejne błędy @@ -867,6 +861,9 @@ Wyklucz: \moje\temp\* Folder pairs Pary folderów +Compressed view +Widok skompresowany + Select view Określ widok @@ -885,20 +882,14 @@ Wyklucz: \moje\temp\* -D-Click -Podw. kliknięcie - Delete Usuń -Customize... -Dostosuj... - -Select time span... -Określ przedział czasowy... +Include all +Zaznacz wszystko -Auto-adjust columns -Autodopasowanie kolumn +Exclude all +Odznacz wszystko Icon size: Rozmiar ikony: @@ -912,14 +903,11 @@ Wyklucz: \moje\temp\* Large Duży -Include all rows -Dołącz wszystkie rzędy - -Exclude all rows -Wyklucz wszystkie rzędy +Select time span... +Określ przedział czasowy... -Reset view -Resetuj widok +Default view +Widok domyślny Show "%x" Pokaż "%x" @@ -1206,6 +1194,12 @@ Wyklucz: \moje\temp\* Move files into a time-stamped subdirectory Przenieś pliki do oznaczonego podkatalogu +Files +Pliki + +Percentage +Procentowo + %x TB %x TB @@ -1338,6 +1332,9 @@ Wyklucz: \moje\temp\* Directories are dependent! Be careful when setting up synchronization rules: Katalogi są zależne! Pamiętaj o tym podczas ustawiania zasad synchronizacji: +Preparing synchronization... +Przygotowywanie synchronizacji... + Memory allocation failed! Błąd alokacji zasobów! @@ -1455,8 +1452,8 @@ Wyklucz: \moje\temp\* Target directory name must not be empty! Katalog docelowy nie może być pusty! -User-defined directory for deletion was not specified! -Katalog użytkownika dla elementów usuniętych nie został określony! +Directory for file versioning was not supplied! +Nie określono katalogu do wersjonowania plików! Source directory does not exist anymore: Katalog źródłowy nie istnieje: diff --git a/BUILD/Languages/portuguese.lng b/BUILD/Languages/portuguese.lng index 53199fe0..515711d1 100644 --- a/BUILD/Languages/portuguese.lng +++ b/BUILD/Languages/portuguese.lng @@ -139,36 +139,6 @@ %x Bytes - - - - - - -Size -Tamanho - -Date -Data - -Full path -Caminho completo - -Filename -Nome do ficheiro - -Relative path -Caminho - -Directory -Directório - -Extension -Extensão - -Comparison Result -Resultados da comparação - Initial synchronization: Sincronização inicial: @@ -354,6 +324,24 @@ A linha de comandos é executada cada vez que: Logging A escrever em log +File time and size +Data e tamanho do ficheiro + +File content +Conteúdo do ficheiro + + + + +Mirror ->> +Espelhar ->> + +Update -> +Actualizar -> + +Custom +Personalizado + FreeFileSync batch file FreeFileSync ficheiro batch @@ -411,6 +399,36 @@ A linha de comandos é executada cada vez que: (Requires an Internet connection!) (Necessita acesso à Internet!) + + + + + + +Full path +Caminho completo + +Name +Nome + +Relative path +Caminho + +Directory +Directório + +Size +Tamanho + +Date +Data + +Extension +Extensão + +Comparison Result +Resultados da comparação + Drag && drop Arrastar && Largar @@ -435,9 +453,6 @@ A linha de comandos é executada cada vez que: 2. &Synchronize... 2. &Sincronizar... -S&witch view -&Mudar vista - &New &Novo @@ -582,27 +597,15 @@ A linha de comandos é executada cada vez que: Select variant: Selecione uma variante: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identificar e propagar mudanças em ambos os lados utilizando base de dados. Eliminar, renomear e conflitos são detetados automaticamente. -Mirror ->> -Espelhar ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Cópia de segurança do directório à esquerda. O directório da direita é alterado para ficar igual ao da esquerda após sincronização. -Update -> -Actualizar -> - Copy new or updated files to right folder. Copiar ficheiros novos ou actualizados para a direita -Custom -Personalizado - Configure your own synchronization rules. Configure as suas regras de sincronização. @@ -658,9 +661,6 @@ Ficheiros considerados iguais se são iguais -File time and size -Data e tamanho do ficheiro - Files are found equal if - file content @@ -671,9 +671,6 @@ Os ficheiros são considerados iguais se - o conteúdo é o mesmo -File content -Conteúdo do ficheiro - Symbolic Link handling Tratamento de links simbólicos @@ -689,32 +686,29 @@ Os ficheiros são considerados iguais se Source code written in C++ utilizing: Código fonte escrito em C++ usando: -Big thanks for localizing FreeFileSync goes out to: -Pela tradução de FreeFileSync, um agradecimento a: +Feedback and suggestions are welcome +Comentários e sugestões são apreciados -Feedback and suggestions are welcome at: -Comentários e sugestões são benvindos em: +Homepage +Site FreeFileSync at Sourceforge FreeFileSync na Sourceforge -Homepage -Site +Email +Email -If you like FFS +Big thanks for localizing FreeFileSync goes out to: +Pela tradução de FreeFileSync, um agradecimento a: + +If you like FreeFileSync Se gosta do FreeFileSync Donate with PayPal Doar usando PayPal -Email -Email - -Report translation error -Informar um erro de tradução - -Published under the GNU General Public License: -Publicado sobre GNU General Public License: +Published under the GNU General Public License +Publicado sobre GNU General Public License Ignore subsequent errors Ignorar erros subsequentes @@ -863,6 +857,9 @@ Excluir: \stuff\temp\* Folder pairs Par de directório +Compressed view +Vista compacta + Select view Seleccionar vista @@ -881,20 +878,14 @@ Excluir: \stuff\temp\* -D-Click -Duplo Clique - Delete Eliminar -Customize... -Personalizar... - -Select time span... -Selecione intervalo de tempo... +Include all +Incluir tudo -Auto-adjust columns -Auto ajustar colunas +Exclude all +Excluir tudo Icon size: Tamanho ícone: @@ -908,14 +899,11 @@ Excluir: \stuff\temp\* Large Grande -Include all rows -Incluir todas as linhas - -Exclude all rows -Excluir todas linhas +Select time span... +Selecione intervalo de tempo... -Reset view -Restaurar vista +Default view +Vista normal Show "%x" Mostrar "%x" @@ -1196,6 +1184,12 @@ Excluir: \stuff\temp\* Move files into a time-stamped subdirectory Mover ficheiros para uma subpasta datada +Files +Ficheiros + +Percentage +Percentagem + %x TB %x TB @@ -1325,6 +1319,9 @@ Excluir: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Directórios são dependentes! Cuidado ao definir as regras de sincronização: +Preparing synchronization... +A preparar sincronização... + Memory allocation failed! Alocação de memória falhou! @@ -1442,8 +1439,8 @@ Excluir: \stuff\temp\* Target directory name must not be empty! Nome do directório de destino não pode estar vazio! -User-defined directory for deletion was not specified! -Directório para eliminação não foi especificado! +Directory for file versioning was not supplied! +Diretório para armazenar versões não foi definido! Source directory does not exist anymore: A pasta de origem já não existe: diff --git a/BUILD/Languages/portuguese_br.lng b/BUILD/Languages/portuguese_br.lng index 030258d4..ad2c2f2c 100644 --- a/BUILD/Languages/portuguese_br.lng +++ b/BUILD/Languages/portuguese_br.lng @@ -139,36 +139,6 @@ %x Bytes - - - - - - -Size -Tamanho - -Date -Data - -Full path -Caminho completo - -Filename -Nome do arquivo - -Relative path -Caminho relativo - -Directory -Diretório - -Extension -Extensão - -Comparison Result -Resultado da Comparação - Initial synchronization: Sincronização inicial: @@ -354,6 +324,24 @@ A linha de comando é executada cada vez que: Logging Log +File time and size +Data e tamanho do arquivo + +File content +Conteúdo do arquivo + + + + +Mirror ->> +Espelhar ->> + +Update -> +Atualizar -> + +Custom +Personalizado + FreeFileSync batch file FreeFileSync arquivo batch @@ -411,23 +399,53 @@ A linha de comando é executada cada vez que: (Requires an Internet connection!) (Requer conexão com a Internet!) + + + + + + +Full path +Caminho completo + +Name +Nome + +Relative path +Caminho relativo + +Directory +Diretório + +Size +Tamanho + +Date +Data + +Extension +Extensão + +Comparison Result +Resultado da Comparação + Drag && drop Arrastar && Soltar Close progress dialog - +Fechar indicador de progresso Shut down - +Desligar Log off - +Fazer logoff Standby - +Em espera Hibernate - +Hibernar 1. &Compare 1. C&omparar @@ -435,9 +453,6 @@ A linha de comando é executada cada vez que: 2. &Synchronize... 2. S&incronizar... -S&witch view -A<erar visualização - &New &Novo @@ -520,7 +535,7 @@ A linha de comando é executada cada vez que: Elementos encontrados: Items remaining: -Elementos faltantes: +Elementos restantes: Speed: Velocidade: @@ -556,7 +571,7 @@ A linha de comando é executada cada vez que: Informação do Status Show progress dialog - +Mostrar indicador de progresso Error handling Tratamento de erros @@ -582,27 +597,15 @@ A linha de comando é executada cada vez que: Select variant: Selecione um modo: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identifica e propaga as mudanças em ambos os lados usando um banco de dados. Arquivos apagados, renomeados e conflitantes são detectados automaticamente. -Mirror ->> -Espelhar ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Backup espelho da pasta da esquerda. A pasta da direita será modificada para ficar exatamente igual à pasta da esquerda após a sincronização. -Update -> -Atualizar -> - Copy new or updated files to right folder. Copia arquivos novos ou atualizados para a pasta da direita -Custom -Personalizado - Configure your own synchronization rules. Configure as suas próprias regras de sincronização. @@ -610,7 +613,7 @@ A linha de comando é executada cada vez que: Tratamento da exclusão On completion: - +Ao terminar: Configuration Configuração @@ -658,9 +661,6 @@ Os arquivos são considerados iguais se são os mesmos -File time and size -Data e tamanho do arquivo - Files are found equal if - file content @@ -672,9 +672,6 @@ Os arquivos são considerados iguais se é o mesmo -File content -Conteúdo do arquivo - Symbolic Link handling Tratamento de Links Simbólicos @@ -690,32 +687,29 @@ Os arquivos são considerados iguais se Source code written in C++ utilizing: Código-fonte escrito em C++ utilizando: -Big thanks for localizing FreeFileSync goes out to: -Pela tradução do FreeFileSync, um agradecimento a: +Feedback and suggestions are welcome +Críticas e sugestões são bem-vindas -Feedback and suggestions are welcome at: -Comentários e sugestões são bem-vindos: +Homepage +Homepage FreeFileSync at Sourceforge FreeFileSync na Sourceforge -Homepage -Homepage +Email +E-mail -If you like FFS -Se você gosta do FFS +Big thanks for localizing FreeFileSync goes out to: +Pela tradução do FreeFileSync, um agradecimento a: + +If you like FreeFileSync +Se você gosta do FreeFileSync Donate with PayPal Doar usando PayPal -Email -E-mail - -Report translation error -Reportar erro de tradução - -Published under the GNU General Public License: -Publicado sobre a GNU General Public License: +Published under the GNU General Public License +Publicado sobre a GNU General Public License Ignore subsequent errors Ignorar erros subsequentes @@ -864,6 +858,9 @@ Excluir: \stuff\temp\* Folder pairs Pares de pastas +Compressed view +Visualização compacta + Select view Selecionar visualização @@ -882,20 +879,14 @@ Excluir: \stuff\temp\* -D-Click -Duplo Click - Delete Apagar -Customize... -Personalizar... - -Select time span... -Selecionar período de tempo... +Include all +Incluir todos -Auto-adjust columns -Autoajustar colunas +Exclude all +Excluir todos Icon size: Tamanho do ícone: @@ -909,14 +900,11 @@ Excluir: \stuff\temp\* Large Grande -Include all rows -Incluir todas as linhas - -Exclude all rows -Excluir todas as linhas +Select time span... +Selecionar período de tempo... -Reset view -Restaurar visualização +Default view +Visualização padrão Show "%x" Mostrar "%x" @@ -1197,6 +1185,12 @@ Excluir: \stuff\temp\* Move files into a time-stamped subdirectory Mover arquivos para um subdiretório com carimbo de tempo +Files +Arquivos + +Percentage +Percentual + %x TB %x TB @@ -1326,6 +1320,9 @@ Excluir: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Diretórios são dependentes! Cuidado ao definir as regras de sincronização: +Preparing synchronization... +Preparando sincronização... + Memory allocation failed! Alocação de memória falhou! @@ -1443,8 +1440,8 @@ Excluir: \stuff\temp\* Target directory name must not be empty! Nome do diretório de destino não pode estar vazio! -User-defined directory for deletion was not specified! -Diretório especificado para arquivos apagados não foi definido! +Directory for file versioning was not supplied! +Diretório para controle de versões não foi fornecido! Source directory does not exist anymore: Diretório de origem não existe mais: diff --git a/BUILD/Languages/romanian.lng b/BUILD/Languages/romanian.lng index 3cb1f53a..8f2cb480 100644 --- a/BUILD/Languages/romanian.lng +++ b/BUILD/Languages/romanian.lng @@ -140,36 +140,6 @@ %x de Baiți - - - - - - -Size -Mărime - -Date -Dată - -Full path -Calea Completă - -Filename -Numele Elementului - -Relative path -Calea Relativă - -Directory -Dosar - -Extension -Extensie - -Comparison Result -Rezultatul Comparării - Initial synchronization: Sincronizare inițială: @@ -239,7 +209,7 @@ Eroare la mutarea în Reciclator: Could not load a required DLL: -Nu pot încărca o filă DLL necesară: +Nu pot deschide o filă DLL necesară: Error accessing Volume Shadow Copy Service! Eroare la accesarea Serviciului de Conservare a Volumelor [Volume Shadow Copy]! @@ -357,6 +327,24 @@ Linia de comandă este executată de fiecare dată cînd: Logging Jurnal +File time and size +Timpul și Mărimea Filelor + +File content +Conținutul Filelor + + + + +Mirror ->> +Clonare =>> + +Update -> +Actualizare => + +Custom +Sincronizare Personalizată + FreeFileSync batch file Filă cu set de comenzi FreeFileSync @@ -414,8 +402,38 @@ Linia de comandă este executată de fiecare dată cînd: (Requires an Internet connection!) (Necesită o conexiune la internet!) + + + + + + +Full path +Cale Completă + +Name +Nume + +Relative path +Cale Relativă + +Directory +Dosar + +Size +Mărime + +Date +Dată + +Extension +Extensie + +Comparison Result +Rezultatul Comparării + Drag && drop -Trage și pune un dosar peste compartimentul de mai jos sau folosește butonul de explorare +Trage și pune un dosar în cîmpul de mai jos sau folosește butonul de explorare Close progress dialog Închide Fereastra cu Progresul Sincronizării @@ -585,27 +603,15 @@ Linia de comandă este executată de fiecare dată cînd: Select variant: Selectează Varianta de Sincronizare: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identificare și propagare a modificărilor din ambele părți folosind o bază de date. Ștergerile, renumirile și conflictele sînt detectate automat -Mirror ->> -Clonare =>> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Conservare [backup] în oglindă a dosarului stîng. Dosarul drept e modificat pentru a fi identic după sincronizare cu cel stîng. -Update -> -Actualizare => - Copy new or updated files to right folder. Copiere în dosarul din dreapta a filelor actualizate sau noi. -Custom -Sincronizare Personalizată - Configure your own synchronization rules. Reguli de sincronizare definite de utilizator pentru fiecare situație. @@ -661,9 +667,6 @@ Filele sînt considerate identice dacă sînt aceleași -File time and size -Timpul și Mărimea Filelor - Files are found equal if - file content @@ -675,9 +678,6 @@ Filele sînt considerate identice dacă este același -File content -Conținutul Filelor - Symbolic Link handling Prelucrarea Legăturilor Simbolice (Simlegături) @@ -693,32 +693,29 @@ este același Source code written in C++ utilizing: Cod sursă scris în C++ folosind: -Big thanks for localizing FreeFileSync goes out to: -Mulțumiri pentru traducerea FreeFileSync: +Feedback and suggestions are welcome +Opiniile și sugestiile despre program sînt binevenite -Feedback and suggestions are welcome at: -Opiniile și sugestiile sînt binevenite: +Homepage +Situl Softului FreeFileSync at Sourceforge FreeFileSync la Sourceforge -Homepage -Sit +Email +Adresa Autorului -If you like FFS -Donează pentru FFS +Big thanks for localizing FreeFileSync goes out to: +Mulțumiri pentru traducerea FreeFileSync: + +If you like FreeFileSync +Donează pentru FreeFileSync Donate with PayPal Donează prin PayPal -Email -Adresă - -Report translation error -Raportează erori de trad. - -Published under the GNU General Public License: -Publicat sub licența GNU GPL: +Published under the GNU General Public License +Publicat sub licența GNU GPL Ignore subsequent errors Ignoră (nu lua în seamă) erorile ulterioare @@ -802,7 +799,7 @@ Excluse: \stuff\temp\* Mărimea maximă a filei &Default -&Implicite +Coloanele &Implicite Move column up Mută coloana în sus @@ -811,13 +808,13 @@ Excluse: \stuff\temp\* Mută coloana în jos Transactional file copy -Copiere tranzacțională a filelor +Copiază filele în mod tranzacțional Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error. Scrierea se face mai întîi într-o filă temporară (*.ffs_tmp), care e apoi renumită. Se garantează astfel consecvența stării filelor chiar și în cazul apariției de erori fatale. Copy locked files -Copiere a filelor partajate [shared] sau zăvorîte [locked] +Copiază filele partajate [shared] sau zăvorîte [locked] Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights) Filele partajate sau zăvorîte sînt copiate folosind Serviciul de Conservare a Volumelor din Windows [Volume Shadow Copy] (necesită drepturi de Administrator) @@ -826,7 +823,7 @@ Excluse: \stuff\temp\* Copiază permisiunile de acces ale filelor Transfer file and directory permissions (Requires Administrator rights) -Transferă permisiunile filelor și dosarelor (necesită drepturi de Administrator) +Permisiunile filelor și dosarelor sînt și ele transferate (necesită drepturi de Administrator) Hidden dialogs: Casete de dialog ascunse: @@ -867,6 +864,9 @@ Excluse: \stuff\temp\* Folder pairs Perechi de Dosare +Compressed view +Vedere Comprimată + Select view Selectează Vederea @@ -885,20 +885,14 @@ Excluse: \stuff\temp\* -D-Click -Clic-Dreapta - Delete Șterge -Customize... -Personalizează... - -Select time span... -Selectează intervalul de timp... +Include all +Include Tot -Auto-adjust columns -Ajustează Automat Coloanele +Exclude all +Exclude Tot Icon size: Mărimea Icoanelor Elementelor: @@ -912,14 +906,11 @@ Excluse: \stuff\temp\* Large Mare -Include all rows -Include Toate Rîndurile - -Exclude all rows -Exclude Toate Rîndurile +Select time span... +Selectează intervalul de timp... -Reset view -Resetează Vederea +Default view +Vedere Implicită Show "%x" Arată "%x" @@ -934,7 +925,7 @@ Excluse: \stuff\temp\* Vrei să salvezi modificările configurației curente? Configuration loaded! -Configurație încărcată ! +Configurație deschisă ! Folder Comparison and Synchronization Comparare și Sincronizare de Dosare @@ -1148,7 +1139,7 @@ Excluse: \stuff\temp\* Urmărește Copy NTFS permissions -Copiere a permisiunilor NTFS +Copiază permisiunile NTFS Integrate external applications into context menu. The following macros are available: Comenzi pentru aplicații externe incluse în meniul contextual al softului. Sînt disponibile următoarele macrocomenzi: @@ -1206,6 +1197,12 @@ Excluse: \stuff\temp\* Move files into a time-stamped subdirectory Filele sînt mutate într-un subdosar special cu marcaj de timp +Files +File + +Percentage +Procent + %x TB %x TB @@ -1276,7 +1273,7 @@ Excluse: \stuff\temp\* Eroare la schimbarea datei de modificare: Error loading library function: -Eroare la încărcarea bibliotecii de funcții: +Eroare la deschiderea bibliotecii de funcții: Error reading security context: Eroare la citirea contextului de securitate: @@ -1338,6 +1335,9 @@ Excluse: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Dosarele sînt interdependente! Atenție la setarea regulilor de sincronizare: +Preparing synchronization... +Pregătesc sincronizarea... + Memory allocation failed! Alocarea memoriei a eșuat! @@ -1455,8 +1455,8 @@ Excluse: \stuff\temp\* Target directory name must not be empty! Numele dosarului țintă nu poate să lipsească! -User-defined directory for deletion was not specified! -Dosarul ales de utilizator pentru ștergere nu a fost specificat ! +Directory for file versioning was not supplied! +Dosarul pentru versionarea filelor n-a fost specificat! Source directory does not exist anymore: Dosarul sursă nu mai există: diff --git a/BUILD/Languages/russian.lng b/BUILD/Languages/russian.lng index 6ea76175..1440942c 100644 --- a/BUILD/Languages/russian.lng +++ b/BUILD/Languages/russian.lng @@ -140,36 +140,6 @@ %x Байт - -<Символьная ссылка> - - -<Папка> - -Size -Размер - -Date -Дата - -Full path -Полный путь - -Filename -Имя файла - -Relative path -Относительный путь - -Directory -Папка - -Extension -Расширение - -Comparison Result -Результаты сравнения - Initial synchronization: Первоначальная синхронизация: @@ -357,6 +327,24 @@ The command line is executed each time: Logging Лог-файлы +File time and size +Дата и размер файла + +File content +Содержимое файла + + +<Автоматический> + +Mirror ->> +Зеркало ->> + +Update -> +Обновить -> + +Custom +Выборочно + FreeFileSync batch file Файл пакетного задания FreeFileSync @@ -414,6 +402,36 @@ The command line is executed each time: (Requires an Internet connection!) (требуется подключение к Интернету!) + +<Символьная ссылка> + + +<Папка> + +Full path +Полный путь + +Name +Имя + +Relative path +Относительный путь + +Directory +Папка + +Size +Размер + +Date +Дата + +Extension +Расширение + +Comparison Result +Результаты сравнения + Drag && drop Drag && drop @@ -438,9 +456,6 @@ The command line is executed each time: 2. &Synchronize... 2. &Синхронизировать -S&witch view -Переключить вид - &New &Новая @@ -588,27 +603,15 @@ The command line is executed each time: Select variant: Варианты синхронизации - -<Автоматический> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Выявление и распространение изменений на обе стороны, используя базу данных. Удаленные, переименованные и конфликтные файлы определяются автоматически. -Mirror ->> -Зеркало ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Зеркальная (резервная) копия левой части. В результате синхронизации правая папка будет изменена до полного соответствия левой. -Update -> -Обновить -> - Copy new or updated files to right folder. Копировать новые или обновлять файлы на правой стороне. -Custom -Выборочно - Configure your own synchronization rules. Настроить свои собственные правила синхронизации. @@ -663,9 +666,6 @@ are the same - размер файла -File time and size -Дата и размер файла - Files are found equal if - file content @@ -673,9 +673,6 @@ is the same Файлы считаются равными, если содержание файлов одинаковое -File content -Содержимое файла - Symbolic Link handling Обращение к символьной ссылке @@ -691,32 +688,29 @@ is the same Source code written in C++ utilizing: Исходный код написан на C++ с использованием: -Big thanks for localizing FreeFileSync goes out to: -Большое спасибо за перевод FreeFileSync: +Feedback and suggestions are welcome +Замечания и предложения приветствуются -Feedback and suggestions are welcome at: -Отзывы и предложения присылайте по адресу: +Homepage +Оф.сайт FreeFileSync at Sourceforge FreeFileSync на Sourceforge -Homepage -Оф.сайт +Email +Почта -If you like FFS -Если Вам понравился FFS +Big thanks for localizing FreeFileSync goes out to: +Большое спасибо за перевод FreeFileSync: + +If you like FreeFileSync +Если Вам понравился FreeFileSync Donate with PayPal Отправить деньги через PayPal -Email -Почта - -Report translation error -Сообщить об ошибке перевода - -Published under the GNU General Public License: -Издается под лицензией GNU General Public License: +Published under the GNU General Public License +Издается под лицензией GNU General Public License Ignore subsequent errors Игнорировать последующие ошибки @@ -865,6 +859,9 @@ Exclude: \stuff\temp\* Folder pairs Пары папок для синхронизации +Compressed view +Компактный вид + Select view Вид списка файлов @@ -883,20 +880,14 @@ Exclude: \stuff\temp\* <групповое выделение> -D-Click -Двойной клик - Delete Удалить -Customize... -Выбрать колонки... - -Select time span... -Выберите промежуток времени... +Include all +Включить все -Auto-adjust columns -Автовыравнивание ширины колонок +Exclude all +Исключить все Icon size: Размер иконок: @@ -910,14 +901,11 @@ Exclude: \stuff\temp\* Large - большой -Include all rows -Отметить все - -Exclude all rows -Не отмечать ничего +Select time span... +Выберите промежуток времени... -Reset view -Сброс настроек вида +Default view +Стандартный вид Show "%x" Показать "%x" @@ -1202,11 +1190,17 @@ Exclude: \stuff\temp\* Использовать "Корзину" при удалении или перезаписи файлов Versioning -Перемещать удаляемые файлы в заданную папку +Перемещать старые версии файлов в заданную папку Move files into a time-stamped subdirectory Перемещать файлы в заданную папку (можно создавать архивные версии удаленных файлов) +Files +Файлы + +Percentage +Проценты + %x TB %x ТБ @@ -1342,6 +1336,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Зависимые папки! Будьте внимательны при настройке правил синхронизации: +Preparing synchronization... +Подготовка к синхронизации... + Memory allocation failed! Ошибка выделения памяти! (Не хватает памяти) @@ -1459,8 +1456,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! Путь целевой папки не должен быть пустым! -User-defined directory for deletion was not specified! -Пользовательская папка для удаления не была указана! +Directory for file versioning was not supplied! +Папка для старых версий файлов не была указана! Source directory does not exist anymore: Исходная папка больше не существует: diff --git a/BUILD/Languages/slovenian.lng b/BUILD/Languages/slovenian.lng index ca75f4a4..567a5ed2 100644 --- a/BUILD/Languages/slovenian.lng +++ b/BUILD/Languages/slovenian.lng @@ -141,36 +141,6 @@ %x Bajtov - - - - - - -Size -Velikost - -Date -Datum - -Full path -Polna pot - -Filename -Ime datoteke - -Relative path -Relativna pot - -Directory -Imenik - -Extension -Razširitev - -Comparison Result -Rezultati primerjave - Initial synchronization: Začetna sinhronizacija: @@ -360,6 +330,24 @@ Ukazna vrstica se izvrši vsakič ko: Logging Beleženje +File time and size +Čas in velikost datoteke + +File content +Vsebini datoteke + + + + +Mirror ->> +Zrcalno ->> + +Update -> +Posodobi -> + +Custom +Po meri + FreeFileSync batch file FreeFileSync paketna datoteka @@ -417,6 +405,36 @@ Ukazna vrstica se izvrši vsakič ko: (Requires an Internet connection!) (Zahteva povezavo z Internetom!) + + + + + + +Full path +Polna pot + +Name +Ime + +Relative path +Relativna pot + +Directory +Imenik + +Size +Velikost + +Date +Datum + +Extension +Razširitev + +Comparison Result +Rezultati primerjave + Drag && drop Povleci && spusti @@ -441,9 +459,6 @@ Ukazna vrstica se izvrši vsakič ko: 2. &Synchronize... 2. &Sinhroniziraj... -S&witch view -Sp&remeni pogled - &New &Novo @@ -588,27 +603,15 @@ Ukazna vrstica se izvrši vsakič ko: Select variant: Izberite varianto: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identificiraj in promoviraj spremembe na obeh straneh z uporabo podatkovne baze. Izbrisi, preimenovanja in spori so samodejno zaznani. -Mirror ->> -Zrcalno ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Zrcalna varnostna kopija leve mape. Desna mapa bo spremenjena, da se bo natančno ujemala z levo mapo po sinhronizaciji. -Update -> -Posodobi -> - Copy new or updated files to right folder. Kopiraj nove ali posodobljene datoteke v desno mapo. -Custom -Po meri - Configure your own synchronization rules. Konfigurirajte vaša lastna sinhronizacijska pravila. @@ -664,9 +667,6 @@ Datoteki sta enaki, če sta enaka -File time and size -Čas in velikost datoteke - Files are found equal if - file content @@ -678,9 +678,6 @@ Datoteki sta enaki, če enaka -File content -Vsebini datoteke - Symbolic Link handling Rokovanje s simboličnimi povezavami @@ -696,32 +693,29 @@ enaka Source code written in C++ utilizing: Izvorna koda napisana v C++ z uporabo: -Big thanks for localizing FreeFileSync goes out to: -Zahvale za prevod FreeFileSync gredo: +Feedback and suggestions are welcome +Povratne informacije in predlogi so dobrodošli -Feedback and suggestions are welcome at: -Povratne informacije in predlogi so dobrodošli na: +Homepage +Domača stran FreeFileSync at Sourceforge FreeFileSync na Sourceforge -Homepage -Domača stran +Email +Email -If you like FFS -Če vam je FFS všeč +Big thanks for localizing FreeFileSync goes out to: +Zahvale za prevod FreeFileSync gredo: + +If you like FreeFileSync +Če vam je FreeFileSync všeč Donate with PayPal Doniraj s PayPal -Email -Email - -Report translation error -Poročaj o napaki prevoda - -Published under the GNU General Public License: -Objavljeno pod licenco GNU General Public: +Published under the GNU General Public License +Objavljeno pod licenco GNU General Public Ignore subsequent errors Ignoriraj vse nadaljnje napake @@ -870,6 +864,9 @@ Izključi: \stuff\temp\* Folder pairs Pari map +Compressed view +Stisnjeni pogled + Select view Izberite pogled @@ -888,20 +885,14 @@ Izključi: \stuff\temp\* -D-Click -D-Klik - Delete Izbriši -Customize... -Prilagodi... - -Select time span... -Izberite časovni okvir... +Include all +Vključi vse -Auto-adjust columns -Samo-prilagodi stolpce +Exclude all +Izključi vse Icon size: Velikost ikone: @@ -915,14 +906,11 @@ Izključi: \stuff\temp\* Large Velika -Include all rows -Vključi se vrstice - -Exclude all rows -Izključi vse vrstice +Select time span... +Izberite časovni okvir... -Reset view -Ponastavi pogled +Default view +Privzeti pogled Show "%x" Prikaži "%x" @@ -1215,6 +1203,12 @@ Izključi: \stuff\temp\* Move files into a time-stamped subdirectory Premakni datoteke v časovno-označen podimenik +Files +Datoteke + +Percentage +Odstotek + %x TB %x TB @@ -1350,6 +1344,9 @@ Izključi: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Imeniki so v odvisnosti! Bodite pozorni, ko nastavljate sinhronizacijska pravila: +Preparing synchronization... +Pripravljam sinhronizacijo... + Memory allocation failed! Neuspešno dodeljevanje pomnilnika! @@ -1467,8 +1464,8 @@ Izključi: \stuff\temp\* Target directory name must not be empty! Ime ciljnega imenika ne sme biti prazno! -User-defined directory for deletion was not specified! -Uporabniško-določen imenik za brisanje ni bil naveden! +Directory for file versioning was not supplied! +Imenik za upravljanje z datotečnimi raličicami ni bil podan! Source directory does not exist anymore: Izvorni imenik ne obstaja več: diff --git a/BUILD/Languages/spanish.lng b/BUILD/Languages/spanish.lng index cd91438f..84d5434e 100644 --- a/BUILD/Languages/spanish.lng +++ b/BUILD/Languages/spanish.lng @@ -139,36 +139,6 @@ %x Bytes - - - - - - -Size -Tamaño - -Date -Fecha - -Full path -Ruta completa - -Filename -Nombre del archivo - -Relative path -Ruta relativa - -Directory -Directorio - -Extension -Extensión - -Comparison Result -Resultado de la comparación - Initial synchronization: Sincronización inicial: @@ -354,6 +324,24 @@ La línea de comandos se ejecuta cada vez: Logging Iniciando sesión +File time and size +Fecha y tamaño del archivo + +File content +Contenido del archivo + + + + +Mirror ->> +Espejo ->> + +Update -> +Actualizar -> + +Custom +Personalizado + FreeFileSync batch file Archivo batch de FreeFileSync @@ -411,6 +399,36 @@ La línea de comandos se ejecuta cada vez: (Requires an Internet connection!) (¡Conexión a Internet necesaria!) + + + + + + +Full path +Ruta completa + +Name +Nombre + +Relative path +Ruta relativa + +Directory +Directorio + +Size +Tamaño + +Date +Fecha + +Extension +Extensión + +Comparison Result +Resultado de la comparación + Drag && drop Arrastrar y soltar @@ -435,9 +453,6 @@ La línea de comandos se ejecuta cada vez: 2. &Synchronize... 2. &Sincronizar... -S&witch view -C&ambiar vista - &New &Nuevo @@ -582,27 +597,15 @@ La línea de comandos se ejecuta cada vez: Select variant: Seleccione un tipo: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Identificar y propagar cambios en ambos lados usando una base de datos. Borrados, renombraciones y conflictos son detectados automáticamente. -Mirror ->> -Espejo ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Copia de seguridad en espejo de la carpeta izquierda. La carpeta derecha es modificada exactamente como la carpeta izquierda después de la sincronización. -Update -> -Actualizar -> - Copy new or updated files to right folder. Copiar archivos nuevos o actualizados a la carpeta de la derecha. -Custom -Personalizado - Configure your own synchronization rules. Configuración de sus propias reglas de sincronización. @@ -658,9 +661,6 @@ Los archivos serán considerados iguales si son iguales -File time and size -Fecha y tamaño del archivo - Files are found equal if - file content @@ -672,9 +672,6 @@ Los archivos serán considerados iguales si es el mismo -File content -Contenido del archivo - Symbolic Link handling Gestión de enlaces simbólicos @@ -690,32 +687,29 @@ es el mismo Source code written in C++ utilizing: Código fuente escrito en C++ utilizando: -Big thanks for localizing FreeFileSync goes out to: -Agradecimientos por la traducción de FreeFileSync a: +Feedback and suggestions are welcome +Feedback y sugerencias son bienvenidas -Feedback and suggestions are welcome at: -Comentarios y sugerencias son bienvenidos en: +Homepage +Página de inicio FreeFileSync at Sourceforge FreeFileSync en Sourceforge -Homepage -Página de inicio +Email +Correo electrónico -If you like FFS -Si te gusta FFS +Big thanks for localizing FreeFileSync goes out to: +Agradecimientos por la traducción de FreeFileSync a: + +If you like FreeFileSync +Si te gusta FreeFileSync Donate with PayPal Donar a través de PayPal -Email -Correo electrónico - -Report translation error -Informar de errores de traducción - -Published under the GNU General Public License: -Publicado bajo "GNU General Public License": +Published under the GNU General Public License +Publicado bajo "GNU General Public License" Ignore subsequent errors Ignorar errores posteriores @@ -864,6 +858,9 @@ Excluir: \stuff\temp\* Folder pairs Pares de carpetas +Compressed view +Vista comprimida + Select view Seleccione vista @@ -882,20 +879,14 @@ Excluir: \stuff\temp\* -D-Click -Doble click - Delete Eliminar -Customize... -Personalizar... - -Select time span... -Seleccionar duración +Include all +Incluir todo -Auto-adjust columns -Ajustar automáticamente las columnas +Exclude all +Excluir todo Icon size: Tamaño del icono: @@ -909,14 +900,11 @@ Excluir: \stuff\temp\* Large Grande -Include all rows -Incluir todas las filas - -Exclude all rows -Excluir todas las columnas +Select time span... +Seleccionar duración -Reset view -Reiniciar vista +Default view +Vista por defecto Show "%x" Mostrar "%x" @@ -1197,6 +1185,12 @@ Excluir: \stuff\temp\* Move files into a time-stamped subdirectory Mover archivos a un subdirectorio con marca de tiempo +Files +Archivos + +Percentage +Porcentaje + %x TB %x TB @@ -1326,6 +1320,9 @@ Excluir: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: ¡Los directorios son dependientes! Tenga cuidado al establecer las reglas de sincronización: +Preparing synchronization... +Preparando sincronización... + Memory allocation failed! ¡La asignación de memoria ha fallado! @@ -1443,8 +1440,8 @@ Excluir: \stuff\temp\* Target directory name must not be empty! ¡El nombre del directorio de destino no debe estar vacío! -User-defined directory for deletion was not specified! -¡No se ha indicado el directorio definido por el usuario para el borrado! +Directory for file versioning was not supplied! +¡El directorio para el versionamiento de archivo no ha sido especificado! Source directory does not exist anymore: El directorio origen ya no existe: diff --git a/BUILD/Languages/swedish.lng b/BUILD/Languages/swedish.lng index aad97208..b6b133f4 100644 --- a/BUILD/Languages/swedish.lng +++ b/BUILD/Languages/swedish.lng @@ -139,36 +139,6 @@ %x Byte - - - - - - -Size -Storlek - -Date -Datum - -Full path -Fullständig sökväg - -Filename -Filnamn - -Relative path -Sökväg - -Directory -Katalog - -Extension -Filformat - -Comparison Result -Jämförelseresultat - Initial synchronization: Initial synkronisering: @@ -354,6 +324,24 @@ Kommandot verkställes när: Logging Loggar +File time and size +Tidsstämpling och storlek + +File content +Filinnehåll + + + + +Mirror ->> +Spegla ->> + +Update -> +Uppdatera -> + +Custom +Anpassat + FreeFileSync batch file FreeFileSync batch-fil @@ -411,6 +399,36 @@ Kommandot verkställes när: (Requires an Internet connection!) (Kräver Internetuppkoppling!) + + + + + + +Full path +Fullständig sökväg + +Name +Namn + +Relative path +Sökväg + +Directory +Katalog + +Size +Storlek + +Date +Datum + +Extension +Filformat + +Comparison Result +Jämförelseresultat + Drag && drop Dra && släpp @@ -582,27 +600,15 @@ Kommandot verkställes när: Select variant: Välj variant: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Använd en databas för att identifiera och sprida ändringar på båda sidor. Borttagning, namnbyte och konflikter upptäcks automatiskt -Mirror ->> -Spegla ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Speglar säkerhetskopia av vänster katalog. Höger katalog ändras för att exakt matcha vänster efter synkroniseringen. -Update -> -Uppdatera -> - Copy new or updated files to right folder. Kopiera nya och uppdaterade filer till höger katalog. -Custom -Anpassat - Configure your own synchronization rules. Konfigurera dina egna synkroniseringsregler. @@ -658,9 +664,6 @@ Filer betraktas som likvärdiga om är samma. -File time and size -Tidsstämpling och storlek - Files are found equal if - file content @@ -672,9 +675,6 @@ Filerna betecknas som lika om, är lika -File content -Filinnehåll - Symbolic Link handling Hantering av Symboliska länkar @@ -690,32 +690,29 @@ Filerna betecknas som lika om, Source code written in C++ utilizing: Källkod skriven i C++ med hjälp av: -Big thanks for localizing FreeFileSync goes out to: -Stort tack för översättningen av FreeFileSync går till: +Feedback and suggestions are welcome +Återkoppling och förslag är välkommna -Feedback and suggestions are welcome at: -Feedback och förslag är välkommna här: +Homepage +Hemsida FreeFileSync at Sourceforge FreeFileSync på Sourceforge -Homepage -Hemsida +Email +E-post -If you like FFS -Om du gillar FFS +Big thanks for localizing FreeFileSync goes out to: +Stort tack för översättningen av FreeFileSync går till: + +If you like FreeFileSync +Om du gillar FreeFileSync Donate with PayPal Donera via PayPal -Email -E-post - -Report translation error -Rapportera översättningsfel - -Published under the GNU General Public License: -Publiserad under GNU General Public License: +Published under the GNU General Public License +Publiserad under GNU General Public License Ignore subsequent errors Ignorera följdfel @@ -864,6 +861,9 @@ Undanta: \stuff\temp\* Folder pairs Katalogpar +Compressed view +Komprimerad vy + Select view Välj vy @@ -882,20 +882,14 @@ Undanta: \stuff\temp\* -D-Click -Håll ner D - Delete Ta bort -Customize... -Anpassar... - -Select time span... -Välj tidsintervall... +Include all +Inkludera alla -Auto-adjust columns -Autojustera kollumner +Exclude all +Exkludera alla Icon size: Ikonstorlek: @@ -909,14 +903,11 @@ Undanta: \stuff\temp\* Large Stor -Include all rows -Inkludera alla rader - -Exclude all rows -Undanta alla rader +Select time span... +Välj tidsintervall... -Reset view -Återställ vy +Default view +Standardvy Show "%x" Visa "%x" @@ -1197,6 +1188,12 @@ Undanta: \stuff\temp\* Move files into a time-stamped subdirectory Flytta filer till en tidsstämplad underkatalog +Files +Filer + +Percentage +Procent + %x TB %x TB @@ -1326,6 +1323,9 @@ Undanta: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Kataloger är beroende! Var försiktig när du sätter upp synkroniseringsregler: +Preparing synchronization... +Förbereder synkronisering... + Memory allocation failed! Minnesallokering misslyckades! @@ -1443,8 +1443,8 @@ Undanta: \stuff\temp\* Target directory name must not be empty! Målkatalogens namn måste anges -User-defined directory for deletion was not specified! -Katalog för borttagning ej specifiserad! +Directory for file versioning was not supplied! +Katalog för versionshantering har inte specificerats Source directory does not exist anymore: Källkatalogen finns inte längre: diff --git a/BUILD/Languages/turkish.lng b/BUILD/Languages/turkish.lng index 928ccde4..d326b6c7 100644 --- a/BUILD/Languages/turkish.lng +++ b/BUILD/Languages/turkish.lng @@ -139,36 +139,6 @@ %x Bayt - - - - - - -Size -Boyut - -Date -Tarih - -Full path -Tam yol - -Filename -Dosya adı - -Relative path -Bağıl klasör yolu - -Directory -Klasör - -Extension -Uzantı - -Comparison Result -Karşılaştırma sonucu - Initial synchronization: Başlangıç eşleştirmesi: @@ -354,6 +324,24 @@ Her seferinde çalıştırılacak komut satırı: Logging Günlükleme +File time and size +Dosya tarih ve saati + +File content +Dosya içeriği + + + + +Mirror ->> +Yansı ->> + +Update -> +Güncelle -> + +Custom +Özel + FreeFileSync batch file FreeFileSync toplu iş dosyası @@ -411,6 +399,36 @@ Her seferinde çalıştırılacak komut satırı: (Requires an Internet connection!) (İnternet bağlantısı gereklidir!) + + + + + + +Full path +Tam yol + +Name +Ad + +Relative path +Bağıl klasör yolu + +Directory +Klasör + +Size +Boyut + +Date +Tarih + +Extension +Uzantı + +Comparison Result +Karşılaştırma sonucu + Drag && drop Klasör ya da dosyaları buraya sürükleyip bırakabilirsiniz @@ -582,27 +600,15 @@ Her seferinde çalıştırılacak komut satırı: Select variant: Davranışı seçin: - - - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. İki yandaki değişiklikleri bir veritabanı kullanarak belirler ve sakla. Silme, yeniden adlandırma ve çakışma işlemleri kendiliğinden algılanır. -Mirror ->> -Yansı ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Sol klasörün yansı yedeği. Eşleştirmeden sonra sağ klasör, sol klasörün tamamen aynısı olur. -Update -> -Güncelle -> - Copy new or updated files to right folder. Yalnız yeni ya da güncellenmiş dosyalar soldan sağa kopyalanır. -Custom -Özel - Configure your own synchronization rules. Buradan kendi eşleştirme kurallarınızı yapılandırabilirsiniz. @@ -658,9 +664,6 @@ Dosyaların eşit sayılması için aynı olmalıdır -File time and size -Dosya tarih ve saati - Files are found equal if - file content @@ -672,9 +675,6 @@ Dosyaların eşit sayılması için aynı olmalıdır -File content -Dosya içeriği - Symbolic Link handling Sembolik bağlantı işleme @@ -690,32 +690,29 @@ aynı olmalıdır Source code written in C++ utilizing: Kaynak kodu C++ kullanılarak yazılmıştır: -Big thanks for localizing FreeFileSync goes out to: -FreeFileSync çevirmenlerine çok teşekkürler: +Feedback and suggestions are welcome +Öneri ve geri bildirimlerinizi bekleriz -Feedback and suggestions are welcome at: -Geri bildirim ve önerileriniz için: +Homepage +Ana sayfa FreeFileSync at Sourceforge Sourceforge sitesinde FreeFileSync -Homepage -Ana sayfa +Email +E-posta -If you like FFS -FFS’i beğendiyseniz +Big thanks for localizing FreeFileSync goes out to: +FreeFileSync çevirmenlerine çok teşekkürler: + +If you like FreeFileSync +FreeFileSync’i beğendiyseniz Donate with PayPal PayPal ile bağış yapın -Email -E-posta - -Report translation error -Çeviri hatası bildirin - -Published under the GNU General Public License: -GNU Genel Kamu Lisansı şartları altında yayınlanmıştır: +Published under the GNU General Public License +GNU Genel Kamu Lisansı şartları altında yayınlanmıştır Ignore subsequent errors Sonraki hataları yoksay @@ -864,6 +861,9 @@ Katma: \stuff\temp\* Folder pairs Klasör çiftleri +Compressed view +Sıkıştırılmış görünüm + Select view Görünümü seçin @@ -882,20 +882,14 @@ Katma: \stuff\temp\* <çoklu seçim> -D-Click -D-Tuşu - Delete Sil -Customize... -Özelleştir... - -Select time span... -Zaman aralığını seçin... +Include all +Tümünü kat -Auto-adjust columns -Sütunları kendiliğinden hizala +Exclude all +Tümünü dışla Icon size: Simge boyutu: @@ -909,14 +903,11 @@ Katma: \stuff\temp\* Large Büyük -Include all rows -Tüm satırları kat - -Exclude all rows -Tüm satırları dışla +Select time span... +Zaman aralığını seçin... -Reset view -Görünümü sıfırla +Default view +Varsayılan görünüm Show "%x" "%x" panelini göster @@ -1197,6 +1188,12 @@ Katma: \stuff\temp\* Move files into a time-stamped subdirectory Dosyaları zaman damgasıyla bir alt klasöre taşır +Files +Dosyalar + +Percentage +Yüzde + %x TB %x TB @@ -1326,6 +1323,9 @@ Katma: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Klasörler bağımlı! Eşleştirme kurallarını koyarken dikkatli olun: +Preparing synchronization... +Eşleştirmeye hazırlanıyor... + Memory allocation failed! Bellek ayrılamadı! @@ -1443,8 +1443,8 @@ Katma: \stuff\temp\* Target directory name must not be empty! Hedef klasör adı boş olamaz! -User-defined directory for deletion was not specified! -Silme için kullanıcının belirttiği dizin belirtilmemiş! +Directory for file versioning was not supplied! +Dosya sürümlemesi için klasör desteklenmiyor! Source directory does not exist anymore: Kaynak klasör artık yok: @@ -1474,7 +1474,7 @@ Katma: \stuff\temp\* Şu yollar için geri dönüşüm kutusu kullanılamaz! Dosyalar anında ve tamamen silinir: A directory will be modified which is part of multiple folder pairs! Please review synchronization settings! -Çoklu klasör çiftlerinin bir parçası olduğan bir klasör düzenlenecek! Lütfen eşleştirme ayarlarınızı gözden geçirin! +Bir klasör, çoklu klasör çiftlerinin bir parçası olduğundan değiştirilecek! Lütfen eşleştirme ayarlarınızı gözden geçirin! Processing folder pair: İşlenen klasör çifti: diff --git a/BUILD/Languages/ukrainian.lng b/BUILD/Languages/ukrainian.lng index ec580568..704c6784 100644 --- a/BUILD/Languages/ukrainian.lng +++ b/BUILD/Languages/ukrainian.lng @@ -140,36 +140,6 @@ %x байтів - -<Символьне посилання> - - -<Каталог> - -Size -Розмір - -Date -Дата - -Full path -Повний шлях - -Filename -Ім’я файлу - -Relative path -Відносний шлях - -Directory -Каталог - -Extension -Розширення - -Comparison Result -Результати порівнювання - Initial synchronization: Вступна синхронізація: @@ -357,6 +327,24 @@ The command line is executed each time: Logging Лог-файли +File time and size +Дата та розмір файлу + +File content +Вміст файлу + + +<Автоматичний> + +Mirror ->> +Дзеркало ->> + +Update -> +Оновити -> + +Custom +Вибірково + FreeFileSync batch file Файл завдання FreeFileSync @@ -414,6 +402,36 @@ The command line is executed each time: (Requires an Internet connection!) (Необхідне підключення до Інтернету!) + +<Символьне посилання> + + +<Каталог> + +Full path +Повний шлях + +Name + + +Relative path +Відносний шлях + +Directory +Каталог + +Size +Розмір + +Date +Дата + +Extension +Розширення + +Comparison Result +Результати порівнювання + Drag && drop Drag && drop @@ -588,27 +606,15 @@ The command line is executed each time: Select variant: Виберіть варіант: - -<Автоматичний> - Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically. Виявити та поширити зміни на обидві сторони використовуючи базу даних. Видалення, перейменування та конфлікти визначаються автоматично. -Mirror ->> -Дзеркало ->> - Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization. Дзеркальна (резервна) копія лівої частини. В результаті синхронізації права папка змінюється до полної відповідності лівій. -Update -> -Оновити -> - Copy new or updated files to right folder. Копіювати нові чи оновлювати файли з правої сторони. -Custom -Вибірково - Configure your own synchronization rules. Налаштувати власні правила синхронізації. @@ -664,9 +670,6 @@ are the same співпадають -File time and size -Дата та розмір файлу - Files are found equal if - file content @@ -674,9 +677,6 @@ is the same Файли вважаються рівними, якщо вміст файлів однаковий -File content -Вміст файлу - Symbolic Link handling Обробка символьного посилання @@ -692,32 +692,29 @@ is the same Source code written in C++ utilizing: Код програми написаний на C++ з використанням: -Big thanks for localizing FreeFileSync goes out to: -Щира подяка за переклад FreeFileSync: +Feedback and suggestions are welcome + -Feedback and suggestions are welcome at: -Відгуки та пропозиції висилайте на адресу: +Homepage +Оф.сайт FreeFileSync at Sourceforge FreeFileSync на Sourceforge -Homepage -Оф.сайт +Email +Почта -If you like FFS -Якщо Вам сподобався FFS +Big thanks for localizing FreeFileSync goes out to: +Щира подяка за переклад FreeFileSync: + +If you like FreeFileSync +Якщо Вам сподобався FreeFileSync Donate with PayPal Пожертвувати через PayPal -Email -Почта - -Report translation error -Повідомити: помилка перекладу - -Published under the GNU General Public License: -Видано за ліцензією GNU General Public License: +Published under the GNU General Public License +Видано за ліцензією GNU General Public License Ignore subsequent errors Ігнорувати наступні помилки @@ -866,6 +863,9 @@ Exclude: \stuff\temp\* Folder pairs Пари папок +Compressed view + + Select view Список файлів @@ -884,20 +884,14 @@ Exclude: \stuff\temp\* <груповий вибір> -D-Click -Клацніть двічі - Delete Видалити -Customize... -Вибрати колонки... - -Select time span... -Виберіть інтервал часу... +Include all + -Auto-adjust columns -Автовирівнювання ширини колонок +Exclude all + Icon size: Розмір іконки: @@ -911,14 +905,11 @@ Exclude: \stuff\temp\* Large великий -Include all rows -Відмінити всі - -Exclude all rows -Виключити всі рядки +Select time span... +Виберіть інтервал часу... -Reset view -Скидання налаштувань відображення +Default view + Show "%x" Показати "%x" @@ -1205,6 +1196,12 @@ Exclude: \stuff\temp\* Move files into a time-stamped subdirectory Переміщати файли в підкатлог з часовою міткою +Files + + +Percentage + + %x TB %x ТБ @@ -1340,6 +1337,9 @@ Exclude: \stuff\temp\* Directories are dependent! Be careful when setting up synchronization rules: Залежні каталоги! Будьте уважні при налаштуванні правил синхронізації: +Preparing synchronization... + + Memory allocation failed! Помилка виділення пам’яті! (Не хватает памяти) @@ -1457,8 +1457,8 @@ Exclude: \stuff\temp\* Target directory name must not be empty! Кінцевий каталог не повинен бути порожнім -User-defined directory for deletion was not specified! -Каталог для вилучення користувачем не був вказаний! +Directory for file versioning was not supplied! + Source directory does not exist anymore: Каталог-джерело вже не існує: diff --git a/BUILD/Resources.zip b/BUILD/Resources.zip index 1b37e7b1..905fa797 100644 Binary files a/BUILD/Resources.zip and b/BUILD/Resources.zip differ diff --git a/Cleanup.cmd b/Cleanup.cmd deleted file mode 100644 index 40b62e27..00000000 --- a/Cleanup.cmd +++ /dev/null @@ -1,70 +0,0 @@ -@if NOT [%1]==[] echo Don't pass a parameter! && pause && exit - -@echo off - -::clean codeblocks garbage -del FreeFileSync.layout -del FreeFileSync.depend -del FreeFileSync-Linux.layout -del FreeFileSync-Linux.depend -del RealtimeSync\RealtimeSync.layout -del RealtimeSync\RealtimeSync.depend -del RealtimeSync\Realt-Linux.layout -del RealtimeSync\Realt-Linux.depend - -::clean Visual C++ garbage -del FreeFileSync.vcxproj.user -del FreeFileSync.ncb -del RealtimeSync\RealtimeSync.ncb -del "FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj.user" -attrib FreeFileSync.suo -h -del FreeFileSync.suo -attrib RealtimeSync\RealtimeSync.suo -h -del RealtimeSync\RealtimeSync.suo -del FreeFileSync.sdf -del RealtimeSync\RealtimeSync.sdf -del RealtimeSync\RealtimeSync.vcxproj.user - -del BUILD\FreeFileSync*.pdb -del BUILD\FreeFileSync*.ilk -del BUILD\FreeFileSync*.lib -del BUILD\FreeFileSync*.exp - -del BUILD\RealtimeSync*.pdb -del BUILD\RealtimeSync*.ilk -del BUILD\RealtimeSync*.lib -del BUILD\RealtimeSync*.exp - -del BUILD\FreeFileSync.exe -del BUILD\FreeFileSync_Debug.exe -del BUILD\FreeFileSync_Win32.exe -del BUILD\FreeFileSync_x64.exe -del BUILD\RealtimeSync.exe -del BUILD\RealtimeSync_Debug.exe -del BUILD\RealtimeSync_Win32.exe -del BUILD\RealtimeSync_x64.exe -del BUILD\gmon.out - -del shared\ShadowCopy\ShadowCopy.ncb -attrib shared\ShadowCopy\ShadowCopy.suo -h -del shared\ShadowCopy\ShadowCopy.suo -del shared\ShadowCopy\Shadow_2003.vcproj.*.user -del shared\ShadowCopy\Shadow_XP.vcproj.*.user -del shared\ShadowCopy\ShadowTest.vcproj.*.user -del shared\ShadowCopy\Shadow.pdb -del shared\ShadowCopy\Shadow.ilk -del shared\ShadowCopy\Shadow.exp -del shared\ShadowCopy\Shadow.lib -del shared\ShadowCopy\ShadowTest.ilk -del shared\ShadowCopy\ShadowTest.pdb - -del shared\IFileOperation\FileOperation_Vista.ncb -attrib shared\IFileOperation\FileOperation_Vista.suo -h -del shared\IFileOperation\FileOperation_Vista.suo -del shared\IFileOperation\FileOperation_Vista.vcproj.*.user -del shared\IFileOperation\Test.vcproj.*.user -del shared\IFileOperation\Test.ilk - -attrib shared\Taskbar_Seven\Taskbar_Seven.suo -h -del shared\Taskbar_Seven\Taskbar_Seven.suo -del shared\Taskbar_Seven\Taskbar_Seven.vcproj.*.user diff --git a/FreeFileSync.cbp b/FreeFileSync.cbp index 3a2d84a8..8d24385b 100644 --- a/FreeFileSync.cbp +++ b/FreeFileSync.cbp @@ -151,17 +151,11 @@ - - - - @@ -243,6 +237,14 @@ + + + + + + + + + + + + - - @@ -444,7 +458,6 @@ - @@ -453,7 +466,6 @@ - diff --git a/FreeFileSync.vcxproj b/FreeFileSync.vcxproj index 923a55c3..d34d50f6 100644 --- a/FreeFileSync.vcxproj +++ b/FreeFileSync.vcxproj @@ -1,309 +1 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {86C36CC7-9418-4253-9928-828486F59A00} - Win32Proj - FreeFileSync - - - - Application - true - Unicode - Windows7.1SDK - - - Application - true - Unicode - Windows7.1SDK - - - Application - false - true - Unicode - Windows7.1SDK - - - Application - false - true - Unicode - Windows7.1SDK - - - - - - - - - - - - - - - - - - - true - BUILD\Bin\ - OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ - false - $(ProjectName)_Debug - - - true - BUILD\Bin\ - OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ - false - $(ProjectName)_Debug - - - false - BUILD\Bin\ - OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ - false - $(ProjectName)_$(PlatformName) - - - false - BUILD\Bin\ - OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ - false - $(ProjectName)_$(PlatformName) - - - - Use - Level4 - Disabled - WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions) - .;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_dll\mswud;C:\Program Files\C++\Boost - wx+\pch.h - 4100;4996;4267;4512 - true - $(IntDir)pch.obj - zen/warn_static.h;wx+\pch.h - EditAndContinue - MultiThreadedDebugDLL - false - - - - - Windows - true - $(OutDir)$(TargetName)$(TargetExt) - wxmsw28ud_aui.lib;wxmsw28ud_adv.lib;wxmsw28ud_core.lib;wxbase28ud_net.lib;wxbase28ud.lib;wxpngd.lib;wxzlibd.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies) - C:\Program Files\C++\wxWidgets\lib\vc_dll;C:\Program Files\C++\Boost\stage\lib - - - - - - - C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud - %(PreprocessorDefinitions); - - - - - - - - - Use - Level4 - Disabled - WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions) - .;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_dll\mswud;C:\Program Files\C++\Boost - wx+\pch.h - 4100;4996;4267;4512 - true - $(IntDir)pch.obj - zen/warn_static.h;wx+\pch.h - ProgramDatabase - false - - - Windows - true - $(OutDir)$(TargetName)$(TargetExt) - wxbase28ud.lib;wxmsw28ud_core.lib;wxmsw28ud_adv.lib;wxmsw28ud_aui.lib;wxbase28ud_net.lib;wxpngd.lib;wxzlibd.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies) - C:\Program Files\C++\wxWidgets-x64\lib\vc_dll;C:\Program Files\C++\Boost\stage64\lib - - - - - C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud - %(PreprocessorDefinitions);WX_CPU_AMD64 - - - - - - - - - Level4 - NotUsing - MaxSpeed - true - ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions) - .;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost - Speed - 4100;4996;4267;4512 - MultiThreaded - true - Default - zen/warn_static.h - - - Windows - false - true - true - wxmsw28u_aui.lib;wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - C:\Program Files\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib - - - UseLinkTimeCodeGeneration - - - C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu - %(PreprocessorDefinitions); - - - - - - - Level4 - NotUsing - MaxSpeed - true - ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions) - .;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost - Speed - 4100;4996;4267;4512 - MultiThreaded - true - zen/warn_static.h - - - Windows - false - true - true - wxmsw28u_aui.lib;wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - C:\Program Files\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib - - - UseLinkTimeCodeGeneration - - - C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu - %(PreprocessorDefinitions);WX_CPU_AMD64 - - - - - - - - - - - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - \ No newline at end of file + Debug Win32 Debug x64 Release Win32 Release x64 {86C36CC7-9418-4253-9928-828486F59A00} Win32Proj FreeFileSync Application true Unicode Windows7.1SDK Application true Unicode Windows7.1SDK Application false true Unicode Windows7.1SDK Application false true Unicode Windows7.1SDK true BUILD\Bin\ OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ false $(ProjectName)_Debug true BUILD\Bin\ OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ false $(ProjectName)_Debug false BUILD\Bin\ OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ false $(ProjectName)_$(PlatformName) false BUILD\Bin\ OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\ false $(ProjectName)_$(PlatformName) Use Level4 Disabled WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions) .;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_dll\mswud;C:\Program Files\C++\Boost wx+\pch.h 4100;4996;4267;4512 true $(IntDir)pch.obj zen/warn_static.h;wx+\pch.h EditAndContinue MultiThreadedDebugDLL false Windows true $(OutDir)$(TargetName)$(TargetExt) wxmsw28ud_aui.lib;wxmsw28ud_adv.lib;wxmsw28ud_core.lib;wxbase28ud_net.lib;wxbase28ud.lib;wxpngd.lib;wxzlibd.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies) C:\Program Files\C++\wxWidgets\lib\vc_dll;C:\Program Files\C++\Boost\stage\lib C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud %(PreprocessorDefinitions); Use Level4 Disabled WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions) .;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_dll\mswud;C:\Program Files\C++\Boost wx+\pch.h 4100;4996;4267;4512 true $(IntDir)pch.obj zen/warn_static.h;wx+\pch.h ProgramDatabase false Windows true $(OutDir)$(TargetName)$(TargetExt) wxbase28ud.lib;wxmsw28ud_core.lib;wxmsw28ud_adv.lib;wxmsw28ud_aui.lib;wxbase28ud_net.lib;wxpngd.lib;wxzlibd.lib;comctl32.lib;ws2_32.lib;Rpcrt4.lib;winmm.lib;%(AdditionalDependencies) C:\Program Files\C++\wxWidgets-x64\lib\vc_dll;C:\Program Files\C++\Boost\stage64\lib C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud %(PreprocessorDefinitions);WX_CPU_AMD64 Level4 NotUsing MaxSpeed true ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions) .;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost Speed 4100;4996;4267;4512 MultiThreaded true Default zen/warn_static.h Windows false true true wxmsw28u_aui.lib;wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) C:\Program Files\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib UseLinkTimeCodeGeneration C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu %(PreprocessorDefinitions); Level4 NotUsing MaxSpeed true ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions) .;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost Speed 4100;4996;4267;4512 MultiThreaded true zen/warn_static.h Windows false true true wxmsw28u_aui.lib;wxmsw28u_adv.lib;wxmsw28u_core.lib;wxbase28u.lib;wxpng.lib;wxzlib.lib;wxbase28u_net.lib;comctl32.lib;ws2_32.lib;winmm.lib;Rpcrt4.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) C:\Program Files\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib UseLinkTimeCodeGeneration C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu %(PreprocessorDefinitions);WX_CPU_AMD64 Create Create Designer \ No newline at end of file diff --git a/Makefile b/Makefile index 2eaf7edf..0812c08c 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ prefix = /usr BINDIR = $(DESTDIR)$(prefix)/bin SHAREDIR = $(DESTDIR)$(prefix)/share APPSHAREDIR = $(SHAREDIR)/$(APPNAME) +DOCSHAREDIR = $(SHAREDIR)/doc/$(APPNAME) COMMON_COMPILE_FLAGS = -Wall -pipe `pkg-config --cflags gtk+-2.0` -O3 -pthread -std=gnu++0x -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DZEN_PLATFORM_OTHER -DWXINTL_NO_GETTEXT_MACRO -I. -include "zen/i18n.h" COMMON_LINK_FLAGS = -O3 -pthread @@ -11,7 +12,7 @@ COMMON_LINK_FLAGS = -O3 -pthread FFS_CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes` LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs std,aui --debug=no --unicode=yes` -lboost_thread -#static build used for precompiled release +#static std library linkage used for precompiled release ifeq ($(BUILD),release) FFS_CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes --static=yes` LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs std,aui --debug=no --unicode=yes --static=yes` /usr/local/lib/libboost_thread.a @@ -37,92 +38,88 @@ FFS_CPPFLAGS += `pkg-config --cflags unity` -DHAVE_UBUNTU_UNITY LINKFLAGS += `pkg-config --libs unity` endif -FILE_LIST= #internal list of all *.cpp files needed for compilation -FILE_LIST+=algorithm.cpp -FILE_LIST+=application.cpp -FILE_LIST+=comparison.cpp -FILE_LIST+=file_hierarchy.cpp -FILE_LIST+=lib/binary.cpp -FILE_LIST+=lib/custom_grid.cpp -FILE_LIST+=lib/db_file.cpp -FILE_LIST+=lib/dir_lock.cpp -FILE_LIST+=lib/error_log.cpp -FILE_LIST+=lib/hard_filter.cpp -FILE_LIST+=lib/icon_buffer.cpp -FILE_LIST+=lib/localization.cpp -FILE_LIST+=lib/parallel_scan.cpp -FILE_LIST+=lib/process_xml.cpp -FILE_LIST+=lib/recycler.cpp -FILE_LIST+=lib/resolve_path.cpp -FILE_LIST+=lib/resources.cpp -FILE_LIST+=lib/statistics.cpp -FILE_LIST+=lib/status_handler.cpp -FILE_LIST+=lib/xml_base.cpp -FILE_LIST+=structures.cpp -FILE_LIST+=synchronization.cpp -FILE_LIST+=ui/folder_history_box.cpp -FILE_LIST+=ui/exec_finished_box.cpp -FILE_LIST+=ui/dir_name.cpp -FILE_LIST+=ui/batch_config.cpp -FILE_LIST+=ui/batch_status_handler.cpp -FILE_LIST+=ui/check_version.cpp -FILE_LIST+=ui/grid_view.cpp -FILE_LIST+=ui/gui_generated.cpp -FILE_LIST+=ui/gui_status_handler.cpp -FILE_LIST+=ui/main_dlg.cpp -FILE_LIST+=ui/msg_popup.cpp -FILE_LIST+=ui/progress_indicator.cpp -FILE_LIST+=ui/search.cpp -FILE_LIST+=ui/small_dlgs.cpp -FILE_LIST+=ui/sync_cfg.cpp -FILE_LIST+=ui/taskbar.cpp -FILE_LIST+=ui/tray_icon.cpp -FILE_LIST+=wx+/button.cpp -FILE_LIST+=wx+/format_unit.cpp -FILE_LIST+=wx+/graph.cpp -FILE_LIST+=wx+/tooltip.cpp -FILE_LIST+=zen/file_handling.cpp -FILE_LIST+=zen/file_id.cpp -FILE_LIST+=zen/file_io.cpp -FILE_LIST+=zen/file_traverser.cpp -FILE_LIST+=zen/zstring.cpp +CPP_LIST= #internal list of all *.cpp files needed for compilation +CPP_LIST+=algorithm.cpp +CPP_LIST+=application.cpp +CPP_LIST+=comparison.cpp +CPP_LIST+=structures.cpp +CPP_LIST+=synchronization.cpp +CPP_LIST+=file_hierarchy.cpp +CPP_LIST+=ui/custom_grid.cpp +CPP_LIST+=ui/folder_history_box.cpp +CPP_LIST+=ui/exec_finished_box.cpp +CPP_LIST+=ui/dir_name.cpp +CPP_LIST+=ui/batch_config.cpp +CPP_LIST+=ui/batch_status_handler.cpp +CPP_LIST+=ui/check_version.cpp +CPP_LIST+=ui/grid_view.cpp +CPP_LIST+=ui/tree_view.cpp +CPP_LIST+=ui/gui_generated.cpp +CPP_LIST+=ui/gui_status_handler.cpp +CPP_LIST+=ui/main_dlg.cpp +CPP_LIST+=ui/msg_popup.cpp +CPP_LIST+=ui/progress_indicator.cpp +CPP_LIST+=ui/search.cpp +CPP_LIST+=ui/small_dlgs.cpp +CPP_LIST+=ui/sync_cfg.cpp +CPP_LIST+=ui/taskbar.cpp +CPP_LIST+=ui/tray_icon.cpp +CPP_LIST+=lib/binary.cpp +CPP_LIST+=lib/db_file.cpp +CPP_LIST+=lib/dir_lock.cpp +CPP_LIST+=lib/error_log.cpp +CPP_LIST+=lib/hard_filter.cpp +CPP_LIST+=lib/icon_buffer.cpp +CPP_LIST+=lib/localization.cpp +CPP_LIST+=lib/parallel_scan.cpp +CPP_LIST+=lib/process_xml.cpp +CPP_LIST+=lib/recycler.cpp +CPP_LIST+=lib/resolve_path.cpp +CPP_LIST+=lib/resources.cpp +CPP_LIST+=lib/statistics.cpp +CPP_LIST+=lib/status_handler.cpp +CPP_LIST+=lib/xml_base.cpp +CPP_LIST+=zen/file_handling.cpp +CPP_LIST+=zen/file_id.cpp +CPP_LIST+=zen/file_io.cpp +CPP_LIST+=zen/file_traverser.cpp +CPP_LIST+=zen/zstring.cpp +CPP_LIST+=wx+/grid.cpp +CPP_LIST+=wx+/button.cpp +CPP_LIST+=wx+/format_unit.cpp +CPP_LIST+=wx+/graph.cpp +CPP_LIST+=wx+/tooltip.cpp #list of all *.o files -OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/FFS_Release_GCC_Make/$(subst .cpp,.o,$(notdir $(file)))) - -#build list of all dependencies -DEP_LIST=$(foreach file, $(FILE_LIST), $(subst .cpp,.dep,$(file))) - +OBJECT_LIST=$(CPP_LIST:%.cpp=OBJ/FFS_Release_GCC_Make/%.o) all: FreeFileSync -init: - if [ ! -d ./OBJ ]; then mkdir OBJ; fi - if [ ! -d ./OBJ/FFS_Release_GCC_Make ]; then mkdir OBJ/FFS_Release_GCC_Make; fi - -%.dep : %.cpp -#strip path information - g++ $(FFS_CPPFLAGS) -c $< -o OBJ/FFS_Release_GCC_Make/$(subst .cpp,.o,$(notdir $<)) +OBJ/FFS_Release_GCC_Make/%.o : %.cpp + mkdir -p $(dir $@) + g++ $(FFS_CPPFLAGS) -c $< -o $@ -FreeFileSync: init $(DEP_LIST) -#respect linker order: wxWidgets libraries last +FreeFileSync: $(OBJECT_LIST) g++ -o ./BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS) clean: - rm -rf OBJ/FFS_Release_GCC_Make +#-f doesn't work when deleting directories + if [ -d OBJ/FFS_Release_GCC_Make ]; then rm -rf OBJ/FFS_Release_GCC_Make; fi rm -f BUILD/$(APPNAME) install: - if [ ! -d $(BINDIR) ]; then mkdir -p $(BINDIR); fi - if [ ! -d $(APPSHAREDIR) ]; then mkdir -p $(APPSHAREDIR); fi - + mkdir -p $(BINDIR) cp BUILD/$(APPNAME) $(BINDIR) + + mkdir -p $(APPSHAREDIR) cp -R BUILD/Languages/ \ BUILD/Help/ \ BUILD/Compare_Complete.wav \ BUILD/Sync_Complete.wav \ BUILD/Resources.zip \ - BUILD/Changelog.txt \ - BUILD/License.txt \ BUILD/styles.rc \ $(APPSHAREDIR) + + mkdir -p $(DOCSHAREDIR) + cp BUILD/Changelog.txt $(DOCSHAREDIR)/changelog + gzip $(DOCSHAREDIR)/changelog diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp index 2f1a8848..d45ae482 100644 --- a/RealtimeSync/application.cpp +++ b/RealtimeSync/application.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 "application.h" diff --git a/RealtimeSync/application.h b/RealtimeSync/application.h index 69a28ef9..8ed2b45d 100644 --- a/RealtimeSync/application.h +++ b/RealtimeSync/application.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 REALTIMESYNCAPP_H diff --git a/RealtimeSync/gui_generated.cpp b/RealtimeSync/gui_generated.cpp index 51229ebf..f968c995 100644 --- a/RealtimeSync/gui_generated.cpp +++ b/RealtimeSync/gui_generated.cpp @@ -1,11 +1,10 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 30 2011) +// C++ code generated with wxFormBuilder (version Dec 2 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "../ui/wx_form_build_hide_warnings.h" #include "../wx+/button.h" #include "../wx+/dir_picker.h" @@ -20,18 +19,18 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_menubar1 = new wxMenuBar( 0 ); m_menuFile = new wxMenu(); wxMenuItem* m_menuItem14; - m_menuItem14 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("CTRL-S"), wxEmptyString, wxITEM_NORMAL ); + m_menuItem14 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("CTRL+S"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItem14 ); wxMenuItem* m_menuItem13; - m_menuItem13 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL-L"), wxEmptyString, wxITEM_NORMAL ); + m_menuItem13 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("CTRL+L"), wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuItem13 ); wxMenuItem* m_separator1; m_separator1 = 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_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, _("&File") ); @@ -44,7 +43,7 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr wxMenuItem* m_separator2; m_separator2 = m_menuHelp->AppendSeparator(); - m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("SHIFT-F1"), wxEmptyString, wxITEM_NORMAL ); + 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") ); @@ -58,16 +57,10 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr bSizer1 = new wxBoxSizer( wxVERTICAL ); - bSizer1->Add( 0, 10, 0, 0, 5 ); + bSizer1->Add( 0, 5, 0, 0, 5 ); wxStaticBoxSizer* sbSizer41; - sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_staticText2 = new wxStaticText( m_panelMain, wxID_ANY, _("Usage:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2->Wrap( -1 ); - m_staticText2->SetFont( wxFont( 10, 74, 90, 90, true, wxEmptyString ) ); - - sbSizer41->Add( m_staticText2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Usage:") ), wxVERTICAL ); m_staticText3 = new wxStaticText( m_panelMain, wxID_ANY, _("1. Select directories to monitor."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText3->Wrap( -1 ); @@ -81,23 +74,35 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_staticText5->Wrap( -1 ); sbSizer41->Add( m_staticText5, 0, wxLEFT, 10 ); - m_staticline3 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizer41->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + sbSizer41->Add( 0, 15, 0, 0, 5 ); m_staticText21 = new wxStaticText( m_panelMain, wxID_ANY, _("The command line is executed each time:\n- all directories become available (e.g. USB stick insert)\n- files within these directories or subdirectories are modified"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText21->Wrap( -1 ); sbSizer41->Add( m_staticText21, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizer1->Add( sbSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 20 ); + bSizer1->Add( sbSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 20 ); m_staticline2 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizer1->Add( m_staticline2, 0, wxTOP|wxBOTTOM|wxEXPAND, 10 ); - sbSizerDirToWatch = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Directories to watch") ), wxVERTICAL ); + sbSizerDirToWatch2 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Directories to watch") ), wxVERTICAL ); m_panelMainFolder = new wxPanel( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer114; - bSizer114 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer11->Add( 25, 0, 0, 0, 5 ); + + m_staticTextFinalPath = new wxStaticText( m_panelMainFolder, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFinalPath->Wrap( -1 ); + bSizer11->Add( m_staticTextFinalPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 ); + + bSizer10->Add( bSizer11, 0, 0, 5 ); wxBoxSizer* bSizer781; bSizer781 = new wxBoxSizer( wxHORIZONTAL ); @@ -112,20 +117,20 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr bSizer781->Add( m_bpButtonRemoveTopFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer114->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_txtCtrlDirectoryMain = new wxTextCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 300,-1 ), 0 ); - bSizer114->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer781->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 ); m_dirPickerMain = new zen::DirPickerCtrl( m_panelMainFolder, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); m_dirPickerMain->SetToolTip( _("Select a folder") ); - bSizer114->Add( m_dirPickerMain, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer781->Add( m_dirPickerMain, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer10->Add( bSizer781, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_panelMainFolder->SetSizer( bSizer114 ); + m_panelMainFolder->SetSizer( bSizer10 ); m_panelMainFolder->Layout(); - bSizer114->Fit( m_panelMainFolder ); - sbSizerDirToWatch->Add( m_panelMainFolder, 0, wxEXPAND, 5 ); + bSizer10->Fit( m_panelMainFolder ); + sbSizerDirToWatch2->Add( m_panelMainFolder, 0, wxEXPAND, 5 ); m_scrolledWinFolders = new wxScrolledWindow( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); m_scrolledWinFolders->SetScrollRate( 5, 5 ); @@ -134,9 +139,9 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr m_scrolledWinFolders->SetSizer( bSizerFolders ); m_scrolledWinFolders->Layout(); bSizerFolders->Fit( m_scrolledWinFolders ); - sbSizerDirToWatch->Add( m_scrolledWinFolders, 0, wxEXPAND, 5 ); + sbSizerDirToWatch2->Add( m_scrolledWinFolders, 0, wxEXPAND, 5 ); - bSizer1->Add( sbSizerDirToWatch, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + bSizer1->Add( sbSizerDirToWatch2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* sbSizer3; sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Command line") ), wxVERTICAL ); @@ -154,16 +159,13 @@ MainDlgGenerated::MainDlgGenerated( wxWindow* parent, wxWindowID id, const wxStr sbSizer4->Add( m_spinCtrlDelay, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer1->Add( sbSizer4, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_staticline1 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); + bSizer1->Add( sbSizer4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_buttonStart = new zen::BitmapButton( m_panelMain, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 ); m_buttonStart->SetDefault(); m_buttonStart->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) ); - bSizer1->Add( m_buttonStart, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer1->Add( m_buttonStart, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); m_buttonCancel = new wxButton( m_panelMain, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); bSizer1->Add( m_buttonCancel, 0, 0, 5 ); diff --git a/RealtimeSync/gui_generated.h b/RealtimeSync/gui_generated.h index cedd812f..2232fc67 100644 --- a/RealtimeSync/gui_generated.h +++ b/RealtimeSync/gui_generated.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 30 2011) +// C++ code generated with wxFormBuilder (version Dec 2 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,7 +11,6 @@ #include #include #include -class wxStaticText; namespace zen { class BitmapButton; } namespace zen { class DirPickerCtrl; } @@ -25,9 +24,9 @@ namespace zen { class DirPickerCtrl; } #include #include #include -#include #include #include +#include #include #include #include @@ -55,15 +54,14 @@ protected: wxMenuItem* m_menuItemAbout; wxBoxSizer* bSizerMain; wxPanel* m_panelMain; - wxStaticText* m_staticText2; wxStaticText* m_staticText3; wxStaticText* m_staticText4; wxStaticText* m_staticText5; - wxStaticLine* m_staticline3; wxStaticText* m_staticText21; wxStaticLine* m_staticline2; - wxStaticBoxSizer* sbSizerDirToWatch; + wxStaticBoxSizer* sbSizerDirToWatch2; wxPanel* m_panelMainFolder; + wxStaticText* m_staticTextFinalPath; wxBitmapButton* m_bpButtonAddFolder; wxBitmapButton* m_bpButtonRemoveTopFolder; wxTextCtrl* m_txtCtrlDirectoryMain; @@ -71,7 +69,6 @@ protected: wxBoxSizer* bSizerFolders; wxTextCtrl* m_textCtrlCommand; wxSpinCtrl* m_spinCtrlDelay; - wxStaticLine* m_staticline1; zen::BitmapButton* m_buttonStart; wxButton* m_buttonCancel; diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp index 03b54374..3b40236a 100644 --- a/RealtimeSync/main_dlg.cpp +++ b/RealtimeSync/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" @@ -34,15 +34,15 @@ MainDialog::MainDialog(wxDialog* dlg, const wxString& cfgFileName) m_bpButtonRemoveTopFolder->Hide(); m_panelMainFolder->Layout(); - m_bpButtonAddFolder->SetBitmapLabel(GlobalResources::getImage(wxT("addFolderPair"))); - m_bpButtonRemoveTopFolder->SetBitmapLabel(GlobalResources::getImage(wxT("removeFolderPair"))); - m_buttonStart->setBitmapFront(GlobalResources::getImage(wxT("startRed"))); + m_bpButtonAddFolder ->SetBitmapLabel(GlobalResources::getImage(L"addFolderPair")); + m_bpButtonRemoveTopFolder->SetBitmapLabel(GlobalResources::getImage(L"removeFolderPair")); + m_buttonStart ->setBitmapFront(GlobalResources::getImage(L"startRed")); //register key event Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnKeyPressed), NULL, this); //prepare drag & drop - dirNameFirst.reset(new DirectoryName(*m_panelMainFolder, *m_dirPickerMain, *m_txtCtrlDirectoryMain, sbSizerDirToWatch)); + dirNameFirst.reset(new DirectoryName(*m_panelMainFolder, *m_dirPickerMain, *m_txtCtrlDirectoryMain, m_staticTextFinalPath)); #ifdef FFS_WIN diff --git a/RealtimeSync/main_dlg.h b/RealtimeSync/main_dlg.h index af3c93a9..01789a45 100644 --- a/RealtimeSync/main_dlg.h +++ b/RealtimeSync/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 REALTIMESYNCMAIN_H @@ -69,7 +69,7 @@ private: static const wxString& lastConfigFileName(); - std::auto_ptr> dirNameFirst; + std::unique_ptr> dirNameFirst; std::vector dirNamesExtra; //additional pairs to the standard pair wxString currentConfigFileName; diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile index 956525f6..0dc2d8af 100644 --- a/RealtimeSync/makefile +++ b/RealtimeSync/makefile @@ -9,62 +9,53 @@ COMMON_LINK_FLAGS = -O3 -pthread FFS_CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes` LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs --debug=no --unicode=yes` -lboost_thread -#static build used for precompiled release +#static std library linkage used for precompiled release ifeq ($(BUILD),release) FFS_CPPFLAGS = $(COMMON_COMPILE_FLAGS) `wx-config --cxxflags --debug=no --unicode=yes --static=yes` LINKFLAGS = $(COMMON_LINK_FLAGS) `wx-config --libs --debug=no --unicode=yes --static=yes` /usr/local/lib/libboost_thread.a endif -FILE_LIST= #internal list of all *.cpp files needed for compilation -FILE_LIST+=application.cpp -FILE_LIST+=gui_generated.cpp -FILE_LIST+=main_dlg.cpp -FILE_LIST+=resources.cpp -FILE_LIST+=tray_menu.cpp -FILE_LIST+=watcher.cpp -FILE_LIST+=xml_ffs.cpp -FILE_LIST+=xml_proc.cpp -FILE_LIST+=../ui/dir_name.cpp -FILE_LIST+=../lib/localization.cpp -FILE_LIST+=../lib/process_xml.cpp -FILE_LIST+=../lib/resolve_path.cpp -FILE_LIST+=../lib/xml_base.cpp -FILE_LIST+=../ui/folder_history_box.cpp -FILE_LIST+=../structures.cpp -FILE_LIST+=../wx+/button.cpp -FILE_LIST+=../wx+/format_unit.cpp -FILE_LIST+=../zen/dir_watcher.cpp -FILE_LIST+=../zen/file_handling.cpp -FILE_LIST+=../zen/file_io.cpp -FILE_LIST+=../zen/file_traverser.cpp -FILE_LIST+=../zen/zstring.cpp +CPP_LIST= #internal list of all *.cpp files needed for compilation +CPP_LIST+=application.cpp +CPP_LIST+=gui_generated.cpp +CPP_LIST+=main_dlg.cpp +CPP_LIST+=resources.cpp +CPP_LIST+=tray_menu.cpp +CPP_LIST+=watcher.cpp +CPP_LIST+=xml_ffs.cpp +CPP_LIST+=xml_proc.cpp +CPP_LIST+=../structures.cpp +CPP_LIST+=../ui/dir_name.cpp +CPP_LIST+=../ui/folder_history_box.cpp +CPP_LIST+=../lib/localization.cpp +CPP_LIST+=../lib/process_xml.cpp +CPP_LIST+=../lib/resolve_path.cpp +CPP_LIST+=../lib/xml_base.cpp +CPP_LIST+=../zen/dir_watcher.cpp +CPP_LIST+=../zen/file_handling.cpp +CPP_LIST+=../zen/file_io.cpp +CPP_LIST+=../zen/file_traverser.cpp +CPP_LIST+=../zen/zstring.cpp +CPP_LIST+=../wx+/button.cpp +CPP_LIST+=../wx+/format_unit.cpp #list of all *.o files -OBJECT_LIST=$(foreach file, $(FILE_LIST), ../OBJ/RTS_Release_GCC_Make/$(subst .cpp,.o,$(notdir $(file)))) - -#build list of all dependencies -DEP_LIST=$(foreach file, $(FILE_LIST), $(subst .cpp,.dep,$(file))) - +OBJECT_LIST=$(CPP_LIST:%.cpp=../OBJ/RTS_Release_GCC_Make/RTS/%.o) all: RealtimeSync -init: - if [ ! -d ../OBJ ]; then mkdir ../OBJ; fi - if [ ! -d ../OBJ/RTS_Release_GCC_Make ]; then mkdir ../OBJ/RTS_Release_GCC_Make; fi +../OBJ/RTS_Release_GCC_Make/RTS/%.o : %.cpp + mkdir -p $(dir $@) + g++ $(FFS_CPPFLAGS) -c $< -o $@ -%.dep : %.cpp - #strip path information - g++ $(FFS_CPPFLAGS) -c $< -o ../OBJ/RTS_Release_GCC_Make/$(subst .cpp,.o,$(notdir $<)) - -RealtimeSync: init $(DEP_LIST) -#respect linker order: wxWidgets libraries last +RealtimeSync: $(OBJECT_LIST) g++ -o ../BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS) clean: - rm -rf ../OBJ/RTS_Release_GCC_Make +#-f doesn't work when deleting directories + if [ -d ../OBJ/RTS_Release_GCC_Make ]; then rm -rf ../OBJ/RTS_Release_GCC_Make; fi rm -f ../BUILD/$(APPNAME) install: - if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR); fi - + mkdir -p $(BINDIR) cp ../BUILD/$(APPNAME) $(BINDIR) diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp index 8566a9d6..41e16808 100644 --- a/RealtimeSync/resources.cpp +++ b/RealtimeSync/resources.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 "resources.h" diff --git a/RealtimeSync/resources.h b/RealtimeSync/resources.h index 820ff6a3..835125a4 100644 --- a/RealtimeSync/resources.h +++ b/RealtimeSync/resources.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 RESOURCES_H_INCLUDED diff --git a/RealtimeSync/tray_menu.cpp b/RealtimeSync/tray_menu.cpp index 0cfed18e..c8eccbf5 100644 --- a/RealtimeSync/tray_menu.cpp +++ b/RealtimeSync/tray_menu.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_menu.h" diff --git a/RealtimeSync/tray_menu.h b/RealtimeSync/tray_menu.h index 80f2d26c..21d26932 100644 --- a/RealtimeSync/tray_menu.h +++ b/RealtimeSync/tray_menu.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 TRAYMENU_H_INCLUDED diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp index 52dead7a..36ceb006 100644 --- a/RealtimeSync/watcher.cpp +++ b/RealtimeSync/watcher.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 "watcher.h" diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h index 9d2448de..cb39ed20 100644 --- a/RealtimeSync/watcher.h +++ b/RealtimeSync/watcher.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 WATCHER_H_INCLUDED diff --git a/RealtimeSync/xml_ffs.cpp b/RealtimeSync/xml_ffs.cpp index e0433374..6ec5f843 100644 --- a/RealtimeSync/xml_ffs.cpp +++ b/RealtimeSync/xml_ffs.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 "xml_ffs.h" diff --git a/RealtimeSync/xml_ffs.h b/RealtimeSync/xml_ffs.h index f359c039..abff3c10 100644 --- a/RealtimeSync/xml_ffs.h +++ b/RealtimeSync/xml_ffs.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 XMLFREEFILESYNC_H_INCLUDED diff --git a/RealtimeSync/xml_proc.cpp b/RealtimeSync/xml_proc.cpp index 38ba2a17..df50d569 100644 --- a/RealtimeSync/xml_proc.cpp +++ b/RealtimeSync/xml_proc.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 "xml_proc.h" diff --git a/RealtimeSync/xml_proc.h b/RealtimeSync/xml_proc.h index 2fd54c37..a2e178d4 100644 --- a/RealtimeSync/xml_proc.h +++ b/RealtimeSync/xml_proc.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 XMLPROCESSING_H_INCLUDED diff --git a/algorithm.cpp b/algorithm.cpp index 9a3b46f0..77704bfc 100644 --- a/algorithm.cpp +++ b/algorithm.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 "algorithm.h" @@ -27,7 +27,7 @@ using namespace std::rel_ops; void zen::swapGrids(const MainConfiguration& config, FolderComparison& folderCmp) { std::for_each(begin(folderCmp), end(folderCmp), std::mem_fun_ref(&BaseDirMapping::flip)); - redetermineSyncDirection(config, folderCmp, NULL); + redetermineSyncDirection(config, folderCmp, [](const std::wstring&) {}); } @@ -55,13 +55,13 @@ private: switch (fileObj.getCategory()) { case FILE_LEFT_SIDE_ONLY: - if (endsWith(fileObj.getFullName(), zen::TEMP_FILE_ENDING)) + if (endsWith(fileObj.getShortName(), zen::TEMP_FILE_ENDING)) fileObj.setSyncDir(SYNC_DIR_LEFT); //schedule potentially existing temporary files for deletion else fileObj.setSyncDir(dirCfg.exLeftSideOnly); break; case FILE_RIGHT_SIDE_ONLY: - if (endsWith(fileObj.getFullName(), zen::TEMP_FILE_ENDING)) + if (endsWith(fileObj.getShortName(), zen::TEMP_FILE_ENDING)) fileObj.setSyncDir(SYNC_DIR_RIGHT); //schedule potentially existing temporary files for deletion else fileObj.setSyncDir(dirCfg.exRightSideOnly); @@ -399,19 +399,18 @@ std::pair retrieveDataSetDir(const Zstring& obj class RedetermineAuto { public: - static void execute(BaseDirMapping& baseDirectory, DeterminationProblem* handler) + static void execute(BaseDirMapping& baseDirectory, std::function reportWarning) { - RedetermineAuto(baseDirectory, handler); + RedetermineAuto(baseDirectory, reportWarning); } private: - RedetermineAuto(BaseDirMapping& baseDirectory, - DeterminationProblem* handler) : + RedetermineAuto(BaseDirMapping& baseDirectory, std::function reportWarning) : txtBothSidesChanged(_("Both sides have changed since last synchronization!")), txtNoSideChanged(_("Cannot determine sync-direction:") + L" \n" + _("No change since last synchronization!")), txtFilterChanged(_("Cannot determine sync-direction:") + L" \n" + _("Filter settings have changed!")), txtLastSyncFail (_("Cannot determine sync-direction:") + L" \n" + _("The file was not processed by last synchronization!")), - handler_(handler) + reportWarning_(reportWarning) { if (allElementsEqual(baseDirectory)) //nothing to do: abort and don't show any nag-screens return; @@ -474,8 +473,8 @@ private: catch (FileErrorDatabaseNotExisting&) {} //let's ignore these errors for now... catch (FileError& error) //e.g. incompatible database version { - if (handler_) handler_->reportWarning(error.toString() + L" \n\n" + - _("Setting default synchronization directions: Old files will be overwritten with newer files.")); + reportWarning_(error.toString() + L" \n\n" + + _("Setting default synchronization directions: Old files will be overwritten with newer files.")); } return std::pair(); //NULL } @@ -533,12 +532,12 @@ private: //---------------------------------------------------------------------- //##################### schedule potentially existing temporary files for deletion #################### - if (cat == FILE_LEFT_SIDE_ONLY && endsWith(fileObj.getFullName(), zen::TEMP_FILE_ENDING)) + if (cat == FILE_LEFT_SIDE_ONLY && endsWith(fileObj.getShortName(), zen::TEMP_FILE_ENDING)) { fileObj.setSyncDir(SYNC_DIR_LEFT); return; } - else if (cat == FILE_RIGHT_SIDE_ONLY && endsWith(fileObj.getFullName(), zen::TEMP_FILE_ENDING)) + else if (cat == FILE_RIGHT_SIDE_ONLY && endsWith(fileObj.getShortName(), zen::TEMP_FILE_ENDING)) { fileObj.setSyncDir(SYNC_DIR_RIGHT); return; @@ -821,7 +820,7 @@ private: const std::wstring txtFilterChanged; const std::wstring txtLastSyncFail; - DeterminationProblem* const handler_; + std::function reportWarning_; //detection of renamed files template @@ -894,10 +893,10 @@ std::vector zen::extractDirectionCfg(const MainConfiguration& m } -void zen::redetermineSyncDirection(const DirectionConfig& directConfig, BaseDirMapping& baseDirectory, DeterminationProblem* handler) +void zen::redetermineSyncDirection(const DirectionConfig& directConfig, BaseDirMapping& baseDirectory, std::function reportWarning) { if (directConfig.var == DirectionConfig::AUTOMATIC) - RedetermineAuto::execute(baseDirectory, handler); + RedetermineAuto::execute(baseDirectory, reportWarning); else { DirectionSet dirCfg = extractDirections(directConfig); @@ -906,9 +905,9 @@ void zen::redetermineSyncDirection(const DirectionConfig& directConfig, BaseDirM } -void zen::redetermineSyncDirection(const MainConfiguration& mainCfg, FolderComparison& folderCmp, DeterminationProblem* handler) +void zen::redetermineSyncDirection(const MainConfiguration& mainCfg, FolderComparison& folderCmp, std::function reportWarning) { - if (folderCmp.size() == 0) + if (folderCmp.empty()) return; std::vector directCfgs = extractDirectionCfg(mainCfg); @@ -919,7 +918,7 @@ void zen::redetermineSyncDirection(const MainConfiguration& mainCfg, FolderCompa for (auto iter = folderCmp.begin(); iter != folderCmp.end(); ++iter) { const DirectionConfig& cfg = directCfgs[iter - folderCmp.begin()]; - redetermineSyncDirection(cfg, **iter, handler); + redetermineSyncDirection(cfg, **iter, reportWarning); } } @@ -1337,10 +1336,9 @@ void zen::applyTimeSpanFilter(FolderComparison& folderCmp, const Int64& timeFrom //############################################################################################################ -std::pair zen::deleteFromGridAndHDPreview( //assemble message containing all files to be deleted - const std::vector& rowsToDeleteOnLeft, - const std::vector& rowsToDeleteOnRight, - bool deleteOnBothSides) +std::pair zen::deleteFromGridAndHDPreview(const std::vector& selectionLeft, + const std::vector& selectionRight, + bool deleteOnBothSides) { //fast replacement for wxString modelling exponential growth typedef Zbase zxString; //for use with UI texts @@ -1350,46 +1348,50 @@ std::pair zen::deleteFromGridAndHDPreview( //assemble message con if (deleteOnBothSides) { - //mix selected rows from left and right - std::set rowsToDelete(rowsToDeleteOnLeft.begin(), rowsToDeleteOnLeft.end()); - rowsToDelete.insert(rowsToDeleteOnRight.begin(), rowsToDeleteOnRight.end()); + //mix selected rows from left and right (without changing order) + std::vector selection; + { + hash_set objectsUsed; + std::copy_if(selectionLeft .begin(), selectionLeft .end(), std::back_inserter(selection), [&](FileSystemObject* fsObj) { return objectsUsed.insert(fsObj).second; }); + std::copy_if(selectionRight.begin(), selectionRight.end(), std::back_inserter(selection), [&](FileSystemObject* fsObj) { return objectsUsed.insert(fsObj).second; }); + } - std::for_each(rowsToDelete.begin(), rowsToDelete.end(), + std::for_each(selection.begin(), selection.end(), [&](const FileSystemObject* fsObj) { if (!fsObj->isEmpty()) { - filesToDelete += utf8CvrtTo(fsObj->getFullName()) + wxT("\n"); + filesToDelete += utf8CvrtTo(fsObj->getFullName()) + L'\n'; ++totalDelCount; } if (!fsObj->isEmpty()) { - filesToDelete += utf8CvrtTo(fsObj->getFullName()) + wxT("\n"); + filesToDelete += utf8CvrtTo(fsObj->getFullName()) + L'\n'; ++totalDelCount; } - filesToDelete += wxT("\n"); + filesToDelete += L'\n'; }); } else //delete selected files only { - std::for_each(rowsToDeleteOnLeft.begin(), rowsToDeleteOnLeft.end(), + std::for_each(selectionLeft.begin(), selectionLeft.end(), [&](const FileSystemObject* fsObj) { if (!fsObj->isEmpty()) { - filesToDelete += utf8CvrtTo(fsObj->getFullName()) + wxT("\n"); + filesToDelete += utf8CvrtTo(fsObj->getFullName()) + L'\n'; ++totalDelCount; } }); - std::for_each(rowsToDeleteOnRight.begin(), rowsToDeleteOnRight.end(), + std::for_each(selectionRight.begin(), selectionRight.end(), [&](const FileSystemObject* fsObj) { if (!fsObj->isEmpty()) { - filesToDelete += utf8CvrtTo(fsObj->getFullName()) + wxT("\n"); + filesToDelete += utf8CvrtTo(fsObj->getFullName()) + L'\n'; ++totalDelCount; } }); @@ -1495,15 +1497,15 @@ void deleteFromGridAndHDOneSide(InputIterator first, InputIterator last, } -void zen::deleteFromGridAndHD(std::vector& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows - std::vector& rowsToDeleteOnRight, //all pointers need to be bound! +void zen::deleteFromGridAndHD(const std::vector& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows + const std::vector& rowsToDeleteOnRight, //all pointers need to be bound! FolderComparison& folderCmp, //attention: rows will be physically deleted! const std::vector& directCfgs, bool deleteOnBothSides, bool useRecycleBin, DeleteFilesHandler& statusHandler) { - if (folderCmp.size() == 0) + if (folderCmp.empty()) return; else if (folderCmp.size() != directCfgs.size()) throw std::logic_error("Programming Error: Contract violation!"); diff --git a/algorithm.h b/algorithm.h index 96ff6b1a..66203ec7 100644 --- a/algorithm.h +++ b/algorithm.h @@ -1,12 +1,13 @@ // ************************************************************************** // * 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 ALGORITHM_H_INCLUDED #define ALGORITHM_H_INCLUDED +#include #include "file_hierarchy.h" #include "lib/soft_filter.h" @@ -14,15 +15,10 @@ namespace zen { void swapGrids(const MainConfiguration& config, FolderComparison& folderCmp); -struct DeterminationProblem //callback -{ - virtual ~DeterminationProblem() {} - virtual void reportWarning(const std::wstring& text) = 0; -}; std::vector extractDirectionCfg(const MainConfiguration& mainCfg); -void redetermineSyncDirection(const DirectionConfig& directConfig, BaseDirMapping& baseDirectory, DeterminationProblem* handler); //handler may be NULL -void redetermineSyncDirection(const MainConfiguration& mainCfg, FolderComparison& folderCmp, DeterminationProblem* handler); +void redetermineSyncDirection(const DirectionConfig& directConfig, BaseDirMapping& baseDirectory, std::function reportWarning); +void redetermineSyncDirection(const MainConfiguration& mainCfg, FolderComparison& folderCmp, std::function reportWarning); void setSyncDirectionRec(SyncDirection newDirection, FileSystemObject& fsObj); //set new direction (recursively) @@ -40,9 +36,9 @@ void setActiveStatus(bool newStatus, FileSystemObject& fsObj); //activate or //manual deletion of files on main grid -std::pair deleteFromGridAndHDPreview( //returns wxString with elements to be deleted and total count of selected(!) objects, NOT total files/dirs! - const std::vector& rowsToDeleteOnLeft, //all pointers need to be bound! - const std::vector& rowsToDeleteOnRight, // +std::pair deleteFromGridAndHDPreview( //returns wxString with elements to be deleted and total count of selected(!) objects, NOT total files/dirs! + const std::vector& selectionLeft, //all pointers need to be bound! + const std::vector& selectionRight, // bool deleteOnBothSides); class DeleteFilesHandler @@ -61,8 +57,8 @@ public: //virtual void totalFilesToDelete(int objectsTotal) = 0; //informs about the total number of files to be deleted virtual void notifyDeletion(const Zstring& currentObject) = 0; //called for each file/folder that has been deleted }; -void deleteFromGridAndHD(std::vector& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows - std::vector& rowsToDeleteOnRight, //all pointers need to be bound! +void deleteFromGridAndHD(const std::vector& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows + const std::vector& rowsToDeleteOnRight, //all pointers need to be bound! FolderComparison& folderCmp, //attention: rows will be physically deleted! const std::vector& directCfgs, bool deleteOnBothSides, diff --git a/comparison.cpp b/comparison.cpp index bb147b61..16ddaa72 100644 --- a/comparison.cpp +++ b/comparison.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 "comparison.h" @@ -351,23 +351,10 @@ void CompareProcess::startCompareProcess(const std::vector& cfgLi const FolderPairCfg& fpCfg = cfgList[j - output_tmp.begin()]; //set initial sync-direction - class RedetermineCallback : public DeterminationProblem - { - public: - RedetermineCallback(bool& warningSyncDatabase, ProcessCallback& procCallback) : - warningSyncDatabase_(warningSyncDatabase), - procCallback_(procCallback) {} - - virtual void reportWarning(const std::wstring& text) - { - procCallback_.reportWarning(text, warningSyncDatabase_); - } - private: - bool& warningSyncDatabase_; - ProcessCallback& procCallback_; - } redetCallback(m_warnings.warningSyncDatabase, procCallback); - - zen::redetermineSyncDirection(fpCfg.directionCfg, *j, &redetCallback); + procCallback.reportStatus(_("Preparing synchronization...")); + procCallback.forceUiRefresh(); + zen::redetermineSyncDirection(fpCfg.directionCfg, *j, + [&](const std::wstring& warning) { procCallback.reportWarning(warning, m_warnings.warningSyncDatabase); }); } //only if everything was processed correctly output is written to! @@ -706,8 +693,8 @@ void linearMerge(const MapType& mapLeft, const MapType& mapRight, ProcessLeftOnl auto iterLeft = mapLeft .begin(); auto iterRight = mapRight.begin(); - auto finishLeft = [&]() { std::for_each(iterLeft, mapLeft .end(), lo); }; - auto finishRight = [&]() { std::for_each(iterRight, mapRight.end(), ro); }; + auto finishLeft = [&] { std::for_each(iterLeft, mapLeft .end(), lo); }; + auto finishRight = [&] { std::for_each(iterRight, mapRight.end(), ro); }; if (iterLeft == mapLeft .end()) return finishRight(); if (iterRight == mapRight.end()) return finishLeft(); @@ -845,6 +832,7 @@ void CompareProcess::performComparison(const FolderPairCfg& fpCfg, const DirectoryValue& bufValueRight = getDirValue(fpCfg.rightDirectoryFmt); procCallback.reportStatus(_("Generating file list...")); + procCallback.forceUiRefresh(); //PERF_START; MergeSides(undefinedFiles, undefinedLinks).execute(bufValueLeft.dirCont, bufValueRight.dirCont, output); diff --git a/comparison.h b/comparison.h index f3226e90..747f4230 100644 --- a/comparison.h +++ b/comparison.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 COMPARISON_H_INCLUDED diff --git a/file_hierarchy.cpp b/file_hierarchy.cpp index 987713cb..769ad74f 100644 --- a/file_hierarchy.cpp +++ b/file_hierarchy.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 "file_hierarchy.h" @@ -38,7 +38,7 @@ namespace SyncOperation proposedSyncOperation(CompareFilesResult cmpResult, bool selectedForSynchronization, SyncDirection syncDir, - const std::wstring& syncDirConflict) + bool haveDirConflict) //perf: std::wstring was wasteful here { if (!selectedForSynchronization) return cmpResult == FILE_EQUAL ? @@ -55,7 +55,7 @@ SyncOperation proposedSyncOperation(CompareFilesResult cmpResult, case SYNC_DIR_RIGHT: return SO_CREATE_NEW_RIGHT; //copy files to right case SYNC_DIR_NONE: - return syncDirConflict.empty() ? SO_DO_NOTHING : SO_UNRESOLVED_CONFLICT; + return haveDirConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING; } break; @@ -67,7 +67,7 @@ SyncOperation proposedSyncOperation(CompareFilesResult cmpResult, case SYNC_DIR_RIGHT: return SO_DELETE_RIGHT; //delete files on right case SYNC_DIR_NONE: - return syncDirConflict.empty() ? SO_DO_NOTHING : SO_UNRESOLVED_CONFLICT; + return haveDirConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING; } break; @@ -82,7 +82,7 @@ SyncOperation proposedSyncOperation(CompareFilesResult cmpResult, case SYNC_DIR_RIGHT: return SO_OVERWRITE_RIGHT; //copy from left to right case SYNC_DIR_NONE: - return syncDirConflict.empty() ? SO_DO_NOTHING : SO_UNRESOLVED_CONFLICT; + return haveDirConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING; } break; @@ -94,7 +94,7 @@ SyncOperation proposedSyncOperation(CompareFilesResult cmpResult, case SYNC_DIR_RIGHT: return SO_COPY_METADATA_TO_RIGHT; case SYNC_DIR_NONE: - return syncDirConflict.empty() ? SO_DO_NOTHING : SO_UNRESOLVED_CONFLICT; + return haveDirConflict ? SO_UNRESOLVED_CONFLICT : SO_DO_NOTHING; } break; @@ -119,7 +119,7 @@ bool hasDirectChild(const HierarchyObject& hierObj, Predicate p) SyncOperation FileSystemObject::testSyncOperation(SyncDirection testSyncDir, bool active) const { - return proposedSyncOperation(getCategory(), active, testSyncDir, getSyncOpConflict()); + return proposedSyncOperation(getCategory(), active, testSyncDir, syncDirConflict.get() != NULL); } @@ -307,7 +307,7 @@ std::wstring zen::getSyncOpDescription(SyncOperation op) case SO_COPY_METADATA_TO_RIGHT: return _("Copy file attributes only to right"); case SO_UNRESOLVED_CONFLICT: //not used on GUI, but in .csv - _("Conflict/file cannot be categorized"); + return _("Conflict/file cannot be categorized"); } assert(false); return std::wstring(); diff --git a/file_hierarchy.h b/file_hierarchy.h index f48c4a1a..5ad0a2a0 100644 --- a/file_hierarchy.h +++ b/file_hierarchy.h @@ -1,24 +1,22 @@ // ************************************************************************** // * 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 FILEHIERARCHY_H_INCLUDED #define FILEHIERARCHY_H_INCLUDED #include -#include #include -#include #include #include #include +#include #include "structures.h" #include #include #include "structures.h" -//#include "lib/hard_filter.h" namespace zen @@ -222,7 +220,13 @@ public: bool dirExistsLeft, const Zstring& dirPostfixedRight, bool dirExistsRight) : +#ifdef _MSC_VER +#pragma warning(disable : 4355) //"The this pointer is valid only within nonstatic member functions. It cannot be used in the initializer list for a base class." +#endif HierarchyObject(Zstring(), *this), +#ifdef _MSC_VER +#pragma warning(default : 4355) +#endif baseDirPfL(dirPostfixedLeft), baseDirPfR(dirPostfixedRight), dirExistsLeft_(dirExistsLeft), @@ -300,32 +304,28 @@ template class ObjectMgr { public: - typedef const ObjectMgr* ObjectID; + typedef ObjectMgr* ObjectId; + typedef const ObjectMgr* ObjectIdConst; - ObjectID getId() { activeObjects().insert(this); return this; } - //unfortunately we need to keep this method non-const to get non-const "this" pointer - //we could instead put this into the constructor, but temporaries created by STL could lead to some overhead + ObjectIdConst getId() const { return this; } + /**/ ObjectId getId() { return this; } - static T* retrieve(ObjectID id) //returns NULL if object is not valid anymore + static const T* retrieve(ObjectIdConst id) //returns NULL if object is not valid anymore { - auto iter = activeObjects().find(const_cast(id)); - return static_cast(iter == activeObjects().end() ? NULL : *iter); //static down-cast + auto iter = activeObjects().find(id); + return static_cast(iter == activeObjects().end() ? NULL : *iter); } + static T* retrieve(ObjectId id) { return const_cast(retrieve(static_cast(id))); } protected: - ObjectMgr() {} - ~ObjectMgr() { activeObjects().erase(this); } + ObjectMgr () { activeObjects().insert(this); } + ~ObjectMgr() { activeObjects().erase (this); } private: ObjectMgr(const ObjectMgr& rhs); // ObjectMgr& operator=(const ObjectMgr& rhs); //it's not well-defined what coping an objects means regarding object-identity in this context -#if defined _MSC_VER && _MSC_VER <= 1600 //VS2010 performance bug in std::unordered_set<>: http://drdobbs.com/blogs/cpp/232200410 -> should be fixed in VS11 - //compiler macros: http://predef.sourceforge.net/precomp.html - static std::set& activeObjects() { static std::set inst; return inst; } -#else - static std::unordered_set& activeObjects() { static std::unordered_set inst; return inst; } //external linkage (even in header file!) -#endif + static zen::hash_set& activeObjects() { static zen::hash_set inst; return inst; } //external linkage (even in header file!) }; //------------------------------------------------------------------ @@ -484,8 +484,8 @@ public: template FileId getFileId () const; template const Zstring getExtension() const; - void setMoveRef(ObjectID refId) { moveFileRef = refId; } //reference to corresponding renamed file - ObjectID getMoveRef() const { return moveFileRef; } //may be NULL + void setMoveRef(ObjectId refId) { moveFileRef = refId; } //reference to corresponding renamed file + ObjectId getMoveRef() const { return moveFileRef; } //may be NULL virtual CompareFilesResult getCategory() const; virtual std::wstring getCatConflict() const; @@ -512,7 +512,7 @@ private: FileDescriptor dataLeft; FileDescriptor dataRight; - ObjectID moveFileRef; + ObjectId moveFileRef; }; //------------------------------------------------------------------ diff --git a/lib/IFileOperation/dll_main.cpp b/lib/IFileOperation/dll_main.cpp index 3805c99d..46c65311 100644 --- a/lib/IFileOperation/dll_main.cpp +++ b/lib/IFileOperation/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/lib/IFileOperation/file_op.cpp b/lib/IFileOperation/file_op.cpp index fca802f0..8024ab91 100644 --- a/lib/IFileOperation/file_op.cpp +++ b/lib/IFileOperation/file_op.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 "file_op.h" diff --git a/lib/IFileOperation/file_op.h b/lib/IFileOperation/file_op.h index c33993ad..530226d3 100644 --- a/lib/IFileOperation/file_op.h +++ b/lib/IFileOperation/file_op.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 RECYCLER_DLL_H diff --git a/lib/ShadowCopy/LockFile.cpp b/lib/ShadowCopy/LockFile.cpp index 7df3ec66..523b01bb 100644 --- a/lib/ShadowCopy/LockFile.cpp +++ b/lib/ShadowCopy/LockFile.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/lib/ShadowCopy/dll_main.cpp b/lib/ShadowCopy/dll_main.cpp index 3805c99d..46c65311 100644 --- a/lib/ShadowCopy/dll_main.cpp +++ b/lib/ShadowCopy/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/lib/ShadowCopy/shadow.cpp b/lib/ShadowCopy/shadow.cpp index 5047a698..fc95381d 100644 --- a/lib/ShadowCopy/shadow.cpp +++ b/lib/ShadowCopy/shadow.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 "shadow.h" @@ -46,6 +46,35 @@ struct shadow::ShadowData namespace { +std::wstring formatVssError(HRESULT hr) //at least the one's from IVssBackupComponents::AddToSnapshotSet; return empty if no format found +{ + switch (hr) + { + case VSS_E_BAD_STATE: + return L"VSS_E_BAD_STATE"; + case VSS_E_MAXIMUM_NUMBER_OF_VOLUMES_REACHED: + return L"VSS_E_MAXIMUM_NUMBER_OF_VOLUMES_REACHED"; + case VSS_E_MAXIMUM_NUMBER_OF_SNAPSHOTS_REACHED: + return L"VSS_E_MAXIMUM_NUMBER_OF_SNAPSHOTS_REACHED"; + case VSS_E_OBJECT_NOT_FOUND: + return L"VSS_E_OBJECT_NOT_FOUND"; + case VSS_E_PROVIDER_NOT_REGISTERED: + return L"VSS_E_PROVIDER_NOT_REGISTERED"; + case VSS_E_PROVIDER_VETO: + return L"VSS_E_PROVIDER_VETO"; + case VSS_E_VOLUME_NOT_SUPPORTED: + return L"VSS_E_VOLUME_NOT_SUPPORTED"; + case VSS_E_VOLUME_NOT_SUPPORTED_BY_PROVIDER: + return L"VSS_E_VOLUME_NOT_SUPPORTED_BY_PROVIDER"; + case VSS_E_UNEXPECTED_PROVIDER_ERROR: + return L"VSS_E_UNEXPECTED_PROVIDER_ERROR"; + default: + return std::wstring(); + } +} + + + inline void copyString(const std::wstring& input, wchar_t* buffer, size_t bufferSize) { @@ -92,7 +121,7 @@ shadow::ShadowData createShadowCopy(const wchar_t* volumeName) //throw ComError VSS_ID snapshotSetId = {}; ZEN_CHECK_COM(backupComp->StartSnapshotSet(&snapshotSetId)); - ScopeGuard guardSnapShot = makeGuard([&]() { backupComp->AbortBackup(); }); + ScopeGuard guardSnapShot = makeGuard([&] { backupComp->AbortBackup(); }); //Quote: "This method must be called if a backup operation terminates after the creation of a //shadow copy set with "StartSnapshotSet" and before "DoSnapshotSet" returns." @@ -103,7 +132,11 @@ shadow::ShadowData createShadowCopy(const wchar_t* volumeName) //throw ComError { if (hr == VSS_E_VOLUME_NOT_SUPPORTED) throw ComError(L"Volume Shadow Copy Service is not supported on this volume!"); - throw ComError(L"Error calling \"backupComp->AddToSnapshotSet\".", hr); + const std::wstring vssError = formatVssError(hr); + if (!vssError.empty()) + throw ComError(L"Error calling \"backupComp->AddToSnapshotSet\": " + vssError); + else + throw ComError(L"Error calling \"backupComp->AddToSnapshotSet\".", hr); } } diff --git a/lib/ShadowCopy/shadow.h b/lib/ShadowCopy/shadow.h index 68b7141f..ea113dae 100644 --- a/lib/ShadowCopy/shadow.h +++ b/lib/ShadowCopy/shadow.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 SHADOWCOPY_H diff --git a/lib/Thumbnail/dll_main.cpp b/lib/Thumbnail/dll_main.cpp index 3805c99d..46c65311 100644 --- a/lib/Thumbnail/dll_main.cpp +++ b/lib/Thumbnail/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/lib/Thumbnail/thumbnail.cpp b/lib/Thumbnail/thumbnail.cpp index c3d22cbd..050251de 100644 --- a/lib/Thumbnail/thumbnail.cpp +++ b/lib/Thumbnail/thumbnail.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 "thumbnail.h" diff --git a/lib/Thumbnail/thumbnail.h b/lib/Thumbnail/thumbnail.h index 3feec275..7e11812c 100644 --- a/lib/Thumbnail/thumbnail.h +++ b/lib/Thumbnail/thumbnail.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/lib/binary.cpp b/lib/binary.cpp index 4fdf8899..1da93ee6 100644 --- a/lib/binary.cpp +++ b/lib/binary.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 "binary.h" diff --git a/lib/binary.h b/lib/binary.h index 111af249..1fcfdf57 100644 --- a/lib/binary.h +++ b/lib/binary.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 BINARY_H_INCLUDED diff --git a/lib/custom_grid.cpp b/lib/custom_grid.cpp deleted file mode 100644 index 92f3b718..00000000 --- a/lib/custom_grid.cpp +++ /dev/null @@ -1,2422 +0,0 @@ -// ************************************************************************** -// * 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) * -// ************************************************************************** - -#include "custom_grid.h" -#include "resources.h" -#include -#include -#include -#include "resources.h" -#include -#include "../ui/grid_view.h" -#include "../synchronization.h" -#include -#include -#include -#include - -#ifdef FFS_WIN -#include -#include "status_handler.h" -#include - -#elif defined FFS_LINUX -#include -#endif - -using namespace zen; - - -const size_t MIN_ROW_COUNT = 15; - -//class containing pure grid data: basically the same as wxGridStringTable, but adds cell formatting - -/* -class hierarchy: - CustomGridTable - /|\ - ________________|________________ - | | - CustomGridTableRim | - /|\ | - __________|__________ | - | | | -CustomGridTableLeft CustomGridTableRight CustomGridTableMiddle -*/ - -class CustomGridTable : public wxGridTableBase -{ -public: - CustomGridTable(int initialRows = 0, int initialCols = 0) : //note: initialRows/initialCols MUST match with GetNumberRows()/GetNumberCols() at initialization!!! - wxGridTableBase(), - gridDataView(NULL), - lastNrRows(initialRows), - lastNrCols(initialCols) {} - - - virtual ~CustomGridTable() {} - - - void setGridDataTable(const GridView* view) - { - this->gridDataView = view; - } - - - //########################################################################### - //grid standard input output methods, redirected directly to gridData to improve performance - - virtual int GetNumberRows() - { - if (gridDataView) - return static_cast(std::max(gridDataView->rowsOnView(), MIN_ROW_COUNT)); - else - return 0; //grid is initialized with zero number of rows - } - - - virtual bool IsEmptyCell(int row, int col) - { - return false; //avoid overlapping cells - - //return (GetValue(row, col) == wxEmptyString); - } - - - virtual void SetValue(int row, int col, const wxString& value) - { - assert (false); //should not be used, since values are retrieved directly from gridDataView - } - - //update dimensions of grid: no need for InsertRows(), AppendRows(), DeleteRows() anymore!!! - void updateGridSizes() - { - const int currentNrRows = GetNumberRows(); - - if (lastNrRows < currentNrRows) - { - if (GetView()) - { - wxGridTableMessage msg(this, - wxGRIDTABLE_NOTIFY_ROWS_APPENDED, - currentNrRows - lastNrRows); - - GetView()->ProcessTableMessage( msg ); - } - } - else if (lastNrRows > currentNrRows) - { - if (GetView()) - { - wxGridTableMessage msg(this, - wxGRIDTABLE_NOTIFY_ROWS_DELETED, - 0, - lastNrRows - currentNrRows); - - GetView()->ProcessTableMessage( msg ); - } - } - lastNrRows = currentNrRows; - - const int currentNrCols = GetNumberCols(); - - if (lastNrCols < currentNrCols) - { - if (GetView()) - { - wxGridTableMessage msg(this, - wxGRIDTABLE_NOTIFY_COLS_APPENDED, - currentNrCols - lastNrCols); - - GetView()->ProcessTableMessage( msg ); - } - } - else if (lastNrCols > currentNrCols) - { - if (GetView()) - { - wxGridTableMessage msg(this, - wxGRIDTABLE_NOTIFY_COLS_DELETED, - 0, - lastNrCols - currentNrCols); - - GetView()->ProcessTableMessage( msg ); - } - } - lastNrCols = currentNrCols; - } - //########################################################################### - - - virtual wxGridCellAttr* GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) - { - const std::pair color = getRowColor(row); - - //add color to some rows - wxGridCellAttr* result = wxGridTableBase::GetAttr(row, col, kind); - if (result) - { - if (result->GetTextColour() == color.first && - result->GetBackgroundColour() == color.second) - { - return result; - } - else //grid attribute might be referenced by other elements, so clone it! - { - wxGridCellAttr* attr = result->Clone(); //attr has ref-count 1 - result->DecRef(); - result = attr; - } - } - else - result = new wxGridCellAttr; //created with ref-count 1 - - result->SetTextColour (color.first); - result->SetBackgroundColour(color.second); - - return result; - } - - - const FileSystemObject* getRawData(size_t row) const - { - if (gridDataView) - return gridDataView->getObject(row); //returns NULL if request is not valid or not data found - - return NULL; - } - -protected: - static const wxColour COLOR_BLUE; - static const wxColour COLOR_GREY; - static const wxColour COLOR_ORANGE; - static const wxColour COLOR_CMP_RED; - static const wxColour COLOR_CMP_BLUE; - static const wxColour COLOR_CMP_GREEN; - static const wxColour COLOR_SYNC_BLUE; - static const wxColour COLOR_SYNC_BLUE_LIGHT; - static const wxColour COLOR_SYNC_GREEN; - static const wxColour COLOR_SYNC_GREEN_LIGHT; - static const wxColour COLOR_YELLOW; - static const wxColour COLOR_YELLOW_LIGHT; - - const GridView* gridDataView; //(very fast) access to underlying grid data :) - -private: - virtual const std::pair getRowColor(int row) = 0; //rows that are filtered out are shown in different color: - - int lastNrRows; - int lastNrCols; -}; - -//see http://www.latiumsoftware.com/en/articles/00015.php#12 for "safe" colors -const wxColour CustomGridTable::COLOR_ORANGE( 238, 201, 0); -const wxColour CustomGridTable::COLOR_BLUE( 80, 110, 255); -const wxColour CustomGridTable::COLOR_GREY( 212, 208, 200); -const wxColour CustomGridTable::COLOR_CMP_RED( 249, 163, 165); -const wxColour CustomGridTable::COLOR_CMP_BLUE( 144, 232, 246); -const wxColour CustomGridTable::COLOR_CMP_GREEN( 147, 253, 159); -const wxColour CustomGridTable::COLOR_SYNC_BLUE( 201, 203, 247); -const wxColour CustomGridTable::COLOR_SYNC_BLUE_LIGHT(201, 225, 247); -const wxColour CustomGridTable::COLOR_SYNC_GREEN(197, 248, 190); -const wxColour CustomGridTable::COLOR_SYNC_GREEN_LIGHT(226, 248, 190); -const wxColour CustomGridTable::COLOR_YELLOW( 247, 252, 62); -const wxColour CustomGridTable::COLOR_YELLOW_LIGHT(253, 252, 169); - - -class CustomGridTableRim : public CustomGridTable -{ -public: - virtual ~CustomGridTableRim() {} - - virtual int GetNumberCols() - { - return static_cast(columnPositions.size()); - } - - virtual wxString GetColLabelValue( int col ) - { - return CustomGridRim::getTypeName(getTypeAtPos(col)); - } - - - void setupColumns(const std::vector& positions) - { - columnPositions = positions; - updateGridSizes(); //add or remove columns - } - - - xmlAccess::ColumnTypes getTypeAtPos(size_t pos) const - { - if (pos < columnPositions.size()) - return columnPositions[pos]; - else - return xmlAccess::DIRECTORY; - } - - //get filename in order to retrieve the icon from it - virtual Zstring getIconFile(size_t row) const = 0; //return "folder" if row points to a folder - -protected: - template - wxString GetValueSub(int row, int col) - { - const FileSystemObject* fsObj = getRawData(row); - if (fsObj) - { - struct GetTextValue : public FSObjectVisitor - { - GetTextValue(xmlAccess::ColumnTypes colType, const FileSystemObject& fso) : colType_(colType), fsObj_(fso) {} - virtual void visit(const FileMapping& fileObj) - { - switch (colType_) - { - case xmlAccess::FULL_PATH: - value = toWx(beforeLast(fileObj.getFullName(), FILE_NAME_SEPARATOR)); - break; - case xmlAccess::FILENAME: //filename - value = toWx(fileObj.getShortName()); - break; - case xmlAccess::REL_PATH: //relative path - value = toWx(beforeLast(fileObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found - break; - case xmlAccess::DIRECTORY: - value = toWx(fileObj.getBaseDirPf()); - break; - case xmlAccess::SIZE: //file size - if (!fsObj_.isEmpty()) - value = zen::toStringSep(fileObj.getFileSize()); - break; - case xmlAccess::DATE: //date - if (!fsObj_.isEmpty()) - value = zen::utcToLocalTimeString(fileObj.getLastWriteTime()); - break; - case xmlAccess::EXTENSION: //file extension - value = toWx(fileObj.getExtension()); - break; - } - } - - virtual void visit(const SymLinkMapping& linkObj) - { - switch (colType_) - { - case xmlAccess::FULL_PATH: - value = toWx(beforeLast(linkObj.getFullName(), FILE_NAME_SEPARATOR)); - break; - case xmlAccess::FILENAME: //filename - value = toWx(linkObj.getShortName()); - break; - case xmlAccess::REL_PATH: //relative path - value = toWx(beforeLast(linkObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found - break; - case xmlAccess::DIRECTORY: - value = toWx(linkObj.getBaseDirPf()); - break; - case xmlAccess::SIZE: //file size - if (!fsObj_.isEmpty()) - value = _(""); - break; - case xmlAccess::DATE: //date - if (!fsObj_.isEmpty()) - value = zen::utcToLocalTimeString(linkObj.getLastWriteTime()); - break; - case xmlAccess::EXTENSION: //file extension - value = wxEmptyString; - break; - } - } - - virtual void visit(const DirMapping& dirObj) - { - switch (colType_) - { - case xmlAccess::FULL_PATH: - value = toWx(dirObj.getFullName()); - break; - case xmlAccess::FILENAME: - value = toWx(dirObj.getShortName()); - break; - case xmlAccess::REL_PATH: - value = toWx(beforeLast(dirObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found - break; - case xmlAccess::DIRECTORY: - value = toWx(dirObj.getBaseDirPf()); - break; - case xmlAccess::SIZE: //file size - if (!fsObj_.isEmpty()) - value = _(""); - break; - case xmlAccess::DATE: //date - if (!fsObj_.isEmpty()) - value = wxEmptyString; - break; - case xmlAccess::EXTENSION: //file extension - value = wxEmptyString; - break; - } - } - xmlAccess::ColumnTypes colType_; - wxString value; - - const FileSystemObject& fsObj_; - } getVal(getTypeAtPos(col), *fsObj); - fsObj->accept(getVal); - return getVal.value; - } - //if data is not found: - return wxEmptyString; - } - - template - Zstring getIconFileImpl(size_t row) const //return "folder" if row points to a folder - { - const FileSystemObject* fsObj = getRawData(row); - if (fsObj && !fsObj->isEmpty()) - { - struct GetIcon : public FSObjectVisitor - { - virtual void visit(const FileMapping& fileObj) - { - //Optimization: if filename exists on both sides, always use left side's file - //if (!fileObj.isEmpty() && !fileObj.isEmpty()) - // iconName = fileObj.getFullName(); - //else -> now with thumbnails this isn't viable anymore - iconName = fileObj.getFullName(); - } - virtual void visit(const SymLinkMapping& linkObj) - { - iconName = linkObj.getLinkType() == LinkDescriptor::TYPE_DIR ? - Zstr("folder") : - linkObj.getFullName(); - } - virtual void visit(const DirMapping& dirObj) - { - iconName = Zstr("folder"); - } - - Zstring iconName; - } getIcon; - fsObj->accept(getIcon); - return getIcon.iconName; - } - - return Zstring(); - } - - -private: - virtual const std::pair getRowColor(int row) //rows that are filtered out are shown in different color: - { - std::pair result(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), - wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); - - const FileSystemObject* fsObj = getRawData(row); - if (fsObj) - { - //mark filtered rows - if (!fsObj->isActive()) - { - result.first = *wxBLACK; - result.second = COLOR_BLUE; - } - else - { - //mark directories and symlinks - struct GetRowColor : public FSObjectVisitor - { - GetRowColor(wxColour& foreground, wxColour& background) : foreground_(foreground), background_(background) {} - - virtual void visit(const FileMapping& fileObj) {} - virtual void visit(const SymLinkMapping& linkObj) - { - foreground_ = *wxBLACK; - background_ = COLOR_ORANGE; - } - virtual void visit(const DirMapping& dirObj) - { - foreground_ = *wxBLACK; - background_ = COLOR_GREY; - } - - private: - wxColour& foreground_; - wxColour& background_; - } getCol(result.first, result.second); - fsObj->accept(getCol); - } - } - - return result; - } - - std::vector columnPositions; -}; - - -class CustomGridTableLeft : public CustomGridTableRim -{ -public: - - virtual wxString GetValue(int row, int col) - { - return CustomGridTableRim::GetValueSub(row, col); - } - - virtual Zstring getIconFile(size_t row) const //return "folder" if row points to a folder - { - return getIconFileImpl(row); - } -}; - - -class CustomGridTableRight : public CustomGridTableRim -{ -public: - virtual wxString GetValue(int row, int col) - { - return CustomGridTableRim::GetValueSub(row, col); - } - - virtual Zstring getIconFile(size_t row) const //return "folder" if row points to a folder - { - return getIconFileImpl(row); - } -}; - - -class CustomGridTableMiddle : public CustomGridTable -{ -public: - //middle grid is created (first wxWidgets internal call to GetNumberCols()) with one column - CustomGridTableMiddle() : - CustomGridTable(0, GetNumberCols()), //attention: static binding to virtual GetNumberCols() in a Constructor! - syncPreviewActive(false) {} - - virtual int GetNumberCols() - { - return 1; - } - - virtual wxString GetColLabelValue( int col ) - { - return wxEmptyString; - } - - virtual wxString GetValue(int row, int col) //method used for exporting .csv file only! - { - const FileSystemObject* fsObj = getRawData(row); - if (fsObj) - { - if (syncPreviewActive) //synchronization preview - return getSymbol(fsObj->getSyncOperation()); - else - return getSymbol(fsObj->getCategory()); - } - return wxEmptyString; - } - - void enableSyncPreview(bool value) - { - syncPreviewActive = value; - } - - bool syncPreviewIsActive() const - { - return syncPreviewActive; - } - -private: - virtual const std::pair getRowColor(int row) //rows that are filtered out are shown in different color: - { - std::pair result(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), - wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); - - const FileSystemObject* fsObj = getRawData(row); - if (fsObj) - { - //mark filtered rows - if (!fsObj->isActive()) - { - result.first = *wxBLACK;; - result.second = COLOR_BLUE; - } - 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: - result.first = *wxBLACK; - result.second = COLOR_SYNC_BLUE; - break; - // result.second = COLOR_SYNC_BLUE_LIGHT; - break; - 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: - result.first = *wxBLACK; - result.second = COLOR_SYNC_GREEN; - break; - // result.second = COLOR_SYNC_GREEN_LIGHT; - case SO_UNRESOLVED_CONFLICT: - result.first = *wxBLACK; - result.second = COLOR_YELLOW; - break; - } - } - else //comparison results view - { - switch (fsObj->getCategory()) - { - case FILE_LEFT_SIDE_ONLY: - case FILE_LEFT_NEWER: - result.first = *wxBLACK; - result.second = COLOR_SYNC_BLUE; //COLOR_CMP_BLUE; - break; - - case FILE_RIGHT_SIDE_ONLY: - case FILE_RIGHT_NEWER: - result.first = *wxBLACK; - result.second = COLOR_SYNC_GREEN; //COLOR_CMP_GREEN; - break; - case FILE_DIFFERENT: - result.first = *wxBLACK; - result.second = COLOR_CMP_RED; - break; - case FILE_EQUAL: - break;//usually white - case FILE_CONFLICT: - result.first = *wxBLACK; - result.second = COLOR_YELLOW; - break; - case FILE_DIFFERENT_METADATA: - result.first = *wxBLACK; - result.second = COLOR_YELLOW_LIGHT; - break; - } - } - } - } - - return result; - } - - bool syncPreviewActive; //determines wheter grid shall show compare result or sync preview -}; - -//######################################################################################################## - - -CustomGrid::CustomGrid(wxWindow* parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) : - wxGrid(parent, id, pos, size, style, name), - m_gridLeft(NULL), - m_gridMiddle(NULL), - m_gridRight(NULL), - isLeading(false), - m_marker(-1, ASCENDING) -{ - //wxColour darkBlue(40, 35, 140); -> user default colors instead! - //SetSelectionBackground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)); - //SetSelectionForeground(*wxWHITE); -} - - -void CustomGrid::initSettings(CustomGridLeft* gridLeft, - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const GridView* gridDataView) -{ - assert(this == gridLeft || this == gridRight || this == gridMiddle); - - //these grids will scroll together - m_gridLeft = gridLeft; - m_gridRight = gridRight; - m_gridMiddle = gridMiddle; - - //enhance grid functionality; identify leading grid by keyboard input or scroll action - Connect(wxEVT_KEY_DOWN, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_TOP, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_BOTTOM, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_LINEUP, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_LINEDOWN, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_PAGEUP, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_PAGEDOWN, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_THUMBTRACK, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SCROLLWIN_THUMBRELEASE, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_GRID_LABEL_LEFT_CLICK, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - Connect(wxEVT_SET_FOCUS, wxEventHandler(CustomGrid::onGridAccess), NULL, this); //used by grid text-search - GetGridWindow()->Connect(wxEVT_LEFT_DOWN, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - GetGridWindow()->Connect(wxEVT_RIGHT_DOWN, wxEventHandler(CustomGrid::onGridAccess), NULL, this); - - GetGridWindow()->Connect(wxEVT_ENTER_WINDOW, wxEventHandler(CustomGrid::adjustGridHeights), NULL, this); - - //parallel grid scrolling: do NOT use DoPrepareDC() to align grids! GDI resource leak! Use regular paint event instead: - GetGridWindow()->Connect(wxEVT_PAINT, wxEventHandler(CustomGrid::OnPaintGrid), NULL, this); -} - - -void CustomGrid::release() //release connection to zen::GridView -{ - assert(getGridDataTable()); - getGridDataTable()->setGridDataTable(NULL); //kind of "disable" griddatatable; don't delete it with SetTable(NULL)! May be used by wxGridCellStringRenderer -} - - -bool CustomGrid::isLeadGrid() const -{ - return isLeading; -} - - -void CustomGrid::setIconManager(const std::shared_ptr& iconBuffer) -{ - if (iconBuffer.get()) - SetDefaultRowSize(iconBuffer->getSize() + 1, true); //+ 1 for line between rows - else - SetDefaultRowSize(IconBuffer(IconBuffer::SIZE_SMALL).getSize() + 1, true); //currently iconBuffer is always bound, but we may use it as a "no icon" status at some time... - - enableFileIcons(iconBuffer); - Refresh(); -} - - -void CustomGrid::RefreshCell(int row, int col) -{ - wxRect rectScrolled(CellToRect(row, col)); - //use: wxRect rect = CellToRect( row, col ); ? - CalcScrolledPosition(rectScrolled.x, rectScrolled.y, &rectScrolled.x, &rectScrolled.y); - - GetGridWindow()->RefreshRect(rectScrolled); //note: CellToRect() and YToRow work on m_gridWindow NOT on the whole grid! -} - - -void CustomGrid::OnPaintGrid(wxEvent& event) -{ - if (isLeadGrid()) //avoid back coupling - alignOtherGrids(m_gridLeft, m_gridMiddle, m_gridRight); //scroll other grids - event.Skip(); -} - - -void moveCursorWhileSelecting(int anchor, int oldPos, int newPos, wxGrid* grid) -{ - //note: all positions are valid in this context! - - grid->SetGridCursor( newPos, grid->GetGridCursorCol()); - grid->MakeCellVisible(newPos, grid->GetGridCursorCol()); - - if (oldPos < newPos) - { - for (int i = oldPos; i < std::min(anchor, newPos); ++i) - grid->DeselectRow(i); //remove selection - - for (int i = std::max(oldPos, anchor); i <= newPos; ++i) - grid->SelectRow(i, true); //add to selection - } - else - { - for (int i = std::max(newPos, anchor) + 1; i <= oldPos; ++i) - grid->DeselectRow(i); //remove selection - - for (int i = newPos; i <= std::min(oldPos, anchor); ++i) - grid->SelectRow(i, true); //add to selection - } -} - - -void execGridCommands(wxEvent& event, wxGrid* grid) -{ - static int anchorRow = 0; - if (grid->GetNumberRows() == 0 || - grid->GetNumberCols() == 0) - return; - - const wxKeyEvent* keyEvent = dynamic_cast (&event); - if (keyEvent) - { - //ensure cursorOldPos is always a valid row! - const int cursorOldPos = std::max(std::min(grid->GetGridCursorRow(), grid->GetNumberRows() - 1), 0); - const int cursorOldColumn = std::max(std::min(grid->GetGridCursorCol(), grid->GetNumberCols() - 1), 0); - - const bool shiftPressed = keyEvent->ShiftDown(); - const bool ctrlPressed = keyEvent->ControlDown(); - const int keyCode = keyEvent->GetKeyCode(); - - //SHIFT + X - if (shiftPressed) - switch (keyCode) - { - case WXK_UP: - case WXK_NUMPAD_UP: - { - const int cursorNewPos = std::max(cursorOldPos - 1, 0); - moveCursorWhileSelecting(anchorRow, cursorOldPos, cursorNewPos, grid); - return; //no event.Skip() - } - case WXK_DOWN: - case WXK_NUMPAD_DOWN: - { - const int cursorNewPos = std::min(cursorOldPos + 1, grid->GetNumberRows() - 1); - moveCursorWhileSelecting(anchorRow, cursorOldPos, cursorNewPos, grid); - return; //no event.Skip() - } - case WXK_LEFT: - case WXK_NUMPAD_LEFT: - { - const int cursorColumn = std::max(cursorOldColumn - 1, 0); - grid->SetGridCursor(cursorOldPos, cursorColumn); - grid->MakeCellVisible(cursorOldPos, cursorColumn); - return; //no event.Skip() - } - case WXK_RIGHT: - case WXK_NUMPAD_RIGHT: - { - const int cursorColumn = std::min(cursorOldColumn + 1, grid->GetNumberCols() - 1); - grid->SetGridCursor(cursorOldPos, cursorColumn); - grid->MakeCellVisible(cursorOldPos, cursorColumn); - return; //no event.Skip() - } - case WXK_PAGEUP: - case WXK_NUMPAD_PAGEUP: - { - const int rowsPerPage = grid->GetGridWindow()->GetSize().GetHeight() / grid->GetDefaultRowSize(); - const int cursorNewPos = std::max(cursorOldPos - rowsPerPage, 0); - moveCursorWhileSelecting(anchorRow, cursorOldPos, cursorNewPos, grid); - return; //no event.Skip() - } - case WXK_PAGEDOWN: - case WXK_NUMPAD_PAGEDOWN: - { - const int rowsPerPage = grid->GetGridWindow()->GetSize().GetHeight() / grid->GetDefaultRowSize(); - const int cursorNewPos = std::min(cursorOldPos + rowsPerPage, grid->GetNumberRows() - 1); - moveCursorWhileSelecting(anchorRow, cursorOldPos, cursorNewPos, grid); - return; //no event.Skip() - } - case WXK_HOME: - case WXK_NUMPAD_HOME: - { - const int cursorNewPos = 0; - moveCursorWhileSelecting(anchorRow, cursorOldPos, cursorNewPos, grid); - return; //no event.Skip() - } - case WXK_END: - case WXK_NUMPAD_END: - { - const int cursorNewPos = grid->GetNumberRows() - 1; - moveCursorWhileSelecting(anchorRow, cursorOldPos, cursorNewPos, grid); - return; //no event.Skip() - } - } - - //CTRL + X - if (ctrlPressed) - switch (keyCode) - { - case WXK_UP: - case WXK_NUMPAD_UP: - { - grid->SetGridCursor(0, grid->GetGridCursorCol()); - grid->MakeCellVisible(0, grid->GetGridCursorCol()); - return; //no event.Skip() - } - case WXK_DOWN: - case WXK_NUMPAD_DOWN: - { - grid->SetGridCursor(grid->GetNumberRows() - 1, grid->GetGridCursorCol()); - grid->MakeCellVisible(grid->GetNumberRows() - 1, grid->GetGridCursorCol()); - return; //no event.Skip() - } - case WXK_LEFT: - case WXK_NUMPAD_LEFT: - { - grid->SetGridCursor(grid->GetGridCursorRow(), 0); - grid->MakeCellVisible(grid->GetGridCursorRow(), 0); - return; //no event.Skip() - } - case WXK_RIGHT: - case WXK_NUMPAD_RIGHT: - { - grid->SetGridCursor(grid->GetGridCursorRow(), grid->GetNumberCols() - 1); - grid->MakeCellVisible(grid->GetGridCursorRow(), grid->GetNumberCols() - 1); - return; //no event.Skip() - } - } - - //button with or without control keys pressed - switch (keyCode) - { - case WXK_HOME: - case WXK_NUMPAD_HOME: - { - grid->SetGridCursor(0, grid->GetGridCursorCol()); - grid->MakeCellVisible(0, grid->GetGridCursorCol()); - return; //no event.Skip() - } - case WXK_END: - case WXK_NUMPAD_END: - { - grid->SetGridCursor(grid->GetNumberRows() - 1, grid->GetGridCursorCol()); - grid->MakeCellVisible(grid->GetNumberRows() - 1, grid->GetGridCursorCol()); - return; //no event.Skip() - } - - case WXK_PAGEUP: - case WXK_NUMPAD_PAGEUP: - { - const int rowsPerPage = grid->GetGridWindow()->GetSize().GetHeight() / grid->GetDefaultRowSize(); - const int cursorNewPos = std::max(cursorOldPos - rowsPerPage, 0); - grid->SetGridCursor(cursorNewPos, grid->GetGridCursorCol()); - grid->MakeCellVisible(cursorNewPos, grid->GetGridCursorCol()); - return; //no event.Skip() - } - case WXK_PAGEDOWN: - case WXK_NUMPAD_PAGEDOWN: - { - const int rowsPerPage = grid->GetGridWindow()->GetSize().GetHeight() / grid->GetDefaultRowSize(); - const int cursorNewPos = std::min(cursorOldPos + rowsPerPage, grid->GetNumberRows() - 1); - grid->SetGridCursor(cursorNewPos, grid->GetGridCursorCol()); - grid->MakeCellVisible(cursorNewPos, grid->GetGridCursorCol()); - return; //no event.Skip() - } - } - - //button without additonal control keys pressed - if (keyEvent->GetModifiers() == wxMOD_NONE) - switch (keyCode) - { - case WXK_UP: - case WXK_NUMPAD_UP: - { - const int cursorNewPos = std::max(cursorOldPos - 1, 0); - grid->SetGridCursor(cursorNewPos, grid->GetGridCursorCol()); - grid->MakeCellVisible(cursorNewPos, grid->GetGridCursorCol()); - return; //no event.Skip() - } - case WXK_DOWN: - case WXK_NUMPAD_DOWN: - { - const int cursorNewPos = std::min(cursorOldPos + 1, grid->GetNumberRows() - 1); - grid->SetGridCursor(cursorNewPos, grid->GetGridCursorCol()); - grid->MakeCellVisible(cursorNewPos, grid->GetGridCursorCol()); - return; //no event.Skip() - } - case WXK_LEFT: - case WXK_NUMPAD_LEFT: - { - const int cursorColumn = std::max(cursorOldColumn - 1, 0); - grid->SetGridCursor(cursorOldPos, cursorColumn); - grid->MakeCellVisible(cursorOldPos, cursorColumn); - return; //no event.Skip() - } - case WXK_RIGHT: - case WXK_NUMPAD_RIGHT: - { - const int cursorColumn = std::min(cursorOldColumn + 1, grid->GetNumberCols() - 1); - grid->SetGridCursor(cursorOldPos, cursorColumn); - grid->MakeCellVisible(cursorOldPos, cursorColumn); - return; //no event.Skip() - } - } - } - - anchorRow = grid->GetGridCursorRow(); - event.Skip(); //let event delegate! -} - - -inline -bool gridsShouldBeCleared(const wxEvent& event) -{ - const wxMouseEvent* mouseEvent = dynamic_cast(&event); - if (mouseEvent) - { - if (mouseEvent->ControlDown() || mouseEvent->ShiftDown()) - return false; - - if (mouseEvent->ButtonDown(wxMOUSE_BTN_LEFT)) - return true; - } - else - { - const wxKeyEvent* keyEvent = dynamic_cast(&event); - if (keyEvent) - { - if (keyEvent->ControlDown() || keyEvent->AltDown() || keyEvent->ShiftDown()) - return false; - - switch (keyEvent->GetKeyCode()) - { - //default navigation keys - case WXK_UP: - case WXK_DOWN: - case WXK_LEFT: - case WXK_RIGHT: - case WXK_PAGEUP: - case WXK_PAGEDOWN: - case WXK_HOME: - case WXK_END: - case WXK_NUMPAD_UP: - case WXK_NUMPAD_DOWN: - case WXK_NUMPAD_LEFT: - case WXK_NUMPAD_RIGHT: - case WXK_NUMPAD_PAGEUP: - case WXK_NUMPAD_PAGEDOWN: - case WXK_NUMPAD_HOME: - case WXK_NUMPAD_END: - //other keys - case WXK_TAB: - case WXK_RETURN: - case WXK_NUMPAD_ENTER: - case WXK_ESCAPE: - return true; - } - } - } - - return false; -} - - -void CustomGrid::onGridAccess(wxEvent& event) -{ - if (!isLeading) - { - //notify other grids of new user focus - m_gridLeft ->isLeading = m_gridLeft == this; - m_gridMiddle->isLeading = m_gridMiddle == this; - m_gridRight ->isLeading = m_gridRight == this; - - wxGrid::SetFocus(); - } - - //clear grids - if (gridsShouldBeCleared(event)) - { - m_gridLeft ->ClearSelection(); - m_gridMiddle->ClearSelection(); - m_gridRight ->ClearSelection(); - } - - //update row labels NOW (needed when scrolling if buttons keep being pressed) - m_gridLeft ->GetGridRowLabelWindow()->Update(); - m_gridRight->GetGridRowLabelWindow()->Update(); - - //support for custom short-cuts (overwriting wxWidgets functionality!) - execGridCommands(event, this); //event.Skip is handled here! -} - - -//workaround: ensure that all grids are properly aligned: add some extra window space to grids that have no horizontal scrollbar -void CustomGrid::adjustGridHeights(wxEvent& event) -{ - //m_gridLeft, m_gridRight, m_gridMiddle not NULL because called after initSettings() - - int y1 = 0; - int y2 = 0; - int y3 = 0; - int dummy = 0; - - m_gridLeft ->GetViewStart(&dummy, &y1); - m_gridRight ->GetViewStart(&dummy, &y2); - m_gridMiddle->GetViewStart(&dummy, &y3); - - if (y1 != y2 || y2 != y3) - { - int yMax = std::max(y1, std::max(y2, y3)); - - if (m_gridLeft->isLeadGrid()) //do not handle case (y1 == yMax) here!!! Avoid back coupling! - m_gridLeft->SetMargins(0, 0); - else if (y1 < yMax) - m_gridLeft->SetMargins(0, 30); - - if (m_gridRight->isLeadGrid()) - m_gridRight->SetMargins(0, 0); - else if (y2 < yMax) - m_gridRight->SetMargins(0, 30); - - if (m_gridMiddle->isLeadGrid()) - m_gridMiddle->SetMargins(0, 0); - else if (y3 < yMax) - m_gridMiddle->SetMargins(0, 30); - - m_gridLeft ->ForceRefresh(); - m_gridRight ->ForceRefresh(); - m_gridMiddle->ForceRefresh(); - } -} - - -void CustomGrid::updateGridSizes() -{ - if (getGridDataTable()) - getGridDataTable()->updateGridSizes(); -} - - -void CustomGridRim::updateGridSizes() -{ - CustomGrid::updateGridSizes(); - - //set row label size - if (GetRowLabelSize() > 0) - { - //SetRowLabelSize(wxGRID_AUTOSIZE); -> we can do better - wxClientDC dc(GetGridRowLabelWindow()); - dc.SetFont(GetLabelFont()); - - wxArrayString lines; - lines.push_back(GetRowLabelValue(GetNumberRows())); - - long width = 0; - long dummy = 0; - GetTextBoxSize(dc, lines, &width, &dummy); - - width += 8; - - SetRowLabelSize(width); - } -} - - -void CustomGrid::setSortMarker(SortMarker marker) -{ - m_marker = marker; -} - - -void CustomGrid::DrawColLabel(wxDC& dc, int col) -{ - wxGrid::DrawColLabel(dc, col); - - if (col == m_marker.first) - { - if (m_marker.second == ASCENDING) - dc.DrawBitmap(GlobalResources::getImage(wxT("smallUp")), GetColRight(col) - 16 - 2, 2, true); //respect 2-pixel border - else - dc.DrawBitmap(GlobalResources::getImage(wxT("smallDown")), GetColRight(col) - 16 - 2, 2, true); //respect 2-pixel border - } -} - - -std::pair CustomGrid::mousePosToCell(wxPoint pos) -{ - int x = -1; - int y = -1; - CalcUnscrolledPosition(pos.x, pos.y, &x, &y); - - std::pair output(-1, -1); - if (x >= 0 && y >= 0) - { - output.first = YToRow(y); - output.second = XToCol(x); - } - return output; -} - - -std::set CustomGrid::getAllSelectedRows() const -{ - std::set output; - - const wxArrayInt selectedRows = this->GetSelectedRows(); - if (!selectedRows.IsEmpty()) - { - for (size_t i = 0; i < selectedRows.GetCount(); ++i) - output.insert(selectedRows[i]); - } - - if (!this->GetSelectedCols().IsEmpty()) //if a column is selected this is means all rows are marked for deletion - { - for (int k = 0; k < const_cast(this)->GetNumberRows(); ++k) //messy wxGrid implementation... - output.insert(k); - } - - const wxGridCellCoordsArray singlySelected = this->GetSelectedCells(); - if (!singlySelected.IsEmpty()) - { - for (size_t k = 0; k < singlySelected.GetCount(); ++k) - output.insert(singlySelected[k].GetRow()); - } - - const wxGridCellCoordsArray tmpArrayTop = this->GetSelectionBlockTopLeft(); - if (!tmpArrayTop.IsEmpty()) - { - wxGridCellCoordsArray tmpArrayBottom = this->GetSelectionBlockBottomRight(); - - size_t arrayCount = tmpArrayTop.GetCount(); - - if (arrayCount == tmpArrayBottom.GetCount()) - { - for (size_t i = 0; i < arrayCount; ++i) - { - const int rowTop = tmpArrayTop[i].GetRow(); - const int rowBottom = tmpArrayBottom[i].GetRow(); - - for (int k = rowTop; k <= rowBottom; ++k) - output.insert(k); - } - } - } - - //some exception: also add current cursor row to selection if there are no others... hopefully improving usability - if (output.empty() && this->isLeadGrid()) - output.insert(const_cast(this)->GetCursorRow()); //messy wxGrid implementation... - - return output; -} - - -//############################################################################################ -//CustomGrid specializations - -class GridCellRenderer : public wxGridCellStringRenderer -{ -public: - GridCellRenderer(CustomGridRim::FailedIconLoad& failedLoads, - const CustomGridTableRim* gridDataTable, - const std::shared_ptr& iconBuffer) : - failedLoads_(failedLoads), - m_gridDataTable(gridDataTable), - iconBuffer_(iconBuffer) {} - - - virtual void Draw(wxGrid& grid, - wxGridCellAttr& attr, - wxDC& dc, - const wxRect& rect, //unscrolled rect - int row, int col, - bool isSelected) - { - //############## show windows explorer file icons ###################### - - if (iconBuffer_.get() && - m_gridDataTable->getTypeAtPos(col) == xmlAccess::FILENAME) - { - const int iconSize = iconBuffer_->getSize(); - if (rect.GetWidth() >= iconSize) - { - // Partitioning: - // ____________________________ - // | 2 pix border | icon | rest | - // ---------------------------- - { - //clear area where icon will be placed (including border) - wxRect rectShrinked(rect); - rectShrinked.SetWidth(LEFT_BORDER + iconSize); //add 2 pixel border - wxGridCellRenderer::Draw(grid, attr, dc, rectShrinked, row, col, isSelected); - } - - { - //draw rest - wxRect rest(rect); //unscrolled - rest.x += LEFT_BORDER + iconSize; - rest.width -= LEFT_BORDER + iconSize; - wxGridCellStringRenderer::Draw(grid, attr, dc, rest, row, col, isSelected); - } - - wxRect rectIcon(rect); - rectIcon.SetWidth(iconSize); //set to icon area only - rectIcon.x += LEFT_BORDER; // - - //try to draw icon - //retrieve grid data - const Zstring fileName = m_gridDataTable->getIconFile(row); - if (!fileName.empty()) - { - wxIcon icon; - - //first check if it is a directory icon: - if (fileName == Zstr("folder")) - icon = iconBuffer_->genericDirIcon(); - else //retrieve file icon - { - if (!iconBuffer_->requestFileIcon(fileName, &icon)) //returns false if icon is not in buffer - { - icon = iconBuffer_->genericFileIcon(); //better than nothing - - failedLoads_.insert(row); //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()) - { - int posX = rectIcon.GetX(); - int posY = rectIcon.GetY(); - //center icon if it is too small - if (rectIcon.GetWidth() > icon.GetWidth()) - posX += (rectIcon.GetWidth() - icon.GetWidth()) / 2; - if (rectIcon.GetHeight() > icon.GetHeight()) - posY += (rectIcon.GetHeight() - icon.GetHeight()) / 2; - - dc.DrawIcon(icon, posX, posY); - } - } - return; - } - } - - //default - wxGridCellStringRenderer::Draw(grid, attr, dc, rect, row, col, isSelected); - } - - - virtual wxSize GetBestSize(wxGrid& grid, //adapt reported width if file icons are shown - wxGridCellAttr& attr, - wxDC& dc, - int row, int col) - { - if (iconBuffer_.get() && //evaluate at compile time - m_gridDataTable->getTypeAtPos(col) == xmlAccess::FILENAME) - { - wxSize rv = wxGridCellStringRenderer::GetBestSize(grid, attr, dc, row, col); - rv.SetWidth(rv.GetWidth() + LEFT_BORDER + iconBuffer_->getSize()); - return rv; - } - - //default - return wxGridCellStringRenderer::GetBestSize(grid, attr, dc, row, col); - } - - -private: - CustomGridRim::FailedIconLoad& failedLoads_; - const CustomGridTableRim* const m_gridDataTable; - std::shared_ptr iconBuffer_; - - static const int LEFT_BORDER = 2; -}; - -//---------------------------------------------------------------------------------------- - -CustomGridRim::CustomGridRim(wxWindow* parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) : - CustomGrid(parent, id, pos, size, style, name), otherGrid(NULL) -{ - Connect(wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler(CustomGridRim::OnResizeColumn), NULL, this); //row-based tooltip -} - - -void CustomGridRim::setOtherGrid(CustomGridRim* other) //call during initialization! -{ - otherGrid = other; -} - - -void CustomGridRim::OnResizeColumn(wxGridSizeEvent& event) -{ - //Resize columns on both sides in parallel - const int thisCol = event.GetRowOrCol(); - - if (!otherGrid || thisCol < 0 || thisCol >= GetNumberCols()) return; - - const xmlAccess::ColumnTypes thisColType = getTypeAtPos(thisCol); - - for (int i = 0; i < otherGrid->GetNumberCols(); ++i) - if (otherGrid->getTypeAtPos(i) == thisColType) - { - otherGrid->SetColSize(i, GetColSize(thisCol)); - otherGrid->ForceRefresh(); - break; - } -} - - -//this method is called when grid view changes: useful for parallel updating of multiple grids -void CustomGridRim::alignOtherGrids(CustomGrid* gridLeft, CustomGrid* gridMiddle, CustomGrid* gridRight) -{ - if (!otherGrid) return; - - int x = 0; - int y = 0; - GetViewStart(&x, &y); - gridMiddle->Scroll(-1, y); - otherGrid->Scroll(x, y); -} - - -template -void CustomGridRim::setTooltip(const wxMouseEvent& event) -{ - const int hoveredRow = mousePosToCell(event.GetPosition()).first; - - wxString toolTip; - if (hoveredRow >= 0 && getGridDataTable() != NULL) - { - const FileSystemObject* const fsObj = getGridDataTable()->getRawData(hoveredRow); - if (fsObj && !fsObj->isEmpty()) - { - struct AssembleTooltip : public FSObjectVisitor - { - AssembleTooltip(wxString& tipMsg) : tipMsg_(tipMsg) {} - - virtual void visit(const FileMapping& fileObj) - { - tipMsg_ = copyStringTo(std::wstring() + fileObj.getRelativeName() + L"\n" + - _("Size") + L": " + zen::filesizeToShortString(to(fileObj.getFileSize())) + L"\n" + - _("Date") + L": " + zen::utcToLocalTimeString(fileObj.getLastWriteTime())); - } - - virtual void visit(const SymLinkMapping& linkObj) - { - tipMsg_ = copyStringTo(std::wstring() + linkObj.getRelativeName() + L"\n" + - _("Date") + L": " + zen::utcToLocalTimeString(linkObj.getLastWriteTime())); - } - - virtual void visit(const DirMapping& dirObj) - { - tipMsg_ = toWx(dirObj.getRelativeName()); - } - - wxString& tipMsg_; - } assembler(toolTip); - fsObj->accept(assembler); - } - } - - - wxToolTip* tt = GetGridWindow()->GetToolTip(); - - const wxString currentTip = tt ? tt->GetTip() : wxString(); - if (toolTip != currentTip) - { - if (toolTip.IsEmpty()) - GetGridWindow()->SetToolTip(NULL); //wxGTK doesn't allow wxToolTip with empty text! - else - { - //wxWidgets bug: tooltip multiline property is defined by first tooltip text containing newlines or not (same is true for maximum width) - if (!tt) - GetGridWindow()->SetToolTip(new wxToolTip(wxT("a b\n\ - a b"))); //ugly, but is working (on Windows) - tt = GetGridWindow()->GetToolTip(); //should be bound by now - if (tt) - tt->SetTip(toolTip); - } - } -} - - -xmlAccess::ColumnAttributes CustomGridRim::getDefaultColumnAttributes() -{ - xmlAccess::ColumnAttributes defaultColumnSettings; - - xmlAccess::ColumnAttrib newEntry; - newEntry.type = xmlAccess::FULL_PATH; - newEntry.visible = false; - newEntry.position = 0; - newEntry.width = 150; - defaultColumnSettings.push_back(newEntry); - - newEntry.type = xmlAccess::DIRECTORY; - newEntry.position = 1; - newEntry.width = 140; - defaultColumnSettings.push_back(newEntry); - - newEntry.type = xmlAccess::REL_PATH; - newEntry.visible = true; - newEntry.position = 2; - newEntry.width = 118; - defaultColumnSettings.push_back(newEntry); - - newEntry.type = xmlAccess::FILENAME; - newEntry.position = 3; - newEntry.width = 138; - defaultColumnSettings.push_back(newEntry); - - newEntry.type = xmlAccess::SIZE; - newEntry.position = 4; - newEntry.width = 80; - defaultColumnSettings.push_back(newEntry); - - newEntry.type = xmlAccess::DATE; - newEntry.position = 5; - newEntry.width = 113; - defaultColumnSettings.push_back(newEntry); - - newEntry.type = xmlAccess::EXTENSION; - newEntry.visible = false; - newEntry.position = 6; - newEntry.width = 60; - defaultColumnSettings.push_back(newEntry); - - return defaultColumnSettings; -} - - -xmlAccess::ColumnAttributes CustomGridRim::getColumnAttributes() -{ - std::sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByPositionAndVisibility); - - xmlAccess::ColumnAttributes output; - xmlAccess::ColumnAttrib newEntry; - for (size_t i = 0; i < columnSettings.size(); ++i) - { - newEntry = columnSettings[i]; - if (newEntry.visible) - newEntry.width = GetColSize(static_cast(i)); //hidden columns are sorted to the end of vector! - output.push_back(newEntry); - } - - return output; -} - - -void CustomGridRim::setColumnAttributes(const xmlAccess::ColumnAttributes& attr) -{ - //remove special alignment for column "size" - if (GetLayoutDirection() != wxLayout_RightToLeft) //don't change for RTL languages - for (int i = 0; i < GetNumberCols(); ++i) - if (getTypeAtPos(i) == xmlAccess::SIZE) - { - wxGridCellAttr* cellAttributes = GetOrCreateCellAttr(0, i); - cellAttributes->SetAlignment(wxALIGN_LEFT, wxALIGN_CENTRE); - SetColAttr(i, cellAttributes); - break; - } - //---------------------------------------------------------------------------------- - - columnSettings.clear(); - if (attr.size() == 0) - { - //default settings: - columnSettings = getDefaultColumnAttributes(); - } - else - { - for (size_t i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i) - { - xmlAccess::ColumnAttrib newEntry; - - if (i < attr.size()) - newEntry = attr[i]; - else //fix corrupted data: - { - newEntry.type = static_cast(xmlAccess::COLUMN_TYPE_COUNT); //sort additional rows to the end - newEntry.visible = false; - newEntry.position = i; - newEntry.width = 100; - } - columnSettings.push_back(newEntry); - } - - std::sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByType); - for (size_t i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i) //just be sure that each type exists only once - columnSettings[i].type = static_cast(i); - - std::sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByPositionOnly); - for (size_t i = 0; i < xmlAccess::COLUMN_TYPE_COUNT; ++i) //just be sure that positions are numbered correctly - columnSettings[i].position = i; - } - - std::sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByPositionAndVisibility); - std::vector newPositions; - for (size_t i = 0; i < columnSettings.size() && columnSettings[i].visible; ++i) //hidden columns are sorted to the end of vector! - newPositions.push_back(columnSettings[i].type); - - //set column positions - if (getGridDataTableRim()) - getGridDataTableRim()->setupColumns(newPositions); - - //set column width (set them after setupColumns!) - for (size_t i = 0; i < newPositions.size(); ++i) - SetColSize(static_cast(i), columnSettings[i].width); - - //-------------------------------------------------------------------------------------------------------- - //set special alignment for column "size" - if (GetLayoutDirection() != wxLayout_RightToLeft) //don't change for RTL languages - for (int i = 0; i < GetNumberCols(); ++i) - if (getTypeAtPos(i) == xmlAccess::SIZE) - { - wxGridCellAttr* cellAttributes = GetOrCreateCellAttr(0, i); - cellAttributes->SetAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE); - SetColAttr(i, cellAttributes); //make filesize right justified on grids - break; - } - - ClearSelection(); - ForceRefresh(); -} - - -xmlAccess::ColumnTypes CustomGridRim::getTypeAtPos(size_t pos) const -{ - if (getGridDataTableRim()) - return getGridDataTableRim()->getTypeAtPos(pos); - else - return xmlAccess::DIRECTORY; -} - - -wxString CustomGridRim::getTypeName(xmlAccess::ColumnTypes colType) -{ - switch (colType) - { - case xmlAccess::FULL_PATH: - return _("Full path"); - case xmlAccess::FILENAME: - return _("Filename"); - case xmlAccess::REL_PATH: - return _("Relative path"); - case xmlAccess::DIRECTORY: - return _("Directory"); - case xmlAccess::SIZE: - return _("Size"); - case xmlAccess::DATE: - return _("Date"); - case xmlAccess::EXTENSION: - return _("Extension"); - } - - return wxEmptyString; //dummy -} - - -void CustomGridRim::autoSizeColumns() //performance optimized column resizer (analog to wxGrid::AutoSizeColumns() -{ - for (int col = 0; col < GetNumberCols(); ++col) - { - if (col < 0) - return; - - int rowMax = -1; - size_t lenMax = 0; - for (int row = 0; row < GetNumberRows(); ++row) - if (GetCellValue(row, col).size() > lenMax) - { - lenMax = GetCellValue(row, col).size(); - rowMax = row; - } - - wxCoord extentMax = 0; - - //calculate width of (most likely) widest cell - wxClientDC dc(GetGridWindow()); - if (rowMax > -1) - { - wxGridCellAttr* attr = GetCellAttr(rowMax, col); - if (attr) - { - wxGridCellRenderer* renderer = attr->GetRenderer(this, rowMax, col); - if (renderer) - { - const wxSize size = renderer->GetBestSize(*this, *attr, dc, rowMax, col); - extentMax = std::max(extentMax, size.x); - renderer->DecRef(); - } - attr->DecRef(); - } - } - - //consider column label - dc.SetFont(GetLabelFont()); - wxCoord w = 0; - wxCoord h = 0; - dc.GetMultiLineTextExtent(GetColLabelValue(col), &w, &h ); - if (GetColLabelTextOrientation() == wxVERTICAL) - w = h; - extentMax = std::max(extentMax, w); - - extentMax += 15; //leave some space around text - - SetColSize(col, extentMax); - - } - Refresh(); -} - - -void CustomGridRim::enableFileIcons(const std::shared_ptr& iconBuffer) -{ - iconBuffer_ = iconBuffer; - SetDefaultRenderer(new GridCellRenderer(failedLoads, getGridDataTableRim(), iconBuffer)); //SetDefaultRenderer takes ownership! -} - - -std::pair CustomGridRim::getVisibleRows() -{ - int dummy = -1; - int height = -1; - GetGridWindow()->GetClientSize(&dummy, &height); - - if (height >= 0) - { - const int rowTop = mousePosToCell(wxPoint(0, 0)).first; - int rowEnd = mousePosToCell(wxPoint(0, height)).first; - if (rowEnd == -1) //when scrolling to the very end, there are a few border pixels that do not belong to any row - rowEnd = GetNumberRows(); - else - ++rowEnd; - - if (0 <= rowTop && rowTop <= rowEnd) - return std::make_pair(rowTop, rowEnd); //"top" means here top of the screen => smaller value - } - return std::make_pair(0, 0); -} - - -inline -CustomGridTableRim* CustomGridRim::getGridDataTableRim() const -{ - return dynamic_cast(getGridDataTable()); //I'm tempted to use a static cast here... -} - - -void CustomGridRim::getIconsToBeLoaded(std::vector& newLoad) //loads all (not yet) drawn icons -{ - //don't check too often! give worker thread some time to fetch data - - newLoad.clear(); - - if (iconBuffer_.get()) - { - const CustomGridTableRim* gridDataTable = getGridDataTableRim(); - if (!gridDataTable) return; - - const int totalCols = const_cast(gridDataTable)->GetNumberCols(); - const int totalRows = const_cast(gridDataTable)->GetNumberRows(); - - //determine column - const int colFilename = [&]() -> int - { - for (int k = 0; k < totalCols; ++k) - if (gridDataTable->getTypeAtPos(k) == xmlAccess::FILENAME) - return k; - return -1; - }(); - if (colFilename < 0) - return; - - const auto rowsOnScreen = getVisibleRows(); - - //loop over all visible rows - const int firstRow = static_cast(rowsOnScreen.first); - const int rowNo = std::min(static_cast(rowsOnScreen.second), totalRows) - firstRow; - - for (int i = 0; i < rowNo; ++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 : - rowNo - 1 - (i - 1) / 2); - - if (failedLoads.find(currentRow) != failedLoads.end()) //find failed attempts to load icon - { - const Zstring fileName = gridDataTable->getIconFile(currentRow); - if (!fileName.empty()) - { - //test if they are already loaded in buffer: - if (iconBuffer_->requestFileIcon(fileName)) - { - //exists in buffer: refresh Row - RefreshCell(currentRow, colFilename); //do a *full* refresh for *every* failed load to update partial DC updates while scrolling - failedLoads.erase(currentRow); // - } - else //not yet in buffer: mark for async. loading - { - newLoad.push_back(fileName); - } - } - } - } - } -} - -//---------------------------------------------------------------------------------------- - - -//update file icons periodically: use SINGLE instance to coordinate left and right grid at once -IconUpdater::IconUpdater(CustomGridLeft* leftGrid, CustomGridRight* rightGrid) : - m_leftGrid(leftGrid), - m_rightGrid(rightGrid), - m_timer(new wxTimer) //connect timer event for async. icon loading -{ - m_timer->Connect(wxEVT_TIMER, wxEventHandler(IconUpdater::loadIconsAsynchronously), NULL, this); - m_timer->Start(50); //timer interval in ms -} - - -IconUpdater::~IconUpdater() {} - - -void IconUpdater::loadIconsAsynchronously(wxEvent& event) //loads all (not yet) drawn icons -{ - std::vector iconsLeft; - m_leftGrid->getIconsToBeLoaded(iconsLeft); - - std::vector newLoad; - m_rightGrid->getIconsToBeLoaded(newLoad); - - //merge vectors - newLoad.insert(newLoad.end(), iconsLeft.begin(), iconsLeft.end()); - - if (m_leftGrid->iconBuffer_.get()) - m_leftGrid->iconBuffer_->setWorkload(newLoad); - - //event.Skip(); -} - -//---------------------------------------------------------------------------------------- - - -CustomGridLeft::CustomGridLeft(wxWindow* parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) : - CustomGridRim(parent, id, pos, size, style, name) -{ - GetGridWindow()->Connect(wxEVT_MOTION, wxMouseEventHandler(CustomGridLeft::OnMouseMovement), NULL, this); //row-based tooltip -} - - -bool CustomGridLeft::CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode) -{ - //use custom wxGridTableBase class for management of large sets of formatted data. - //This is done in CreateGrid instead of SetTable method since source code is generated and wxFormbuilder invokes CreatedGrid by default. - SetTable(new CustomGridTableLeft, true, wxGrid::wxGridSelectRows); //give ownership to wxGrid: gridDataTable is deleted automatically in wxGrid destructor - return true; -} - - -void CustomGridLeft::initSettings(CustomGridLeft* gridLeft, //create connection with zen::GridView - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const zen::GridView* gridDataView) -{ - //set underlying grid data - assert(getGridDataTable()); - getGridDataTable()->setGridDataTable(gridDataView); - - CustomGridRim::setOtherGrid(gridRight); - - CustomGridRim::initSettings(gridLeft, gridMiddle, gridRight, gridDataView); -} - - -void CustomGridLeft::OnMouseMovement(wxMouseEvent& event) -{ - CustomGridRim::setTooltip(event); - event.Skip(); -} - - -CustomGridTable* CustomGridLeft::getGridDataTable() const -{ - return static_cast(GetTable()); //one of the few cases where no dynamic_cast is required! -} - - -//---------------------------------------------------------------------------------------- -CustomGridRight::CustomGridRight(wxWindow* parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) : - CustomGridRim(parent, id, pos, size, style, name) -{ - GetGridWindow()->Connect(wxEVT_MOTION, wxMouseEventHandler(CustomGridRight::OnMouseMovement), NULL, this); //row-based tooltip -} - - -bool CustomGridRight::CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode) -{ - SetTable(new CustomGridTableRight, true, wxGrid::wxGridSelectRows); //give ownership to wxGrid: gridDataTable is deleted automatically in wxGrid destructor - return true; -} - - -void CustomGridRight::initSettings(CustomGridLeft* gridLeft, //create connection with zen::GridView - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const zen::GridView* gridDataView) -{ - //set underlying grid data - assert(getGridDataTable()); - getGridDataTable()->setGridDataTable(gridDataView); - - CustomGridRim::setOtherGrid(gridLeft); - - CustomGridRim::initSettings(gridLeft, gridMiddle, gridRight, gridDataView); -} - - -void CustomGridRight::OnMouseMovement(wxMouseEvent& event) -{ - CustomGridRim::setTooltip(event); - event.Skip(); -} - - -CustomGridTable* CustomGridRight::getGridDataTable() const -{ - return static_cast(GetTable()); //one of the few cases where no dynamic_cast is required! -} - - -//---------------------------------------------------------------------------------------- -class GridCellRendererMiddle : public wxGridCellStringRenderer -{ -public: - GridCellRendererMiddle(const CustomGridMiddle& middleGrid) : m_gridMiddle(middleGrid) {}; - - virtual void Draw(wxGrid& grid, - wxGridCellAttr& attr, - wxDC& dc, - const wxRect& rect, - int row, int col, - bool isSelected); - -private: - const CustomGridMiddle& m_gridMiddle; -}; - - -//define new event types -const wxEventType FFS_CHECK_ROWS_EVENT = wxNewEventType(); //attention! do NOT place in header to keep (generated) id unique! -const wxEventType FFS_SYNC_DIRECTION_EVENT = wxNewEventType(); - -const int CHECK_BOX_IMAGE = 11; //width of checkbox image -const int CHECK_BOX_WIDTH = CHECK_BOX_IMAGE + 3; //width of first block - -// cell: -// ---------------------------------- -// | checkbox | left | middle | right| -// ---------------------------------- - - -CustomGridMiddle::CustomGridMiddle(wxWindow* parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) : - CustomGrid(parent, id, pos, size, style, name), - selectionRowBegin(-1), - selectionPos(BLOCKPOS_CHECK_BOX), - highlightedRow(-1), - highlightedPos(BLOCKPOS_CHECK_BOX) -{ - SetLayoutDirection(wxLayout_LeftToRight); // - GetGridWindow ()->SetLayoutDirection(wxLayout_LeftToRight); //avoid mirroring this dialog in RTL languages like Hebrew or Arabic - GetGridColLabelWindow()->SetLayoutDirection(wxLayout_LeftToRight); // - - //connect events for dynamic selection of sync direction - GetGridWindow()->Connect(wxEVT_MOTION, wxMouseEventHandler(CustomGridMiddle::OnMouseMovement), NULL, this); - GetGridWindow()->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(CustomGridMiddle::OnLeaveWindow), NULL, this); - GetGridWindow()->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(CustomGridMiddle::OnLeftMouseUp), NULL, this); - GetGridWindow()->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(CustomGridMiddle::OnLeftMouseDown), NULL, this); -} - - -CustomGridMiddle::~CustomGridMiddle() {} - - -bool CustomGridMiddle::CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode) -{ - SetTable(new CustomGridTableMiddle, true, wxGrid::wxGridSelectRows); //give ownership to wxGrid: gridDataTable is deleted automatically in wxGrid destructor - - //display checkboxes (representing bool values) if row is enabled for synchronization - SetDefaultRenderer(new GridCellRendererMiddle(*this)); //SetDefaultRenderer takes ownership! - - return true; -} - - -void CustomGridMiddle::initSettings(CustomGridLeft* gridLeft, //create connection with zen::GridView - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const zen::GridView* gridDataView) -{ - //set underlying grid data - assert(getGridDataTable()); - getGridDataTable()->setGridDataTable(gridDataView); - -#ifdef FFS_LINUX //get rid of scrollbars; Linux: change policy for GtkScrolledWindow - GtkWidget* gridWidget = wxWindow::m_widget; - GtkScrolledWindow* scrolledWindow = GTK_SCROLLED_WINDOW(gridWidget); - gtk_scrolled_window_set_policy(scrolledWindow, GTK_POLICY_NEVER, GTK_POLICY_NEVER); -#endif - - CustomGrid::initSettings(gridLeft, gridMiddle, gridRight, gridDataView); -} - - -CustomGridTable* CustomGridMiddle::getGridDataTable() const -{ - return static_cast(GetTable()); //one of the few cases where no dynamic_cast is required! -} - - -inline -CustomGridTableMiddle* CustomGridMiddle::getGridDataTableMiddle() const -{ - return static_cast(getGridDataTable()); -} - - -#ifdef FFS_WIN //get rid of scrollbars; Windows: overwrite virtual method -void CustomGridMiddle::SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh) -{ - wxWindow::SetScrollbar(orientation, 0, 0, 0, refresh); -} -#endif - - -void CustomGridMiddle::OnMouseMovement(wxMouseEvent& event) -{ - const int rowOld = highlightedRow; - const BlockPosition posOld = highlightedPos; - - - if (selectionRowBegin == -1) //change highlightning only if currently not dragging mouse - { - highlightedRow = mousePosToRow(event.GetPosition(), &highlightedPos); - - if (rowOld != highlightedRow) - { - RefreshCell(highlightedRow, 0); - RefreshCell(rowOld, 0); - } - else if (posOld != highlightedPos) - RefreshCell(highlightedRow, 0); - - //handle tooltip - showToolTip(highlightedRow, GetGridWindow()->ClientToScreen(event.GetPosition())); - } - - event.Skip(); -} - - -void CustomGridMiddle::OnLeaveWindow(wxMouseEvent& event) -{ - highlightedRow = -1; - highlightedPos = BLOCKPOS_CHECK_BOX; - Refresh(); - - //handle tooltip - toolTip.hide(); -} - - -void CustomGridMiddle::showToolTip(int rowNumber, wxPoint pos) -{ - if (!getGridDataTableMiddle()) - return; - - const FileSystemObject* const fsObj = getGridDataTableMiddle()->getRawData(rowNumber); - if (fsObj == NULL) //if invalid row... - { - toolTip.hide(); - return; - } - - if (getGridDataTableMiddle()->syncPreviewIsActive()) //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""; - }(); - - toolTip.show(getSyncOpDescription(*fsObj), pos, &GlobalResources::getImage(imageName)); - } - 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""; - }(); - - toolTip.show(getCategoryDescription(*fsObj), pos, &GlobalResources::getImage(imageName)); - } -} - - -void CustomGridMiddle::OnLeftMouseDown(wxMouseEvent& event) -{ - selectionRowBegin = mousePosToRow(event.GetPosition(), &selectionPos); - event.Skip(); -} - - -void CustomGridMiddle::OnLeftMouseUp(wxMouseEvent& event) -{ - //int selRowEnd = mousePosToCell(event.GetPosition()).first; - //-> use visibly marked rows instead! with wxWidgets 2.8.12 there is no other way than IsInSelection() - int selRowEnd = -1; - if (0 <= selectionRowBegin && selectionRowBegin < GetNumberRows()) - { - for (int i = selectionRowBegin; i < GetNumberRows() && IsInSelection(i, 0); ++i) - selRowEnd = i; - - if (selRowEnd == selectionRowBegin) - for (int i = selectionRowBegin; i >= 0 && IsInSelection(i, 0); --i) - selRowEnd = i; - } - - if (0 <= selectionRowBegin && 0 <= selRowEnd) - { - switch (selectionPos) - { - case BLOCKPOS_CHECK_BOX: - { - //create a custom event - FFSCheckRowsEvent evt(selectionRowBegin, selRowEnd); - AddPendingEvent(evt); - } - break; - case BLOCKPOS_LEFT: - { - //create a custom event - FFSSyncDirectionEvent evt(selectionRowBegin, selRowEnd, SYNC_DIR_LEFT); - AddPendingEvent(evt); - } - break; - case BLOCKPOS_MIDDLE: - { - //create a custom event - FFSSyncDirectionEvent evt(selectionRowBegin, selRowEnd, SYNC_DIR_NONE); - AddPendingEvent(evt); - } - break; - case BLOCKPOS_RIGHT: - { - //create a custom event - FFSSyncDirectionEvent evt(selectionRowBegin, selRowEnd, SYNC_DIR_RIGHT); - AddPendingEvent(evt); - } - break; - } - } - selectionRowBegin = -1; - selectionPos = BLOCKPOS_CHECK_BOX; - - ClearSelection(); - event.Skip(); -} - - -int CustomGridMiddle::mousePosToRow(wxPoint pos, BlockPosition* block) -{ - if (!getGridDataTableMiddle()) - return 0; - - int row = -1; - int x = -1; - int y = -1; - CalcUnscrolledPosition( pos.x, pos.y, &x, &y ); - if (x >= 0 && y >= 0) - { - row = YToRow(y); - - //determine blockposition within cell (optional) - if (block) - { - *block = BLOCKPOS_CHECK_BOX; //default - - if (row >= 0) - { - const FileSystemObject* const fsObj = getGridDataTableMiddle()->getRawData(row); - if (fsObj != NULL && //if valid row... - getGridDataTableMiddle()->syncPreviewIsActive() && - 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 wxRect rect = CellToRect(row, 0); - if (rect.GetWidth() > CHECK_BOX_WIDTH) - { - const double blockWidth = (rect.GetWidth() - CHECK_BOX_WIDTH) / 3.0; - if (rect.GetX() + CHECK_BOX_WIDTH <= x && x < rect.GetX() + rect.GetWidth()) - { - if (x - (rect.GetX() + CHECK_BOX_WIDTH) < blockWidth) - *block = BLOCKPOS_LEFT; - else if (x - (rect.GetX() + CHECK_BOX_WIDTH) < 2 * blockWidth) - *block = BLOCKPOS_MIDDLE; - else - *block = BLOCKPOS_RIGHT; - } - } - } - } - } - } - return row; -} - - -void CustomGridMiddle::enableSyncPreview(bool value) -{ - assert(getGridDataTableMiddle()); - getGridDataTableMiddle()->enableSyncPreview(value); - - if (value) - GetGridColLabelWindow()->SetToolTip(_("Synchronization Preview")); - else - GetGridColLabelWindow()->SetToolTip(_("Comparison Result")); -} - - -void GridCellRendererMiddle::Draw(wxGrid& grid, - wxGridCellAttr& attr, - wxDC& dc, - const wxRect& rect, - int row, int col, - bool isSelected) -{ - //retrieve grid data - const FileSystemObject* const fsObj = m_gridMiddle.getGridDataTableMiddle() ? m_gridMiddle.getGridDataTableMiddle()->getRawData(row) : NULL; - if (fsObj != NULL) //if valid row... - { - if (rect.GetWidth() > CHECK_BOX_WIDTH) - { - const bool rowIsHighlighted = row == m_gridMiddle.highlightedRow; - - wxRect rectShrinked(rect); - - //clean first block of rect that will receive image of checkbox - rectShrinked.SetWidth(CHECK_BOX_WIDTH); - wxGridCellRenderer::Draw(grid, attr, dc, rectShrinked, row, col, isSelected); - - //print checkbox into first block - rectShrinked.SetX(rect.GetX() + 1); - - //HIGHLIGHTNING (checkbox): - if (rowIsHighlighted && - m_gridMiddle.highlightedPos == CustomGridMiddle::BLOCKPOS_CHECK_BOX) - { - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(fsObj->isActive() ? - wxT("checkboxTrueFocus") : - wxT("checkboxFalseFocus")), rectShrinked, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - } - else //default - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(fsObj->isActive() ? - wxT("checkboxTrue") : - wxT("checkboxFalse")), rectShrinked, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - - //clean remaining block of rect that will receive image of checkbox/directions - rectShrinked.SetWidth(rect.GetWidth() - CHECK_BOX_WIDTH); - rectShrinked.SetX(rect.GetX() + CHECK_BOX_WIDTH); - wxGridCellRenderer::Draw(grid, attr, dc, rectShrinked, row, col, isSelected); - - //print remaining block - if (m_gridMiddle.getGridDataTableMiddle()->syncPreviewIsActive()) //synchronization preview - { - //print sync direction into second block - - //HIGHLIGHTNING (sync direction): - if (rowIsHighlighted && - m_gridMiddle.highlightedPos != CustomGridMiddle::BLOCKPOS_CHECK_BOX) //don't allow changing direction for "=="-files - - switch (m_gridMiddle.highlightedPos) - { - case CustomGridMiddle::BLOCKPOS_CHECK_BOX: - break; - case CustomGridMiddle::BLOCKPOS_LEFT: - dc.DrawLabel(wxEmptyString, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_LEFT, true)), rectShrinked, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - break; - case CustomGridMiddle::BLOCKPOS_MIDDLE: - dc.DrawLabel(wxEmptyString, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_NONE, true)), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - case CustomGridMiddle::BLOCKPOS_RIGHT: - dc.DrawLabel(wxEmptyString, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_RIGHT, true)), rectShrinked, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - break; - } - else //default - { - const wxBitmap& syncOpIcon = getSyncOpImage(fsObj->getSyncOperation()); - dc.DrawLabel(wxEmptyString, syncOpIcon, rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - } - } - else //comparison results view - { - switch (fsObj->getCategory()) - { - case FILE_LEFT_SIDE_ONLY: - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("leftOnlySmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - case FILE_RIGHT_SIDE_ONLY: - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("rightOnlySmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - case FILE_LEFT_NEWER: - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("leftNewerSmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - case FILE_RIGHT_NEWER: - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("rightNewerSmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - case FILE_DIFFERENT: - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("differentSmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - case FILE_EQUAL: - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("equalSmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - case FILE_CONFLICT: - case FILE_DIFFERENT_METADATA: - dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("conflictSmall")), rectShrinked, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL); - break; - } - } - - return; - } - } - - //fallback - wxGridCellStringRenderer::Draw(grid, attr, dc, rect, row, col, isSelected); -} - - -//this method is called when grid view changes: useful for parallel updating of multiple grids -void CustomGridMiddle::alignOtherGrids(CustomGrid* gridLeft, CustomGrid* gridMiddle, CustomGrid* gridRight) -{ - int x = 0; - int y = 0; - GetViewStart(&x, &y); - gridLeft->Scroll(-1, y); - gridRight->Scroll(-1, y); -} - - -void CustomGridMiddle::DrawColLabel(wxDC& dc, int col) -{ - CustomGrid::DrawColLabel(dc, col); - - if (!getGridDataTableMiddle()) - return; - - const wxRect rect(GetColLeft(col), 0, GetColWidth(col), GetColLabelSize()); - - if (getGridDataTableMiddle()->syncPreviewIsActive()) - 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); -} - - -const 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; //dummy -} - diff --git a/lib/custom_grid.h b/lib/custom_grid.h deleted file mode 100644 index 47aad3e6..00000000 --- a/lib/custom_grid.h +++ /dev/null @@ -1,370 +0,0 @@ -// ************************************************************************** -// * 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) * -// ************************************************************************** - -#ifndef CUSTOMGRID_H_INCLUDED -#define CUSTOMGRID_H_INCLUDED - -#include -#include -#include -#include "process_xml.h" -#include -#include -#include "../file_hierarchy.h" -#include "icon_buffer.h" - - -class CustomGridTable; -class CustomGridTableRim; -class CustomGridTableLeft; -class CustomGridTableRight; -class CustomGridTableMiddle; -class GridCellRendererMiddle; -class wxTimer; -class CustomGridRim; -class CustomGridLeft; -class CustomGridMiddle; -class CustomGridRight; - - -namespace zen -{ -class GridView; - -const wxBitmap& getSyncOpImage(SyncOperation syncOp); -} -//################################################################################## - -/* -class hierarchy: - CustomGrid - /|\ - ____________|____________ - | | - CustomGridRim | - /|\ | - ________|_______ | - | | | -CustomGridLeft CustomGridRight CustomGridMiddle -*/ - -class CustomGrid : public wxGrid -{ -public: - CustomGrid(wxWindow* parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxWANTS_CHARS, - const wxString& name = wxGridNameStr); - - virtual ~CustomGrid() {} - - virtual void initSettings(CustomGridLeft* gridLeft, //create connection with zen::GridView - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const zen::GridView* gridDataView); - - void release(); //release connection to zen::GridView - - std::set getAllSelectedRows() const; - - //set sort direction indicator on UI - typedef int SortColumn; - - //notify wxGrid that underlying table size has changed - virtual void updateGridSizes(); - - enum SortDirection - { - ASCENDING, - DESCENDING - }; - typedef std::pair SortMarker; - void setSortMarker(SortMarker marker); - - bool isLeadGrid() const; - - void setIconManager(const std::shared_ptr& iconBuffer); - -protected: - void RefreshCell(int row, int col); - virtual void DrawColLabel(wxDC& dc, int col); - std::pair mousePosToCell(wxPoint pos); //returns (row/column) pair - - virtual CustomGridTable* getGridDataTable() const = 0; - -private: - void onGridAccess(wxEvent& event); - - //this method is called when grid view changes: useful for parallel updating of multiple grids - void OnPaintGrid(wxEvent& event); - - virtual void alignOtherGrids(CustomGrid* gridLeft, CustomGrid* gridMiddle, CustomGrid* gridRight) = 0; - - void adjustGridHeights(wxEvent& event); - virtual void enableFileIcons(const std::shared_ptr& iconBuffer) = 0; - - CustomGrid* m_gridLeft; - CustomGrid* m_gridMiddle; - CustomGrid* m_gridRight; - - bool isLeading; //identify grid that has user focus - - SortMarker m_marker; -}; - - -class GridCellRenderer; - - -//----------------------------------------------------------- -class IconUpdater : private wxEvtHandler //update file icons periodically: use SINGLE instance to coordinate left and right grid at once -{ -public: - IconUpdater(CustomGridLeft* leftGrid, CustomGridRight* rightGrid); - ~IconUpdater(); - -private: - void loadIconsAsynchronously(wxEvent& event); //loads all (not yet) drawn icons - - CustomGridRim* m_leftGrid; - CustomGridRim* m_rightGrid; - - std::unique_ptr m_timer; //user timer event to periodically update icons: better than idle event because also active when scrolling! :) -}; - - -//############## SPECIALIZATIONS ################### -class CustomGridRim : public CustomGrid -{ - friend class IconUpdater; - friend class GridCellRenderer; - -public: - CustomGridRim(wxWindow* parent, - wxWindowID id, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name); - - //set visibility, position and width of columns - static xmlAccess::ColumnAttributes getDefaultColumnAttributes(); - xmlAccess::ColumnAttributes getColumnAttributes(); - void setColumnAttributes(const xmlAccess::ColumnAttributes& attr); - - xmlAccess::ColumnTypes getTypeAtPos(size_t pos) const; - static wxString getTypeName(xmlAccess::ColumnTypes colType); - - void autoSizeColumns(); //performance optimized column resizer - - virtual void updateGridSizes(); - -protected: - template - void setTooltip(const wxMouseEvent& event); - - void setOtherGrid(CustomGridRim* other); //call during initialization! - -private: - CustomGridTableRim* getGridDataTableRim() const; - virtual void enableFileIcons(const std::shared_ptr& iconBuffer); - - void OnResizeColumn(wxGridSizeEvent& event); - - //this method is called when grid view changes: useful for parallel updating of multiple grids - virtual void alignOtherGrids(CustomGrid* gridLeft, CustomGrid* gridMiddle, CustomGrid* gridRight); - - //asynchronous icon loading - void getIconsToBeLoaded(std::vector& newLoad); //loads all (not yet) drawn icons - - typedef size_t RowBegin; - typedef size_t RowEnd; - std::pair getVisibleRows(); //return [first, last) number pair - - typedef size_t RowNumber; - typedef std::set FailedIconLoad; - FailedIconLoad failedLoads; //save status of last icon load when drawing on GUI - - std::shared_ptr iconBuffer_; - - xmlAccess::ColumnAttributes columnSettings; //set visibility, position and width of columns - CustomGridRim* otherGrid; //sibling grid on other side -}; - - -class CustomGridLeft : public CustomGridRim -{ -public: - CustomGridLeft(wxWindow* parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxWANTS_CHARS, - const wxString& name = wxGridNameStr); - - virtual bool CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells); - - virtual void initSettings(CustomGridLeft* gridLeft, //create connection with zen::GridView - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const zen::GridView* gridDataView); - -private: - void OnMouseMovement(wxMouseEvent& event); - virtual CustomGridTable* getGridDataTable() const; -}; - - -class CustomGridRight : public CustomGridRim -{ -public: - CustomGridRight(wxWindow* parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxWANTS_CHARS, - const wxString& name = wxGridNameStr); - - virtual bool CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells); - - virtual void initSettings(CustomGridLeft* gridLeft, //create connection with zen::GridView - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const zen::GridView* gridDataView); - -private: - void OnMouseMovement(wxMouseEvent& event); - virtual CustomGridTable* getGridDataTable() const; -}; - - -class CustomGridMiddle : public CustomGrid -{ - friend class GridCellRendererMiddle; - -public: - CustomGridMiddle(wxWindow* parent, - wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxWANTS_CHARS, - const wxString& name = wxGridNameStr); - - ~CustomGridMiddle(); - - virtual bool CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells); - - virtual void initSettings(CustomGridLeft* gridLeft, //create connection with zen::GridView - CustomGridMiddle* gridMiddle, - CustomGridRight* gridRight, - const zen::GridView* gridDataView); - - void enableSyncPreview(bool value); - -private: - virtual CustomGridTable* getGridDataTable() const; - CustomGridTableMiddle* getGridDataTableMiddle() const; - - virtual void enableFileIcons(const std::shared_ptr& iconBuffer) {}; -#ifdef FFS_WIN //get rid of scrollbars; Windows: overwrite virtual method - virtual void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh = true); -#endif - - //this method is called when grid view changes: useful for parallel updating of multiple grids - virtual void alignOtherGrids(CustomGrid* gridLeft, CustomGrid* gridMiddle, CustomGrid* gridRight); - - virtual void DrawColLabel(wxDC& dc, int col); - - void OnMouseMovement(wxMouseEvent& event); - void OnLeaveWindow(wxMouseEvent& event); - void OnLeftMouseDown(wxMouseEvent& event); - void OnLeftMouseUp(wxMouseEvent& event); - - void showToolTip(int rowNumber, wxPoint pos); - - //small helper methods - enum BlockPosition //each cell can be divided into four blocks concerning mouse selections - { - BLOCKPOS_CHECK_BOX, - BLOCKPOS_LEFT, - BLOCKPOS_MIDDLE, - BLOCKPOS_RIGHT - }; - int mousePosToRow(const wxPoint pos, BlockPosition* block = NULL); - - //variables for selecting sync direction - int selectionRowBegin; - BlockPosition selectionPos; - - //variables for highlightning on mouse-over - int highlightedRow; - BlockPosition highlightedPos; - - zen::Tooltip toolTip; -}; - -//custom events for middle grid: - -//-------------------------------------------------------------------------------------------- -//(UN-)CHECKING ROWS FROM SYNCHRONIZATION - -extern const wxEventType FFS_CHECK_ROWS_EVENT; //define new event type - -class FFSCheckRowsEvent : public wxCommandEvent -{ -public: - FFSCheckRowsEvent(const int from, const int to) : - wxCommandEvent(FFS_CHECK_ROWS_EVENT), - rowFrom(from), - rowTo(to) {} - - virtual wxEvent* Clone() const - { - return new FFSCheckRowsEvent(rowFrom, rowTo); - } - - const int rowFrom; - const int rowTo; -}; - -typedef void (wxEvtHandler::*FFSCheckRowsEventFunction)(FFSCheckRowsEvent&); - -#define FFSCheckRowsEventHandler(func) \ - (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(FFSCheckRowsEventFunction, &func) - -//-------------------------------------------------------------------------------------------- -//SELECTING SYNC DIRECTION - -extern const wxEventType FFS_SYNC_DIRECTION_EVENT; //define new event type - -class FFSSyncDirectionEvent : public wxCommandEvent -{ -public: - FFSSyncDirectionEvent(const int from, const int to, const zen::SyncDirection dir) : - wxCommandEvent(FFS_SYNC_DIRECTION_EVENT), - rowFrom(from), - rowTo(to), - direction(dir) {} - - virtual wxEvent* Clone() const - { - return new FFSSyncDirectionEvent(rowFrom, rowTo, direction); - } - - const int rowFrom; - const int rowTo; - const zen::SyncDirection direction; -}; - -typedef void (wxEvtHandler::*FFSSyncDirectionEventFunction)(FFSSyncDirectionEvent&); - -#define FFSSyncDirectionEventHandler(func) \ - (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(FFSSyncDirectionEventFunction, &func) - - -#endif // CUSTOMGRID_H_INCLUDED diff --git a/lib/db_file.cpp b/lib/db_file.cpp index 51333687..2d02d634 100644 --- a/lib/db_file.cpp +++ b/lib/db_file.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 "db_file.h" @@ -48,7 +48,7 @@ Zstring getDBFilename(const BaseDirMapping& baseMap, bool tempfile = false) //Linux and Windows builds are binary incompatible: different file id?, problem with case sensitivity? //however 32 and 64 bit db files *are* designed to be binary compatible! //Give db files different names. - //make sure they end with ".ffs_db". These files will not be included into comparison + //make sure they end with ".ffs_db". These files will not be included into comparison #ifdef FFS_WIN Zstring dbname = Zstring(Zstr("sync")) + (tempfile ? Zstr(".tmp") : Zstr("")) + SYNC_DB_FILE_ENDING; #elif defined FFS_LINUX diff --git a/lib/db_file.h b/lib/db_file.h index 0413c404..e5ae7b50 100644 --- a/lib/db_file.h +++ b/lib/db_file.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 DBFILE_H_INCLUDED diff --git a/lib/dir_exist_async.h b/lib/dir_exist_async.h index f59e9490..f3826eb3 100644 --- a/lib/dir_exist_async.h +++ b/lib/dir_exist_async.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 DIR_EXIST_HEADER_08173281673432158067342132467183267 diff --git a/lib/dir_lock.cpp b/lib/dir_lock.cpp index 9ca76310..88fb19b3 100644 --- a/lib/dir_lock.cpp +++ b/lib/dir_lock.cpp @@ -1,3 +1,8 @@ +// ************************************************************************** +// * 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 "dir_lock.h" #include #include diff --git a/lib/dir_lock.h b/lib/dir_lock.h index c9a16c62..9938d554 100644 --- a/lib/dir_lock.h +++ b/lib/dir_lock.h @@ -1,3 +1,8 @@ +// ************************************************************************** +// * 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 DIR_LOCK_H_INCLUDED #define DIR_LOCK_H_INCLUDED diff --git a/lib/error_log.cpp b/lib/error_log.cpp index 67584dea..a71e72e1 100644 --- a/lib/error_log.cpp +++ b/lib/error_log.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 "error_log.h" diff --git a/lib/error_log.h b/lib/error_log.h index a0b7ab90..62aac70f 100644 --- a/lib/error_log.h +++ b/lib/error_log.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 ERRORLOGGING_H_INCLUDED diff --git a/lib/ffs_paths.h b/lib/ffs_paths.h index 0ad02b15..ac032e6b 100644 --- a/lib/ffs_paths.h +++ b/lib/ffs_paths.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 STANDARDPATHS_H_INCLUDED diff --git a/lib/hard_filter.cpp b/lib/hard_filter.cpp index ee744337..fcef6a9f 100644 --- a/lib/hard_filter.cpp +++ b/lib/hard_filter.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 "hard_filter.h" diff --git a/lib/hard_filter.h b/lib/hard_filter.h index e128a9df..476f5ac1 100644 --- a/lib/hard_filter.h +++ b/lib/hard_filter.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 FFS_FILTER_H_INCLUDED diff --git a/lib/help_provider.h b/lib/help_provider.h index 094084b2..213c05e3 100644 --- a/lib/help_provider.h +++ b/lib/help_provider.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 HELPPROVIDER_H_INCLUDED diff --git a/lib/icon_buffer.cpp b/lib/icon_buffer.cpp index 4e05e642..647228e3 100644 --- a/lib/icon_buffer.cpp +++ b/lib/icon_buffer.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 "icon_buffer.h" @@ -522,7 +522,7 @@ void WorkerThread::operator()() //thread entry ZEN_ON_BLOCK_EXIT(::CoUninitialize()); //2. Initialize system image list - typedef BOOL (WINAPI *FileIconInitFun)(BOOL fRestoreCache); + typedef BOOL (WINAPI* FileIconInitFun)(BOOL fRestoreCache); const SysDllFun fileIconInit(L"Shell32.dll", reinterpret_cast(660)); assert(fileIconInit); if (fileIconInit) diff --git a/lib/icon_buffer.h b/lib/icon_buffer.h index a13ad3cd..3f77a520 100644 --- a/lib/icon_buffer.h +++ b/lib/icon_buffer.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 ICONBUFFER_H_INCLUDED diff --git a/lib/localization.cpp b/lib/localization.cpp index 8084eb42..e8867129 100644 --- a/lib/localization.cpp +++ b/lib/localization.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 "localization.h" @@ -32,7 +32,7 @@ namespace class FFSLocale : public TranslationHandler { public: - FFSLocale(const wxString& filename, wxLanguage languageId); //throw (lngfile::ParsingError, PluralForm::ParsingError) + FFSLocale(const wxString& filename, wxLanguage languageId); //throw lngfile::ParsingError, PluralForm::ParsingError wxLanguage langId() const { return langId_; } @@ -71,7 +71,7 @@ private: -FFSLocale::FFSLocale(const wxString& filename, wxLanguage languageId) : langId_(languageId) //throw (lngfile::ParsingError, PluralForm::ParsingError) +FFSLocale::FFSLocale(const wxString& filename, wxLanguage languageId) : langId_(languageId) //throw lngfile::ParsingError, PluralForm::ParsingError { std::string inputStream; try @@ -111,7 +111,7 @@ FFSLocale::FFSLocale(const wxString& filename, wxLanguage languageId) : langId_( transMappingPl.insert(std::make_pair(std::make_pair(singular, plural), plFormsWide)); } - pluralParser.reset(new PluralForm(header.pluralDefinition.c_str())); //throw PluralForm::ParsingError + pluralParser.reset(new PluralForm(copyStringTo(header.pluralDefinition))); //throw PluralForm::ParsingError } } @@ -205,7 +205,7 @@ ExistingTranslations::ExistingTranslations() locMapping.push_back(newEntry); } } - catch (lngfile::ParsingError&) {} + catch (lngfile::ParsingError&) {} //better not show an error message here; scenario: batch jobs } catch (...) {} @@ -388,7 +388,7 @@ void zen::setLanguage(int language) { try { - zen::setTranslator(new FFSLocale(languageFile, static_cast(language))); //throw (lngfile::ParsingError, PluralForm::ParsingError) + zen::setTranslator(new FFSLocale(languageFile, static_cast(language))); //throw lngfile::ParsingError, PluralForm::ParsingError } catch (lngfile::ParsingError& e) { diff --git a/lib/localization.h b/lib/localization.h index 438ad445..7c30ab74 100644 --- a/lib/localization.h +++ b/lib/localization.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 MISC_H_INCLUDED diff --git a/lib/norm_filter.h b/lib/norm_filter.h index d95fbe35..a47fd910 100644 --- a/lib/norm_filter.h +++ b/lib/norm_filter.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 NORM_FILTER_H_INCLUDED diff --git a/lib/parallel_scan.cpp b/lib/parallel_scan.cpp index a98623cf..774cbeb7 100644 --- a/lib/parallel_scan.cpp +++ b/lib/parallel_scan.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 "parallel_scan.h" diff --git a/lib/parallel_scan.h b/lib/parallel_scan.h index 99424b2a..836892ad 100644 --- a/lib/parallel_scan.h +++ b/lib/parallel_scan.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 PARALLEL_SCAN_H_INCLUDED @@ -59,7 +59,7 @@ public: TRAV_ERROR_RETRY, TRAV_ERROR_IGNORE }; - virtual HandleError reportError (const std::wstring& errorText) = 0; //may throw! + virtual HandleError reportError (const std::wstring& errorText) = 0; //may throw! virtual void reportStatus(const std::wstring& statusMsg, int itemTotal) = 0; // }; diff --git a/lib/parse_lng.h b/lib/parse_lng.h index 811a3181..e876c5a9 100644 --- a/lib/parse_lng.h +++ b/lib/parse_lng.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 PARSE_LNG_HEADER_INCLUDED diff --git a/lib/parse_plural.h b/lib/parse_plural.h index c4466320..297aaafc 100644 --- a/lib/parse_plural.h +++ b/lib/parse_plural.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 PARSE_PLURAL_H_INCLUDED diff --git a/lib/process_xml.cpp b/lib/process_xml.cpp index ef324246..4ee215b9 100644 --- a/lib/process_xml.cpp +++ b/lib/process_xml.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 "process_xml.h" @@ -71,7 +71,6 @@ void setXmlType(XmlDoc& doc, XmlType type) //throw() } //################################################################################################################ - wxString xmlAccess::getGlobalConfigFile() { return toWx(zen::getConfigDir()) + wxT("GlobalSettings.xml"); @@ -539,15 +538,29 @@ bool readText(const std::string& input, UnitTime& value) template <> inline -void writeText(const ColumnTypes& value, std::string& output) +void writeText(const ColumnTypeRim& value, std::string& output) { output = toString(value); } template <> inline -bool readText(const std::string& input, ColumnTypes& value) +bool readText(const std::string& input, ColumnTypeRim& value) { - value = static_cast(toNumber(input)); + value = static_cast(toNumber(input)); + return true; +} + + +template <> inline +void writeText(const ColumnTypeNavi& value, std::string& output) +{ + output = toString(value); +} + +template <> inline +bool readText(const std::string& input, ColumnTypeNavi& value) +{ + value = static_cast(toNumber(input)); return true; } @@ -631,23 +644,42 @@ bool readText(const std::string& input, DirectionConfig::Variant& value) template <> inline -bool readValue(const XmlElement& input, ColumnAttrib& value) +bool readValue(const XmlElement& input, ColumnAttributeRim& value) +{ + XmlIn in(input); + bool rv1 = in.attribute("Type", value.type_); + bool rv2 = in.attribute("Visible", value.visible_); + bool rv3 = in.attribute("Width", value.width_); + return rv1 && rv2 && rv3; +} + +template <> inline +void writeValue(const ColumnAttributeRim& value, XmlElement& output) +{ + XmlOut out(output); + out.attribute("Type", value.type_); + out.attribute("Visible", value.visible_); + out.attribute("Width", value.width_); +} + + +template <> inline +bool readValue(const XmlElement& input, ColumnAttributeNavi& value) { XmlIn in(input); - bool rv1 = in.attribute("Type", value.type); - bool rv2 = in.attribute("Visible", value.visible); - bool rv3 = in.attribute("Width", value.width); - value.position = 0; + bool rv1 = in.attribute("Type", value.type_); + bool rv2 = in.attribute("Visible", value.visible_); + bool rv3 = in.attribute("Width", value.width_); return rv1 && rv2 && rv3; } template <> inline -void writeValue(const ColumnAttrib& value, XmlElement& output) +void writeValue(const ColumnAttributeNavi& value, XmlElement& output) { XmlOut out(output); - out.attribute("Type", value.type); - out.attribute("Visible", value.visible); - out.attribute("Width", value.width); + out.attribute("Type", value.type_); + out.attribute("Visible", value.visible_); + out.attribute("Width", value.width_); } } @@ -791,16 +823,7 @@ void readConfig(const XmlIn& in, xmlAccess::XmlBatchConfig& config) //read GUI specific config data XmlIn inBatchCfg = in["BatchConfig"]; - //----------------------------------------------------------------------------- - if (inBatchCfg["Silent"]) - { - inBatchCfg["Silent"](config.showProgress); - config.showProgress = !config.showProgress; - } - else - //----------------------------------------------------------------------------- - - inBatchCfg["ShowProgress" ](config.showProgress); + inBatchCfg["ShowProgress" ](config.showProgress); inBatchCfg["LogfileDirectory"](config.logFileDirectory); inBatchCfg["LogfileCountMax" ](config.logFileCountMax); inBatchCfg["HandleError" ](config.handleError); @@ -845,12 +868,6 @@ void readConfig(const XmlIn& in, XmlGlobalSettings& config) inWnd.attribute("PosY", config.gui.dlgPos.y); inWnd.attribute("Maximized", config.gui.isMaximized); - // inWnd["Width" ](config.gui.dlgSize.x); - // inWnd["Height" ](config.gui.dlgSize.y); - // inWnd["PosX" ](config.gui.dlgPos.x); - // inWnd["PosY" ](config.gui.dlgPos.y); - // inWnd["Maximized"](config.gui.isMaximized); - inWnd["MaxFolderPairsVisible"](config.gui.maxFolderPairsVisible); inWnd["ManualDeletionOnBothSides"](config.gui.deleteOnBothSides); @@ -861,22 +878,21 @@ void readConfig(const XmlIn& in, XmlGlobalSettings& config) //########################################################### //read column attributes - XmlIn inColLeft = inWnd["LeftColumns"]; - inColLeft.attribute("AutoAdjust", config.gui.autoAdjustColumnsLeft); + XmlIn inColNavi = inWnd["CompressedView"]; + inColNavi(config.gui.columnAttribNavi); - inColLeft(config.gui.columnAttribLeft); - for (size_t i = 0; i < config.gui.columnAttribLeft.size(); ++i) - config.gui.columnAttribLeft[i].position = i; + inColNavi.attribute("ShowPercentage", config.gui.showPercentBar); + inColNavi.attribute("SortByColumn", config.gui.naviLastSortColumn); + inColNavi.attribute("SortAscending", config.gui.naviLastSortAscending); - //########################################################### - XmlIn inColRight = inWnd["RightColumns"]; - inColRight.attribute("AutoAdjust", config.gui.autoAdjustColumnsRight); + XmlIn inColLeft = inWnd["ColumnsLeft"]; + inColLeft(config.gui.columnAttribLeft); + XmlIn inColRight = inWnd["ColumnsRight"]; inColRight(config.gui.columnAttribRight); - for (size_t i = 0; i < config.gui.columnAttribRight.size(); ++i) - config.gui.columnAttribRight[i].position = i; + //########################################################### - inWnd["Perspective" ](config.gui.guiPerspectiveLast); + inWnd["Layout"](config.gui.guiPerspectiveLast); inGui["FolderHistoryLeft" ](config.gui.folderHistoryLeft); inGui["FolderHistoryRight"](config.gui.folderHistoryRight); @@ -1126,18 +1142,22 @@ void writeConfig(const XmlGlobalSettings& config, XmlOut& out) outWnd["IconSize"](config.gui.iconSize); //########################################################### - //write column attributes - XmlOut outColLeft = outWnd["LeftColumns"]; - outColLeft.attribute("AutoAdjust", config.gui.autoAdjustColumnsLeft); + XmlOut outColNavi = outWnd["CompressedView"]; + outColNavi(config.gui.columnAttribNavi); + + outColNavi.attribute("ShowPercentage", config.gui.showPercentBar); + outColNavi.attribute("SortByColumn", config.gui.naviLastSortColumn); + outColNavi.attribute("SortAscending", config.gui.naviLastSortAscending); + + XmlOut outColLeft = outWnd["ColumnsLeft"]; outColLeft(config.gui.columnAttribLeft); - //########################################################### - XmlOut outColRight = outWnd["RightColumns"]; - outColRight.attribute("AutoAdjust", config.gui.autoAdjustColumnsRight); + XmlOut outColRight = outWnd["ColumnsRight"]; outColRight(config.gui.columnAttribRight); + //########################################################### - outWnd["Perspective" ](config.gui.guiPerspectiveLast); + outWnd["Layout"](config.gui.guiPerspectiveLast); outGui["FolderHistoryLeft" ](config.gui.folderHistoryLeft); outGui["FolderHistoryRight"](config.gui.folderHistoryRight); diff --git a/lib/process_xml.h b/lib/process_xml.h index d8ca7e54..5abbfdc9 100644 --- a/lib/process_xml.h +++ b/lib/process_xml.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 PROCESSXML_H_INCLUDED @@ -11,6 +11,7 @@ #include "../structures.h" #include "xml_base.h" #include "localization.h" +#include "../ui/column_attr.h" namespace xmlAccess { @@ -38,28 +39,6 @@ enum OnGuiError ON_GUIERROR_IGNORE }; -enum ColumnTypes -{ - DIRECTORY, //this needs to begin with 0 and be continuous (some code relies on it) - FULL_PATH, - REL_PATH, - FILENAME, - SIZE, - DATE, - EXTENSION -}; -const size_t COLUMN_TYPE_COUNT = 7; - -struct ColumnAttrib -{ - ColumnTypes type; - bool visible; - size_t position; - int width; -}; -typedef std::vector ColumnAttributes; - - typedef wxString Description; typedef wxString Commandline; typedef std::vector > ExternalApps; @@ -167,8 +146,12 @@ struct XmlGlobalSettings dlgSize(wxDefaultCoord, wxDefaultCoord), isMaximized(false), maxFolderPairsVisible(6), - autoAdjustColumnsLeft(false), - autoAdjustColumnsRight(false), + columnAttribNavi (zen::getDefaultColumnAttributesNavi()), + columnAttribLeft (zen::getDefaultColumnAttributesLeft()), + columnAttribRight(zen::getDefaultColumnAttributesRight()), + naviLastSortColumn(zen::defaultValueLastSortColumn), + naviLastSortAscending(zen::defaultValueLastSortAscending), + showPercentBar(zen::defaultValueShowPercentage), folderHistMax(15), onCompletionHistoryMax(8), deleteOnBothSides(false), @@ -201,11 +184,14 @@ struct XmlGlobalSettings int maxFolderPairsVisible; - ColumnAttributes columnAttribLeft; - ColumnAttributes columnAttribRight; + std::vector columnAttribNavi; //compressed view/navigation + std::vector columnAttribLeft; + std::vector columnAttribRight; + + zen::ColumnTypeNavi naviLastSortColumn; //remember sort on navigation panel + bool naviLastSortAscending; // - bool autoAdjustColumnsLeft; - bool autoAdjustColumnsRight; + bool showPercentBar; //in navigation panel ExternalApps externelApplications; @@ -234,31 +220,6 @@ struct XmlGlobalSettings //struct Batch }; - -inline -bool sortByType(const ColumnAttrib& a, const ColumnAttrib& b) -{ - return a.type < b.type; -} - - -inline -bool sortByPositionOnly(const ColumnAttrib& a, const ColumnAttrib& b) -{ - return a.position < b.position; -} - - -inline -bool sortByPositionAndVisibility(const ColumnAttrib& a, const ColumnAttrib& b) -{ - if (a.visible == false) //hidden elements shall appear at end of vector - return false; - if (b.visible == false) - return true; - return a.position < b.position; -} - void readConfig(const wxString& filename, XmlGuiConfig& config); //throw xmlAccess::FfsXmlError void readConfig(const wxString& filename, XmlBatchConfig& config); //throw xmlAccess::FfsXmlError void readConfig( XmlGlobalSettings& config); //throw xmlAccess::FfsXmlError diff --git a/lib/recycler.cpp b/lib/recycler.cpp index abe63a3e..11ed77f7 100644 --- a/lib/recycler.cpp +++ b/lib/recycler.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 "recycler.h" diff --git a/lib/recycler.h b/lib/recycler.h index 4607199c..37b9250e 100644 --- a/lib/recycler.h +++ b/lib/recycler.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 RECYCLER_H_INCLUDED diff --git a/lib/resolve_path.cpp b/lib/resolve_path.cpp index df65b98b..178e70e2 100644 --- a/lib/resolve_path.cpp +++ b/lib/resolve_path.cpp @@ -312,7 +312,7 @@ Zstring volumenNameToPath(const Zstring& volumeName) //return empty string on er if (EqualFilename()(volumeName, Zstring(&volName[0]))) { //GetVolumePathNamesForVolumeName is not available for Windows 2000! - typedef BOOL (WINAPI *GetVolumePathNamesForVolumeNameWFunc)(LPCWSTR lpszVolumeName, + typedef BOOL (WINAPI* GetVolumePathNamesForVolumeNameWFunc)(LPCWSTR lpszVolumeName, LPWCH lpszVolumePathNames, DWORD cchBufferLength, PDWORD lpcchReturnLength); diff --git a/lib/resolve_path.h b/lib/resolve_path.h index 7005d0ea..2fd5008e 100644 --- a/lib/resolve_path.h +++ b/lib/resolve_path.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 RESOLVE_PATH_H_INCLUDED diff --git a/lib/resources.cpp b/lib/resources.cpp index 01a046b1..e47065e6 100644 --- a/lib/resources.cpp +++ b/lib/resources.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 "resources.h" @@ -65,8 +65,8 @@ GlobalResources::GlobalResources() //generic image loading if (name.EndsWith(wxT(".png"))) bitmaps.insert(std::make_pair(name, wxImage(resourceFile, wxBITMAP_TYPE_PNG))); - else if (name == wxT("money.gif")) - loadAnimFromZip(resourceFile, animationMoney); + //else if (name == wxT("money.gif")) + // loadAnimFromZip(resourceFile, animationMoney); else if (name == wxT("working.gif")) loadAnimFromZip(resourceFile, animationSync); } diff --git a/lib/resources.h b/lib/resources.h index d8b08b72..56b23a5f 100644 --- a/lib/resources.h +++ b/lib/resources.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 RESOURCES_H_INCLUDED @@ -21,7 +21,7 @@ public: static const wxBitmap& getImage(const wxString& name) { return instance().getImageInt(name); } //global image resource objects - wxAnimation animationMoney; + //wxAnimation animationMoney; wxAnimation animationSync; wxIcon programIcon; diff --git a/lib/shadow.cpp b/lib/shadow.cpp index 9bc17aff..d00aa2f3 100644 --- a/lib/shadow.cpp +++ b/lib/shadow.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 "shadow.h" @@ -21,7 +21,7 @@ namespace bool runningWOW64() //test if process is running under WOW64 (reference http://msdn.microsoft.com/en-us/library/ms684139(VS.85).aspx) { //dynamically load windows API function - typedef BOOL (WINAPI *IsWow64ProcessFun)(HANDLE hProcess, PBOOL Wow64Process); + typedef BOOL (WINAPI* IsWow64ProcessFun)(HANDLE hProcess, PBOOL Wow64Process); const SysDllFun isWow64Process(L"kernel32.dll", "IsWow64Process"); if (isWow64Process) diff --git a/lib/shadow.h b/lib/shadow.h index bfb1e84a..2d933840 100644 --- a/lib/shadow.h +++ b/lib/shadow.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 SHADOW_H_INCLUDED diff --git a/lib/soft_filter.h b/lib/soft_filter.h index 6763d6b7..1ad55ea9 100644 --- a/lib/soft_filter.h +++ b/lib/soft_filter.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 SOFT_FILTER_H_INCLUDED diff --git a/lib/statistics.cpp b/lib/statistics.cpp index 6cc3c0cd..9914d455 100644 --- a/lib/statistics.cpp +++ b/lib/statistics.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 "statistics.h" diff --git a/lib/statistics.h b/lib/statistics.h index 62a30b99..bddf129d 100644 --- a/lib/statistics.h +++ b/lib/statistics.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 STATISTICS_H_INCLUDED diff --git a/lib/status_handler.cpp b/lib/status_handler.cpp index 55f82c64..5e75b60e 100644 --- a/lib/status_handler.cpp +++ b/lib/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 "status_handler.h" diff --git a/lib/status_handler.h b/lib/status_handler.h index acab956a..a37d2257 100644 --- a/lib/status_handler.h +++ b/lib/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 STATUSHANDLER_H_INCLUDED @@ -56,6 +56,7 @@ struct ProcessCallback //opportunity to abort must be implemented in a frequently executed method like requestUiRefresh() virtual void requestUiRefresh() = 0; //throw ? + virtual void forceUiRefresh () = 0; //throw ? - call before starting long running task which doesn't update regularly //called periodically after data was processed: expected(!) to request GUI update virtual void reportStatus(const std::wstring& text) = 0; //status info only, should not be logged! @@ -90,8 +91,6 @@ class StatusHandler : public ProcessCallback, public AbortCallback public: StatusHandler() : abortRequested(false) {} - virtual void forceUiRefresh() = 0; - virtual void requestUiRefresh() { if (updateUiIsAllowed()) //test if specific time span between ui updates is over diff --git a/lib/xml_base.cpp b/lib/xml_base.cpp index 26176776..e6b1e840 100644 --- a/lib/xml_base.cpp +++ b/lib/xml_base.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 "xml_base.h" diff --git a/lib/xml_base.h b/lib/xml_base.h index dc534dc5..b81b406d 100644 --- a/lib/xml_base.h +++ b/lib/xml_base.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 XMLBASE_H_INCLUDED diff --git a/structures.cpp b/structures.cpp index 803227f3..c53fc454 100644 --- a/structures.cpp +++ b/structures.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 "structures.h" @@ -237,7 +237,7 @@ zen::Int64 resolve(size_t value, UnitTime unit, zen::Int64 defaultVal) localTimeFmt->tm_sec = 0; //0-61 localTimeFmt->tm_min = 0; //0-59 localTimeFmt->tm_hour = 0; //0-23 - return Int64(::mktime(localTimeFmt)); //convert local time back to UTC + return ::mktime(localTimeFmt); //convert local time back to UTC case UTIME_THIS_WEEK: { @@ -256,7 +256,7 @@ zen::Int64 resolve(size_t value, UnitTime unit, zen::Int64 defaultVal) localTimeFmt->tm_min = 0; //0-59 localTimeFmt->tm_hour = 0; //0-23 localTimeFmt->tm_mday = 1; //1-31 - return Int64(::mktime(localTimeFmt)); //convert local time back to UTC + return ::mktime(localTimeFmt); //convert local time back to UTC case UTIME_THIS_YEAR: localTimeFmt->tm_sec = 0; //0-61 @@ -264,7 +264,7 @@ zen::Int64 resolve(size_t value, UnitTime unit, zen::Int64 defaultVal) localTimeFmt->tm_hour = 0; //0-23 localTimeFmt->tm_mday = 1; //1-31 localTimeFmt->tm_mon = 0; //0-11 - return Int64(::mktime(localTimeFmt)); //convert local time back to UTC + return ::mktime(localTimeFmt); //convert local time back to UTC } assert(false); diff --git a/structures.h b/structures.h index 21fbc18e..5d79862f 100644 --- a/structures.h +++ b/structures.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 FREEFILESYNC_H_INCLUDED diff --git a/synchronization.cpp b/synchronization.cpp index 00330c6a..10ec2f5a 100644 --- a/synchronization.cpp +++ b/synchronization.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 "synchronization.h" @@ -866,34 +866,37 @@ private: class zen::SynchronizeFolderPair { public: - SynchronizeFolderPair(const SyncProcess& syncProc, + SynchronizeFolderPair(ProcessCallback& procCallback, + bool verifyCopiedFiles, + bool copyFilePermissions, + bool transactionalFileCopy, #ifdef FFS_WIN shadow::ShadowCopy* shadowCopyHandler, #endif const DeletionHandling& delHandlingLeft, const DeletionHandling& delHandlingRight) : - procCallback_(syncProc.procCallback), + procCallback_(procCallback), #ifdef FFS_WIN shadowCopyHandler_(shadowCopyHandler), #endif delHandlingLeft_(delHandlingLeft), delHandlingRight_(delHandlingRight), - verifyCopiedFiles(syncProc.verifyCopiedFiles_), - copyFilePermissions(syncProc.copyFilePermissions_), - transactionalFileCopy(syncProc.transactionalFileCopy_), - txtCreatingFile (replaceCpy(_("Creating file %x" ), L"%x", L"\"%x\"", false)), + verifyCopiedFiles_(verifyCopiedFiles), + copyFilePermissions_(copyFilePermissions), + transactionalFileCopy_(transactionalFileCopy), + txtCreatingFile (replaceCpy(_("Creating file %x" ), L"%x", L"\"%x\"", false)), //harmonize with duplicates in CallbackMoveFileImpl!!! txtCreatingLink (replaceCpy(_("Creating symbolic link %x" ), L"%x", L"\"%x\"", false)), - txtCreatingFolder (replaceCpy(_("Creating folder %x" ), L"%x", L"\"%x\"", false)), + txtCreatingFolder (replaceCpy(_("Creating folder %x" ), L"%x", L"\"%x\"", false)), // txtOverwritingFile (replaceCpy(_("Overwriting file %x" ), L"%x", L"\"%x\"", false)), txtOverwritingLink (replaceCpy(_("Overwriting symbolic link %x"), L"%x", L"\"%x\"", false)), txtVerifying (replaceCpy(_("Verifying file %x" ), L"%x", L"\"%x\"", false)), txtWritingAttributes(replaceCpy(_("Updating attributes of %x" ), L"%x", L"\"%x\"", false)), - txtMovingFile (replaceCpy(replaceCpy(_("Moving file %x to %y"), L"%x", L"\"%x\"", false), L"%y", L"\"%y\"", false)) {} - //harmonize with duplicates in CallbackMoveFileImpl!!! + txtMovingFile (replaceCpy(replaceCpy(_("Moving file %x to %y"), L"%x", L"\"%x\"", false), L"%y", L"\"%y\"", false)) + {} void startSync(BaseDirMapping& baseMap) { - runZeroPass(baseMap); //first process file moves + runZeroPass(baseMap); //first process file moves runPass(baseMap); //delete files (or overwrite big ones with smaller ones) runPass(baseMap); //copy rest } @@ -947,9 +950,9 @@ private: const DeletionHandling& delHandlingLeft_; const DeletionHandling& delHandlingRight_; - const bool verifyCopiedFiles; - const bool copyFilePermissions; - const bool transactionalFileCopy; + const bool verifyCopiedFiles_; + const bool copyFilePermissions_; + const bool transactionalFileCopy_; //preload status texts const std::wstring txtCreatingFile; @@ -1569,7 +1572,7 @@ void SynchronizeFolderPair::synchronizeLinkInt(SymLinkMapping& linkObj, SyncOper try { - zen::copySymlink(linkObj.getFullName(), target, copyFilePermissions); //throw FileError + zen::copySymlink(linkObj.getFullName(), target, copyFilePermissions_); //throw FileError procCallback_.updateProcessedData(1, 0); linkObj.copyTo(); //update SymLinkMapping @@ -1608,7 +1611,7 @@ void SynchronizeFolderPair::synchronizeLinkInt(SymLinkMapping& linkObj, SyncOper linkObj.removeObject(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!) reportStatus(txtOverwritingLink, target); //restore status text - zen::copySymlink(linkObj.getFullName(), target, copyFilePermissions); //throw FileError + zen::copySymlink(linkObj.getFullName(), target, copyFilePermissions_); //throw FileError linkObj.copyTo(); //update SymLinkMapping procCallback_.updateProcessedData(1, 0); @@ -1677,7 +1680,7 @@ void SynchronizeFolderPair::synchronizeFolderInt(DirMapping& dirObj, SyncOperati const Zstring& target = dirObj.getBaseDirPf() + dirObj.getRelativeName(); reportInfo(txtCreatingFolder, target); - createDirectory(target, dirObj.getFullName(), copyFilePermissions); //no symlink copying! + createDirectory(target, dirObj.getFullName(), copyFilePermissions_); //no symlink copying! dirObj.copyTo(); //update DirMapping procCallback_.updateProcessedData(1, 0); @@ -1843,10 +1846,10 @@ void SyncProcess::startSynchronizationProcess(const std::vector > DirPairList; + typedef std::vector> DirPairList; DirPairList significantDiff; - typedef std::vector > > DirSpaceRequAvailList; //dirname / space required / space available + typedef std::vector>> DirSpaceRequAvailList; //dirname / space required / space available DirSpaceRequAvailList diskSpaceMissing; std::set recyclMissing; @@ -1925,7 +1928,7 @@ void SyncProcess::startSynchronizationProcess(const std::vectorgetBaseDirPf(), j->getBaseDirPf())); - //check for sufficient free diskspace in left directory + //check for sufficient free diskspace + auto checkSpace = [&](const Zstring& baseDirPf, const Int64& spaceRequired) + { + wxLongLong freeDiskSpace; + if (wxGetDiskSpace(toWx(baseDirPf), NULL, &freeDiskSpace)) + { + if (0 < freeDiskSpace && //zero disk space is either an error or not: in both cases this warning message is obsolete (WebDav seems to report 0) + freeDiskSpace.GetValue() < spaceRequired) + diskSpaceMissing.push_back(std::make_pair(baseDirPf, std::make_pair(spaceRequired, freeDiskSpace.GetValue()))); + } + }; const std::pair spaceNeeded = DiskSpaceNeeded::calculate(*j, delHandlerFp.first.deletionFreesSpace(), delHandlerFp.second.deletionFreesSpace()); - wxLongLong freeDiskSpaceLeft; - if (wxGetDiskSpace(toWx(j->getBaseDirPf()), NULL, &freeDiskSpaceLeft)) - { - if (0 < freeDiskSpaceLeft && //zero disk space is either an error or not: in both cases this warning message is obsolete (WebDav seems to report 0) - freeDiskSpaceLeft.ToDouble() < to(spaceNeeded.first)) - diskSpaceMissing.push_back(std::make_pair(j->getBaseDirPf(), std::make_pair(spaceNeeded.first, freeDiskSpaceLeft.ToDouble()))); - } - - //check for sufficient free diskspace in right directory - wxLongLong freeDiskSpaceRight; - if (wxGetDiskSpace(toWx(j->getBaseDirPf()), NULL, &freeDiskSpaceRight)) - { - if (0 < freeDiskSpaceRight && //zero disk space is either an error or not: in both cases this warning message is obsolete (WebDav seems to report 0) - freeDiskSpaceRight.ToDouble() < to(spaceNeeded.second)) - diskSpaceMissing.push_back(std::make_pair(j->getBaseDirPf(), std::make_pair(spaceNeeded.second, freeDiskSpaceRight.ToDouble()))); - } + checkSpace(j->getBaseDirPf(), spaceNeeded.first); + checkSpace(j->getBaseDirPf(), spaceNeeded.second); - //windows: check if recycle bin really exists; if not, Windows will silently delete, which is wrong #ifdef FFS_WIN + //windows: check if recycle bin really exists; if not, Windows will silently delete, which is wrong if (folderPairCfg.handleDeletion == MOVE_TO_RECYCLE_BIN) { if (folderPairStat.getUpdate() + @@ -2138,7 +2137,7 @@ void SyncProcess::startSynchronizationProcess(const std::vectorgetBaseDirPf(), FILE_NAME_SEPARATOR)) && //throw FileError + supportsPermissions(beforeLast(j->getBaseDirPf(), FILE_NAME_SEPARATOR)); + }); //show error dialog if necessary + + SynchronizeFolderPair syncFP(procCallback, verifyCopiedFiles_, copyPermissionsFp, transactionalFileCopy_, #ifdef FFS_WIN shadowCopyHandler.get(), #endif @@ -2156,13 +2163,14 @@ void SyncProcess::startSynchronizationProcess(const std::vector will be done in ~DeletionHandling anyway... - tryReportingError(procCallback, [&]() { delHandlerFp.first .tryCleanup(); }); //show error dialog if necessary - tryReportingError(procCallback, [&]() { delHandlerFp.second.tryCleanup(); }); // + tryReportingError(procCallback, [&] { delHandlerFp.first .tryCleanup(); }); //show error dialog if necessary + tryReportingError(procCallback, [&] { delHandlerFp.second.tryCleanup(); }); // //(try to gracefully) write database file (will be done in ~EnforceUpdateDatabase anyway...) if (folderPairCfg.inAutomaticMode) { procCallback.reportStatus(_("Generating database...")); + procCallback.forceUiRefresh(); tryReportingError(procCallback, [&]() { zen::saveToDisk(*j); }); //throw FileError guardUpdateDb.dismiss(); @@ -2236,8 +2244,8 @@ void SynchronizeFolderPair::copyFileUpdatingTo(const FileMapping& fileObj, const zen::copyFile(source, //type File implicitly means symlinks need to be dereferenced! target, - copyFilePermissions, - transactionalFileCopy, + copyFilePermissions_, + transactionalFileCopy_, &callback, &newAttr); //throw FileError, ErrorFileLocked @@ -2280,7 +2288,7 @@ void SynchronizeFolderPair::copyFileUpdatingTo(const FileMapping& fileObj, const //#################### Verification ############################# - if (verifyCopiedFiles) + if (verifyCopiedFiles_) { zen::ScopeGuard guardTarget = zen::makeGuard([&] { removeFile(target); }); //delete target if verification fails zen::ScopeGuard guardStatistics = zen::makeGuard([&] diff --git a/synchronization.h b/synchronization.h index 34494ddd..a9fd5d0c 100644 --- a/synchronization.h +++ b/synchronization.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 SYNCHRONIZATION_H_INCLUDED 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 #include +#include #include "../lib/help_provider.h" #include #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& newPairs, bool addFront = false); void removeAddFolderPair(const int pos); @@ -88,8 +89,6 @@ private: xmlAccess::XmlBatchConfig localBatchCfg; - std::unique_ptr contextMenu; - std::unique_ptr> logfileDir; zen::EnumDescrList enumDescrMap; @@ -146,16 +145,16 @@ private: batchDlg.updateGui(); } - virtual void OnAltCompCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltCompCfg() { - FolderPairPanelBasic::OnAltCompCfgRemoveConfirm(event); + FolderPairPanelBasic::removeAltCompCfg(); batchDlg.updateGui(); } - virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltSyncCfg() { - FolderPairPanelBasic::OnAltSyncCfgRemoveConfirm(event); + FolderPairPanelBasic::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(*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(_(""), [&] { 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(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 //size_t +#include + +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 getDefaultColumnAttributesLeft() +{ + std::vector 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 getDefaultColumnAttributesRight() +{ + std::vector 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 getDefaultColumnAttributesNavi() +{ + std::vector 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 +#include +#include +#include +#include +#include +#include +#include +#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 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; //bind ownership to GridDataRim<>! +}; + +//######################################################################################################## + +class GridDataBase : public GridData +{ +public: + GridDataBase(Grid& grid) : grid_(grid) {} + + void holdOwnership(const std::shared_ptr& evtMgr) { evtMgr_ = evtMgr; } + +protected: + Grid& refGrid() { return grid_; } + const Grid& refGrid() const { return grid_; } + +private: + std::shared_ptr evtMgr_; + Grid& grid_; + +}; + +//######################################################################################################## + +template +class GridDataRim : public GridDataBase +{ +public: + GridDataRim(const std::shared_ptr& gridDataView, Grid& grid, size_t compPos) : GridDataBase(grid), gridDataView_(gridDataView), compPos_(compPos) {} + + void setIconManager(const std::shared_ptr& iconMgr) { iconMgr_ = iconMgr; } + + void addIconsToBeLoaded(std::vector& 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& 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(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()) //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(), FILE_NAME_SEPARATOR)); + break; + case COL_TYPE_FILENAME: //filename + value = toWx(fileObj.getShortName()); + 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()); + break; + case COL_TYPE_SIZE: //file size + if (!fsObj_.isEmpty()) + value = zen::toStringSep(fileObj.getFileSize()); + break; + case COL_TYPE_DATE: //date + if (!fsObj_.isEmpty()) + value = zen::utcToLocalTimeString(fileObj.getLastWriteTime()); + break; + case COL_TYPE_EXTENSION: //file extension + value = toWx(fileObj.getExtension()); + break; + } + } + + virtual void visit(const SymLinkMapping& linkObj) + { + switch (colType_) + { + case COL_TYPE_FULL_PATH: + value = toWx(beforeLast(linkObj.getFullName(), FILE_NAME_SEPARATOR)); + break; + case COL_TYPE_FILENAME: //filename + value = toWx(linkObj.getShortName()); + 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()); + break; + case COL_TYPE_SIZE: //file size + if (!fsObj_.isEmpty()) + value = _(""); + break; + case COL_TYPE_DATE: //date + if (!fsObj_.isEmpty()) + value = zen::utcToLocalTimeString(linkObj.getLastWriteTime()); + 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()); + break; + case COL_TYPE_FILENAME: + value = toWx(dirObj.getShortName()); + 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()); + break; + case COL_TYPE_SIZE: //file size + if (!fsObj_.isEmpty()) + value = _(""); + break; + case COL_TYPE_DATE: //date + if (!fsObj_.isEmpty()) + value = wxEmptyString; + break; + case COL_TYPE_EXTENSION: //file extension + value = wxEmptyString; + break; + } + } + ColumnTypeRim colType_; + wxString value; + + const FileSystemObject& fsObj_; + } getVal(static_cast(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(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(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(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(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(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()) + { + struct GetIcon : public FSObjectVisitor + { + virtual void visit(const FileMapping& fileObj) + { + iconName = fileObj.getFullName(); + } + virtual void visit(const SymLinkMapping& linkObj) + { + iconName = linkObj.getLinkType() == LinkDescriptor::TYPE_DIR ? + Zstr("folder") : + linkObj.getFullName(); + } + 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()) + { + struct AssembleTooltip : public FSObjectVisitor + { + AssembleTooltip(wxString& tipMsg) : tipMsg_(tipMsg) {} + + virtual void visit(const FileMapping& fileObj) + { + tipMsg_ = copyStringTo(std::wstring() + fileObj.getRelativeName() + L"\n" + + _("Size") + L": " + zen::filesizeToShortString(to(fileObj.getFileSize())) + L"\n" + + _("Date") + L": " + zen::utcToLocalTimeString(fileObj.getLastWriteTime())); + } + + virtual void visit(const SymLinkMapping& linkObj) + { + tipMsg_ = copyStringTo(std::wstring() + linkObj.getRelativeName() + L"\n" + + _("Date") + L": " + zen::utcToLocalTimeString(linkObj.getLastWriteTime())); + } + + virtual void visit(const DirMapping& dirObj) + { + tipMsg_ = toWx(dirObj.getRelativeName()); + } + + wxString& tipMsg_; + } assembler(toolTip); + fsObj->accept(assembler); + } + return toolTip; + } + + std::shared_ptr gridDataView_; + std::shared_ptr iconMgr_; + std::vector failedLoads; //effectively a vector of size "number of rows" + const size_t compPos_; + std::unique_ptr buffer; //avoid costs of recreating this temporal variable +}; + + +class GridDataLeft : public GridDataRim +{ +public: + GridDataLeft(const std::shared_ptr& gridDataView, Grid& grid, size_t compPos) : GridDataRim(gridDataView, grid, compPos) {} + + void setNavigationMarker(std::vector&& markedFiles, + std::vector&& 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::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(fsObj) || dynamic_cast(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(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(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::getBackGroundColor(row), wxEAST); + } + } + } + + std::vector markedFiles_; //mark files/symlinks directly within a container + std::vector markedContainer_; //mark full container including all child-objects + //DO NOT DEREFERENCE!!!! NOT GUARANTEED TO BE VALID!!! +}; + + +class GridDataRight : public GridDataRim +{ +public: + GridDataRight(const std::shared_ptr& gridDataView, Grid& grid, size_t compPos) : GridDataRim(gridDataView, grid, compPos) {} +}; + + + + +//######################################################################################################## + +class GridDataMiddle : public GridDataBase +{ +public: + GridDataMiddle(const std::shared_ptr& gridDataView, Grid& grid) : + GridDataBase(grid), + gridDataView_(gridDataView), + syncPreviewActive(true) {} + + void onSelectBegin(const wxPoint& clientPos, int row, ColumnType colType) + { + if (static_cast(colType) == COL_TYPE_MIDDLE_VALUE) + { + refGrid().clearSelection(gridview::COMP_MIDDLE); + dragSelection.reset(new std::pair(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(refGrid().getRowCount()) && + 0 <= rowTo && rowTo < static_cast(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(colType) == COL_TYPE_MIDDLE_VALUE) + { + if (highlight) //refresh old highlight + refreshCell(refGrid(), highlight->first, static_cast(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE); + + highlight.reset(new std::pair(row, mousePosToBlock(clientPos, row))); + refreshCell(refGrid(), highlight->first, static_cast(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(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(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(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(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(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 gridDataView_; + bool syncPreviewActive; + std::unique_ptr> highlight; //(row, block) current mouse highlight + std::unique_ptr> dragSelection; //(row, block) + std::unique_ptr 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> 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 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& gridDataView) +{ + grid.setComponentCount(3); + + auto provLeft_ = std::make_shared(gridDataView, grid, gridview::COMP_LEFT ); + auto provMiddle_ = std::make_shared(gridDataView, grid); + auto provRight_ = std::make_shared(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(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 attribMiddle; + attribMiddle.push_back(Grid::ColumnAttribute(static_cast(COL_TYPE_BORDER), 5)); + attribMiddle.push_back(Grid::ColumnAttribute(static_cast(COL_TYPE_MIDDLE_VALUE), 60)); + attribMiddle.push_back(Grid::ColumnAttribute(static_cast(COL_TYPE_BORDER), 5)); + + grid.setColumnConfig(attribMiddle, gridview::COMP_MIDDLE); +} + + +namespace +{ +std::vector makeConsistent(const std::vector& attribs) +{ + std::set usedTypes; + + std::vector 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 gridview::convertConfig(const std::vector& attribs) +{ + const auto& attribClean = makeConsistent(attribs); + + std::vector output; + std::transform(attribClean.begin(), attribClean.end(), std::back_inserter(output), + [&](const ColumnAttributeRim& a) { return Grid::ColumnAttribute(static_cast(a.type_), a.width_, a.visible_); }); + + return output; +} + + +std::vector gridview::convertConfig(const std::vector& attribs) +{ + std::vector output; + + std::transform(attribs.begin(), attribs.end(), std::back_inserter(output), + [&](const Grid::ColumnAttribute& ca) { return ColumnAttributeRim(static_cast(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 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(grid.getDataProvider(gridview::COMP_LEFT)); + auto* provRight = dynamic_cast(grid.getDataProvider(gridview::COMP_RIGHT)); + + if (provLeft && provRight) + { + std::shared_ptr iconMgr = std::make_shared(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&& markedFiles, + std::vector&& markedContainer) +{ + if (auto* provLeft = dynamic_cast(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(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 +#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& gridDataView); + +std::vector convertConfig(const std::vector& attribs); //+ make consistent +std::vector convertConfig(const std::vector& 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&& markedFiles, //mark files/symlinks directly within a container + std::vector&& 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 DirectoryName::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::~DirectoryName() template -void DirectoryName::OnFilesDropped(FFSFileDropEvent& event) +void DirectoryName::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(FILE_NAME_SEPARATOR)); //returns empty string if ch not found @@ -130,18 +131,20 @@ void DirectoryName::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 void DirectoryName::OnWriteDirManually(wxCommandEvent& event) { - setDirectoryName(event.GetString(), static_cast(NULL), &dirPicker_, dirName_, staticBox_, 100); //potentially slow network access: wait 100 ms at most + setDirectoryName(event.GetString(), static_cast(NULL), &dirPicker_, dirName_, staticText_, 100); //potentially slow network access: wait 100 ms at most event.Skip(); } @@ -150,7 +153,7 @@ template void DirectoryName::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::getName() const template void DirectoryName::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 #include #include +#include namespace zen { @@ -21,10 +22,10 @@ template //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& droppedFiles) { return true; }; //return true if drop should be processed + virtual bool acceptDrop(const std::vector& 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 +#include #include #include #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 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 +//#include 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 void getNumbers(const FileSystemObject& fsObj, StatusResult& result) { @@ -71,6 +57,70 @@ void getNumbers(const FileSystemObject& fsObj, StatusResult& result) } +template +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(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::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::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& guiRows, std::vector& output) +void GridView::getAllFileRef(const std::set& rows, std::vector& output) { - std::set::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& guiRows, std::vector().swap(viewRef); //free mem - std::vector().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().swap(viewRef); //free mem + std::vector().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()); else if (!ascending) std::sort(sortedRef.begin(), sortedRef.end(), LessRelativeName()); break; - case SORT_BY_FILENAME: + case COL_TYPE_FILENAME: if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName()); else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName()); else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName()); else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName()); break; - case SORT_BY_FILESIZE: + case COL_TYPE_SIZE: if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize()); else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize()); else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize()); else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize()); break; - case SORT_BY_DATE: + case COL_TYPE_DATE: if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime()); else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime()); else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime()); else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime()); break; - case SORT_BY_EXTENSION: + case COL_TYPE_EXTENSION: if ( ascending && onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension()); else if ( ascending && !onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension()); else if (!ascending && onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension()); else if (!ascending && !onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension()); break; - case SORT_BY_CMP_RESULT: - if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult()); - else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult()); - break; - case SORT_BY_SYNC_DIRECTION: - if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection()); - else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection()); - break; - case SORT_BY_DIRECTORY: + //case SORT_BY_CMP_RESULT: + // if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult()); + // else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult()); + // break; + //case SORT_BY_SYNC_DIRECTION: + // if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection()); + // else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection()); + // 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 +#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& guiRows, std::vector& output); + void getAllFileRef(const std::set& rows, std::vector& 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 viewRef; //partial view on sortedRef - // | - // | (update...) - // \|/ - std::vector sortedRef; //equivalent to folderCmp, but may be sorted - // | - // | (setData) - // \|/ - FolderComparison folderCmp; //actual comparison data: owned by GridView! + template void updateView(Predicate pred); + + zen::hash_map rowPositions; //find row positions on sortedRef directly + zen::hash_map rowPositionsFirstChild; //find first child on sortedRef of a hierarchy object + //NEVER DEREFERENCE HierarchyObject*!!! lookup only! + + std::vector viewRef; //partial view on sortedRef + /* /|\ + | (update...) + | */ + std::vector sortedRef; //flat view of weak pointers on folderCmp; may be sorted + /* /|\ + | (setData...) + | */ + //std::shared_ptr folderCmp; //actual comparison data: owned by GridView! + + class SerializeHierarchy; //sorting classes template @@ -160,6 +165,8 @@ private: template class LessSyncDirection; + + std::unique_ptr currentSort; }; @@ -189,26 +196,6 @@ FileSystemObject* GridView::getObject(size_t row) //code re-use of const method: see Meyers Effective C++ return const_cast(static_cast(*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,3757 +20,3652 @@ 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 ); -} +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 ); + 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() +{ +} + +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 ); +} + +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 . 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 ); + +} + +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 ); +} + +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, _(""), 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 ); + +} + +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 ); +} + +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 ); + +} + +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 ); +} + +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 ); + +} + +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 ); +} + +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 ); + +} + +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, 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¤cy_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¤cy_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 ); + +} + +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 ); +} + +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 ); + +} + +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 ); +} + +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 ); + +} + +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 ); +} + +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 ); + +} + +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 ); +} + +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 ); + +} + +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 ); -FolderPairGenerated::~FolderPairGenerated() -{ -} + this->SetSizer( bSizer21 ); + this->Layout(); + bSizer21->Fit( this ); -CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) -{ - wxBoxSizer* bSizer40; - bSizer40 = new wxBoxSizer( wxVERTICAL ); - - - 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 ); -} + this->Centre( wxBOTH ); -CompareStatusGenerated::~CompareStatusGenerated() -{ + // 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 ); } -BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +FilterDlgGenerated::~FilterDlgGenerated() { - 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 . 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 ); -} + // 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 ); -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 ); - } -BatchFolderPairGenerated::BatchFolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +CustomizeColsDlgGenerated::CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, 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 ); -} + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); -BatchFolderPairGenerated::~BatchFolderPairGenerated() -{ -} + wxBoxSizer* bSizer96; + bSizer96 = new wxBoxSizer( wxVERTICAL ); -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, _(""), 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 ); -} + wxBoxSizer* bSizer99; + bSizer99 = new wxBoxSizer( wxHORIZONTAL ); -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 ); - -} + 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 ); -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 ); -} + wxBoxSizer* bSizer98; + bSizer98 = new wxBoxSizer( wxVERTICAL ); -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 ); - -} + m_bpButton29 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton29->SetToolTip( _("Move column up") ); -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 ); -} + bSizer98->Add( m_bpButton29, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); -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 ); - -} + m_bpButton30 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton30->SetToolTip( _("Move column down") ); -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 ); -} + bSizer98->Add( m_bpButton30, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); -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 ); - -} + bSizer99->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 ); -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¤cy_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¤cy_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 ); -} + bSizer96->Add( bSizer99, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); -AboutDlgGenerated::~AboutDlgGenerated() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); - m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); - -} + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxHORIZONTAL ); -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 ); -} + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); -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 ); - -} + bSizer97->Add( m_button9, 0, wxALL, 5 ); -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 ); -} -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 ); - -} + bSizer97->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); -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 ); -} + 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 ) ); -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 ); - -} + bSizer97->Add( m_button28, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); -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 ); -} + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); -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 ); - -} + bSizer97->Add( m_button29, 0, wxALL, 5 ); -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 ); -} + bSizer96->Add( bSizer97, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); -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 ); - -} + this->SetSizer( bSizer96 ); + this->Layout(); + bSizer96->Fit( 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 ); + // 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 #include #include -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 #include @@ -38,9 +36,7 @@ namespace zen{ class Graph2D; } #include #include #include -#include #include -#include #include #include #include @@ -48,6 +44,7 @@ namespace zen{ class Graph2D; } #include #include #include +#include #include #include #include @@ -58,6 +55,7 @@ namespace zen{ class Graph2D; } #include #include #include +#include #include #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 #include #include +#include #include "folder_history_box.h" -#include "../lib/custom_grid.h" #include #include #include "../comparison.h" @@ -44,6 +44,7 @@ #include "../lib/ffs_paths.h" #include #include "folder_pair.h" +#include #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 { 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& droppedFiles) + virtual bool acceptDrop(const std::vector& 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> 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::OnAltCompCfgRemoveConfirm(event); - mainDlg.applyCompareConfig(false); //false: not global level + FolderPairPanelBasic::removeAltCompCfg(); + mainDlg.applyCompareConfig(false); //false: do not change preview status } - virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltSyncCfg() { - FolderPairPanelBasic::OnAltSyncCfgRemoveConfirm(event); + FolderPairPanelBasic::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::OnLocalFilterCfgRemoveConfirm(event); - mainDlg.updateFilterConfig(); //update filter + FolderPairPanelBasic::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(); //make sure it is always bound folderHistoryRight = std::make_shared(); // @@ -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::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 cfgFileNames = globalSettings->gui.cfgFileHistory; @@ -757,11 +783,7 @@ void MainDialog::readGlobalSettings() } return IconBuffer::SIZE_SMALL; }(); - - std::shared_ptr iconBuffer = std::make_shared(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 cfgFileHistory; @@ -806,48 +835,33 @@ void MainDialog::writeGlobalSettings() } -void MainDialog::setSyncDirManually(const std::set& rowsToSetOnUiTable, const zen::SyncDirection dir) +void MainDialog::setSyncDirManually(const std::vector& selection, SyncDirection direction) { - if (rowsToSetOnUiTable.size() > 0) + if (!selection.empty()) { - for (std::set::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& rowsToFilterOnUiTable, int leadingRow) +void MainDialog::setManualFilter(const std::vector& selection, bool setIncluded) { - if (!rowsToFilterOnUiTable.empty()) - { - bool newSelection = false; //default: deselect range + //if hidefiltered is active, there should be no filtered elements on screen => current element was filtered out + assert(!currentCfg.hideFilteredElements || !setIncluded); - //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); - - //get all lines that need to be filtered - std::vector compRef; - gridDataView->getAllFileRef(rowsToFilterOnUiTable, compRef); //everything in compRef is bound - - for (std::vector::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& 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 zxString; //for use with UI texts } -void MainDialog::copySelectionToClipboard(CustomGrid& selectedGrid) +void MainDialog::copySelectionToClipboard() { - const std::set selectedRows = getSelectedRows(&selectedGrid); - if (selectedRows.size() > 0) - { - zxString clipboardString; //perf: wxString doesn't model exponential growth and so is out + zxString clipboardString; //perf: wxString doesn't model exponential growth and so is out - const int colCount = selectedGrid.GetNumberCols(); - - for (std::set::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 colAttr = m_gridMain->getColumnConfig(compPos); + vector_remove_if(colAttr, [](const Grid::ColumnAttribute& ca) { return !ca.visible_; }); + if (!colAttr.empty()) { - clipboardString += copyStringTo(selectedGrid.GetCellValue(static_cast(*i), k)); - if (k != colCount - 1) - clipboardString += wxT('\t'); + const std::vector 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(prov->getValue(row, ca.type_)); + clipboardString += L'\t'; + }); + clipboardString += copyStringTo(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(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(clipboardString))); //ownership passed + wxTheClipboard->Close(); + } } -std::set MainDialog::getSelectedRows(const CustomGrid* grid) const +std::vector MainDialog::getGridSelection(bool fromLeft, bool fromRight) const { - std::set output = grid->getAllSelectedRows(); + std::set selectedRows; - //remove invalid rows - output.erase(output.lower_bound(gridDataView->rowsOnView()), output.end()); + auto addSelection = [&](size_t compPos) + { + const std::vector& sel = m_gridMain->getSelectedRows(compPos); + selectedRows.insert(sel.begin(), sel.end()); + }; - return output; + if (fromLeft) + addSelection(gridview::COMP_LEFT); + + if (fromRight) + addSelection(gridview::COMP_RIGHT); + + std::vector selection; + gridDataView->getAllFileRef(selectedRows, selection); + return selection; } -std::set MainDialog::getSelectedRows() const +std::vector MainDialog::getTreeSelection() const { - //merge selections from left and right grid - std::set selection = getSelectedRows(m_gridLeft); - std::set additional = getSelectedRows(m_gridRight); - selection.insert(additional.begin(), additional.end()); - return selection; + const std::vector& sel = m_gridNavi->getSelectedRows(); + + std::vector output; + std::for_each(sel.begin(), sel.end(), + [&](int row) + { + if (std::unique_ptr node = treeDataView->getLine(row)) + { + if (const TreeView::RootNode* root = dynamic_cast(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(node.get())) + output.push_back(&(dir->dirObj_)); + //else if (dynamic_cast(node.get())) -> ignore files/symlinks + } + }); + return output; } @@ -1038,68 +1090,42 @@ private: }; -void MainDialog::deleteSelectedFiles(const std::set& viewSelectionLeft, const std::set& viewSelectionRight) +void MainDialog::deleteSelectedFiles(const std::vector& selectionLeft, + const std::vector& selectionRight) { - if (viewSelectionLeft.size() + viewSelectionRight.size()) + if (!selectionLeft.empty() || !selectionRight.empty()) { - //map lines from GUI view to grid line references - std::vector compRefLeft; - gridDataView->getAllFileRef(viewSelectionLeft, compRefLeft); - - std::vector 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(); - } + 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&) {} - if (oldFocus) - oldFocus->SetFocus(); //restore focus before deletion - } -} + //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 + updateGui(); //call immediately after deleteFromGridAndHD!!! -void MainDialog::openExternalApplication(const wxString& commandline) -{ - if (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid()) - { - const CustomGrid* leadGrid = m_gridLeft->isLeadGrid() ? - static_cast(m_gridLeft) : - static_cast(m_gridRight); - std::set selection = getSelectedRows(leadGrid); - - 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()); //empty if obj not existing - dir = toWx(beforeLast(fsObj->getFullName(), FILE_NAME_SEPARATOR)); //small issue: if obj does not exist but parent exists, this one erronously returns empty + name = toWx(fsObj->getFullName()); //empty if obj not existing + dir = toWx(beforeLast(fsObj->getFullName(), FILE_NAME_SEPARATOR)); //small issue: if obj does not exist but parent exists, this one erronously returns empty - nameCo = toWx(fsObj->getFullName()); - dirCo = toWx(beforeLast(fsObj->getFullName(), FILE_NAME_SEPARATOR)); - } + nameCo = toWx(fsObj->getFullName()); + dirCo = toWx(beforeLast(fsObj->getFullName(), 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(*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 viewSelectionLeft = getSelectedRows(m_gridLeft); - const std::set viewSelectionRight = getSelectedRows(m_gridRight); - deleteSelectedFiles(viewSelectionLeft, viewSelectionRight); - } - return; - case WXK_SPACE: case WXK_NUMPAD_SPACE: { - wxCommandEvent dummy; - OnContextFilterTemp(dummy); + const auto& selection = getTreeSelection(); + 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; - } - - 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 selection = getSelectedRows(m_gridMiddle); - setSyncDirManually(selection, zen::SYNC_DIR_LEFT); - } - return; - - case WXK_RIGHT: //ALT + -> - { - std::set selection = getSelectedRows(m_gridMiddle); - setSyncDirManually(selection, zen::SYNC_DIR_RIGHT); - } - return; - - case WXK_UP: /* ALT + /|\ */ - case WXK_DOWN: /* ALT + \|/ */ - { - std::set selection = getSelectedRows(m_gridMiddle); - setSyncDirManually(selection, zen::SYNC_DIR_NONE); - } - return; - } - - else - switch (keyCode) - { case WXK_DELETE: case WXK_NUMPAD_DELETE: - { - std::set selection = getSelectedRows(m_gridMiddle); - deleteSelectedFiles(selection, selection); - } - - return; - - case WXK_SPACE: - case WXK_NUMPAD_SPACE: - { - std::set selection = getSelectedRows(m_gridMiddle); - filterRangeManually(selection, static_cast(*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 viewSelectionLeft = getSelectedRows(m_gridLeft); - const std::set 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 -{ - CtxtSelectionString(const wxString& name) : objName(name) {} - const wxString objName; -}; - -struct SelectedExtension : public wxObject -{ - SelectedExtension(const Zstring& ext) : extension(ext) {} - - Zstring extension; -}; - - -struct CtxtSelectionIconSize : public wxObject +void MainDialog::onNaviSelection(GridRangeSelectEvent& event) { - CtxtSelectionIconSize(xmlAccess::FileIconSize sz) : iconSize(sz) {} - xmlAccess::FileIconSize iconSize; -}; - - -typedef std::vector > FilterObjList; //relative name |-> "is directory flag" - -struct FilterObjContainer : public wxObject -{ - FilterObjContainer(const FilterObjList& objList) : selectedObjects(objList) {} - - FilterObjList selectedObjects; -}; -//------------------------------------------------------------ - - - -void MainDialog::OnContextRim(wxGridEvent& event) -{ - //usability: select row unter right-click if not already selected - wxGrid* sourceGrid = dynamic_cast(event.GetEventObject()); - if (sourceGrid != NULL) + //scroll m_gridMain to user's new selection on m_gridNavi + int leadRow = -1; + if (std::unique_ptr node = treeDataView->getLine(event.rowFrom_)) { - const int clickedRow = event.GetRow(); - const int clickedCol = event.GetCol(); - if (clickedRow >= 0 && clickedCol >= 0 && !sourceGrid->IsInSelection(clickedRow, 0)) + if (const TreeView::RootNode* root = dynamic_cast(node.get())) + leadRow = gridDataView->findRowFirstChild(&(root->baseMap_)); + else if (const TreeView::DirNode* dir = dynamic_cast(node.get())) { - sourceGrid->SelectRow(clickedRow); - sourceGrid->SetGridCursor(clickedRow, clickedCol); - - if (sourceGrid == m_gridLeft) - m_gridRight->ClearSelection(); - else if (sourceGrid == m_gridRight) - m_gridLeft->ClearSelection(); + 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(node.get())) + leadRow = gridDataView->findRowDirect(files->firstFile_.getId()); } - //------------------------------------------------------------------------------ + if (leadRow >= 0) + m_gridMain->scrollTo(std::max(0, leadRow - 1)); //scroll one more row - std::set selection; + //get selection on navigation tree and set corresponding markers on main grid + std::vector markedFiles; //mark files/symlinks directly within a container + std::vector markedContainer; //mark full container including child-objects + const std::vector& selection = m_gridNavi->getSelectedRows(); + std::for_each(selection.begin(), selection.end(), + [&](int row) { - const std::set selectionLeft = getSelectedRows(m_gridLeft); - const std::set selectionRight = getSelectedRows(m_gridRight); - selection.insert(selectionLeft .begin(), selectionLeft .end()); - selection.insert(selectionRight.begin(), selectionRight.end()); - } - - const size_t selectionBegin = selection.size() == 0 ? 0 : *selection.begin(); - - const FileSystemObject* fsObj = gridDataView->getObject(selectionBegin); - - //####################################################### - //re-create context menu - contextMenu.reset(new wxMenu); - - if (syncPreview->previewIsEnabled() && - fsObj && fsObj->getSyncOperation() != SO_EQUAL) - { - if (selection.size() > 0) + if (std::unique_ptr node = treeDataView->getLine(row)) { - //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(); - } - } - - //CONTEXT_FILTER_TEMP - if (fsObj && (selection.size() > 0)) - { - wxMenuItem* menuItemInExcl = NULL; - if (fsObj->isActive()) - { - menuItemInExcl = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Exclude temporarily")) + wxT("\tSpace")); - menuItemInExcl->SetBitmap(GlobalResources::getImage(wxT("checkboxFalse"))); - } - else - { - menuItemInExcl = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Include temporarily")) + wxT("\tSpace")); - menuItemInExcl->SetBitmap(GlobalResources::getImage(wxT("checkboxTrue"))); + if (const TreeView::RootNode* root = dynamic_cast(node.get())) + markedContainer.push_back(&(root->baseMap_)); + else if (const TreeView::DirNode* dir = dynamic_cast(node.get())) + markedContainer.push_back(&(dir->dirObj_)); + else if (const TreeView::FilesNode* files = dynamic_cast(node.get())) + markedFiles.push_back(&(files->firstFile_.parent())); } + }); - 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); - } + gridview::setNavigationMarker(*m_gridMain, std::move(markedFiles), std::move(markedContainer)); - //############################################################################################### - //get list of relative file/dir-names for filtering - FilterObjList exFilterCandidateObj; + event.Skip(); +} - { - class AddFilter : public FSObjectVisitor - { - 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) - { - filterList_.push_back(std::make_pair(linkObj.getObjRelativeName(), false)); - } - virtual void visit(const DirMapping& dirObj) - { - filterList_.push_back(std::make_pair(dirObj.getObjRelativeName(), true)); - } - - private: - FilterObjList& filterList_; - } - newFilterEntry(exFilterCandidateObj); +void MainDialog::onNaviGridContext(GridClickEvent& event) +{ + ContextMenu menu; - for (std::set::const_iterator i = selection.begin(); i != selection.end(); ++i) - { - const FileSystemObject* currObj = gridDataView->getObject(*i); - if (currObj) - currObj->accept(newFilterEntry); - } - } - //############################################################################################### + const auto& selection = getTreeSelection(); //referenced by lambdas! - //CONTEXT_EXCLUDE_EXT - if (exFilterCandidateObj.size() > 0 && !exFilterCandidateObj.begin()->second) //non empty && no directory + //---------------------------------------------------------------------------------------------------- + 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 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! + auto getImage = [&](SyncDirection dir, SyncOperation soDefault) { - 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); - } - } - - - //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" " + _("")); - - if (menuItemExclObj != NULL) - { - menuItemExclObj->SetBitmap(GlobalResources::getImage(wxT("filterSmall"))); - contextMenu->Append(menuItemExclObj); - - //connect event - contextMenu->Connect(menuItemExclObj->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnContextExcludeObject), - new FilterObjContainer(exFilterCandidateObj), //ownership passed! - this); - } - - - //CONTEXT_EXTERNAL_APP - if (!globalSettings->gui.externelApplications.empty()) + 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()) { - contextMenu->AppendSeparator(); - - const bool externalAppEnabled = (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid()) && - selection.size() == 1; - - 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); - } + 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); - contextMenu->AppendSeparator(); - + //---------------------------------------------------------------------------------------------------- + //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" " + _(""), + [this, &selection] { excludeItems(selection); }, + &GlobalResources::getImage(L"filterSmall")); + + //---------------------------------------------------------------------------------------------------- //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); + menu.addSeparator(); + menu.addItem(_("Delete") + L"\tDel", [&] { deleteSelectedFiles(selection, selection); }, NULL, !selection.empty()); - //show context menu - PopupMenu(contextMenu.get()); + menu.popup(*this); } -void MainDialog::OnContextFilterTemp(wxCommandEvent& event) +void MainDialog::onMainGridContext(GridClickEvent& event) { - //merge selections from left and right grid - std::set selection = getSelectedRows(); - if (!selection.empty()) - filterRangeManually(selection, static_cast(*selection.begin())); -} + ContextMenu menu; + const auto& selection = getGridSelection(); //referenced by lambdas! -void MainDialog::OnContextExcludeExtension(wxCommandEvent& event) -{ - SelectedExtension* selExtension = dynamic_cast(event.m_callbackUserData); - if (selExtension) + if (event.compPos_ == gridview::COMP_LEFT || + event.compPos_ == gridview::COMP_RIGHT) { - const Zstring newExclude = Zstring(Zstr("*.")) + selExtension->extension; - - //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 - - updateFilterButtons(); - - //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(); - - if (currentCfg.hideFilteredElements) + //---------------------------------------------------------------------------------------------------- + if (syncPreviewEnabled && !selection.empty()) { - m_gridLeft ->ClearSelection(); - m_gridRight ->ClearSelection(); - m_gridMiddle->ClearSelection(); + 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 + menu.addItem(_("Exclude temporarily") + L"\tSpace", [] {}, NULL, false); -void MainDialog::OnContextExcludeObject(wxCommandEvent& event) -{ - FilterObjContainer* objCont = dynamic_cast(event.m_callbackUserData); - if (objCont) - { - if (objCont->selectedObjects.size() > 0) //check needed to determine if filtering is needed + //---------------------------------------------------------------------------------------------------- + //CONTEXT_EXCLUDE_EXT + if (!selection.empty() && + dynamic_cast(selection[0]) == NULL) //non empty && no directory { - Zstring newExclude; - for (FilterObjList::const_iterator i = objCont->selectedObjects.begin(); i != objCont->selectedObjects.end(); ++i) + 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! { - if (i != objCont->selectedObjects.begin()) - newExclude += Zstr("\n"); + const Zstring extension = afterLast(filename, Zchar('.')); - newExclude += FILE_NAME_SEPARATOR + i->first; - if (i->second) //is directory - newExclude += FILE_NAME_SEPARATOR; + menu.addItem(_("Exclude via filter:") + L" *." + extension, + [this, extension] { excludeExtension(extension); }, + &GlobalResources::getImage(L"filterSmall")); } + } + //---------------------------------------------------------------------------------------------------- + //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" " + _(""), + [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) + { + //some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly" + wxString description = zen::implementation::translate(copyStringTo(iter->first)); + if (description.empty()) + description = L" "; //wxWidgets doesn't like empty items - //add to filter config - Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter; - if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr("\n"))) - excludeFilter += Zstr("\n"); - excludeFilter += newExclude; - - updateFilterButtons(); - - //do not fully apply filter, just exclude new items - std::for_each(begin(gridDataView->getDataTentative()), end(gridDataView->getDataTentative()), - [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); }); + const wxString command = iter->second; - //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative()); - updateGuiGrid(); + auto openApp = [this, &selection, command, event] { openExternalApplication(selection.empty() ? NULL : selection[0], event.compPos_ == gridview::COMP_LEFT, command); }; - if (currentCfg.hideFilteredElements) - { - m_gridLeft ->ClearSelection(); - m_gridRight ->ClearSelection(); - m_gridMiddle->ClearSelection(); + 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(); - -void MainDialog::OnContextOpenWith(wxCommandEvent& event) -{ - CtxtSelectionString* stringObj = dynamic_cast(event.m_callbackUserData); - if (stringObj) - openExternalApplication(stringObj->objName); -} - - - -void MainDialog::OnContextDeleteFiles(wxCommandEvent& event) -{ - const std::set viewSelectionLeft = getSelectedRows(m_gridLeft); - const std::set viewSelectionRight = getSelectedRows(m_gridRight); - deleteSelectedFiles(viewSelectionLeft, viewSelectionRight); -} - - -void MainDialog::OnContextSyncDirLeft(wxCommandEvent& event) -{ - //merge selections from left and right grid - const std::set selection = getSelectedRows(); - setSyncDirManually(selection, zen::SYNC_DIR_LEFT); -} - - -void MainDialog::OnContextSyncDirNone(wxCommandEvent& event) -{ - //merge selections from left and right grid - const std::set selection = getSelectedRows(); - setSyncDirManually(selection, zen::SYNC_DIR_NONE); -} - - -void MainDialog::OnContextSyncDirRight(wxCommandEvent& event) -{ - //merge selections from left and right grid - const std::set 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); + menu.addItem(_("Delete") + L"\tDel", [this] + { + deleteSelectedFiles( + getGridSelection(true, false), + getGridSelection(false, true)); + }, NULL, !selection.empty()); } - 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) + else if (event.compPos_ == gridview::COMP_MIDDLE) { - contextMenu->AppendSeparator(); - - wxMenuItem* header = contextMenu->Append(wxID_ANY, _("Icon size:")); - header->Enable(false); - - auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz) + menu.addItem(_("Include all"), [&] { - 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); + zen::setActiveStatus(true, folderCmp); + updateGui(); + }, NULL, gridDataView->rowsTotal() > 0); - if (globalSettings->gui.iconSize == sz) - newItem->Check(); - }; - addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL); - addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM); - addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE); + 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); } - - PopupMenu(contextMenu.get()); //show context menu + menu.popup(*this); } -void MainDialog::OnContextRimLabelRight(wxGridEvent& event) +void MainDialog::excludeExtension(const Zstring& extension) { - contextMenu.reset(new wxMenu); //re-create context menu + const Zstring newExclude = Zstr("*.") + extension; - 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); + //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 - 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(); + updateFilterButtons(); - wxMenuItem* header = contextMenu->Append(wxID_ANY, _("Icon size:")); - header->Enable(false); + //do not fully apply filter, just exclude new items + std::for_each(begin(folderCmp), end(folderCmp), + [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); }); - auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz) - { - 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(); - }; - addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL); - addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM); - addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE); - } - - PopupMenu(contextMenu.get()); //show context menu + //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative()); + updateGui(); } -void MainDialog::OnContextCustColumnLeft(wxCommandEvent& event) +void MainDialog::excludeItems(const std::vector& selection) { - xmlAccess::ColumnAttributes colAttr = m_gridLeft->getColumnAttributes(); - - if (zen::showCustomizeColsDlg(colAttr) == ReturnSmallDlg::BUTTON_OKAY) + if (!selection.empty()) //check needed to determine if filtering is needed { - 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)); - } -} + Zstring newExclude; + for (auto iter = selection.begin(); iter != selection.end(); ++iter) + { + FileSystemObject* fsObj = *iter; + const bool isDir = dynamic_cast(fsObj) != NULL; + if (iter != selection.begin()) + newExclude += Zstr("\n"); -void MainDialog::OnContextCustColumnRight(wxCommandEvent& event) -{ - xmlAccess::ColumnAttributes colAttr = m_gridRight->getColumnAttributes(); + newExclude += FILE_NAME_SEPARATOR + fsObj->getObjRelativeName(); + if (isDir) + newExclude += FILE_NAME_SEPARATOR; + } - if (zen::showCustomizeColsDlg(colAttr) == ReturnSmallDlg::BUTTON_OKAY) - { - m_gridRight->setColumnAttributes(colAttr); + //add to filter config + Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter; + if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr("\n"))) + excludeFilter += Zstr("\n"); + excludeFilter += newExclude; - 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)); - } -} + updateFilterButtons(); + //do not fully apply filter, just exclude new items + std::for_each(begin(folderCmp), end(folderCmp), + [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); }); -void MainDialog::OnContextSelectTimeSpan(wxCommandEvent& event) -{ - if (showSelectTimespanDlg(manualTimeSpanFrom, manualTimeSpanTo) == ReturnSmallDlg::BUTTON_OKAY) - { - applyTimeSpanFilter(gridDataView->getDataTentative(), manualTimeSpanFrom, manualTimeSpanTo); //overwrite current active/inactive settings - refreshGridAfterFilterChange(400); + //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative()); + updateGui(); } } -void MainDialog::OnContextAutoAdjustLeft(wxCommandEvent& event) -{ - globalSettings->gui.autoAdjustColumnsLeft = !globalSettings->gui.autoAdjustColumnsLeft; - updateGuiGrid(); -} - - -void MainDialog::OnContextAutoAdjustRight(wxCommandEvent& event) +void MainDialog::onGridLabelContext(GridClickEvent& event) { - globalSettings->gui.autoAdjustColumnsRight = !globalSettings->gui.autoAdjustColumnsRight; - updateGuiGrid(); -} - + ContextMenu menu; -void MainDialog::OnContextSetIconSize(wxCommandEvent& event) -{ - CtxtSelectionIconSize* sizeObj = dynamic_cast(event.m_callbackUserData); - if (sizeObj) + if (event.compPos_ == gridview::COMP_LEFT || + event.compPos_ == gridview::COMP_RIGHT) { - globalSettings->gui.iconSize = sizeObj->iconSize; - - const IconBuffer::IconSize sz = [&]() -> IconBuffer::IconSize + auto toggleColumn = [&](const Grid::ColumnAttribute& ca, size_t compPos) { - 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 = std::make_shared(sz); - - m_gridLeft ->setIconManager(iconBuffer); - m_gridMiddle->setIconManager(iconBuffer); - m_gridRight ->setIconManager(iconBuffer); - } -} - - -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 -} + auto colAttr = m_gridMain->getColumnConfig(compPos); + for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter) + if (iter->type_ == ca.type_) + { + iter->visible_ = !ca.visible_; + m_gridMain->setColumnConfig(colAttr, compPos); + return; + } + }; -void MainDialog::OnContextMiddleLabel(wxGridEvent& event) -{ - contextMenu.reset(new wxMenu); //re-create context menu + 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) + { + const Grid::ColumnAttribute& ca = *iter; + const size_t compPos = event.compPos_; - wxMenuItem* itemSyncPreview = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Synchronization Preview")); - contextMenu->Connect(itemSyncPreview->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncView), NULL, this); + menu.addCheckBox(prov->getColumnLabel(ca.type_), [ca, compPos, toggleColumn] { toggleColumn(ca, compPos); }, + ca.visible_, ca.type_ != static_cast(COL_TYPE_FILENAME)); //do not allow user to hide file name column! + } + } + //---------------------------------------------------------------------------------------------- + menu.addSeparator(); - wxMenuItem* itemCmpResult = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Comparison Result")); - contextMenu->Connect(itemCmpResult->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextComparisonView), NULL, this); + auto setDefault = [&] + { + m_gridMain->setColumnConfig(gridview::convertConfig(event.compPos_ == gridview::COMP_LEFT ? + getDefaultColumnAttributesLeft() : + getDefaultColumnAttributesRight()), event.compPos_); + }; + menu.addItem(_("&Default"), setDefault); //'&' -> reuse text from "default" buttons elsewhere + //---------------------------------------------------------------------------------------------- + auto setIconSize = [&](xmlAccess::FileIconSize sz, IconBuffer::IconSize szAlias) + { + globalSettings->gui.iconSize = sz; + gridview::setIconSize(*m_gridMain, szAlias); + }; + menu.addSeparator(); + menu.addItem(_("Icon size:"), [] {}, NULL, false); - if (syncPreview->previewIsEnabled()) - itemSyncPreview->SetBitmap(GlobalResources::getImage(wxT("syncViewSmall"))); - else - itemCmpResult->SetBitmap(GlobalResources::getImage(wxT("cmpViewSmall"))); + 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(event.colType_) == COL_TYPE_DATE) + { + menu.addSeparator(); - contextMenu->Append(itemCmpResult); - contextMenu->Append(itemSyncPreview); + 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); + } + } - PopupMenu(contextMenu.get()); //show context menu + else if (event.compPos_ == gridview::COMP_MIDDLE) + { + menu.addItem(_("Synchronization Preview"), [&] { enablePreview(true ); }, syncPreviewEnabled ? &GlobalResources::getImage(L"syncViewSmall") : NULL); + menu.addItem(_("Comparison Result"), [&] { enablePreview(false); }, syncPreviewEnabled ? NULL : &GlobalResources::getImage(L"cmpViewSmall")); + } + menu.popup(*this); } void MainDialog::OnContextSetLayout(wxMouseEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu + ContextMenu menu; - wxMenuItem* itemReset = contextMenu->Append(wxID_ANY, _("Reset view")); - contextMenu->Connect(itemReset->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetLayoutReset), NULL, this); - - typedef std::vector > CaptionNameMapping; - CaptionNameMapping captionNameMap; + menu.addItem(_("Default view"), [&] + { + auiMgr.LoadPerspective(defaultPerspective); + updateGuiForFolderPair(); + }); + //---------------------------------------------------------------------------------------- + std::vector> 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); - } - } + menu.addSeparator(); - PopupMenu(contextMenu.get()); //show context menu -} - - -void MainDialog::OnContextSetLayoutReset(wxCommandEvent& event) -{ - auiMgr.LoadPerspective(defaultPerspective); -} - - -void MainDialog::OnContextSetLayoutShowPanel(wxCommandEvent& event) -{ - CtxtSelectionString* stringObj = dynamic_cast(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, _(""), 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(_(""), [&] { 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(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(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(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(gridDataView->rowsOnView())); //consider dummy rows + + if (0 <= rowFirst && rowFirst < rowLast) + { + std::set selectedRows; + for (int i = rowFirst; i < rowLast; ++i) + selectedRows.insert(i); - std::set selectedRowsOnView; - for (int i = lowerBound; i <= upperBound; ++i) - selectedRowsOnView.insert(i); + std::vector 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(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 selectedRows; + for (int i = rowFirst; i < rowLast; ++i) + selectedRows.insert(i); - updateGuiGrid(); + std::vector objects; + gridDataView->getAllFileRef(selectedRows, objects); + + setSyncDirManually(objects, event.direction_); } } @@ -2894,17 +2487,12 @@ void MainDialog::setLastUsedConfig(const std::vector& 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(name)), background); + return mirrorIfRtl( + layOver( + GlobalResources::getImage(utf8CvrtTo(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::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(); + gridDataView->setData(folderCmp); //update view on data + treeDataView->setData(folderCmp); // + updateGui(); + updateSyncEnabledStatus(); //enable the sync button - //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)); + if (m_buttonStartSync->IsShownOnScreen()) + m_buttonStartSync->SetFocus(); - //reset last sort selection: used for determining sort direction - lastSortColumn = -1; - lastSortGrid = NULL; - - 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 +} + + +void MainDialog::clearGrid(bool refreshGrid) +{ + folderCmp.clear(); + gridDataView->setData(folderCmp); + treeDataView->setData(folderCmp); + + updateSyncEnabledStatus(); - m_gridLeft ->Refresh(); - m_gridMiddle->Refresh(); - m_gridRight ->Refresh(); + 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(), statusHandler); - dummy2.addDir(i->getBaseDirPf(), statusHandler); + dummy2.addDir(iter->getBaseDirPf(), statusHandler); + dummy2.addDir(iter->getBaseDirPf(), statusHandler); } //start synchronization and mark all elements processed @@ -3568,10 +3112,10 @@ void MainDialog::OnStartSync(wxCommandEvent& event) const std::vector 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(); -} - - -void MainDialog::OnLeftGridDoubleClick(wxGridEvent& event) -{ - if (!globalSettings->gui.externelApplications.empty()) - openExternalApplication(event.GetRow(), true, globalSettings->gui.externelApplications[0].second); - // event.Skip(); + updateGui(); } -void MainDialog::OnRightGridDoubleClick(wxGridEvent& event) +void MainDialog::onGridDoubleClick(GridClickEvent& event) { if (!globalSettings->gui.externelApplications.empty()) - openExternalApplication(event.GetRow(), false, 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::OnSortLeftGrid(wxGridEvent& event) +void MainDialog::onGridLabelLeftClick(GridClickEvent& 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(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::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(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(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(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(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(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& newPairs, bool addFront) { wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion - wxWindowUpdateLocker dummy2(m_panelGrids); // + //wxWindowUpdateLocker dummy2(m_panelGrids); // + + std::vector newEntries; std::for_each(newPairs.begin(), newPairs.end(), [&](const FolderPairEnh& enhPair) @@ -4136,45 +3579,43 @@ void MainDialog::addFolderPair(const std::vector& 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(cellVal) + wxT('\"'); - else - exportString += copyStringTo(cellVal); -} } @@ -4265,7 +3689,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) //write legend exportString += copyStringTo(_("Legend")) + wxT('\n'); - if (syncPreview->previewIsEnabled()) + if (syncPreviewEnabled) { exportString += wxT("\"") + copyStringTo(getSyncOpDescription(SO_EQUAL)) + wxT("\";") + copyStringTo(getSymbol(SO_EQUAL)) + wxT('\n'); exportString += wxT("\"") + copyStringTo(getSyncOpDescription(SO_CREATE_NEW_LEFT)) + wxT("\";") + copyStringTo(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(val) + wxT('\"'); + else + exportString += copyStringTo(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); - //begin work - const int rowsTotal = m_gridLeft->GetNumberRows(); - for (int i = 0; i < rowsTotal; ++i) + 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_; }); + + 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 #include "gui_generated.h" #include "../lib/process_xml.h" +#include "custom_grid.h" +#include "tree_view.h" +#include 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 getSelectedRows(const CustomGrid* grid) const; - std::set getSelectedRows() const; - void setSyncDirManually(const std::set& rowsToSetOnUiTable, const zen::SyncDirection dir); - void filterRangeManually(const std::set& rowsToFilterOnUiTable, int leadingRow); - void copySelectionToClipboard(CustomGrid& selectedGrid); - void deleteSelectedFiles(const std::set& viewSelectionLeft, const std::set& viewSelectionRight); + std::vector getGridSelection(bool fromLeft = true, bool fromRight = true) const; + std::vector getTreeSelection() const; - void openExternalApplication(const wxString& commandline); - void openExternalApplication(size_t rowNumber, bool leftSide, const wxString& commandline); + void setSyncDirManually(const std::vector& selection, zen::SyncDirection direction); + void setManualFilter(const std::vector& selection, bool setIncluded); + void copySelectionToClipboard(); + void deleteSelectedFiles(const std::vector& selectionLeft, + const std::vector& 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& 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 gridDataView; //always bound! + std::shared_ptr treeDataView; // - //UI view of FolderComparison structure - std::unique_ptr 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 contextMenu; - //status information wxLongLong lastStatusChange; std::stack 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 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; //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 #include +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 +class FindInText; template 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::FindInText(const wxString& textToFind) : - textToFind_(textToFind) {} - - -template <> -inline -bool FindInText::found(const wxString& phrase) const +class FindInText { - return phrase.Find(textToFind_) != wxNOT_FOUND; -} - - -template <> -FindInText::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::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 -std::pair 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(grid).GetNumberRows(); - const int columnCount = const_cast(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(grid).GetGridCursorRow(); - int cursorColumn = const_cast(grid).GetGridCursorCol(); - - if (cursorRow < 0 || - cursorRow >= rowCount || - cursorColumn < 0 || - cursorColumn >= columnCount) + auto prov = grid.getDataProvider(compPos); + std::vector 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 searchTxt(searchString); - const FindInText searchTxt(searchString); - - if (fromBeginToCursor) - { - for (int row = 0; row < cursorRow; ++row) - for (int col = 0; col < columnCount; ++col) - if (searchTxt.found(const_cast(grid).GetCellValue(row, col))) - return std::make_pair(row, col); - - for (int col = 0; col <= cursorColumn; ++col) - if (searchTxt.found(const_cast(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(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(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 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( grid, searchString, fromBeginToCursor, afterCursorToEnd) : - searchGrid(grid, searchString, fromBeginToCursor, afterCursorToEnd); + findRow( grid, compPos, searchString, rowFirst, rowLast) : + findRow(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 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 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 #include #include "../synchronization.h" -#include "../lib/custom_grid.h" +#include "custom_grid.h" #include #include #include #include #include +#include #include "../lib/help_provider.h" #include #include @@ -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::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(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(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 +#include "../file_hierarchy.h" +#include +//#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 -struct Compare -{ - template - 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 -{ - template - bool isSmallerThan(T a, T b) - { - assert_static(sizeof(T) <= 2 * sizeof(int)); //use for comparing (small) INTEGRAL types only! - return a > b; - } -}; - - template 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().isSmallerThan( - cmpFileName(a.getShortName(), b.getShortName()), 0); + return makeSortDirection(LessFilename(), Int2Type())(a.getShortName(), b.getShortName()); } } @@ -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().isSmallerThan(rv, 0); + return makeSortDirection(std::less(), Int2Type())(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().isSmallerThan(fileObjA->getFileSize(), fileObjB->getFileSize()); + return makeSortDirection(std::less(), Int2Type())(fileObjA->getFileSize(), fileObjB->getFileSize()); } @@ -166,7 +144,7 @@ bool lessFiletime(const FileSystemObject& a, const FileSystemObject& b) zen::Int64 dateB = fileObjB ? fileObjB->getLastWriteTime() : linkObjB->getLastWriteTime(); //return list beginning with newest files first - return Compare().isSmallerThan(dateA, dateB); + return makeSortDirection(std::less(), Int2Type())(dateA, dateB); } @@ -187,7 +165,7 @@ bool lessExtension(const FileSystemObject& a, const FileSystemObject& b) else if (fileObjB == NULL) return true; //directories last - return Compare().isSmallerThan(cmpFileName(fileObjA->getExtension(), fileObjB->getExtension()), 0); + return makeSortDirection(LessFilename(), Int2Type())(fileObjA->getExtension(), fileObjB->getExtension()); } @@ -200,14 +178,14 @@ bool lessCmpResult(const FileSystemObject& a, const FileSystemObject& b) if (b.getCategory() == FILE_EQUAL) return true; - return Compare().isSmallerThan(a.getCategory(), b.getCategory()); + return makeSortDirection(std::less(), Int2Type())(a.getCategory(), b.getCategory()); } template inline bool lessSyncDirection(const FileSystemObject& a, const FileSystemObject& b) { - return Compare().isSmallerThan(a.getSyncOperation(), b.getSyncOperation()); + return makeSortDirection(std::less(), Int2Type())(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 #include #include +#include #include "gui_generated.h" #include #include @@ -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 +#include "tree_view.h" +#include +#include +#include +#include +#include +#include +#include +#include "../lib/icon_buffer.h" +#include "../lib/resources.h" + +using namespace zen; + + +template //(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(); + case SYNC_DIR_RIGHT: + return fileObj.getFileSize(); + case SYNC_DIR_NONE: + break; + } + return std::max(fileObj.getFileSize(), fileObj.getFileSize()); + }; + + + 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>& workList) +{ + const UInt64 total = std::accumulate(workList.begin(), workList.end(), UInt64(), + [](UInt64 val, const std::pair& 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& pair) { *pair.second = 0; }); + return; + } + + int remainingPercent = 100; + std::for_each(workList.begin(), workList.end(), + [&](std::pair& pair) + { + *pair.second = to(pair.first) * 100 / to(total); //round down + remainingPercent -= *pair.second; + }); + + //sort descending by absolute error + std::sort(workList.begin(), workList.end(), + [&](const std::pair& lhs, const std::pair& rhs) + { + //return std::abs(*lhs.second - to(lhs.first) * 100 / total) > std::abs(*rhs.second - to(rhs.first) * 100 / total); + return (to(lhs.first) - to(rhs.first)) * 100 / to(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(workList.size())); + std::for_each(workList.begin(), workList.begin() + remainingPercent, + [&](std::pair& pair) { ++*pair.second; }); +} +} + + +template +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(FileSystemObject::retrieve(static_cast(lhs.node_)->objId)); + const auto* dirObjR = dynamic_cast(FileSystemObject::retrieve(static_cast(rhs.node_)->objId)); + + if (!dirObjL) //might be pathologic, but it's covered + return false; + else if (!dirObjR) + return true; + + return makeSortDirection(LessFilename(), Int2Type())(dirObjL->getObjShortName(), dirObjR->getObjShortName()); + } + + case TreeView::TYPE_FILES: + break; + } + assert(false); + return false; //:= all equal + } +}; + + +template +void TreeView::sortSingleLevel(std::vector& 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())); + break; + + case COL_TYPE_NAVI_DIRECTORY: + std::sort(items.begin(), items.end(), LessShortName()); + break; + } +} + + +void TreeView::getChildren(const Container& cont, size_t level, std::vector& output) +{ + output.clear(); + output.reserve(cont.subDirs.size() + 1); //keep pointers in "workList" valid + std::vector> 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(output, sortColumn); + else + sortSingleLevel(output, sortColumn); +} + + +void TreeView::applySubView(std::vector&& newView) +{ + //preserve current node expansion status + auto getHierAlias = [](const TreeView::TreeLine& tl) -> const HierarchyObject* + { + switch (tl.type_) + { + case TreeView::TYPE_ROOT: + return static_cast(tl.node_)->baseMap.get(); + + case TreeView::TYPE_DIRECTORY: + if (auto dirObj = dynamic_cast(FileSystemObject::retrieve(static_cast(tl.node_)->objId))) + return dirObj; + break; + + case TreeView::TYPE_FILES: + break; //none!!! + } + return NULL; + }; + + zen::hash_set 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> 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 newLines; + getChildren(*line.node_, line.level_ + 1, newLines); + + flatTree.insert(flatTree.begin() + row + 1, newLines.begin(), newLines.end()); + } + } +} + + +template +void TreeView::updateView(Predicate pred) +{ + //update view on full data + std::vector newView; + newView.reserve(folderCmp.size()); //avoid expensive reallocations! + + std::for_each(folderCmp.begin(), folderCmp.end(), + [&](const std::shared_ptr& baseObj) + { + if (!baseObj->getBaseDirPf().empty() || !baseObj->getBaseDirPf().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 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().swap(flatTree); //free mem + std::vector().swap(folderCmpView); // + folderCmp = newData; +} + + +std::unique_ptr 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(flatTree[row].node_); + return make_unique(percent, getStatus(row), root->bytesGross, *(root->baseMap)); + } + break; + + case TreeView::TYPE_DIRECTORY: + { + const auto* dir = static_cast(flatTree[row].node_); + if (auto dirObj = dynamic_cast(FileSystemObject::retrieve(dir->objId))) + return make_unique(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(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& 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 node = treeDataView_->getLine(row)) + switch (static_cast(colType)) + { + case COL_TYPE_NAVI_BYTES: + return filesizeToShortString(to(node->bytes_)); + + case COL_TYPE_NAVI_DIRECTORY: + if (const TreeView::RootNode* root = dynamic_cast(node.get())) + { + const wxString dirLeft = utf8CvrtTo(beforeLast(root->baseMap_.getBaseDirPf(), FILE_NAME_SEPARATOR)); + const wxString dirRight = utf8CvrtTo(beforeLast(root->baseMap_.getBaseDirPf(), FILE_NAME_SEPARATOR)); + + if (dirLeft.empty()) + return dirRight; + else if (dirRight.empty()) + return dirLeft; + else + return utf8CvrtTo(dirLeft + L" \x2212 " + dirRight); //\x2212 = unicode minus + } + else if (const TreeView::DirNode* dir = dynamic_cast(node.get())) + return utf8CvrtTo(dir->dirObj_.getObjShortName()); + else if (dynamic_cast(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(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(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_) + { + if (std::unique_ptr 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(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(node.get())) + drawBitmapRtlNoMirror(dc, rootBmp, rectTmp, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, buffer); + else if (auto dir = dynamic_cast(node.get())) + { + drawIconRtlNoMirror(dc, dirIcon, rectTmp.GetTopLeft() + wxPoint(0, (rectTmp.height - dirIcon.GetHeight()) / 2), buffer); + isActive = dir->dirObj_.isActive(); + } + else if (dynamic_cast(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(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(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_) + { + if (std::unique_ptr 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(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(event.colType_) == COL_TYPE_NAVI_DIRECTORY) + if (std::unique_ptr 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(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(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(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 treeDataView_; + const wxIcon fileIcon; + const wxIcon dirIcon; + const wxBitmap rootBmp; + std::unique_ptr 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& treeDataView) +{ + grid.setDataProvider(std::make_shared(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(grid.getDataProvider())) + prov->setShowPercentage(value); + else + assert(false); +} + + +bool treeview::getShowPercentage(const Grid& grid) +{ + if (auto* prov = dynamic_cast(grid.getDataProvider())) + return prov->getShowPercentage(); + assert(false); + return true; +} + + +namespace +{ +std::vector makeConsistent(const std::vector& attribs) +{ + std::set usedTypes; + + std::vector 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 treeview::convertConfig(const std::vector& attribs) +{ + const auto& attribClean = makeConsistent(attribs); + + std::vector output; + std::transform(attribClean.begin(), attribClean.end(), std::back_inserter(output), + [&](const ColumnAttributeNavi& a) { return Grid::ColumnAttribute(static_cast(a.type_), a.width_, a.visible_); }); + + return output; +} + + +std::vector treeview::convertConfig(const std::vector& attribs) +{ + std::vector output; + + std::transform(attribs.begin(), attribs.end(), std::back_inserter(output), + [&](const Grid::ColumnAttribute& ca) { return ColumnAttributeNavi(static_cast(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 +#include "../file_hierarchy.h" +#include "column_attr.h" +#include + +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 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 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 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 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 + static void extractVisibleSubtree(HierarchyObject& hierObj, Container& cont, Function includeObject); + void getChildren(const Container& cont, size_t level, std::vector& output); + template void updateView(Predicate pred); + void applySubView(std::vector&& newView); + + template static void sortSingleLevel(std::vector& items, ColumnTypeNavi columnType); + template struct LessShortName; + + std::vector flatTree; //collapsable/expandable sub-tree of partial view -> always sorted! + /* /|\ + | (update...) + | */ + std::vector folderCmpView; //partial view on folderCmp -> unsorted(cannot be, because of files!) + /* /|\ + | (update...) + | */ + std::vector> folderCmp; //full raw data + + ColumnTypeNavi sortColumn; + bool sortAscending; +}; + + +namespace treeview +{ +void init(Grid& grid, const std::shared_ptr& treeDataView); + +void setShowPercentage(Grid& grid, bool value); +bool getShowPercentage(const Grid& grid); + +std::vector convertConfig(const std::vector& attribs); //+ make consistent +std::vector convertConfig(const std::vector& 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 diff --git a/version/version.h b/version/version.h index a1754cbe..e5445e1c 100644 --- a/version/version.h +++ b/version/version.h @@ -3,7 +3,7 @@ namespace zen { -const wchar_t currentVersion[] = L"4.6"; //internal linkage! +const wchar_t currentVersion[] = L"5.0"; //internal linkage! } #endif diff --git a/version/version.rc b/version/version.rc index 8eac41bb..a0af4f4d 100644 --- a/version/version.rc +++ b/version/version.rc @@ -1,2 +1,2 @@ -#define VER_FREEFILESYNC 4,6,0,0 -#define VER_FREEFILESYNC_STR "4.6\0" +#define VER_FREEFILESYNC 5,0,0,0 +#define VER_FREEFILESYNC_STR "5.0\0" diff --git a/wx+/app_main.h b/wx+/app_main.h index ae36a8de..e39a8b43 100644 --- a/wx+/app_main.h +++ b/wx+/app_main.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 APPMAIN_H_INCLUDED diff --git a/wx+/button.cpp b/wx+/button.cpp index 80a9f8ba..9efdf071 100644 --- a/wx+/button.cpp +++ b/wx+/button.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 "button.h" diff --git a/wx+/button.h b/wx+/button.h index 15ebc5a0..471a5b5a 100644 --- a/wx+/button.h +++ b/wx+/button.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 CUSTOMBUTTON_H_INCLUDED diff --git a/wx+/choice_enum.h b/wx+/choice_enum.h index 4565bf81..e12c7a9b 100644 --- a/wx+/choice_enum.h +++ b/wx+/choice_enum.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_CHOICE_ENUM_H_INCLUDED diff --git a/wx+/context_menu.h b/wx+/context_menu.h new file mode 100644 index 00000000..894da832 --- /dev/null +++ b/wx+/context_menu.h @@ -0,0 +1,81 @@ +// ************************************************************************** +// * 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 CONTEXT_HEADER_18047302153418174632141234 +#define CONTEXT_HEADER_18047302153418174632141234 + +#include +#include +#include +#include + +/* +A context menu supporting C++11 lambda callbacks! + +Usage: + ContextMenu menu; + menu.addItem(L"Some Label", [&]{ ...do something... }); -> capture by reference is fine, as long as captured variables have at least scope of ContextMenu::show()! + ... + menu.popup(wnd); +*/ + +namespace zen +{ +class ContextMenu : private wxEvtHandler +{ +public: + void addItem(const wxString& label, const std::function& command, const wxBitmap* bmp = NULL, bool enabled = true) + { + wxMenuItem* newItem = new wxMenuItem(&menu, wxID_ANY, label); + if (bmp) newItem->SetBitmap(*bmp); + if (!enabled) newItem->Enable(false); + menu.Append(newItem); //do NOT append item before setting bitmap! wxWidgets screws up for yet another crappy reason + menu.Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextMenu::onSelection), new GenericCommand(command), /*pass ownership*/ this); + } + + void addCheckBox(const wxString& label, const std::function& command, bool checked, bool enabled = true) + { + wxMenuItem* newItem = menu.AppendCheckItem(wxID_ANY, label); + newItem->Check(checked); + if (!enabled) newItem->Enable(false); + menu.Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextMenu::onSelection), new GenericCommand(command), /*pass ownership*/ this); + } + + void addRadio(const wxString& label, const std::function& command, bool checked, bool enabled = true) + { + wxMenuItem* newItem = menu.AppendRadioItem(wxID_ANY, label); + newItem->Check(checked); + if (!enabled) newItem->Enable(false); + menu.Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextMenu::onSelection), new GenericCommand(command), /*pass ownership*/ this); + } + + void addSeparator() { menu.AppendSeparator(); } + + void popup(wxWindow& wnd) //show popup menu + process lambdas + { + wnd.PopupMenu(&menu); + wxTheApp->ProcessPendingEvents(); //make sure lambdas are evaluated before going out of scope; + //although all events seem to be processed within wxWindows::PopupMenu, we shouldn't trust wxWidgets in this regard + } + +private: + void onSelection(wxCommandEvent& event) + { + if (auto cmd = dynamic_cast(event.m_callbackUserData)) + (cmd->fun_)(); + } + + struct GenericCommand : public wxObject + { + GenericCommand(const std::function& fun) : fun_(fun) {} + std::function fun_; + }; + + wxMenu menu; +}; +} + +#endif //CONTEXT_HEADER_18047302153418174632141234 diff --git a/wx+/file_drop.h b/wx+/file_drop.h index 1eaeede0..c2a14423 100644 --- a/wx+/file_drop.h +++ b/wx+/file_drop.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 FILE_DROP_H_INCLUDED @@ -14,15 +14,15 @@ namespace zen { //register simple file drop event (without issue of freezing dialogs and without wxFileDropTarget overdesign) -//1. setup a window to emit FFS_DROP_FILE_EVENT +//1. setup a window to emit EVENT_DROP_FILE void setupFileDrop(wxWindow& wnd); //2. register events: -//wnd.Connect (FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(MyDlg::OnFilesDropped), NULL, this); -//wnd.Disconnect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(MyDlg::OnFilesDropped), NULL, this); +//wnd.Connect (EVENT_DROP_FILE, FileDropEventHandler(MyDlg::OnFilesDropped), NULL, this); +//wnd.Disconnect(EVENT_DROP_FILE, FileDropEventHandler(MyDlg::OnFilesDropped), NULL, this); //3. do something: -//void MyDlg::OnFilesDropped(FFSFileDropEvent& event); +//void MyDlg::OnFilesDropped(FileDropEvent& event); @@ -49,21 +49,18 @@ wxEventType createNewEventType() } //define new event type -const wxEventType FFS_DROP_FILE_EVENT = createNewEventType(); +const wxEventType EVENT_DROP_FILE = createNewEventType(); -class FFSFileDropEvent : public wxCommandEvent +class FileDropEvent : public wxCommandEvent { public: - FFSFileDropEvent(const std::vector& filesDropped, const wxWindow& dropWindow, wxPoint dropPos) : - wxCommandEvent(FFS_DROP_FILE_EVENT), + FileDropEvent(const std::vector& filesDropped, const wxWindow& dropWindow, wxPoint dropPos) : + wxCommandEvent(EVENT_DROP_FILE), filesDropped_(filesDropped), dropWindow_(dropWindow), dropPos_(dropPos) {} - virtual wxEvent* Clone() const - { - return new FFSFileDropEvent(filesDropped_, dropWindow_, dropPos_); - } + virtual wxEvent* Clone() const { return new FileDropEvent(*this); } const std::vector& getFiles() const { return filesDropped_; } const wxWindow& getDropWindow() const { return dropWindow_; } @@ -72,13 +69,13 @@ public: private: const std::vector filesDropped_; const wxWindow& dropWindow_; - wxPoint dropPos_; + const wxPoint dropPos_; }; -typedef void (wxEvtHandler::*FFSFileDropEventFunction)(FFSFileDropEvent&); +typedef void (wxEvtHandler::*FileDropEventFunction)(FileDropEvent&); -#define FFSFileDropEventHandler(func) \ - (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(FFSFileDropEventFunction, &func) +#define FileDropEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(FileDropEventFunction, &func) class WindowDropTarget : public wxFileDropTarget @@ -86,19 +83,21 @@ class WindowDropTarget : public wxFileDropTarget public: WindowDropTarget(wxWindow& dropWindow) : dropWindow_(dropWindow) {} +private: virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& fileArray) { std::vector filenames(fileArray.begin(), fileArray.end()); if (!filenames.empty()) { //create a custom event on drop window: execute event after file dropping is completed! (after mouse is released) - FFSFileDropEvent evt(filenames, dropWindow_, wxPoint(x, y)); - dropWindow_.GetEventHandler()->AddPendingEvent(evt); + FileDropEvent evt(filenames, dropWindow_, wxPoint(x, y)); + auto handler = dropWindow_.GetEventHandler(); + if (handler) + handler->AddPendingEvent(evt); } return true; } -private: wxWindow& dropWindow_; }; diff --git a/wx+/format_unit.cpp b/wx+/format_unit.cpp index 13e53ba3..0a054534 100644 --- a/wx+/format_unit.cpp +++ b/wx+/format_unit.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 "format_unit.h" @@ -137,7 +137,8 @@ std::wstring zen::remainingTimeToShortString(double timeInSec) std::wstring zen::fractionToShortString(double fraction) { - return replaceCpy(_("%x%"), L"%x", printNumber(L"%3.2f", fraction * 100.0), false); + //return replaceCpy(_("%x%"), L"%x", printNumber(L"%3.2f", fraction * 100.0), false); + return printNumber(L"%3.2f", fraction * 100.0) + L'%'; //no need to internationalize faction!? } diff --git a/wx+/format_unit.h b/wx+/format_unit.h index 6eba90de..361818cc 100644 --- a/wx+/format_unit.h +++ b/wx+/format_unit.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 UTIL_H_INCLUDED diff --git a/wx+/graph.cpp b/wx+/graph.cpp index 4fdfb35d..7bbfa805 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.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 "graph.h" @@ -145,7 +145,7 @@ void drawXLabel(wxDC& dc, double& xMin, double& xMax, const wxRect& clientArea, if (clientArea.GetHeight() <= 0 || clientArea.GetWidth() <= 0) return; - int optimalBlockWidth = dc.GetMultiLineTextExtent(wxT("100000000000000")).GetWidth(); + const int optimalBlockWidth = dc.GetMultiLineTextExtent(wxT("100000000000000")).GetWidth(); double valRangePerBlock = (xMax - xMin) * optimalBlockWidth / clientArea.GetWidth(); valRangePerBlock = labelFmt.getOptimalBlockSize(valRangePerBlock); @@ -244,6 +244,8 @@ Graph2D::Graph2D(wxWindow* parent, //http://wiki.wxwidgets.org/Flicker-Free_Drawing Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(Graph2D::onEraseBackGround), NULL, this); + //SetDoubleBuffered(true); slow as hell! + #if wxCHECK_VERSION(2, 9, 1) SetBackgroundStyle(wxBG_STYLE_PAINT); #else @@ -338,7 +340,7 @@ private: void Graph2D::render(wxDC& dc) const { { - //have everything including label background in natural window color by default (overwriting current background color) + //draw everything including label background in natural window color by default (overwriting current background color) const wxColor backColor = wxPanel::GetClassDefaultAttributes().colBg != wxNullColour ? wxPanel::GetClassDefaultAttributes().colBg : wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); @@ -403,24 +405,25 @@ void Graph2D::render(wxDC& dc) const double minWndX = attr.minXauto ? std::numeric_limits::infinity() : attr.minX; //automatic: ensure values are initialized by first curve double maxWndX = attr.maxXauto ? -std::numeric_limits::infinity() : attr.maxX; // if (!curves_.empty()) + for (auto iter = curves_.begin(); iter != curves_.end(); ++iter) + if (iter->first.get()) + { + const GraphData& graph = *iter->first; + assert(graph.getXBegin() <= graph.getXEnd()); + + if (attr.minXauto) + minWndX = std::min(minWndX, graph.getXBegin()); + if (attr.maxXauto) + maxWndX = std::max(maxWndX, graph.getXEnd()); + } + + if (minWndX < maxWndX && maxWndX - minWndX < std::numeric_limits::infinity()) //valid x-range { - for (GraphList::const_iterator j = curves_.begin(); j != curves_.end(); ++j) - { - if (!j->first.get()) continue; - const GraphData& graph = *j->first; - assert(graph.getXBegin() <= graph.getXEnd()); - - if (attr.minXauto) - minWndX = std::min(minWndX, graph.getXBegin()); - if (attr.maxXauto) - maxWndX = std::max(maxWndX, graph.getXEnd()); - } if (attr.labelposX != X_LABEL_NONE && //minWndX, maxWndX are just a suggestion, drawXLabel may enlarge them! attr.labelFmtX.get()) drawXLabel(dc, minWndX, maxWndX, xLabelArea, attr.labelHeightX, attr.labelposX == X_LABEL_BOTTOM, *attr.labelFmtX); - } - if (minWndX < maxWndX) //valid x-range - { + + //detect y value range std::vector, int>> yValuesList(curves_.size()); double minWndY = attr.minYauto ? std::numeric_limits::infinity() : attr.minY; //automatic: ensure values are initialized by first curve @@ -480,11 +483,11 @@ void Graph2D::render(wxDC& dc) const wxPoint currentPos = activeSel->refCurrentPos() - dataOrigin; //normalize positions - confine(startPos .x, 0, dataArea.width); //allow for one past the end(!) to enable "full range selections" - confine(currentPos.x, 0, dataArea.width); // + restrict(startPos .x, 0, dataArea.width); //allow for one past the end(!) to enable "full range selections" + restrict(currentPos.x, 0, dataArea.width); // - confine(startPos .y, 0, dataArea.height); // - confine(currentPos.y, 0, dataArea.height); // + restrict(startPos .y, 0, dataArea.height); // + restrict(currentPos.y, 0, dataArea.height); // //save current selection as double coordinates activeSel->refSelection().from = SelectionBlock::Point(cvrtX.screenToReal(startPos.x + 0.5), //+0.5 start selection in the middle of a pixel @@ -533,7 +536,7 @@ void Graph2D::render(wxDC& dc) const //finally draw curves for (GraphList::const_iterator j = curves_.begin(); j != curves_.end(); ++j) { - std::vector& yValues = yValuesList[j - curves_.begin()].first; //actual y-values + std::vector& yValues = yValuesList[j - curves_.begin()].first; //actual y-values int offset = yValuesList[j - curves_.begin()].second; //x-value offset in pixel std::vector curve; diff --git a/wx+/graph.h b/wx+/graph.h index aadba04b..19de4869 100644 --- a/wx+/graph.h +++ b/wx+/graph.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_PLOT_HEADER_2344252459 @@ -279,7 +279,8 @@ private: void onPaintEvent(wxPaintEvent& evt) { - wxAutoBufferedPaintDC dc(this); //double-buffer only on systems that require it + wxAutoBufferedPaintDC dc(this); //this one happily fucks up for RTL layout by not drawing the first column (x = 0)! + //wxPaintDC dc(this); render(dc); } diff --git a/wx+/grid.cpp b/wx+/grid.cpp new file mode 100644 index 00000000..bfb08eb1 --- /dev/null +++ b/wx+/grid.cpp @@ -0,0 +1,2052 @@ +// ************************************************************************** +// * 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 "grid.h" +#include +#include +#include +#include //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER +#include +#include +#include +#include +#include +#include +#include +#include "format_unit.h" + +#ifdef FFS_LINUX +#include +#endif + + +using namespace zen; + +wxColor zen::getColorSelectionGradientFrom() { return wxColor(137, 172, 255); } //blue: H:158 S:255 V:196 +wxColor zen::getColorSelectionGradientTo () { return wxColor(225, 234, 255); } // H:158 S:255 V:240 + +void zen::clearArea(wxDC& dc, const wxRect& rect, const wxColor& col) +{ + wxDCPenChanger dummy (dc, col); + wxDCBrushChanger dummy2(dc, col); + dc.DrawRectangle(rect); +} + +namespace +{ +//------------ Grid Constants ------------------------------------------------------------------------------------ +const double MOUSE_DRAG_ACCELERATION = 1.5; //unit: [rows / (pixel * sec)] -> same value as Explorer! +const int DEFAULT_ROW_HEIGHT = 20; +const int DEFAULT_COL_LABEL_HEIGHT = 25; +const int COLUMN_BORDER_LEFT = 4; //for left-aligned text +const int COLUMN_LABEL_BORDER = COLUMN_BORDER_LEFT; +const int COLUMN_MOVE_DELAY = 5; //unit: [pixel] (from Explorer) +const int COLUMN_MIN_WIDTH = 40; //only honored when resizing manually! +const int ROW_LABEL_BORDER = 3; +const int COLUMN_RESIZE_TOLERANCE = 6; //unit [pixel] + +const wxColor COLOR_SELECTION_GRADIENT_NO_FOCUS_FROM = wxColour(192, 192, 192); //light grey wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW); +const wxColor COLOR_SELECTION_GRADIENT_NO_FOCUS_TO = wxColour(228, 228, 228); + +const wxColor COLOR_LABEL_GRADIENT_FROM = wxColour(200, 200, 200); //light grey +const wxColor COLOR_LABEL_GRADIENT_TO = *wxWHITE; + +const wxColor COLOR_LABEL_GRADIENT_FROM_FOCUS = getColorSelectionGradientFrom(); +const wxColor COLOR_LABEL_GRADIENT_TO_FOCUS = COLOR_LABEL_GRADIENT_TO; + +//wxColor getColorRowLabel () { return wxPanel::GetClassDefaultAttributes ().colBg; } // +wxColor getColorMainWinBackground() { return wxListBox::GetClassDefaultAttributes().colBg; } //cannot be initialized statically on wxGTK! + +const wxColor colorGridLine = wxColour(192, 192, 192); //light grey +//---------------------------------------------------------------------------------------------------------------- + + +//a fix for a poor wxWidgets implementation (wxAutoBufferedPaintDC skips one pixel on left side when RTL layout is active) +#ifndef wxALWAYS_NATIVE_DOUBLE_BUFFER +#error we need this one! +#endif + +#if wxALWAYS_NATIVE_DOUBLE_BUFFER +struct BufferedPaintDC : public wxPaintDC { BufferedPaintDC(wxWindow& wnd, std::unique_ptr& buffer) : wxPaintDC(&wnd) {} }; + +#else +class BufferedPaintDC : public wxMemoryDC +{ +public: + BufferedPaintDC(wxWindow& wnd, std::unique_ptr& buffer) : buffer_(buffer), paintDc(&wnd) + { + const wxSize clientSize = wnd.GetClientSize(); + if (!buffer_ || clientSize != wxSize(buffer->GetWidth(), buffer->GetHeight())) + buffer.reset(new wxBitmap(clientSize.GetWidth(), clientSize.GetHeight())); + + SelectObject(*buffer); + + if (paintDc.IsOk()) + SetLayoutDirection(paintDc.GetLayoutDirection()); + } + + ~BufferedPaintDC() + { + paintDc.SetLayoutDirection(wxLayout_LeftToRight); //workaround bug in wxDC::Blit() + SetLayoutDirection(wxLayout_LeftToRight); // + + const wxPoint origin = GetDeviceOrigin(); + paintDc.Blit(0, 0, buffer_->GetWidth(), buffer_->GetHeight(), this, -origin.x, -origin.y); + } + +private: + std::unique_ptr& buffer_; + wxPaintDC paintDc; +}; +#endif + + +//another fix for yet another poor wxWidgets implementation (wxDCClipper does *not* stack) +hash_map clippingAreas; + +class DcClipper +{ +public: + DcClipper(wxDC& dc, const wxRect& r) : dc_(dc) + { + auto iter = clippingAreas.find(&dc); + if (iter != clippingAreas.end()) + { + oldRect.reset(new wxRect(iter->second)); + + wxRect tmp = r; + tmp.Intersect(*oldRect); //better safe than sorry + dc_.SetClippingRegion(tmp); // + iter->second = tmp; + } + else + { + dc_.SetClippingRegion(r); + clippingAreas.insert(std::make_pair(&dc_, r)); + } + } + + ~DcClipper() + { + dc_.DestroyClippingRegion(); + if (oldRect.get() != NULL) + { + dc_.SetClippingRegion(*oldRect); + clippingAreas[&dc_] = *oldRect; + } + else + clippingAreas.erase(&dc_); + } + +private: + std::unique_ptr oldRect; + wxDC& dc_; +}; +} + +//---------------------------------------------------------------------------------------------------------------- +const wxEventType zen::EVENT_GRID_MOUSE_LEFT_DOUBLE = wxNewEventType(); +const wxEventType zen::EVENT_GRID_COL_LABEL_MOUSE_LEFT = wxNewEventType(); +const wxEventType zen::EVENT_GRID_COL_LABEL_MOUSE_RIGHT = wxNewEventType(); +const wxEventType zen::EVENT_GRID_COL_RESIZE = wxNewEventType(); +const wxEventType zen::EVENT_GRID_MOUSE_LEFT_DOWN = wxNewEventType(); +const wxEventType zen::EVENT_GRID_MOUSE_LEFT_UP = wxNewEventType(); +const wxEventType zen::EVENT_GRID_MOUSE_RIGHT_DOWN = wxNewEventType(); +const wxEventType zen::EVENT_GRID_MOUSE_RIGHT_UP = wxNewEventType(); +const wxEventType zen::EVENT_GRID_SELECT_RANGE = wxNewEventType(); +//---------------------------------------------------------------------------------------------------------------- + +void GridData::renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus) +{ + drawCellBackground(dc, rect, enabled, selected, hasFocus, getColorMainWinBackground()); +} + + +void GridData::renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType) +{ + wxRect rectTmp = drawCellBorder(dc, rect); + + rectTmp.x += COLUMN_BORDER_LEFT; + rectTmp.width -= COLUMN_BORDER_LEFT; + drawCellText(dc, rectTmp, getValue(row, colType), grid.IsEnabled()); +} + + +size_t GridData::getBestSize(wxDC& dc, int row, ColumnType colType) +{ + return dc.GetTextExtent(getValue(row, colType)).GetWidth() + 2 * COLUMN_BORDER_LEFT; //some border on left and right side +} + + +wxRect GridData::drawCellBorder(wxDC& dc, const wxRect& rect) //returns remaining rectangle +{ + wxDCPenChanger dummy2(dc, wxPen(colorGridLine, 1, wxSOLID)); + dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight()); + dc.DrawLine(rect.GetBottomRight(), rect.GetTopRight() + wxPoint(0, -1)); + + return wxRect(rect.GetTopLeft(), wxSize(rect.width - 1, rect.height - 1)); +} + + +void GridData::drawCellBackground(wxDC& dc, const wxRect& rect, bool enabled, bool selected, bool hasFocus, const wxColor& backgroundColor) +{ + if (enabled) + { + if (selected) + { + if (hasFocus) + dc.GradientFillLinear(rect, getColorSelectionGradientFrom(), getColorSelectionGradientTo(), wxEAST); + else + dc.GradientFillLinear(rect, COLOR_SELECTION_GRADIENT_NO_FOCUS_FROM, COLOR_SELECTION_GRADIENT_NO_FOCUS_TO, wxEAST); + } + else + clearArea(dc, rect, backgroundColor); + } + else + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); +} + + +void GridData::drawCellText(wxDC& dc, const wxRect& rect, const wxString& text, bool enabled, int alignment) +{ + wxDCTextColourChanger dummy(dc, enabled ? dc.GetTextForeground() : wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + + DcClipper clip(dc, rect); //wxDC::DrawLabel doesn't care about width, WTF? + dc.DrawLabel(text, rect, alignment); +} + + +void GridData::renderColumnLabel(Grid& grid, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted) +{ + wxRect rectTmp = drawColumnLabelBorder(dc, rect); + drawColumnLabelBackground(dc, rectTmp, highlighted); + + rectTmp.x += COLUMN_BORDER_LEFT; + rectTmp.width -= COLUMN_BORDER_LEFT; + drawColumnLabelText(dc, rectTmp, getColumnLabel(colType)); +} + + +wxRect GridData::drawColumnLabelBorder(wxDC& dc, const wxRect& rect) //returns remaining rectangle +{ + //draw white line + { + wxDCPenChanger dummy(dc, *wxWHITE_PEN); + dc.DrawLine(rect.GetTopLeft(), rect.GetBottomLeft()); + } + + //draw border (with gradient) + { + wxDCPenChanger dummy(dc, wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID)); + dc.GradientFillLinear(wxRect(rect.GetTopRight(), rect.GetBottomRight()), dc.GetPen().GetColour(), COLOR_LABEL_GRADIENT_TO, wxNORTH); + dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight() + wxPoint(1, 0)); + } + + return wxRect(rect.x + 1, rect.y, rect.width - 2, rect.height - 1); //we really don't like wxRect::Deflate, do we? +} + + +void GridData::drawColumnLabelBackground(wxDC& dc, const wxRect& rect, bool highlighted) +{ + if (highlighted) + dc.GradientFillLinear(rect, COLOR_LABEL_GRADIENT_FROM_FOCUS, COLOR_LABEL_GRADIENT_TO_FOCUS, wxNORTH); + else //regular background gradient + dc.GradientFillLinear(rect, COLOR_LABEL_GRADIENT_FROM, COLOR_LABEL_GRADIENT_TO, wxNORTH); //clear overlapping cells +} + + +void GridData::drawColumnLabelText(wxDC& dc, const wxRect& rect, const wxString& text) +{ + DcClipper clip(dc, rect); //wxDC::DrawLabel doesn't care about witdh, WTF? + dc.DrawLabel(text, rect, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); +} + +//---------------------------------------------------------------------------------------------------------------- + +/* + SubWindow + /|\ + | + ----------------------------------- + | | | | +CornerWin RowLabelWin ColLabelWin MainWin + +*/ + +class Grid::SubWindow : public wxWindow +{ +public: + SubWindow(Grid& parent) : + wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxPanelNameStr), + parent_(parent) + { + Connect(wxEVT_PAINT, wxPaintEventHandler(SubWindow::onPaintEvent), NULL, this); + Connect(wxEVT_SIZE, wxEventHandler(SubWindow::onSizeEvent), NULL, this); + //http://wiki.wxwidgets.org/Flicker-Free_Drawing + Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(SubWindow::onEraseBackGround), NULL, this); + + //SetDoubleBuffered(true); slow as hell! + +#if wxCHECK_VERSION(2, 9, 1) + SetBackgroundStyle(wxBG_STYLE_PAINT); +#else + SetBackgroundStyle(wxBG_STYLE_CUSTOM); +#endif + + Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(SubWindow::onFocus), NULL, this); + Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(SubWindow::onFocus), NULL, this); + + Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(SubWindow::onMouseLeftDown ), NULL, this); + Connect(wxEVT_LEFT_UP, wxMouseEventHandler(SubWindow::onMouseLeftUp ), NULL, this); + Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(SubWindow::onMouseLeftDouble), NULL, this); + Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(SubWindow::onMouseRightDown ), NULL, this); + Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(SubWindow::onMouseRightUp ), NULL, this); + Connect(wxEVT_MOTION, wxMouseEventHandler(SubWindow::onMouseMovement ), NULL, this); + Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(SubWindow::onLeaveWindow ), NULL, this); + Connect(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(SubWindow::onMouseCaptureLost), NULL, this); + + Connect(wxEVT_CHAR, wxKeyEventHandler(SubWindow::onChar ), NULL, this); + Connect(wxEVT_KEY_UP, wxKeyEventHandler(SubWindow::onKeyUp ), NULL, this); + Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(SubWindow::onKeyDown), NULL, this); + } + + Grid& refParent() { return parent_; } + const Grid& refParent() const { return parent_; } + + template + bool sendEventNow(T& event) //return "true" if a suitable event handler function was found and executed, and the function did not call wxEvent::Skip. + { + if (wxEvtHandler* evtHandler = parent_.GetEventHandler()) + return evtHandler->ProcessEvent(event); + return false; + } + +protected: + void setToolTip(const wxString& text) //proper fix for wxWindow + { + wxToolTip* tt = GetToolTip(); + + const wxString oldText = tt ? tt->GetTip() : wxString(); + if (text != oldText) + { + if (text.IsEmpty()) + SetToolTip(NULL); //wxGTK doesn't allow wxToolTip with empty text! + else + { + //wxWidgets bug: tooltip multiline property is defined by first tooltip text containing newlines or not (same is true for maximum width) + if (!tt) + SetToolTip(new wxToolTip(wxT("a b\n\ + a b"))); //ugly, but is working (on Windows) + tt = GetToolTip(); //should be bound by now + if (tt) + tt->SetTip(text); + } + } + } + +private: + virtual void render(wxDC& dc, const wxRect& rect) = 0; + + virtual void onFocus(wxFocusEvent& event) { event.Skip(); } + + virtual void onMouseLeftDown (wxMouseEvent& event) { event.Skip(); } + virtual void onMouseLeftUp (wxMouseEvent& event) { event.Skip(); } + virtual void onMouseLeftDouble(wxMouseEvent& event) { event.Skip(); } + virtual void onMouseRightDown (wxMouseEvent& event) { event.Skip(); } + virtual void onMouseRightUp (wxMouseEvent& event) { event.Skip(); } + virtual void onMouseMovement (wxMouseEvent& event) { event.Skip(); } + virtual void onLeaveWindow (wxMouseEvent& event) { event.Skip(); } + virtual void onMouseCaptureLost(wxMouseCaptureLostEvent& event) { event.Skip(); } + + virtual void onChar (wxKeyEvent& event) { event.Skip(); } + virtual void onKeyUp (wxKeyEvent& event) { event.Skip(); } + virtual void onKeyDown(wxKeyEvent& event) { event.Skip(); } + + void onPaintEvent(wxPaintEvent& evt) + { + //wxAutoBufferedPaintDC dc(this); -> this one happily fucks up for RTL layout by not drawing the first column (x = 0)! + BufferedPaintDC dc(*this, buffer); + + assert(GetSize() == GetClientSize()); + + const wxRegion& updateReg = GetUpdateRegion(); + for (wxRegionIterator iter = updateReg; iter; ++iter) + render(dc, iter.GetRect()); + } + + void onSizeEvent(wxEvent& evt) + { + Refresh(); + evt.Skip(); + } + + void onEraseBackGround(wxEraseEvent& evt) {} + + Grid& parent_; + std::unique_ptr buffer; +}; + +//---------------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------- + +class Grid::CornerWin : public SubWindow +{ +public: + CornerWin(Grid& parent) : SubWindow(parent) {} + +private: + virtual bool AcceptsFocus() const { return false; } + + virtual void render(wxDC& dc, const wxRect& rect) + { + const wxRect& clientRect = GetClientRect(); + + dc.GradientFillLinear(clientRect, COLOR_LABEL_GRADIENT_FROM, COLOR_LABEL_GRADIENT_TO, wxNORTH); + + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID)); + + { + wxDCPenChanger dummy(dc, COLOR_LABEL_GRADIENT_TO); + dc.DrawLine(clientRect.GetTopLeft(), clientRect.GetTopRight()); + } + + dc.GradientFillLinear(wxRect(clientRect.GetBottomLeft (), clientRect.GetTopLeft ()), dc.GetPen().GetColour(), COLOR_LABEL_GRADIENT_TO, wxNORTH); + dc.GradientFillLinear(wxRect(clientRect.GetBottomRight(), clientRect.GetTopRight()), dc.GetPen().GetColour(), COLOR_LABEL_GRADIENT_TO, wxNORTH); + + dc.DrawLine(clientRect.GetBottomLeft(), clientRect.GetBottomRight()); + + wxRect rectShrinked = clientRect; + rectShrinked.Deflate(1); + dc.SetPen(*wxWHITE_PEN); + + //dc.DrawLine(clientRect.GetTopLeft(), clientRect.GetTopRight() + wxPoint(1, 0)); + dc.DrawLine(rectShrinked.GetTopLeft(), rectShrinked.GetBottomLeft() + wxPoint(0, 1)); + } +}; + +//---------------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------- + +class Grid::RowLabelWin : public SubWindow +{ +public: + RowLabelWin(Grid& parent) : + SubWindow(parent), + rowHeight(DEFAULT_ROW_HEIGHT) {} + + int getBestWidth(int rowFrom, int rowTo) + { + wxClientDC dc(this); + + int bestWidth = 0; + for (int i = rowFrom; i <= rowTo; ++i) + bestWidth = std::max(bestWidth, dc.GetTextExtent(formatRow(i)).GetWidth() + 2 * ROW_LABEL_BORDER); + return bestWidth; + } + + int getLogicalHeight() const { return refParent().getRowCount() * rowHeight; } + + int getRowAtPos(int posY) const //returns < 0 if row not found + { + if (posY >= 0 && rowHeight > 0) + { + const int row = posY / rowHeight; + if (row < static_cast(refParent().getRowCount())) + return row; + } + return -1; + } + + int getRowHeight() const { return rowHeight; } + void setRowHeight(int height) { rowHeight = height; } + + wxRect getRowLabelArea(int row) const //returns empty rect if row not found + { + return wxRect(wxPoint(0, rowHeight * row), + wxSize(GetClientSize().GetWidth(), rowHeight)); + } + + std::pair getRowsOnClient(const wxRect& clientRect) const //returns range [begin, end) + { + const int yFrom = refParent().CalcUnscrolledPosition(clientRect.GetTopLeft ()).y; + const int yTo = refParent().CalcUnscrolledPosition(clientRect.GetBottomRight()).y; + + const int rowBegin = std::max(yFrom / rowHeight, 0); + const int rowEnd = std::min((yTo / rowHeight) + 1, static_cast(refParent().getRowCount())); + + return std::make_pair(rowBegin, rowEnd); + } + +private: + static wxString formatRow(int row) { return toStringSep(row + 1); } //convert number to std::wstring including thousands separator + + virtual bool AcceptsFocus() const { return false; } + + virtual void render(wxDC& dc, const wxRect& rect) + { + if (IsEnabled()) + clearArea(dc, rect, getColorMainWinBackground()); + else + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + + wxFont labelFont = GetFont(); + labelFont.SetWeight(wxFONTWEIGHT_BOLD); + dc.SetFont(labelFont); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + + const std::pair rowRange = getRowsOnClient(rect); //returns range [begin, end) + + for (int row = rowRange.first; row < rowRange.second; ++row) + { + wxRect singleLabelArea = getRowLabelArea(row); + if (singleLabelArea.GetHeight() > 0) + { + singleLabelArea.y = refParent().CalcScrolledPosition(singleLabelArea.GetTopLeft()).y; + drawRowLabel(dc, singleLabelArea, row); + } + } + } + + void drawRowLabel(wxDC& dc, const wxRect& rect, int row) + { + //clearArea(dc, rect, getColorRowLabel()); + dc.GradientFillLinear(rect, COLOR_LABEL_GRADIENT_FROM, COLOR_LABEL_GRADIENT_TO, wxWEST); //clear overlapping cells + + //label text + wxRect textRect = rect; + textRect.Deflate(1); + { + DcClipper clip(dc, textRect); //wxDC::DrawLabel doesn't care about with, WTF? + dc.DrawLabel(formatRow(row), textRect, wxALIGN_CENTRE); + } + + //border lines + { + wxDCPenChanger dummy(dc, *wxWHITE_PEN); + dc.DrawLine(rect.GetTopLeft(), rect.GetTopRight()); + } + { + wxDCPenChanger dummy(dc, wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID)); + dc.DrawLine(rect.GetTopLeft(), rect.GetBottomLeft()); + dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight()); + dc.DrawLine(rect.GetBottomRight(), rect.GetTopRight() + wxPoint(0, -1)); + } + } + + virtual void onMouseLeftDown(wxMouseEvent& event) { refParent().redirectRowLabelEvent(event); } + virtual void onMouseMovement(wxMouseEvent& event) { refParent().redirectRowLabelEvent(event); } + virtual void onMouseLeftUp (wxMouseEvent& event) { refParent().redirectRowLabelEvent(event); } + + int rowHeight; +}; + + +namespace +{ +class ColumnResizing +{ +public: + ColumnResizing(wxWindow& wnd, int col, size_t compPos, int startWidth, int clientPosX) : + wnd_(wnd), + col_(col), + compPos_(compPos), + startWidth_(startWidth), + clientPosX_(clientPosX) { wnd_.CaptureMouse(); } + ~ColumnResizing() { if (wnd_.HasCapture()) wnd_.ReleaseMouse(); } + + int getColumn () const { return col_; } + size_t getComponentPos() const { return compPos_; } + int getStartWidth () const { return startWidth_; } + int getStartPosX () const { return clientPosX_; } + +private: + wxWindow& wnd_; + const int col_; + const size_t compPos_; + const int startWidth_; + const int clientPosX_; +}; + + +class ColumnMove +{ +public: + ColumnMove(wxWindow& wnd, int colFrom, size_t compPos, int clientPosX) : + wnd_(wnd), + colFrom_(colFrom), + compPos_(compPos), + colTo_(colFrom), + clientPosX_(clientPosX), + singleClick_(true) { wnd_.CaptureMouse(); } + ~ColumnMove() { if (wnd_.HasCapture()) wnd_.ReleaseMouse(); } + + int getColumnFrom() const { return colFrom_; } + int& refColumnTo() { return colTo_; } + size_t getComponentPos() const { return compPos_; } + int getStartPosX () const { return clientPosX_; } + + bool isRealMove() const { return !singleClick_; } + bool setRealMove() { return singleClick_ = false; } + +private: + wxWindow& wnd_; + const int colFrom_; + const size_t compPos_; + int colTo_; + const int clientPosX_; + bool singleClick_; +}; +} + +//---------------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------- + +class Grid::ColLabelWin : public SubWindow +{ +public: + ColLabelWin(Grid& parent) : SubWindow(parent), highlight(-1, 0) {} + +private: + virtual bool AcceptsFocus() const { return false; } + + virtual void render(wxDC& dc, const wxRect& rect) + { + if (IsEnabled()) + clearArea(dc, rect, getColorMainWinBackground()); + else + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + + wxFont labelFont = GetFont(); + labelFont.SetWeight(wxFONTWEIGHT_BOLD); + dc.SetFont(labelFont); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + + const int colLabelHeight = refParent().colLabelHeight; + + wxPoint labelAreaTL(refParent().CalcScrolledPosition(wxPoint(0, 0)).x, 0); //client coordinates + + std::vector> compAbsWidths = refParent().getAbsoluteWidths(); //resolve negative/stretched widths + for (auto iterComp = compAbsWidths.begin(); iterComp != compAbsWidths.end(); ++iterComp) + for (auto iterCol = iterComp->begin(); iterCol != iterComp->end(); ++iterCol) + { + const size_t col = iterCol - iterComp->begin(); + const int width = iterCol->width_; //don't use unsigned for calculations! + + if (labelAreaTL.x > rect.GetRight()) + return; //done + if (labelAreaTL.x + width > rect.x) + drawColumnLabel(dc, wxRect(labelAreaTL, wxSize(width, colLabelHeight)), col, iterCol->type_, iterComp - compAbsWidths.begin()); + labelAreaTL.x += width; + } + } + + void drawColumnLabel(wxDC& dc, const wxRect& rect, int col, ColumnType colType, size_t compPos) + { + if (auto dataView = refParent().getDataProvider(compPos)) + { + const bool isHighlighted = activeResizing ? col == activeResizing->getColumn () && compPos == activeResizing->getComponentPos() : //highlight column on mouse-over + activeMove ? col == activeMove ->getColumnFrom() && compPos == activeMove ->getComponentPos() : + /**/ col == highlight.first && compPos == highlight.second; + + DcClipper clip(dc, rect); + dataView->renderColumnLabel(refParent(), dc, rect, colType, isHighlighted); + + //draw move target location + if (refParent().columnMoveAllowed(compPos)) + if (activeMove && activeMove->isRealMove() && activeMove->getComponentPos() == compPos) + { + if (col + 1 == activeMove->refColumnTo()) //handle pos 1, 2, .. up to "at end" position + dc.GradientFillLinear(wxRect(rect.GetTopRight(), rect.GetBottomRight() + wxPoint(-2, 0)), *wxBLUE, COLOR_LABEL_GRADIENT_TO, wxNORTH); + else if (col == activeMove->refColumnTo() && col == 0) //pos 0 + dc.GradientFillLinear(wxRect(rect.GetTopLeft(), rect.GetBottomLeft() + wxPoint(2, 0)), *wxBLUE, COLOR_LABEL_GRADIENT_TO, wxNORTH); + } + } + } + + virtual void onMouseLeftDown(wxMouseEvent& event) + { + if (FindFocus() != &refParent().getMainWin()) + refParent().getMainWin().SetFocus(); + + activeResizing.reset(); + activeMove.reset(); + + if (Opt action = refParent().clientPosToColumnAction(event.GetPosition())) + { + if (action->wantResize) + { + if (event.LeftDClick()) //auto-size visible range on double-click + { + const int bestWidth = refParent().getBestColumnSize(action->col, action->compPos); //return -1 on error + if (bestWidth >= 0) + refParent().setColWidth(action->col, action->compPos, std::max(COLUMN_MIN_WIDTH, bestWidth)); + } + else + { + if (Opt colWidth = refParent().getAbsoluteWidth(action->col, action->compPos)) + activeResizing.reset(new ColumnResizing(*this, action->col, action->compPos, *colWidth, event.GetPosition().x)); + } + } + else //a move or single click + activeMove.reset(new ColumnMove(*this, action->col, action->compPos, event.GetPosition().x)); + } + event.Skip(); + } + + virtual void onMouseLeftUp(wxMouseEvent& event) + { + activeResizing.reset(); //nothing else to do, actual work done by onMouseMovement() + + if (activeMove) + { + const size_t compPos = activeMove->getComponentPos(); + if (activeMove->isRealMove()) + { + if (refParent().columnMoveAllowed(compPos)) + { + const int colFrom = activeMove->getColumnFrom(); + int colTo = activeMove->refColumnTo(); + + if (colTo > colFrom) //simulate "colFrom" deletion + --colTo; + + refParent().moveColumn(colFrom, colTo, compPos); + } + } + else //notify single label click + { + const Opt colType = refParent().colToType(activeMove->getColumnFrom(), compPos); + if (colType) + { + GridClickEvent clickEvent(EVENT_GRID_COL_LABEL_MOUSE_LEFT, event, -1, *colType, compPos); + sendEventNow(clickEvent); + } + } + activeMove.reset(); + } + + refParent().updateWindowSizes(); //looks strange if done during onMouseMovement() + refParent().Refresh(); + event.Skip(); + } + + virtual void onMouseCaptureLost(wxMouseCaptureLostEvent& event) + { + activeResizing.reset(); + activeMove.reset(); + Refresh(); + //event.Skip(); -> we DID handle it! + } + + virtual void onMouseLeftDouble(wxMouseEvent& event) + { + const Opt action = refParent().clientPosToColumnAction(event.GetPosition()); + if (action && action->wantResize) + { + //auto-size visible range on double-click + const int bestWidth = refParent().getBestColumnSize(action->col, action->compPos); //return -1 on error + if (bestWidth >= 0) + { + const size_t newWidth = std::max(COLUMN_MIN_WIDTH, bestWidth); + refParent().setColWidth(action->col, action->compPos, newWidth); + + const Opt colType = refParent().colToType(action->col, action->compPos); + if (colType) + { + //notify column resize + GridColumnResizeEvent sizeEvent(newWidth, *colType, action->compPos); + sendEventNow(sizeEvent); + } + } + } + event.Skip(); + } + + virtual void onMouseMovement(wxMouseEvent& event) + { + if (activeResizing) + { + const int col = activeResizing->getColumn(); + const size_t compPos = activeResizing->getComponentPos(); + + if (Opt colWidth = refParent().getAbsoluteWidth(col, compPos)) + { + const int newWidth = std::max(COLUMN_MIN_WIDTH, activeResizing->getStartWidth() + event.GetPosition().x - activeResizing->getStartPosX()); + if (newWidth != static_cast(*colWidth)) + { + refParent().setColWidth(col, compPos, newWidth); + + const Opt colType = refParent().colToType(col, compPos); + if (colType) + { + //notify column resize + GridColumnResizeEvent sizeEvent(newWidth, *colType, compPos); + sendEventNow(sizeEvent); + } + + refParent().Refresh(); + } + } + } + else if (activeMove) + { + const int clientPosX = event.GetPosition().x; + if (std::abs(clientPosX - activeMove->getStartPosX()) > COLUMN_MOVE_DELAY) //real move (not a single click) + { + activeMove->setRealMove(); + + const int col = refParent().clientPosToMoveTargetColumn(event.GetPosition(), activeMove->getComponentPos()); + if (col >= 0) + activeMove->refColumnTo() = col; + } + } + else + { + const Opt action = refParent().clientPosToColumnAction(event.GetPosition()); + if (action) + { + highlight.first = action->col; + highlight.second = action->compPos; + + if (action->wantResize) + SetCursor(wxCURSOR_SIZEWE); //set window-local only! :) + else + SetCursor(*wxSTANDARD_CURSOR); + } + else + { + highlight.first = -1; + SetCursor(*wxSTANDARD_CURSOR); + } + } + + //change tooltip + const wxString toolTip = [&]() -> wxString + { + const wxPoint absPos = refParent().CalcUnscrolledPosition(event.GetPosition()); + + const auto colInfo = refParent().getColumnAtPos(absPos.x); //returns (column type, compPos), column < 0 if not found + if (colInfo) + { + auto prov = refParent().getDataProvider(colInfo->second); + if (prov) + return prov->getToolTip(colInfo->first); + } + return wxString(); + }(); + setToolTip(toolTip); + + Refresh(); + event.Skip(); + } + + virtual void onLeaveWindow(wxMouseEvent& event) + { + highlight.first = -1; //onLeaveWindow() does not respect mouse capture! -> however highlight is drawn unconditionally during move/resize! + Refresh(); + event.Skip(); + } + + virtual void onMouseRightDown(wxMouseEvent& event) + { + const Opt action = refParent().clientPosToColumnAction(event.GetPosition()); + if (action) + { + const Opt colType = refParent().colToType(action->col, action->compPos); + if (colType) + { + //notify right click + GridClickEvent clickEvent(EVENT_GRID_COL_LABEL_MOUSE_RIGHT, event, -1, *colType, action->compPos); + sendEventNow(clickEvent); + } + } + event.Skip(); + } + + std::unique_ptr activeResizing; + std::unique_ptr activeMove; + std::pair highlight; //(column, component) mouse-over, row < 0 if none +}; + +//---------------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------- + +class Grid::MainWin : public SubWindow +{ +public: + MainWin(Grid& parent, + RowLabelWin& rowLabelWin, + ColLabelWin& colLabelWin) : SubWindow(parent), + rowLabelWin_(rowLabelWin), + colLabelWin_(colLabelWin), + cursor(-1, -1), + selectionAnchor(-1) {} + + void makeRowVisible(int row) + { + const wxRect labelRect = rowLabelWin_.getRowLabelArea(row); //returns empty rect if column not found + if (labelRect.height > 0) + { + int scrollPosX = 0; + refParent().GetViewStart(&scrollPosX, NULL); + + int pixelsPerUnitY = 0; + refParent().GetScrollPixelsPerUnit(NULL, &pixelsPerUnitY); + if (pixelsPerUnitY <= 0) return; + + const int clientPosY = refParent().CalcScrolledPosition(labelRect.GetTopLeft()).y; + if (clientPosY < 0) + { + const int scrollPosY = labelRect.GetTopLeft().y / pixelsPerUnitY; + refParent().Scroll(scrollPosX, scrollPosY); + refParent().updateWindowSizes(); //may show horizontal scroll bar + } + else if (clientPosY + labelRect.GetHeight() > rowLabelWin_.GetClientSize().GetHeight()) + { + auto execScroll = [&](int clientHeight) + { + const int scrollPosY = std::ceil((labelRect.GetTopLeft().y - clientHeight + + labelRect.GetHeight()) / static_cast(pixelsPerUnitY)); + refParent().Scroll(scrollPosX, scrollPosY); + refParent().updateWindowSizes(); //may show horizontal scroll bar + }; + + const int clientHeightBefore = rowLabelWin_.GetClientSize().GetHeight(); + execScroll(clientHeightBefore); + + //client height may decrease after scroll due to a new horizontal scrollbar, resulting in a partially visible last row + const int clientHeightAfter = rowLabelWin_.GetClientSize().GetHeight(); + if (clientHeightAfter < clientHeightBefore) + execScroll(clientHeightAfter); + } + } + } + + void setCursor(int row, size_t compPos) + { + cursor = std::make_pair(row, compPos); + selectionAnchor = row; + } + std::pair getCursor() const { return cursor; } // (row, component position) + +private: + virtual void render(wxDC& dc, const wxRect& rect) + { + if (IsEnabled()) + clearArea(dc, rect, getColorMainWinBackground()); + else + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + + dc.SetFont(GetFont()); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + + const int rowHeight = rowLabelWin_.getRowHeight(); + + const wxPoint topLeft = refParent().CalcUnscrolledPosition(rect.GetTopLeft()); + const wxPoint bottomRight = refParent().CalcUnscrolledPosition(rect.GetBottomRight()); + + const int rowFirst = std::max(topLeft .y / rowHeight, 0); // [rowFirst, rowLast) + const int rowLast = std::min(bottomRight.y / rowHeight + 1, static_cast(refParent().getRowCount())); + + wxPoint cellAreaTL(refParent().CalcScrolledPosition(wxPoint(0, 0))); //client coordinates + + std::vector> compAbsWidths = refParent().getAbsoluteWidths(); //resolve negative/stretched widths + for (auto iterComp = compAbsWidths.begin(); iterComp != compAbsWidths.end(); ++iterComp) + { + const int compWidth = std::accumulate(iterComp->begin(), iterComp->end(), 0, + [](int val, const VisibleColumn& vc) { return val + vc.width_; }); + + const size_t compPos = iterComp - compAbsWidths.begin(); + if (auto prov = refParent().getDataProvider(compPos)) + { + //draw background lines + { + DcClipper dummy(dc, rect); //solve issues with drawBackground() painting in area outside of rect (which is not also refreshed by renderCell()) -> keep small scope! + for (int row = rowFirst; row < rowLast; ++row) + drawBackground(*prov, dc, wxRect(cellAreaTL + wxPoint(0, row * rowHeight), wxSize(compWidth, rowHeight)), row, compPos); + } + + //draw single cells + for (auto iterCol = iterComp->begin(); iterCol != iterComp->end(); ++iterCol) + { + const int width = iterCol->width_; //don't use unsigned for calculations! + + if (cellAreaTL.x > rect.GetRight()) + return; //done + + if (cellAreaTL.x + width > rect.x) + for (int row = rowFirst; row < rowLast; ++row) + { + const wxRect& cellRect = wxRect(cellAreaTL.x, cellAreaTL.y + row * rowHeight, width, rowHeight); + DcClipper clip(dc, cellRect); + prov->renderCell(refParent(), dc, cellRect, row, iterCol->type_); + } + cellAreaTL.x += width; + } + } + else + cellAreaTL.x += compWidth; + } + } + + void drawBackground(GridData& prov, wxDC& dc, const wxRect& rect, int row, size_t compPos) + { + Grid& grid = refParent(); + //check if user is currently selecting with mouse + bool drawSelection = grid.isSelected(row, compPos); + if (activeSelection) + { + const int rowFrom = std::min(activeSelection->getStartRow(), activeSelection->getCurrentRow()); + const int rowTo = std::max(activeSelection->getStartRow(), activeSelection->getCurrentRow()); + + if (compPos == activeSelection->getComponentPos() && rowFrom <= row && row <= rowTo) + drawSelection = activeSelection->isPositiveSelect(); //overwrite default + } + + prov.renderRowBackgound(dc, rect, row, grid.IsEnabled(), drawSelection, wxWindow::FindFocus() == &grid.getMainWin()); + } + + virtual void onMouseLeftDown (wxMouseEvent& event) { onMouseDown(event); } + virtual void onMouseLeftUp (wxMouseEvent& event) { onMouseUp (event); } + virtual void onMouseRightDown(wxMouseEvent& event) { onMouseDown(event); } + virtual void onMouseRightUp (wxMouseEvent& event) { onMouseUp (event); } + + virtual void onMouseLeftDouble(wxMouseEvent& event) + { + const wxPoint absPos = refParent().CalcUnscrolledPosition(event.GetPosition()); + const int row = rowLabelWin_.getRowAtPos(absPos.y); //return -1 if no row at this position + const auto colInfo = refParent().getColumnAtPos(absPos.x); //returns (column type, compPos), column < 0 if not found + if (colInfo) + { + //notify event + GridClickEvent mouseEvent(EVENT_GRID_MOUSE_LEFT_DOUBLE, event, row, colInfo->first, colInfo->second); + sendEventNow(mouseEvent); + } + event.Skip(); + } + + void onMouseDown(wxMouseEvent& event) //handle left and right mouse button clicks (almost) the same + { + if (FindFocus() != this) //doesn't seem to happen automatically for right mouse button + SetFocus(); + + const wxPoint absPos = refParent().CalcUnscrolledPosition(event.GetPosition()); + + const int row = rowLabelWin_.getRowAtPos(absPos.y); //return -1 if no row at this position + const auto colInfo = refParent().getColumnAtPos(absPos.x); //returns (column type, compPos), column < 0 if not found + const ColumnType colType = colInfo ? colInfo->first : DUMMY_COLUMN_TYPE; + const int compPos = colInfo ? colInfo->second : -1; + + //notify event + GridClickEvent mouseEvent(event.RightDown() ? EVENT_GRID_MOUSE_RIGHT_DOWN : EVENT_GRID_MOUSE_LEFT_DOWN, event, row, colType, compPos); + if (!sendEventNow(mouseEvent)) //if event was not processed externally... + { + if (!event.RightDown() || !refParent().isSelected(row, compPos)) //do NOT start a new selection if user right-clicks on a selected area! + { + if (row >= 0 && compPos >= 0) + cursor = std::make_pair(row, compPos); + + if (event.ControlDown()) + { + if (row >= 0 && compPos >= 0) + activeSelection.reset(new MouseSelection(*this, row, compPos, !refParent().isSelected(row, compPos))); + selectionAnchor = row; + } + else if (event.ShiftDown()) + { + if (row >= 0 && compPos >= 0) + activeSelection.reset(new MouseSelection(*this, selectionAnchor, compPos, true)); + refParent().clearSelectionAll(); + } + else + { + if (row >= 0 && compPos >= 0) + activeSelection.reset(new MouseSelection(*this, row, compPos, true)); + selectionAnchor = row; + refParent().clearSelectionAll(); + } + } + Refresh(); + } + + event.Skip(); //allow changin focus + } + + void onMouseUp(wxMouseEvent& event) + { + //const int currentRow = clientPosToRow(event.GetPosition()); -> this one may point to row which is not in visible area! + + if (activeSelection) + { + const int rowFrom = activeSelection->getStartRow(); + const int rowTo = activeSelection->getCurrentRow(); + const size_t compPos = activeSelection->getComponentPos(); + const bool positive = activeSelection->isPositiveSelect(); + refParent().selectRange(rowFrom, rowTo, compPos, positive); + + cursor.first = activeSelection->getCurrentRow(); //slight deviation from Explorer: change cursor while dragging mouse! -> unify behavior with shift + direction keys + + activeSelection.reset(); + } + + //this one may point to row which is not in visible area! + const wxPoint absPos = refParent().CalcUnscrolledPosition(event.GetPosition()); + + const int row = rowLabelWin_.getRowAtPos(absPos.y); //return -1 if no row at this position + const auto colInfo = refParent().getColumnAtPos(absPos.x); //returns (column type, compPos), column < 0 if not found + + const ColumnType colType = colInfo ? colInfo->first : DUMMY_COLUMN_TYPE; //we probably should notify even if colInfo is invalid! + const int compPos = colInfo ? colInfo->second : 0; + + //notify event + GridClickEvent mouseEvent(event.RightUp() ? EVENT_GRID_MOUSE_RIGHT_UP : EVENT_GRID_MOUSE_LEFT_UP, event, row, colType, compPos); + sendEventNow(mouseEvent); + + Refresh(); + event.Skip(); //allow changing focus + } + + virtual void onMouseCaptureLost(wxMouseCaptureLostEvent& event) + { + activeSelection.reset(); + Refresh(); + //event.Skip(); -> we DID handle it! + } + + virtual void onMouseMovement(wxMouseEvent& event) + { + if (activeSelection) + activeSelection->evalMousePos(); //eval on both mouse movement + timer event! + + //change tooltip + const wxString toolTip = [&]() -> wxString + { + const wxPoint absPos = refParent().CalcUnscrolledPosition(event.GetPosition()); + + const int row = rowLabelWin_.getRowAtPos(absPos.y); //return -1 if no row at this position + const auto colInfo = refParent().getColumnAtPos(absPos.x); //returns (column type, compPos), column < 0 if not found + if (colInfo && row >= 0) + { + auto prov = refParent().getDataProvider(colInfo->second); + if (prov) + return prov->getToolTip(row, colInfo->first); + } + return wxString(); + }(); + + setToolTip(toolTip); + + event.Skip(); + } + + virtual void onKeyDown(wxKeyEvent& event) + { + int keyCode = event.GetKeyCode(); + if (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; + } + + const int rowCount = refParent().getRowCount(); + + auto setSingleSelection = [&](int row, int compPos) + { + numeric::restrict(row, 0, rowCount - 1); + numeric::restrict(compPos, 0, static_cast(refParent().comp.size()) - 1); + refParent().setGridCursor(row, compPos); + }; + + auto setSelectionRange = [&](int row) + { + numeric::restrict(row, 0, rowCount - 1); + + cursor.first = row; + if (selectionAnchor < 0) + selectionAnchor = row; + this->makeRowVisible(row); + + auto& comp = refParent().comp; + std::for_each(comp.begin(), comp.end(), [](Grid::Component& c) { c.selection.clear(); }); //clear selection, do NOT fire event + refParent().selectRange(selectionAnchor, row, cursor.second); //set new selection + fire event + }; + + switch (keyCode) + { + case WXK_UP: + case WXK_NUMPAD_UP: + if (event.ShiftDown()) + setSelectionRange(cursor.first - 1); + else if (event.ControlDown()) + refParent().scrollDelta(0, -1); + else + setSingleSelection(cursor.first - 1, cursor.second); + break; + + case WXK_DOWN: + case WXK_NUMPAD_DOWN: + if (event.ShiftDown()) + setSelectionRange(cursor.first + 1); + else if (event.ControlDown()) + refParent().scrollDelta(0, 1); + else + setSingleSelection(cursor.first + 1, cursor.second); + break; + + case WXK_LEFT: + case WXK_NUMPAD_LEFT: + if (event.ControlDown()) + refParent().scrollDelta(-1, 0); + else if (event.ShiftDown()) + ; + else + setSingleSelection(cursor.first, cursor.second - 1); + break; + + case WXK_RIGHT: + case WXK_NUMPAD_RIGHT: + if (event.ControlDown()) + refParent().scrollDelta(1, 0); + else if (event.ShiftDown()) + ; + else + setSingleSelection(cursor.first, cursor.second + 1); + break; + + case WXK_HOME: + case WXK_NUMPAD_HOME: + if (event.ShiftDown()) + setSelectionRange(0); + else if (event.ControlDown()) + setSingleSelection(0, 0); + else + setSingleSelection(0, cursor.second); + break; + + case WXK_END: + case WXK_NUMPAD_END: + if (event.ShiftDown()) + setSelectionRange(rowCount - 1); + else if (event.ControlDown()) + setSingleSelection(rowCount - 1, refParent().comp.size() - 1); + else + setSingleSelection(rowCount - 1, cursor.second); + break; + + case WXK_PAGEUP: + case WXK_NUMPAD_PAGEUP: + if (event.ShiftDown()) + setSelectionRange(cursor.first - GetClientSize().GetHeight() / rowLabelWin_.getRowHeight()); + else if (event.ControlDown()) + ; + else + setSingleSelection(cursor.first - GetClientSize().GetHeight() / rowLabelWin_.getRowHeight(), cursor.second); + break; + + case WXK_PAGEDOWN: + case WXK_NUMPAD_PAGEDOWN: + if (event.ShiftDown()) + setSelectionRange(cursor.first + GetClientSize().GetHeight() / rowLabelWin_.getRowHeight()); + else if (event.ControlDown()) + ; + else + setSingleSelection(cursor.first + GetClientSize().GetHeight() / rowLabelWin_.getRowHeight(), cursor.second); + break; + + case 'A': //Ctrl + A - select all + if (event.ControlDown()) + refParent().selectRange(0, rowCount, cursor.second); + break; + + case WXK_NUMPAD_ADD: //CTRL + '+' - auto-size all + if (event.ControlDown()) + refParent().autoSizeColumns(cursor.second); + break; + } + + Refresh(); + event.Skip(); + } + + virtual void onFocus(wxFocusEvent& event) { Refresh(); event.Skip(); } + + class MouseSelection : private wxEvtHandler + { + public: + MouseSelection(MainWin& wnd, + int rowStart, + size_t compPos, + bool positiveSelect) : wnd_(wnd), rowStart_(rowStart), compPos_(compPos), rowCurrent_(rowStart), positiveSelect_(positiveSelect), toScrollX(0), toScrollY(0), tickCountLast(clock()) + { + wnd_.CaptureMouse(); + timer.Connect(wxEVT_TIMER, wxEventHandler(MouseSelection::onTimer), NULL, this); + timer.Start(100); //timer interval in ms + evalMousePos(); + } + ~MouseSelection() { if (wnd_.HasCapture()) wnd_.ReleaseMouse(); } + + int getStartRow () const { return rowStart_; } + size_t getComponentPos () const { return compPos_; } + int getCurrentRow () const { return rowCurrent_; } + bool isPositiveSelect() const { return positiveSelect_; } //are we selecting or unselecting? + + void evalMousePos() + { + const clock_t now = clock(); + const double deltaTime = static_cast(now - tickCountLast) / CLOCKS_PER_SEC; //unit: [sec] + tickCountLast = now; + + wxMouseState mouseState = wxGetMouseState(); + const wxPoint clientPos = wnd_.ScreenToClient(wxPoint(mouseState.GetX(), mouseState.GetY())); + const wxSize clientSize = wnd_.GetClientSize(); + + //scroll while dragging mouse + const int overlapPixY = clientPos.y < 0 ? clientPos.y : + clientPos.y >= clientSize.GetHeight() ? clientPos.y - (clientSize.GetHeight() - 1) : 0; + const int overlapPixX = clientPos.x < 0 ? clientPos.x : + clientPos.x >= clientSize.GetWidth() ? clientPos.x - (clientSize.GetWidth() - 1) : 0; + + int pixelsPerUnitY = 0; + wnd_.refParent().GetScrollPixelsPerUnit(NULL, &pixelsPerUnitY); + if (pixelsPerUnitY <= 0) return; + + const double mouseDragSpeedIncScrollU = pixelsPerUnitY > 0 ? MOUSE_DRAG_ACCELERATION * wnd_.rowLabelWin_.getRowHeight() / pixelsPerUnitY : 0; //unit: [scroll units / (pixel * sec)] + + auto autoScroll = [&](int overlapPix, double& toScroll) + { + if (overlapPix != 0) + { + const double scrollSpeed = overlapPix * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] + toScroll += scrollSpeed * deltaTime; + } + else + toScroll = 0; + }; + + autoScroll(overlapPixX, toScrollX); + autoScroll(overlapPixY, toScrollY); + + if (toScrollX != 0 || toScrollY != 0) + { + wnd_.refParent().scrollDelta(static_cast(toScrollX), static_cast(toScrollY)); // + toScrollX -= static_cast(toScrollX); //rounds down for positive numbers, up for negative, + toScrollY -= static_cast(toScrollY); //exactly what we want + } + + { + //select current row *after* scrolling + wxPoint clientPosTrimmed = clientPos; + numeric::restrict(clientPosTrimmed.y, 0, clientSize.GetHeight() - 1); //do not select row outside client window! + + wxPoint absPos = wnd_.refParent().CalcUnscrolledPosition(clientPosTrimmed); + int currentRow = wnd_.rowLabelWin_.getRowAtPos(absPos.y); //return -1 if no row at this position + + //make sure "current row" is always at a valid position while moving! + if (currentRow < 0) + currentRow = static_cast(wnd_.refParent().getRowCount()) - 1; //seems, we hit the empty space at the end + + if (currentRow >= 0 && rowCurrent_ != currentRow) + { + rowCurrent_ = currentRow; + wnd_.Refresh(); + } + } + } + + private: + void onTimer(wxEvent& event) { evalMousePos(); } + + MainWin& wnd_; + const int rowStart_; + const size_t compPos_; + int rowCurrent_; + const bool positiveSelect_; + wxTimer timer; + double toScrollX; //count outstanding scroll units to scroll while dragging mouse + double toScrollY; // + clock_t tickCountLast; + }; + + virtual void ScrollWindow(int dx, int dy, const wxRect* rect) + { + wxWindow::ScrollWindow(dx, dy, rect); + rowLabelWin_.ScrollWindow(0, dy, rect); + colLabelWin_.ScrollWindow(dx, 0, rect); + + refParent().updateWindowSizes(false); //row label width has changed -> do *not* update scrollbars: recursion on wxGTK! + rowLabelWin_.Update(); //update while dragging scroll thumb + } + + RowLabelWin& rowLabelWin_; + ColLabelWin& colLabelWin_; + + std::unique_ptr activeSelection; //bound while user is selecting with mouse + + std::pair cursor; //(row, component position) -1 if none + int selectionAnchor; //-1 if none +}; + +//---------------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------- + +Grid::Grid(wxWindow* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) : wxScrolledWindow(parent, id, pos, size, style | wxWANTS_CHARS, name), + showScrollbarX(true), + showScrollbarY(true), + colLabelHeight(DEFAULT_COL_LABEL_HEIGHT), + drawRowLabel(true), + comp(1), + colSizeOld(0) +{ + Connect(wxEVT_PAINT, wxPaintEventHandler(Grid::onPaintEvent ), NULL, this); + Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(Grid::onEraseBackGround), NULL, this); + Connect(wxEVT_SIZE, wxEventHandler (Grid::onSizeEvent ), NULL, this); + + cornerWin_ = new CornerWin (*this); // + rowLabelWin_ = new RowLabelWin(*this); //owership handled by "this" + colLabelWin_ = new ColLabelWin(*this); // + mainWin_ = new MainWin (*this, *rowLabelWin_, *colLabelWin_); // + + SetTargetWindow(mainWin_); + + SetInitialSize(size); //"Most controls will use this to set their initial size" -> why not + + assert(GetClientSize() == GetSize()); //borders are NOT allowed for Grid + //reason: updateWindowSizes() wants to use "GetSize()" as a "GetClientSize()" including scrollbars +} + + +void Grid::updateWindowSizes(bool updateScrollbar) +{ + /* We have to deal with a nasty circular dependency: + + mainWin_->GetClientSize() + /|\ + SetScrollbars -> show/hide scrollbars depending on whether client size is big enough + /|\ + GetClientRect(); -> possibly trimmed by scrollbars + /|\ + mainWin_->GetClientSize() -> also trimmed, since it's a sub-window ! + + */ + + //update scrollbars: showing/hiding scrollbars changes client size! + if (updateScrollbar) + { + //help SetScrollbars() do a better job + //mainWin_->SetSize(std::max(0, GetSize().GetWidth () - rowLabelWidth), -> not working! + // std::max(0, GetSize().GetHeight() - colLabelHeight)); + + int scrollPosX = 0; + int scrollPosY = 0; + GetViewStart(&scrollPosX, &scrollPosY); //preserve current scroll position + + const int pixPerScrollUnitY = std::max(1, rowLabelWin_->getRowHeight()); + const int pixPerScrollUnitX = pixPerScrollUnitY; + + const int scrollUnitsX = std::ceil(static_cast( getMinAbsoluteWidthTotal()) / pixPerScrollUnitX); + const int scrollUnitsY = std::ceil(static_cast(rowLabelWin_->getLogicalHeight()) / pixPerScrollUnitY); + + SetScrollbars(pixPerScrollUnitX, pixPerScrollUnitY, //another abysmal wxWidgets design decision: why is precision needlessly reduced to "pixelsPerUnit"???? + scrollUnitsX, scrollUnitsY, + scrollPosX, scrollPosY); + } + + const wxRect clientRect = GetClientRect(); + + const int mainWinHeight = std::max(0, clientRect.height - colLabelHeight); + + int rowLabelWidth = 0; //calculate optimal row label width + if (drawRowLabel) + { + const int heightTotal = rowLabelWin_->getLogicalHeight(); + if (heightTotal > 0) + { + int yFrom = CalcUnscrolledPosition(wxPoint(0, 0)).y; + int yTo = CalcUnscrolledPosition(wxPoint(0, mainWinHeight - 1)).y ; + numeric::restrict(yFrom, 0, heightTotal - 1); + numeric::restrict(yTo, 0, heightTotal - 1); + + const int rowFrom = rowLabelWin_->getRowAtPos(yFrom); + const int rowTo = rowLabelWin_->getRowAtPos(yTo); + if (rowFrom >= 0 && rowTo >= 0) + rowLabelWidth = rowLabelWin_->getBestWidth(rowFrom, rowTo); + } + } + + const int mainWinWidth = std::max(0, clientRect.width - rowLabelWidth); + + cornerWin_ ->SetSize(0, 0, rowLabelWidth, colLabelHeight); + rowLabelWin_->SetSize(0, colLabelHeight, rowLabelWidth, mainWinHeight); + colLabelWin_->SetSize(rowLabelWidth, 0, mainWinWidth, colLabelHeight); + mainWin_ ->SetSize(rowLabelWidth, colLabelHeight, mainWinWidth, mainWinHeight); +} + + +void Grid::onPaintEvent(wxPaintEvent& event) { wxPaintDC dc(this); } + + +void Grid::setColumnLabelHeight(int height) +{ + colLabelHeight = std::max(0, height); + updateWindowSizes(); +} + + +void Grid::showRowLabel(bool show) +{ + drawRowLabel = show; + updateWindowSizes(); +} + + +std::vector Grid::getSelectedRows(size_t compPos) const +{ + return compPos < comp.size() ? comp[compPos].selection.get() : std::vector(); +} + + +void Grid::scrollDelta(int deltaX, int deltaY) +{ + int scrollPosX = 0; + int scrollPosY = 0; + GetViewStart(&scrollPosX, &scrollPosY); + + scrollPosX += deltaX; + scrollPosY += deltaY; + + //const int unitsTotalX = GetScrollLines(wxHORIZONTAL); + //const int unitsTotalY = GetScrollLines(wxVERTICAL); + + //if (unitsTotalX <= 0 || unitsTotalY <= 0) return; -> premature + //numeric::restrict(scrollPosX, 0, unitsTotalX - 1); //make sure scroll target is in valid range + //numeric::restrict(scrollPosY, 0, unitsTotalY - 1); // + + Scroll(scrollPosX, scrollPosY); + updateWindowSizes(); //may show horizontal scroll bar +} + + +void Grid::redirectRowLabelEvent(wxMouseEvent& event) +{ + event.m_x = 0; + mainWin_->ProcessEvent(event); + + if (event.ButtonDown() && wxWindow::FindFocus() != mainWin_) + mainWin_->SetFocus(); +} + + +size_t Grid::getRowCount() const +{ + return comp.empty() ? 0 : comp.front().dataView_ ? comp.front().dataView_->getRowCount() : 0; +} + + +void Grid::Refresh(bool eraseBackground, const wxRect* rect) +{ + const size_t rowCountNew = getRowCount(); + if (colSizeOld != rowCountNew) + { + colSizeOld = rowCountNew; + std::for_each(comp.begin(), comp.end(), [&](Component& c) { c.selection.init(rowCountNew); }); + updateWindowSizes(); + } + wxScrolledWindow::Refresh(eraseBackground, rect); +} + + +void Grid::setRowHeight(int height) +{ + rowLabelWin_->setRowHeight(height); + updateWindowSizes(); +} + + +void Grid::setColumnConfig(const std::vector& attr, size_t compPos) +{ + if (compPos < comp.size()) + { + //hold ownership of non-visible columns + comp[compPos].oldColAttributes = attr; + + std::vector visibleCols; + std::for_each(attr.begin(), attr.end(), + [&](const ColumnAttribute& ca) + { + if (ca.visible_) + visibleCols.push_back(Grid::VisibleColumn(ca.type_, ca.width_)); + }); + + //set ownership of visible columns + comp[compPos].visibleCols = visibleCols; + + updateWindowSizes(); + Refresh(); + } +} + + +std::vector Grid::getColumnConfig(size_t compPos) const +{ + if (compPos < comp.size()) + { + auto iterVcols = comp[compPos].visibleCols.begin(); + auto iterVcolsend = comp[compPos].visibleCols.end(); + + std::set visibleTypes; + std::transform(iterVcols, iterVcolsend, std::inserter(visibleTypes, visibleTypes.begin()), + [](const VisibleColumn& vc) { return vc.type_; }); + + //get non-visible columns (+ outdated visible ones) + std::vector output = comp[compPos].oldColAttributes; + + //update visible columns but keep order of non-visible ones! + std::for_each(output.begin(), output.end(), + [&](ColumnAttribute& ca) + { + if (visibleTypes.find(ca.type_) != visibleTypes.end()) + { + if (iterVcols != iterVcolsend) + { + ca.visible_ = true; //paranoia + ca.type_ = iterVcols->type_; + ca.width_ = iterVcols->width_; + ++iterVcols; + } + } + else + ca.visible_ = false; //paranoia + }); + + return output; + } + return std::vector(); +} + + +void Grid::showScrollBars(bool horizontal, bool vertical) +{ +#ifdef FFS_WIN + showScrollbarX = horizontal; + showScrollbarY = vertical; + updateWindowSizes(); + +#elif defined FFS_LINUX //get rid of scrollbars, but preserve scrolling behavior! + GtkWidget* gridWidget = wxWindow::m_widget; + GtkScrolledWindow* scrolledWindow = GTK_SCROLLED_WINDOW(gridWidget); + gtk_scrolled_window_set_policy(scrolledWindow, + horizontal ? GTK_POLICY_AUTOMATIC : GTK_POLICY_NEVER, + vertical ? GTK_POLICY_AUTOMATIC : GTK_POLICY_NEVER); +#endif +} + + +#ifdef FFS_WIN //get rid of scrollbars, but preserve scrolling behavior! +void Grid::SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh) +{ + if ((orientation == wxHORIZONTAL && !showScrollbarX) || (orientation == wxVERTICAL && !showScrollbarY)) + wxWindow::SetScrollbar(orientation, 0, 0, 0, refresh); + else + wxWindow::SetScrollbar(orientation, position, thumbSize, range, refresh); +} + + +#ifndef WM_MOUSEHWHEEL //MinGW is clueless... +#define WM_MOUSEHWHEEL 0x020E +#endif + +WXLRESULT Grid::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +{ + if (nMsg == WM_MOUSEHWHEEL) + { + const int distance = GET_WHEEL_DELTA_WPARAM(wParam); + const int delta = WHEEL_DELTA; + const int rotations = distance / delta; + + static int linesPerRotation = -1; + if (linesPerRotation < 0) + if (!::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &linesPerRotation, 0)) + linesPerRotation = 3; + + SetFocus(); + scrollDelta(rotations * linesPerRotation, 0); //in scroll units + } + + return wxScrolledWindow::MSWDefWindowProc(nMsg, wParam, lParam);; +} +#endif + + +wxWindow& Grid::getCornerWin () { return *cornerWin_; } +wxWindow& Grid::getRowLabelWin() { return *rowLabelWin_; } +wxWindow& Grid::getColLabelWin() { return *colLabelWin_; } +wxWindow& Grid::getMainWin () { return *mainWin_; } + + +wxRect Grid::getColumnLabelArea(ColumnType colType, size_t compPos) const +{ + std::vector> compAbsWidths = getAbsoluteWidths(); //resolve negative/stretched widths + if (compPos < compAbsWidths.size()) + { + auto iterComp = compAbsWidths.begin() + compPos; + + auto iterCol = std::find_if(iterComp->begin(), iterComp->end(), [&](const VisibleColumn& vc) { return vc.type_ == colType; }); + if (iterCol != iterComp->end()) + { + int posX = std::accumulate(compAbsWidths.begin(), iterComp, 0, + [](int val, const std::vector& cols) + { + return val + std::accumulate(cols.begin(), cols.end(), 0, [](int val2, const VisibleColumn& vc) { return val2 + vc.width_; }); + }); + + posX += std::accumulate(iterComp->begin(), iterCol, 0, [](int val, const VisibleColumn& vc) { return val + vc.width_; }); + + return wxRect(wxPoint(posX, 0), wxSize(iterCol->width_, colLabelHeight)); + } + } + return wxRect(); +} + + +Opt Grid::clientPosToColumnAction(const wxPoint& pos) const +{ + const int absPosX = CalcUnscrolledPosition(pos).x; + if (absPosX >= 0) + { + int accuWidth = 0; + + std::vector> compAbsWidths = getAbsoluteWidths(); //resolve negative/stretched widths + for (auto iterComp = compAbsWidths.begin(); iterComp != compAbsWidths.end(); ++iterComp) + { + const size_t compPos = iterComp - compAbsWidths.begin(); + const int resizeTolerance = columnResizeAllowed(compPos) ? COLUMN_RESIZE_TOLERANCE : 0; + + for (auto iterCol = iterComp->begin(); iterCol != iterComp->end(); ++iterCol) + { + const size_t col = iterCol - iterComp->begin(); + + accuWidth += iterCol->width_; + if (std::abs(absPosX - accuWidth) < resizeTolerance) + { + ColAction out = {}; + out.wantResize = true; + out.col = col; + out.compPos = compPos; + return out; + } + else if (absPosX < accuWidth) + { + ColAction out = {}; + out.wantResize = false; + out.col = col; + out.compPos = compPos; + return out; + } + } + } + } + return NoValue(); +} + + +void Grid::moveColumn(size_t colFrom, size_t colTo, size_t compPos) +{ + if (compPos < comp.size()) + { + auto& visibleCols = comp[compPos].visibleCols; + if (colFrom < visibleCols.size() && + colTo < visibleCols.size() && + colTo != colFrom) + { + const auto colAtt = visibleCols[colFrom]; + visibleCols.erase (visibleCols.begin() + colFrom); + visibleCols.insert(visibleCols.begin() + colTo, colAtt); + } + } +} + + +int Grid::clientPosToMoveTargetColumn(const wxPoint& pos, size_t compPos) const +{ + std::vector> compAbsWidths = getAbsoluteWidths(); //resolve negative/stretched widths + if (compPos < compAbsWidths.size()) + { + auto iterComp = compAbsWidths.begin() + compPos; + const int absPosX = CalcUnscrolledPosition(pos).x; + + int accuWidth = std::accumulate(compAbsWidths.begin(), iterComp, 0, + [](int val, const std::vector& cols) + { + return val + std::accumulate(cols.begin(), cols.end(), 0, + [](int val2, const VisibleColumn& vc) { return val2 + vc.width_; }); + }); + + for (auto iterCol = iterComp->begin(); iterCol != iterComp->end(); ++iterCol) + { + const int width = iterCol->width_; //beware dreaded unsigned conversions! + accuWidth += width; + + if (absPosX < accuWidth - width / 2) + return iterCol - iterComp->begin(); + } + return iterComp->size(); + } + return -1; +} + + +Opt Grid::colToType(size_t col, size_t compPos) const +{ + if (compPos < comp.size()) + { + auto& visibleCols = comp[compPos].visibleCols; + if (col < visibleCols.size()) + return visibleCols[col].type_; + } + return NoValue(); +} + + +int Grid::getRowAtPos(int posY) const { return rowLabelWin_->getRowAtPos(posY); } + + +Opt> Grid::getColumnAtPos(int posX) const +{ + if (posX >= 0) + { + std::vector> compAbsWidths = getAbsoluteWidths(); //resolve negative/stretched widths + + int accWidth = 0; + for (auto iterComp = compAbsWidths.begin(); iterComp != compAbsWidths.end(); ++iterComp) + for (auto iterCol = iterComp->begin(); iterCol != iterComp->end(); ++iterCol) + { + accWidth += iterCol->width_; + if (posX < accWidth) + { + const size_t compPos = iterComp - compAbsWidths.begin(); + return std::make_pair(iterCol->type_, compPos); + } + } + } + return NoValue(); +} + + +wxRect Grid::getCellArea(int row, ColumnType colType, size_t compPos) const +{ + const wxRect& colArea = getColumnLabelArea(colType, compPos); + const wxRect& rowArea = rowLabelWin_->getRowLabelArea(row); + return wxRect(wxPoint(colArea.x, rowArea.y), wxSize(colArea.width, rowArea.height)); +} + + +void Grid::setGridCursor(int row, size_t compPos) +{ + if (compPos < comp.size()) + { + std::for_each(comp.begin(), comp.end(), [](Grid::Component& c) { c.selection.clear(); }); //clear selection, do NOT fire event + selectRange(row, row, compPos); //set new selection + fire event + + mainWin_->setCursor(row, compPos); + mainWin_->makeRowVisible(row); + mainWin_->Refresh(); + } +} + + +void Grid::selectRange(int rowFrom, int rowTo, size_t compPos, bool positive) +{ + if (compPos < comp.size()) + { + comp[compPos].selection.selectRange(rowFrom, rowTo, positive); + + //notify event + GridRangeSelectEvent selectionEvent(rowFrom, rowTo, compPos, positive); + if (wxEvtHandler* evtHandler = GetEventHandler()) + evtHandler->ProcessEvent(selectionEvent); + } +} + + +void Grid::clearSelectionAll() +{ + std::for_each(comp.begin(), comp.end(), [](Grid::Component& c) { c.selection.clear(); }); + + //notify event + GridRangeSelectEvent unselectionEvent(-1, -1, static_cast(-1), false); + if (wxEvtHandler* evtHandler = GetEventHandler()) + evtHandler->ProcessEvent(unselectionEvent); +} + + +void Grid::scrollTo(int row) +{ + const wxRect labelRect = rowLabelWin_->getRowLabelArea(row); //returns empty rect if column not found + if (labelRect.height > 0) + { + int pixelsPerUnitY = 0; + GetScrollPixelsPerUnit(NULL, &pixelsPerUnitY); + if (pixelsPerUnitY >= 0) + { + int scrollPosX = 0; + GetViewStart(&scrollPosX, NULL); + int scrollPosY = labelRect.GetTopLeft().y / pixelsPerUnitY; + + Scroll(scrollPosX, scrollPosY); + updateWindowSizes(); //may show horizontal scroll bar + Refresh(); + } + } +} + + +std::pair Grid::getGridCursor() const +{ + return mainWin_->getCursor(); +} + + +int Grid::getBestColumnSize(size_t col, size_t compPos) const +{ + if (compPos < comp.size()) + { + auto& visibleCols = comp[compPos].visibleCols; + auto dataView = comp[compPos].dataView_; + if (dataView && col < visibleCols.size()) + { + const ColumnType type = visibleCols[col].type_; + + wxClientDC dc(mainWin_); + dc.SetFont(mainWin_->GetFont()); + + size_t maxSize = 0; + const std::pair rowRange = rowLabelWin_->getRowsOnClient(mainWin_->GetClientRect()); //returns range [begin, end) + + for (int row = rowRange.first; row < rowRange.second; ++row) + maxSize = std::max(maxSize, dataView->getBestSize(dc, row, type)); + + return maxSize; + } + } + return -1; +} + + +void Grid::autoSizeColumns(size_t compPos) +{ + if (compPos < comp.size() && comp[compPos].allowColumnResize) + { + auto& visibleCols = comp[compPos].visibleCols; + for (auto iter = visibleCols.begin(); iter != visibleCols.end(); ++iter) + { + const int col = iter - visibleCols.begin(); + const int bestWidth = getBestColumnSize(col, compPos); //return -1 on error + if (bestWidth >= 0) + { + const size_t newWidth = std::max(COLUMN_MIN_WIDTH, bestWidth); + iter->width_ = newWidth; + + //notify column resize (asynchronously!) + GridColumnResizeEvent sizeEvent(newWidth, iter->type_, compPos); + wxEvtHandler* evtHandler = GetEventHandler(); + if (evtHandler) + evtHandler->AddPendingEvent(sizeEvent); + } + } + updateWindowSizes(); + Refresh(); + } +} + + +int Grid::getMinAbsoluteWidthTotal() const +{ + int minWidthTotal = 0; + //bool haveStretchedCols = false; + std::for_each(comp.begin(), comp.end(), + [&](const Component& c) + { + std::for_each(c.visibleCols.begin(), c.visibleCols.end(), + [&](const VisibleColumn& vc) + { + if (vc.width_ >= 0) + minWidthTotal += vc.width_; + else + { + //haveStretchedCols = true; + minWidthTotal += COLUMN_MIN_WIDTH; //use "min width" if column is stretched + } + }); + }); + return minWidthTotal; +} + + +std::vector> Grid::getAbsoluteWidths() const //evaluate negative widths as stretched absolute values! structure matches "comp" +{ + std::vector> output; + + std::vector> stretchedCols; //(factor, column to stretch) + int factorTotal = 0; + int minWidthTotal = 0; + + output.reserve(comp.size()); + std::for_each(comp.begin(), comp.end(), + [&](const Component& c) + { + output.push_back(std::vector()); + auto& compWidths = output.back(); + + compWidths.reserve(c.visibleCols.size()); + std::for_each(c.visibleCols.begin(), c.visibleCols.end(), + [&](const VisibleColumn& vc) + { + if (vc.width_ >= 0) + { + compWidths.push_back(Grid::VisibleColumn(vc.type_, vc.width_)); + minWidthTotal += vc.width_; + } + else //stretched column + { + compWidths.push_back(Grid::VisibleColumn(vc.type_, COLUMN_MIN_WIDTH)); //use "min width" if column is stretched + minWidthTotal += COLUMN_MIN_WIDTH; + + stretchedCols.push_back(std::make_pair(vc.width_, &compWidths.back())); + factorTotal += vc.width_; + } + }); + }); + + if (!stretchedCols.empty()) + { + const int widthToFill = mainWin_->GetClientSize().GetWidth() - minWidthTotal; + if (widthToFill > 0) + { + int widthRemaining = widthToFill; + for (auto iter = stretchedCols.begin(); iter != stretchedCols.end(); ++iter) + { + const int addWidth = (widthToFill * iter->first) / factorTotal; //round down + iter->second->width_ += addWidth; + widthRemaining -= addWidth; + } + + if (widthRemaining > 0) //should be empty, except for rounding errors + stretchedCols.back().second->width_ += widthRemaining; + } + } + return output; +} diff --git a/wx+/grid.h b/wx+/grid.h index e0069e32..8833dd77 100644 --- a/wx+/grid.h +++ b/wx+/grid.h @@ -1,37 +1,116 @@ // ************************************************************************** // * 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_TREE_LIST_HEADER_8347021348317 -#define WX_TREE_LIST_HEADER_8347021348317 +#ifndef GENERIC_GRID_HEADER_83470213483173 +#define GENERIC_GRID_HEADER_83470213483173 -#include #include +#include #include #include +#include +#include + +//a user-friendly, extensible and high-performance grid control namespace zen { +typedef enum { DUMMY_COLUMN_TYPE = static_cast(-1) } ColumnType; + +//----- Events ----------------------------------------------------------------------------------------------- +extern const wxEventType EVENT_GRID_COL_LABEL_MOUSE_LEFT; //generates: GridClickEvent +extern const wxEventType EVENT_GRID_COL_LABEL_MOUSE_RIGHT; // +extern const wxEventType EVENT_GRID_COL_RESIZE; //generates: GridColumnResizeEvent + +extern const wxEventType EVENT_GRID_MOUSE_LEFT_DOUBLE; // +extern const wxEventType EVENT_GRID_MOUSE_LEFT_DOWN; // +extern const wxEventType EVENT_GRID_MOUSE_LEFT_UP; //generates: GridClickEvent +extern const wxEventType EVENT_GRID_MOUSE_RIGHT_DOWN; // +extern const wxEventType EVENT_GRID_MOUSE_RIGHT_UP; // + +extern const wxEventType EVENT_GRID_SELECT_RANGE; //generates: GridRangeSelectEvent +//NOTE: neither first nor second row need to match EVENT_GRID_MOUSE_LEFT_DOWN/EVENT_GRID_MOUSE_LEFT_UP: user holding SHIFT; moving out of window... +//=> range always specifies *valid* rows + +//example: wnd.Connect(EVENT_GRID_COL_LABEL_LEFT_CLICK, GridClickEventHandler(MyDlg::OnLeftClick), NULL, this); + + +struct GridClickEvent : public wxMouseEvent +{ + GridClickEvent(wxEventType et, const wxMouseEvent& me, int row, ColumnType colType, size_t compPos) : wxMouseEvent(me), row_(row), colType_(colType), compPos_(compPos) { SetEventType(et); } + virtual wxEvent* Clone() const { return new GridClickEvent(*this); } + + const int row_; + const ColumnType colType_; + const size_t compPos_; +}; + +struct GridColumnResizeEvent : public wxCommandEvent +{ + GridColumnResizeEvent(int width, ColumnType colType, size_t compPos) : wxCommandEvent(EVENT_GRID_COL_RESIZE), colType_(colType), width_(width), compPos_(compPos) {} + virtual wxEvent* Clone() const { return new GridColumnResizeEvent(*this); } + + const ColumnType colType_; + const int width_; + const size_t compPos_; +}; + +struct GridRangeSelectEvent : public wxCommandEvent +{ + GridRangeSelectEvent(int rowFrom, int rowTo, size_t compPos, bool positive) : wxCommandEvent(EVENT_GRID_SELECT_RANGE), rowFrom_(rowFrom), rowTo_(rowTo), compPos_(compPos), positive_(positive) {} + virtual wxEvent* Clone() const { return new GridRangeSelectEvent(*this); } + + const int rowFrom_; + const int rowTo_; + const size_t compPos_; + const bool positive_; +}; + +typedef void (wxEvtHandler::*GridClickEventFunction )(GridClickEvent&); +typedef void (wxEvtHandler::*GridColumnResizeEventFunction)(GridColumnResizeEvent&); +typedef void (wxEvtHandler::*GridRangeSelectEventFunction )(GridRangeSelectEvent&); + +#define GridClickEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(GridClickEventFunction, &func) + +#define GridColumnResizeEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(GridColumnResizeEventFunction, &func) + +#define GridRangeSelectEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(GridRangeSelectEventFunction, &func) //------------------------------------------------------------------------------------------------------------ class Grid; +wxColor getColorSelectionGradientFrom(); +wxColor getColorSelectionGradientTo(); -class GridDataView +void clearArea(wxDC& dc, const wxRect& rect, const wxColor& col); + +class GridData { public: - virtual ~GridDataView() {} + virtual ~GridData() {} + + virtual size_t getRowCount() const = 0; //if there are multiple grid components, only the first one will be polled for row count! - virtual wxString getValue(int row, int col) = 0; - virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, int col, bool selected); //default implementation + //grid area + virtual wxString getValue(int row, ColumnType colType) const = 0; + virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus); //default implementation + virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType); // + virtual size_t getBestSize(wxDC& dc, int row, ColumnType colType); //must correspond to renderCell()! + virtual wxString getToolTip(int row, ColumnType colType) const { return wxString(); } - virtual wxString getColumnLabel(int col) = 0; - virtual void renderColumnLabel(Grid& tree, wxDC& dc, const wxRect& rect, int col, bool highlighted); //default implementation + //label area + virtual wxString getColumnLabel(ColumnType colType) const = 0; + virtual void renderColumnLabel(Grid& grid, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted); //default implementation + virtual wxString getToolTip(ColumnType colType) const { return wxString(); } -protected: +protected: //optional helper routines static wxRect drawCellBorder (wxDC& dc, const wxRect& rect); //returns inner rectangle - static void drawCellBackground(wxDC& dc, const wxRect& rect, bool selected, bool enabled, bool hasFocus); - static void drawCellText (wxDC& dc, const wxRect& rect, const wxString& text, bool enabled); + static void drawCellBackground(wxDC& dc, const wxRect& rect, bool enabled, bool selected, bool hasFocus, const wxColor& backgroundColor); + static void drawCellText (wxDC& dc, const wxRect& rect, const wxString& text, bool enabled, int alignment = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); static wxRect drawColumnLabelBorder (wxDC& dc, const wxRect& rect); //returns inner rectangle static void drawColumnLabelBackground(wxDC& dc, const wxRect& rect, bool highlighted); @@ -39,7 +118,6 @@ protected: }; - class Grid : public wxScrolledWindow { public: @@ -50,86 +128,200 @@ public: long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr); - //------------ set grid data -------------------------------------------------- - void setRowCount(int rowCount); - int getRowCount() const; + size_t getRowCount() const; void setRowHeight(int height); - int getRowHeight(); - void setColumnConfig(const std::vector& widths); //set column count + widths - std::vector getColumnConfig() const; + //grid component := a grid is divided into multiple components each of which is essentially a set of connected columns + void setComponentCount(size_t count) { comp.resize(count); updateWindowSizes(); } + size_t getComponentCount() const { return comp.size(); } + + struct ColumnAttribute + { + ColumnAttribute(ColumnType type, int width, bool visible = true) : type_(type), width_(width), visible_(visible) {} + ColumnType type_; + int width_; //if negative, treat as proportional stretch! + bool visible_; + }; - void setDataProvider(const std::shared_ptr& dataView) { dataView_ = dataView; } + void setColumnConfig(const std::vector& attr, size_t compPos = 0); //set column count + widths + std::vector getColumnConfig(size_t compPos = 0) const; + + void setDataProvider(const std::shared_ptr& dataView, size_t compPos = 0) { if (compPos < comp.size()) comp[compPos].dataView_ = dataView; } + /**/ GridData* getDataProvider(size_t compPos = 0) { return compPos < comp.size() ? comp[compPos].dataView_.get() : NULL; } + const GridData* getDataProvider(size_t compPos = 0) const { return compPos < comp.size() ? comp[compPos].dataView_.get() : NULL; } //----------------------------------------------------------------------------- - - void setColumnLabelHeight(int height); - void showRowLabel(bool visible); - void showScrollBars(bool horizontal, bool vertical); + void setColumnLabelHeight(int height); + void showRowLabel(bool visible); - std::vector getSelectedRows() const; + void showScrollBars(bool horizontal, bool vertical); -private: - void onSizeEvent(wxEvent& evt) { updateWindowSizes(); } + std::vector getSelectedRows(size_t compPos = 0) const; + void clearSelection(size_t compPos = 0) { if (compPos < comp.size()) comp[compPos].selection.clear(); } + + void scrollDelta(int deltaX, int deltaY); //in scroll units - void updateWindowSizes(); + wxWindow& getCornerWin (); + wxWindow& getRowLabelWin(); + wxWindow& getColLabelWin(); + wxWindow& getMainWin (); - int getScrollUnitsTotalX() const; - int getScrollUnitsTotalY() const; + int getRowAtPos(int posY) const; //returns < 0 if column not found; absolute coordinates! + Opt> getColumnAtPos(int posX) const; //returns (column type, component pos) - int getPixelsPerScrollUnit() const; + wxRect getCellArea(int row, ColumnType colType, size_t compPos = 0) const; //returns empty rect if column not found; absolute coordinates! - void scrollDelta(int deltaX, int deltaY); //in scroll units + void enableColumnMove (bool value, size_t compPos = 0) { if (compPos < comp.size()) comp[compPos].allowColumnMove = value; } + void enableColumnResize(bool value, size_t compPos = 0) { if (compPos < comp.size()) comp[compPos].allowColumnResize = value; } + + void setGridCursor(int row, size_t compPos = 0); //set + show + select cursor + std::pair getGridCursor() const; //(row, component pos) row == -1 if none + + void scrollTo(int row); + + virtual void Refresh(bool eraseBackground = true, const wxRect* rect = NULL); + virtual bool Enable( bool enable = true) { Refresh(); return wxScrolledWindow::Enable(enable); } + void autoSizeColumns(size_t compPos = 0); + +private: + void onPaintEvent(wxPaintEvent& event); + void onEraseBackGround(wxEraseEvent& event) {} //[!] + void onSizeEvent(wxEvent& evt) { updateWindowSizes(); } + + void updateWindowSizes(bool updateScrollbar = true); void redirectRowLabelEvent(wxMouseEvent& event); #ifdef FFS_WIN virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); //support horizontal mouse wheel -void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh); //get rid of scrollbars, but preserve scrolling behavior! + void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh); //get rid of scrollbars, but preserve scrolling behavior! #endif - GridDataView* getDataProvider() { return dataView_.get(); } - - static const int defaultRowHeight = 20; - static const int defaultColLabelHeight = 25; - static const int columnBorderLeft = 4; //for left-aligned text - static const int columnLabelBorder = columnBorderLeft; - static const int columnMoveDelay = 5; //unit [pixel] (Explorer) - static const int columnMinWidth = 30; - static const int rowLabelBorder = 3; - static const int columnResizeTolerance = 5; //unit [pixel] - static const int mouseDragScrollIncrementY = 2; //in scroll units - static const int mouseDragScrollIncrementX = 1; // - - friend class GridDataView; + + int getBestColumnSize(size_t col, size_t compPos) const; //return -1 on error + + friend class GridData; class SubWindow; class CornerWin; class RowLabelWin; class ColLabelWin; class MainWin; + class Selection + { + public: + void init(size_t rowCount) { rowSelectionValue.resize(rowCount); clear(); } + + std::vector get() const + { + std::vector selection; + for (auto iter = rowSelectionValue.begin(); iter != rowSelectionValue.end(); ++iter) + if (*iter != 0) + selection.push_back(iter - rowSelectionValue.begin()); + return selection; + } + + void clear() { selectRange(0, rowSelectionValue.size(), false); } + + bool isSelected(size_t row) const { return row < rowSelectionValue.size() ? rowSelectionValue[row] != 0 : false; } + + void selectRange(int rowFrom, int rowTo, bool positive = true) //select [rowFrom, rowTo], very tolerant: trims and swaps if required! + { + int rowFirst = std::min(rowFrom, rowTo); + int rowLast = std::max(rowFrom, rowTo) + 1; + + numeric::restrict(rowFirst, 0, static_cast(rowSelectionValue.size())); + numeric::restrict(rowLast, 0, static_cast(rowSelectionValue.size())); + + std::fill(rowSelectionValue.begin() + rowFirst, rowSelectionValue.begin() + rowLast, positive); + } + + private: + std::vector rowSelectionValue; //effectively a vector of size "number of rows" + }; + + struct VisibleColumn + { + VisibleColumn(ColumnType type, int width) : type_(type), width_(width) {} + ColumnType type_; + int width_; //may be NEGATIVE => treat as proportional stretch! use getAbsoluteWidths() to evaluate!!! + }; + + struct Component + { + Component() : allowColumnMove(true), allowColumnResize(true) {} + + std::shared_ptr dataView_; + Selection selection; + bool allowColumnMove; + bool allowColumnResize; + + std::vector visibleCols; //individual widths, type and total column count + std::vector oldColAttributes; //visible + nonvisible columns; use for conversion in setColumnConfig()/getColumnConfig() *only*! + }; + + int getMinAbsoluteWidthTotal() const; //assigns minimum width to stretched columns + std::vector> getAbsoluteWidths() const; //evaluate negative widths as stretched absolute values! structure matches "comp" + + Opt getAbsoluteWidth(size_t col, size_t compPos) const //resolve stretched columns + { + const auto& absWidth = getAbsoluteWidths(); + if (compPos < absWidth.size() && col < absWidth[compPos].size()) + return absWidth[compPos][col].width_; + return NoValue(); + } + + void setColWidth(size_t col, size_t compPos, int width) //width may be >= 0: absolute, or < 0: stretched + { + if (compPos < comp.size() && col < comp[compPos].visibleCols.size()) + comp[compPos].visibleCols[col].width_ = width; + } + + wxRect getColumnLabelArea(ColumnType colType, size_t compPos) const; //returns empty rect if column not found + + void selectRange(int rowFrom, int rowTo, size_t compPos, bool positive = true); //select range + notify event! + void clearSelectionAll(); //clear selection + notify event + + bool isSelected(int row, size_t compPos) const { return compPos < comp.size() ? comp[compPos].selection.isSelected(row) : false; } + + bool columnMoveAllowed (size_t compPos) const { return compPos < comp.size() ? comp[compPos].allowColumnMove : false; } + bool columnResizeAllowed(size_t compPos) const { return compPos < comp.size() ? comp[compPos].allowColumnResize : false; } + + struct ColAction + { + bool wantResize; //"!wantResize" means "move" or "single click" + size_t col; + size_t compPos; + }; + Opt clientPosToColumnAction(const wxPoint& pos) const; + void moveColumn(size_t colFrom, size_t colTo, size_t compPos); + int clientPosToMoveTargetColumn(const wxPoint& pos, size_t compPos) const; + + Opt colToType(size_t col, size_t compPos) const; + + /* Visual layout: - ---------------------------- - |CornerWin | RowLabelWin | - |--------------------------- - |ColLabelWin | MainWin | - ---------------------------- + ------------------------------------------------ + |CornerWin | RowLabelWin: | + |-------------------------- Comp1 | Comp2 ... | row label and main window are vertically tiled into one or more "components" + |ColLabelWin | MainWin: | + ------------------------------------------------ */ CornerWin* cornerWin_; RowLabelWin* rowLabelWin_; ColLabelWin* colLabelWin_; MainWin* mainWin_; - std::shared_ptr dataView_; + bool showScrollbarX; + bool showScrollbarY; - bool showScrollbarX; - bool showScrollbarY; + int colLabelHeight; + bool drawRowLabel; - int colLabelHeight; - int drawRowLabel; + std::vector comp; + size_t colSizeOld; //at the time of last Grid::Refresh() }; } - -#endif //WX_TREE_LIST_HEADER_8347021348317 +#endif //GENERIC_GRID_HEADER_83470213483173 diff --git a/wx+/image_tools.h b/wx+/image_tools.h index 687025d0..82fd88cc 100644 --- a/wx+/image_tools.h +++ b/wx+/image_tools.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 IMAGE_TOOLS_HEADER_45782456427634254 diff --git a/wx+/mouse_move_dlg.cpp b/wx+/mouse_move_dlg.cpp index 7edaa5db..20e6d420 100644 --- a/wx+/mouse_move_dlg.cpp +++ b/wx+/mouse_move_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 "mouse_move_dlg.h" diff --git a/wx+/mouse_move_dlg.h b/wx+/mouse_move_dlg.h index c97ef19c..142dac49 100644 --- a/wx+/mouse_move_dlg.h +++ b/wx+/mouse_move_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 MOUSEMOVEWINDOW_H_INCLUDED diff --git a/wx+/no_flicker.h b/wx+/no_flicker.h index 0dceba97..f745a12a 100644 --- a/wx+/no_flicker.h +++ b/wx+/no_flicker.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 NO_FLICKER_HEADER_893421590321532 diff --git a/wx+/pch.h b/wx+/pch.h index 0a799217..6c3393b2 100644 --- a/wx+/pch.h +++ b/wx+/pch.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 FFS_PRECOMPILED_HEADER diff --git a/wx+/rtl.h b/wx+/rtl.h new file mode 100644 index 00000000..b8844ca8 --- /dev/null +++ b/wx+/rtl.h @@ -0,0 +1,121 @@ +// ************************************************************************** +// * 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 RTL_H_0183487180058718273432148 +#define RTL_H_0183487180058718273432148 + +#include +#include +#include +#include +#include +#include + +namespace zen +{ +//functions supporting right-to-left GUI layout + +void drawBitmapRtlMirror(wxDC& dc, + const wxBitmap& image, + const wxRect& rect, + int alignment, + std::unique_ptr& buffer); //mirror image if layout is RTL + fix some strange wxDC::Blit bug on RTL + +void drawBitmapRtlNoMirror(wxDC& dc, //wxDC::DrawLabel does already NOT mirror by default (but does a crappy job at it, surprise) + const wxBitmap& image, + const wxRect& rect, + int alignment, + std::unique_ptr& buffer); + +void drawIconRtlNoMirror(wxDC& dc, + const wxIcon& icon, //wxDC::DrawIcon DOES mirror by default + const wxPoint& pt, + std::unique_ptr& buffer); + +wxBitmap mirrorIfRtl(const wxBitmap& bmp); + + + + + + + + + + + +//---------------------- implementation ------------------------ +namespace +{ +template +void drawRtlImpl(wxDC& dc, const wxRect& rect, std::unique_ptr& buffer, bool doMirror, DrawImageFun draw) +{ + if (dc.GetLayoutDirection() == wxLayout_RightToLeft) + { + if (!buffer || buffer->GetWidth() != rect.width || buffer->GetHeight() < rect.height) //[!] since we do a mirror, width needs to match exactly! + buffer.reset(new wxBitmap(rect.width, rect.height)); + + wxMemoryDC memDc(*buffer); + memDc.Blit(wxPoint(0, 0), rect.GetSize(), &dc, rect.GetTopLeft()); //blit in: background is mirrored due to memDc, dc having different layout direction! + + if (!doMirror) + { + *buffer = wxBitmap(buffer->ConvertToImage().Mirror()); + memDc.SelectObject(*buffer); + } + + draw(memDc, wxRect(0, 0, rect.width, rect.height)); + //note: we cannot simply use memDc.SetLayoutDirection(wxLayout_RightToLeft) due to some strange 1 pixel bug! so it's a quadruple mirror! :> + + if (!doMirror) + { + *buffer = wxBitmap(buffer->ConvertToImage().Mirror()); + memDc.SelectObject(*buffer); + } + + dc.Blit(rect.GetTopLeft(), rect.GetSize(), &memDc, wxPoint(0, 0)); //blit out: mirror once again + } + else + draw(dc, rect); +} +} + + +inline +void drawBitmapRtlMirror(wxDC& dc, const wxBitmap& image, const wxRect& rect, int alignment, std::unique_ptr& buffer) +{ + return drawRtlImpl(dc, rect, buffer, true, [&](wxDC& dc2, const wxRect& rect2) { dc2.DrawLabel(wxString(), image, rect2, alignment); }); +} + +inline +void drawBitmapRtlNoMirror(wxDC& dc, const wxBitmap& image, const wxRect& rect, int alignment, std::unique_ptr& buffer) +{ + if (dc.GetLayoutDirection() == wxLayout_RightToLeft) + if ((alignment & wxALIGN_CENTER_HORIZONTAL) == 0) //we still *do* want to mirror alignment! + alignment ^= wxALIGN_RIGHT; + static_assert(wxALIGN_LEFT == 0, "doh"); + return drawRtlImpl(dc, rect, buffer, false, [&](wxDC& dc2, const wxRect& rect2) { dc2.DrawLabel(wxString(), image, rect2, alignment); }); +} + +inline +void drawIconRtlNoMirror(wxDC& dc, const wxIcon& icon, const wxPoint& pt, std::unique_ptr& buffer) +{ + wxRect rect(pt.x, pt.y, icon.GetWidth(), icon.GetHeight()); + return drawRtlImpl(dc, rect, buffer, false, [&](wxDC& dc2, const wxRect& rect2) { dc2.DrawIcon(icon, rect2.GetTopLeft()); }); +} + + +inline +wxBitmap mirrorIfRtl(const wxBitmap& bmp) +{ + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + return bmp.ConvertToImage().Mirror(); + else + return bmp; +} +} + +#endif //RTL_H_0183487180058718273432148 diff --git a/wx+/serialize.h b/wx+/serialize.h index 020b8709..4a06c001 100644 --- a/wx+/serialize.h +++ b/wx+/serialize.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 SERIALIZE_H_INCLUDED diff --git a/wx+/shell_execute.h b/wx+/shell_execute.h index 00faf6ea..310fe88c 100644 --- a/wx+/shell_execute.h +++ b/wx+/shell_execute.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 EXECUTE_HEADER_23482134578134134 diff --git a/wx+/string_conv.h b/wx+/string_conv.h index 76249aca..65764b1f 100644 --- a/wx+/string_conv.h +++ b/wx+/string_conv.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 STRINGCONV_H_INCLUDED diff --git a/wx+/timespan.h b/wx+/timespan.h index 698171fa..241a029e 100644 --- a/wx+/timespan.h +++ b/wx+/timespan.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_TIMESPAN_CTRL_HEADER_INCLUDED diff --git a/wx+/toggle_button.h b/wx+/toggle_button.h index 98a39e32..cce7f5b2 100644 --- a/wx+/toggle_button.h +++ b/wx+/toggle_button.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 TOGGLEBUTTON_H_INCLUDED diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp index 9c2587b2..7b4c51e0 100644 --- a/wx+/tooltip.cpp +++ b/wx+/tooltip.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 "tooltip.h" @@ -9,6 +9,8 @@ #include #include #include +#include +#include using namespace zen; @@ -46,7 +48,7 @@ public: }; -Tooltip::Tooltip() : tipWindow(new PopupFrameGenerated(NULL)), lastBmp(NULL) +Tooltip::Tooltip() : tipWindow(new PopupFrameGenerated(NULL)) { #ifdef FFS_WIN //neither looks good nor works at all on Linux tipWindow->Disable(); //prevent window stealing focus! @@ -61,13 +63,12 @@ Tooltip::~Tooltip() } -void Tooltip::show(const wxString& text, wxPoint pos, const wxBitmap* bmp) +void Tooltip::show(const wxString& text, wxPoint mousePos, const wxBitmap* bmp) { - if (bmp != lastBmp) - { - lastBmp = bmp; - tipWindow->m_bitmapLeft->SetBitmap(bmp == NULL ? wxNullBitmap : *bmp); - } + const wxBitmap& newBmp = bmp ? *bmp : wxNullBitmap; + + if (!isEqual(tipWindow->m_bitmapLeft->GetBitmap(), newBmp)) + tipWindow->m_bitmapLeft->SetBitmap(newBmp); if (text != tipWindow->m_staticTextMain->GetLabel()) { @@ -75,14 +76,16 @@ void Tooltip::show(const wxString& text, wxPoint pos, const wxBitmap* bmp) tipWindow->m_staticTextMain->Wrap(600); } -#ifdef FFS_LINUX - tipWindow->Fit(); //Alas Fit() seems to be somewhat broken => this needs to be called EVERY time inside show, not only if text or bmp change. -#endif + tipWindow->Fit(); //Linux: Fit() seems to be somewhat broken => this needs to be called EVERY time inside show, not only if text or bmp change + + const wxPoint newPos = wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ? + mousePos - wxPoint(30 + tipWindow->GetSize().GetWidth(), 0) : + mousePos + wxPoint(30, 0); - if (pos != tipWindow->GetScreenPosition()) - tipWindow->SetSize(pos.x + 30, pos.y, wxDefaultCoord, wxDefaultCoord); + if (newPos != tipWindow->GetScreenPosition()) + tipWindow->SetSize(newPos.x, newPos.y, wxDefaultCoord, wxDefaultCoord); //attention!!! possible endless loop: mouse pointer must NOT be within tipWindow! - //Else it will trigger a wxEVT_LEAVE_WINDOW which will hide the window, causing the window to be shown again via this method, etc. + //else it will trigger a wxEVT_LEAVE_WINDOW on middle grid which will hide the window, causing the window to be shown again via this method, etc. if (!tipWindow->IsShown()) tipWindow->Show(); diff --git a/wx+/tooltip.h b/wx+/tooltip.h index d9053e2c..7babe3c3 100644 --- a/wx+/tooltip.h +++ b/wx+/tooltip.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 CUSTOMTOOLTIP_H_INCLUDED @@ -17,13 +17,12 @@ public: Tooltip(); ~Tooltip(); - void show(const wxString& text, wxPoint pos, const wxBitmap* bmp = NULL); //absolute screen coordinates + void show(const wxString& text, wxPoint mousePos, const wxBitmap* bmp = NULL); //absolute screen coordinates void hide(); private: class PopupFrameGenerated; PopupFrameGenerated* tipWindow; - const wxBitmap* lastBmp; //buffer last used bitmap pointer }; } diff --git a/wxWidgets-Fix/apply-patches.cmd b/wxWidgets-Fix/apply-patches.cmd index 30f88746..e8f6891c 100644 --- a/wxWidgets-Fix/apply-patches.cmd +++ b/wxWidgets-Fix/apply-patches.cmd @@ -1,11 +1,5 @@ @if [%1]==[] echo Please pass wxWidgets installation directory as %%1 parameter, e.g.: C:\Programme\C++\wxWidgets && pause && exit -::fix grid-label double-click to auto-size columns -patch "%1\src\generic\grid.cpp" grid.cpp.patch -pause -patch "%1\include\wx\generic\grid.h" grid.h.patch -pause ::Segoe UI font with Vista patch "%1\src\msw\settings.cpp" settings.cpp.patch -echo Make sure to add "-luxtheme" to "Standard linker flags" in \wxWidgets\build\msw\config.gcc!!! pause \ No newline at end of file diff --git a/wxWidgets-Fix/grid.cpp.patch b/wxWidgets-Fix/grid.cpp.patch deleted file mode 100644 index af9bd684..00000000 --- a/wxWidgets-Fix/grid.cpp.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- old 2009-03-06 11:00:48.000000000 +0100 -+++ src\generic\grid.cpp 2009-10-24 17:12:24.484375000 +0200 -@@ -5605,6 +5605,59 @@ - } - } - -+ -+void wxGrid::AutoSizeColFast(int col, bool doRefresh) -+{ -+ if (col < 0) -+ return; -+ -+ int rowMax = -1; -+ size_t lenMax = 0; -+ for (int row = 0; row < GetNumberRows(); ++row) -+ if (GetCellValue(row, col).size() > lenMax) -+ { -+ lenMax = GetCellValue(row, col).size(); -+ rowMax = row; -+ } -+ -+ wxCoord extentMax = 0; -+ -+ //calculate width of (most likely) widest cell -+ wxClientDC dc(GetGridWindow()); -+ if (rowMax > -1) -+ { -+ wxGridCellAttr* attr = GetCellAttr(rowMax, col); -+ if (attr) -+ { -+ wxGridCellRenderer* renderer = attr->GetRenderer(this, rowMax, col); -+ if (renderer) -+ { -+ const wxSize size = renderer->GetBestSize(*this, *attr, dc, rowMax, col); -+ extentMax = std::max(extentMax, size.x); -+ renderer->DecRef(); -+ } -+ attr->DecRef(); -+ } -+ } -+ -+ //consider column label -+ dc.SetFont(GetLabelFont()); -+ wxCoord w = 0; -+ wxCoord h = 0; -+ dc.GetMultiLineTextExtent(GetColLabelValue(col), &w, &h ); -+ if (GetColLabelTextOrientation() == wxVERTICAL) -+ w = h; -+ extentMax = std::max(extentMax, w); -+ -+ extentMax += 15; //leave some space around text -+ -+ SetColSize(col, extentMax); -+ -+ if (doRefresh) -+ Refresh(); -+} -+ -+ - void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event ) - { - int x, y, col; -@@ -5829,7 +5882,7 @@ - else - { - // adjust column width depending on label text -- AutoSizeColLabelSize( col ); -+ AutoSizeColFast( col ); - - ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, m_colLabelWin); - m_dragLastPos = -1; diff --git a/wxWidgets-Fix/grid.h.patch b/wxWidgets-Fix/grid.h.patch deleted file mode 100644 index 8ed3a8d0..00000000 --- a/wxWidgets-Fix/grid.h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- old 2009-03-06 11:00:50.000000000 +0100 -+++ include\wx\generic\grid.h 2009-10-24 16:56:31.062500000 +0200 -@@ -2003,6 +2003,7 @@ - bool SetModelValues(); - - private: -+ void AutoSizeColFast(int col, bool doRefresh = true); //modification by ZenJu - // Calculate the minimum acceptable size for labels area - wxCoord CalcColOrRowLabelAreaMinSize(bool column /* or row? */); - diff --git a/wxWidgets-Fix/settings.cpp.patch b/wxWidgets-Fix/settings.cpp.patch index 1ba9524a..3c48d052 100644 --- a/wxWidgets-Fix/settings.cpp.patch +++ b/wxWidgets-Fix/settings.cpp.patch @@ -1,19 +1,15 @@ ---- src\msw\settings.cpp.old 2011-03-22 10:36:54.000000000 +0100 -+++ src\msw\settings.cpp 2011-12-14 21:58:59.642200200 +0100 -@@ -40,6 +40,12 @@ +--- settings.cpp.old 2011-03-22 10:36:54.000000000 +0100 ++++ settings.cpp 2012-01-23 00:26:06.916105800 +0100 +@@ -40,6 +40,8 @@ #endif #include "wx/fontutil.h" +//#include +#include -+ -+#ifdef _MSC_VER -+#pragma comment(lib, "UxTheme.lib") -+#endif // ---------------------------------------------------------------------------- // private classes -@@ -261,6 +267,34 @@ +@@ -261,6 +263,48 @@ return font; } @@ -21,26 +17,40 @@ +#define TMT_MSGBOXFONT 805 //why is this constant missing from Uxtheme.h??? +#endif + ++typedef HTHEME (WINAPI* OpenThemeDataFun )(HWND hwnd, LPCWSTR pszClassList); ++typedef HRESULT (WINAPI* CloseThemeDataFun )(HTHEME hTheme); ++typedef HRESULT (WINAPI* GetThemeSysFontFun)(HTHEME hTheme, int iFontID, LOGFONTW* plf); ++ +struct InitFont //(try to) initialize default font, before wxWidgets gets chance to screw up +{ + InitFont() + { -+ HTHEME theme = ::OpenThemeData(NULL, //__in HWND hwnd, -+ L"WINDOW"); //__in LPCWSTR pszClassList -+ -+ LOGFONT lfont = {}; -+ if (::GetThemeSysFont(theme, //__in HTHEME hTheme, -+ TMT_MSGBOXFONT, //__in int iFontID, -+ &lfont) == S_OK) // __out LOGFONTW *plf ++ //Windows 2000 doesn't ship with this dll so we need to link it dynamically ++ if (HMODULE lib = ::LoadLibrary(L"UxTheme.dll")) + { -+ wxNativeFontInfo native; -+ native.lf = lfont; -+ delete gs_fontDefault; -+ gs_fontDefault = wxFontBase::New(native); -+ } ++ OpenThemeDataFun OpenThemeData = reinterpret_cast(::GetProcAddress(lib, "OpenThemeData")); ++ CloseThemeDataFun CloseThemeData = reinterpret_cast(::GetProcAddress(lib, "CloseThemeData")); ++ GetThemeSysFontFun GetThemeSysFont = reinterpret_cast(::GetProcAddress(lib, "GetThemeSysFont")); + -+ if (theme != NULL) -+ ::CloseThemeData(theme); ++ HTHEME theme = (*OpenThemeData)(NULL, //__in HWND hwnd, ++ L"WINDOW"); //__in LPCWSTR pszClassList ++ ++ LOGFONT lfont = {}; ++ if ((*GetThemeSysFont)(theme, //__in HTHEME hTheme, ++ TMT_MSGBOXFONT, //__in int iFontID, ++ &lfont) == S_OK) // __out LOGFONTW *plf ++ { ++ wxNativeFontInfo native; ++ native.lf = lfont; ++ delete gs_fontDefault; ++ gs_fontDefault = wxFontBase::New(native); ++ } ++ ++ if (theme != NULL) ++ (*CloseThemeData)(theme); ++ ++ ::FreeLibrary(lib); ++ } + } +} dummy; + diff --git a/zen/FindFilePlus/dll_main.cpp b/zen/FindFilePlus/dll_main.cpp index 5d64181b..02755010 100644 --- a/zen/FindFilePlus/dll_main.cpp +++ b/zen/FindFilePlus/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/zen/FindFilePlus/find_file_plus.cpp b/zen/FindFilePlus/find_file_plus.cpp index 876d0c0f..70076aa2 100644 --- a/zen/FindFilePlus/find_file_plus.cpp +++ b/zen/FindFilePlus/find_file_plus.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 "find_file_plus.h" diff --git a/zen/FindFilePlus/find_file_plus.h b/zen/FindFilePlus/find_file_plus.h index 2ef5affe..cf1174eb 100644 --- a/zen/FindFilePlus/find_file_plus.h +++ b/zen/FindFilePlus/find_file_plus.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 FIND_FIRST_FILE_PLUS_HEADER_087483434 diff --git a/zen/FindFilePlus/init_dll_binding.h b/zen/FindFilePlus/init_dll_binding.h index 51b32c99..5f2c9fa9 100644 --- a/zen/FindFilePlus/init_dll_binding.h +++ b/zen/FindFilePlus/init_dll_binding.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 INIT_DLL_BINDING_HEADER_018356031467832145 diff --git a/zen/FindFilePlus/load_dll.cpp b/zen/FindFilePlus/load_dll.cpp index 20d9a5fe..9e8dbf17 100644 --- a/zen/FindFilePlus/load_dll.cpp +++ b/zen/FindFilePlus/load_dll.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 "load_dll.h" diff --git a/zen/FindFilePlus/load_dll.h b/zen/FindFilePlus/load_dll.h index 24ce7174..2dde5d70 100644 --- a/zen/FindFilePlus/load_dll.h +++ b/zen/FindFilePlus/load_dll.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 LOAD_DLL_HEADER_0312463214872163832174 diff --git a/zen/assert_static.h b/zen/assert_static.h index 5a2dc4a6..b96b5909 100644 --- a/zen/assert_static.h +++ b/zen/assert_static.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef ASSERTSTATIC_H_INCLUDED diff --git a/zen/base64.h b/zen/base64.h index 4a81787c..273f6c00 100644 --- a/zen/base64.h +++ b/zen/base64.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef BASE64_HEADER_08473021856321840873021487213453214 #define BASE64_HEADER_08473021856321840873021487213453214 diff --git a/zen/basic_math.h b/zen/basic_math.h index f4f46ce0..e9ab1a2f 100644 --- a/zen/basic_math.h +++ b/zen/basic_math.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef BASIC_MATH_HEADER_34726398432 @@ -32,7 +32,7 @@ template const T& max(const T& a, const T& b, const T& c); template -void confine(T& val, const T& minVal, const T& maxVal); //make sure minVal <= val && val <= maxVal +void restrict(T& val, const T& minVal, const T& maxVal); //make sure minVal <= val && val <= maxVal template std::pair minMaxElement(InputIterator first, InputIterator last); @@ -131,7 +131,7 @@ const T& max(const T& a, const T& b, const T& c) template inline -void confine(T& val, const T& minVal, const T& maxVal) +void restrict(T& val, const T& minVal, const T& maxVal) { assert(minVal <= maxVal); if (val < minVal) @@ -260,19 +260,6 @@ double median(RandomAccessIterator first, RandomAccessIterator last) //note: inv } -class LessMinusMedAbs : public std::binary_function -{ -public: - LessMinusMedAbs(double median) : median_(median) {} - bool operator()(double lhs, double rhs) const - { - return abs(lhs - median_) < abs(rhs - median_); - } -private: - double median_; -}; - - template inline double mad(RandomAccessIterator first, RandomAccessIterator last) //note: invalidates input range! { @@ -285,14 +272,16 @@ double mad(RandomAccessIterator first, RandomAccessIterator last) //note: invali //the second median needs to operate on absolute residuals => avoid transforming input range as it may decrease precision! - std::nth_element(first, first + n / 2, last, LessMinusMedAbs(m)); //complexity: O(n) + auto lessMedAbs = [m](double lhs, double rhs) { return abs(lhs - m) < abs(rhs - m); }; + + std::nth_element(first, first + n / 2, last, lessMedAbs); //complexity: O(n) const double midVal = abs(*(first + n / 2) - m); if (n % 2 != 0) return midVal; else //n is even and >= 2 in this context: return mean of two middle values { - const double midVal2 = abs(*std::max_element(first, first + n / 2, LessMinusMedAbs(m)) - m); + const double midVal2 = abs(*std::max_element(first, first + n / 2, lessMedAbs) - m); return 0.5 * (midVal2 + midVal); } } diff --git a/zen/build_info.h b/zen/build_info.h index e57d0c77..6857a855 100644 --- a/zen/build_info.h +++ b/zen/build_info.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 BUILDINFO_H_INCLUDED diff --git a/zen/com_error.h b/zen/com_error.h index 4546bd8a..7f967f7c 100644 --- a/zen/com_error.h +++ b/zen/com_error.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 COM_ERROR_HEADER diff --git a/zen/com_ptr.h b/zen/com_ptr.h index de8dbe64..b55d873e 100644 --- a/zen/com_ptr.h +++ b/zen/com_ptr.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 SMART_COM_PTR_H @@ -117,5 +117,4 @@ ComPtr com_dynamic_cast(const ComPtr& other) //throw() } } - #endif //SMART_COM_PTR_H \ No newline at end of file diff --git a/zen/com_util.h b/zen/com_util.h index db51404b..2845e352 100644 --- a/zen/com_util.h +++ b/zen/com_util.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 COM_UTILITY_HEADER diff --git a/zen/debug_log.h b/zen/debug_log.h index e7116156c..43b2fea3 100644 --- a/zen/debug_log.h +++ b/zen/debug_log.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 DEBUG_LOG_HEADER_017324601673246392184621895740256342 diff --git a/zen/debug_new.cpp b/zen/debug_new.cpp index 2017dcd2..9992f0b3 100644 --- a/zen/debug_new.cpp +++ b/zen/debug_new.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 "debug_new.h" diff --git a/zen/debug_new.h b/zen/debug_new.h index 2976d3d7..ca46cc8e 100644 --- a/zen/debug_new.h +++ b/zen/debug_new.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 DEBUGNEW_H_INCLUDED diff --git a/zen/deprecate.h b/zen/deprecate.h index b045d3c0..33130710 100644 --- a/zen/deprecate.h +++ b/zen/deprecate.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 DEPRECATE_HEADER_2348970348 diff --git a/zen/dir_watcher.cpp b/zen/dir_watcher.cpp index c980c715..6ab56100 100644 --- a/zen/dir_watcher.cpp +++ b/zen/dir_watcher.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_watcher.h" diff --git a/zen/dir_watcher.h b/zen/dir_watcher.h index a9898abb..67f2bce0 100644 --- a/zen/dir_watcher.h +++ b/zen/dir_watcher.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 DIR_WATCHER_348577025748023458 diff --git a/zen/dll.h b/zen/dll.h index 302a3ac8..e25e6916 100644 --- a/zen/dll.h +++ b/zen/dll.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 DLLLOADER_H_INCLUDED @@ -20,7 +20,7 @@ Manage DLL function and library ownership - full value semantics Usage: - typedef BOOL (WINAPI *IsWow64ProcessFun)(HANDLE hProcess, PBOOL Wow64Process); + typedef BOOL (WINAPI* IsWow64ProcessFun)(HANDLE hProcess, PBOOL Wow64Process); const zen::DllFun isWow64Process(L"kernel32.dll", "IsWow64Process"); if (isWow64Process) ... use function ptr ... */ diff --git a/zen/dst_hack.cpp b/zen/dst_hack.cpp index ac5774d0..9fe3a550 100644 --- a/zen/dst_hack.cpp +++ b/zen/dst_hack.cpp @@ -85,7 +85,7 @@ bool dst::isFatDrive(const Zstring& fileName) //throw() bool dst::isFatDrive(HANDLE hFile) //throw() { //dynamically load windows API function - typedef BOOL (WINAPI *GetVolumeInformationByHandleWFunc)(HANDLE hFile, + typedef BOOL (WINAPI* GetVolumeInformationByHandleWFunc)(HANDLE hFile, LPWSTR lpVolumeNameBuffer, DWORD nVolumeNameSize, LPDWORD lpVolumeSerialNumber, diff --git a/zen/file_error.h b/zen/file_error.h index 2992fbbe..853267d4 100644 --- a/zen/file_error.h +++ b/zen/file_error.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 FILEERROR_H_INCLUDED diff --git a/zen/file_handling.cpp b/zen/file_handling.cpp index 334128d9..dd5276a4 100644 --- a/zen/file_handling.cpp +++ b/zen/file_handling.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 "file_handling.h" @@ -910,6 +910,53 @@ void zen::setFileTime(const Zstring& filename, const Int64& modificationTime, Pr } +bool zen::supportsPermissions(const Zstring& dirname) //throw FileError +{ +#ifdef FFS_WIN + const HANDLE hDir = ::CreateFile(zen::applyLongPathPrefix(dirname).c_str(), + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, // | FILE_FLAG_OPEN_REPARSE_POINT -> follow symlinks + NULL); + if (hDir == INVALID_HANDLE_VALUE) + throw FileError(_("Error reading file attributes:") + L"\n\"" + dirname + L"\"" + L"\n\n" + getLastErrorFormatted()); + ZEN_ON_BLOCK_EXIT(::CloseHandle(hDir)); + + //dynamically load windows API function (existing since Windows XP) + typedef BOOL (WINAPI* GetVolumeInformationByHandleWFun)(HANDLE hFile, + LPWSTR lpVolumeNameBuffer, + DWORD nVolumeNameSize, + LPDWORD lpVolumeSerialNumber, + LPDWORD lpMaximumComponentLength, + LPDWORD lpFileSystemFlags, + LPWSTR lpFileSystemNameBuffer, + DWORD nFileSystemNameSize); + + const SysDllFun getVolumeInformationByHandleW(L"kernel32.dll", "GetVolumeInformationByHandleW"); + if (!getVolumeInformationByHandleW) + throw FileError(_("Error loading library function:") + L"\n\"" + L"GetVolumeInformationByHandleW" + L"\""); + + DWORD fileSystemFlags = 0; + if (!getVolumeInformationByHandleW(hDir, //__in HANDLE hFile, + NULL, //__out_opt LPTSTR lpVolumeNameBuffer, + 0, //__in DWORD nVolumeNameSize, + NULL, //__out_opt LPDWORD lpVolumeSerialNumber, + NULL, //__out_opt LPDWORD lpMaximumComponentLength, + &fileSystemFlags, //__out_opt LPDWORD lpFileSystemFlags, + NULL, //__out LPTSTR lpFileSystemNameBuffer, + 0)) //__in DWORD nFileSystemNameSize + throw FileError(_("Error reading file attributes:") + L"\n\"" + dirname + L"\"" + L"\n\n" + getLastErrorFormatted()); + + return (fileSystemFlags & FILE_PERSISTENT_ACLS) != 0; + +#elif defined FFS_LINUX + return true; +#endif +} + + namespace { #ifdef FFS_WIN @@ -928,7 +975,7 @@ Zstring getSymlinkTargetPath(const Zstring& symlink) //throw FileError ZEN_ON_BLOCK_EXIT(::CloseHandle(hDir)); //dynamically load windows API function - typedef DWORD (WINAPI *GetFinalPathNameByHandleWFunc)(HANDLE hFile, + typedef DWORD (WINAPI* GetFinalPathNameByHandleWFunc)(HANDLE hFile, LPTSTR lpszFilePath, DWORD cchFilePath, DWORD dwFlags); @@ -1026,6 +1073,7 @@ void copyObjectPermissions(const Zstring& source, const Zstring& target, ProcSym } //in contrast to ::SetSecurityInfo(), ::SetFileSecurity() seems to honor the "inherit DACL/SACL" flags + //CAVEAT: if a file system does not support ACLs, GetFileSecurity() will return successfully with a *valid* security descriptor containing *no* ACL entries! //NOTE: ::GetFileSecurity()/::SetFileSecurity() do NOT follow Symlinks! const Zstring sourceResolved = procSl == SYMLINK_FOLLOW && symlinkExists(source) ? getSymlinkTargetPath(source) : source; @@ -1336,7 +1384,7 @@ void zen::copySymlink(const Zstring& sourceLink, const Zstring& targetLink, bool }(); //dynamically load windows API function - typedef BOOLEAN (WINAPI *CreateSymbolicLinkFunc)(LPCTSTR lpSymlinkFileName, LPCTSTR lpTargetFileName, DWORD dwFlags); + typedef BOOLEAN (WINAPI* CreateSymbolicLinkFunc)(LPCTSTR lpSymlinkFileName, LPCTSTR lpTargetFileName, DWORD dwFlags); const SysDllFun createSymbolicLink(L"kernel32.dll", "CreateSymbolicLinkW"); if (!createSymbolicLink) diff --git a/zen/file_handling.h b/zen/file_handling.h index e6819322..80350731 100644 --- a/zen/file_handling.h +++ b/zen/file_handling.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 FILE_HANDLING_H_INCLUDED @@ -62,6 +62,8 @@ void moveFile(const Zstring& sourceFile, const Zstring& targetFile, bool ignoreE //"ignoreExisting": existing directories and files will be enriched void moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExisting, CallbackMoveFile* callback); //throw FileError; +bool supportsPermissions(const Zstring& dirname); //throw FileError, derefernces symlinks + //creates superdirectories automatically: void createDirectory(const Zstring& directory, const Zstring& templateDir, bool copyFilePermissions); //throw FileError; void createDirectory(const Zstring& directory); //throw FileError; -> function overload avoids default parameter ambiguity issues! @@ -88,7 +90,6 @@ void copySymlink(const Zstring& sourceLink, const Zstring& targetLink, bool copy - //----------- callbacks --------------- struct CallbackRemoveDir { diff --git a/zen/file_id.cpp b/zen/file_id.cpp index fa05a142..4f9e3600 100644 --- a/zen/file_id.cpp +++ b/zen/file_id.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 "file_id.h" diff --git a/zen/file_id.h b/zen/file_id.h index 3fd4c6bb..1170c2a2 100644 --- a/zen/file_id.h +++ b/zen/file_id.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 FILEID_H_INCLUDED diff --git a/zen/file_id_def.h b/zen/file_id_def.h index 7e729eb1..b65496be 100644 --- a/zen/file_id_def.h +++ b/zen/file_id_def.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 FILE_ID_INTERNAL_HEADER_013287632486321493 diff --git a/zen/file_io.cpp b/zen/file_io.cpp index ba8ab955..ad1ecd6b 100644 --- a/zen/file_io.cpp +++ b/zen/file_io.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 "file_io.h" diff --git a/zen/file_io.h b/zen/file_io.h index 7ce6d901..eb797b7b 100644 --- a/zen/file_io.h +++ b/zen/file_io.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 FILEIO_H_INCLUDED diff --git a/zen/file_traverser.cpp b/zen/file_traverser.cpp index 0fb8a332..a0979c49 100644 --- a/zen/file_traverser.cpp +++ b/zen/file_traverser.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 "file_traverser.h" @@ -93,7 +93,7 @@ DWORD retrieveVolumeSerial(const Zstring& pathName) //returns 0 on error or if s // -> GetVolumePathName() on the other hand resolves "S:\Desktop\somedir" to "S:\Desktop\" - nice try... //dynamically load windows API function (existing since Windows XP) - typedef BOOL (WINAPI *GetFileInformationByHandleFunc)(HANDLE hFile, + typedef BOOL (WINAPI* GetFileInformationByHandleFunc)(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation); const SysDllFun getFileInformationByHandle(L"kernel32.dll", "GetFileInformationByHandle"); @@ -335,7 +335,7 @@ struct FilePlusTraverser template static void extractFileInfo(const FindData& fileInfo, DWORD volumeSerial, TraverseCallback::FileInfo& output) { - output.fileSize = UInt64(fileInfo.fileSize.QuadPart); + output.fileSize = fileInfo.fileSize.QuadPart; output.lastWriteTimeRaw = getModTime(fileInfo); output.id = extractFileID(volumeSerial, fileInfo.fileId); } diff --git a/zen/file_traverser.h b/zen/file_traverser.h index b277b6ab..d6b69f86 100644 --- a/zen/file_traverser.h +++ b/zen/file_traverser.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 FILETRAVERSER_H_INCLUDED diff --git a/zen/fixed_list.h b/zen/fixed_list.h index f08a4815..1b2af5bf 100644 --- a/zen/fixed_list.h +++ b/zen/fixed_list.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 PTR_WRAP_012384670856841394535 @@ -36,7 +36,16 @@ public: lastInsert(NULL), sz(0) {} - ~FixedList() { clear(); } + ~FixedList() + { + Node* ptr = first; + while (ptr) + { + Node* tmp = ptr; + ptr = ptr->next; + delete tmp; + } + } template class ListIterator : public std::iterator diff --git a/zen/guid.h b/zen/guid.h index f9f497b2..42119674 100644 --- a/zen/guid.h +++ b/zen/guid.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 GUID_H_INCLUDED diff --git a/zen/i18n.h b/zen/i18n.h index 08ebd05c..6c050601 100644 --- a/zen/i18n.h +++ b/zen/i18n.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 I18_N_HEADER_3843489325045 diff --git a/zen/int64.h b/zen/int64.h index 31c278ca..a5140ffd 100644 --- a/zen/int64.h +++ b/zen/int64.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 FFS_LARGE_64_BIT_INTEGER_H_INCLUDED @@ -14,6 +14,7 @@ #include #include "assert_static.h" #include "type_tools.h" +#include "type_traits.h" #ifdef FFS_WIN #include "win.h" @@ -46,18 +47,15 @@ void checkRange(U value) class Int64 { - struct DummyClass { operator int() { return 0; } }; public: //safe implicit conversions Int64() : value(0) {} Int64(const Int64& rhs) : value(rhs.value) {} - Int64(int rhs) : value(rhs) {} //ambiguity intentional for types other than these - Int64(long rhs) : value(rhs) {} - Int64(SelectIf::result, DummyClass, std::int64_t>::Result rhs) : - value(rhs) {} //-> std::int64_t equals long int on x64 Linux! Still we want implicit behavior for all other systems! + template + Int64(T rhs, typename EnableIf::result && sizeof(T) <= sizeof(std::int64_t)>::Result* = NULL) : value(static_cast(rhs)) {} - //unsafe explicit but checked conversion from arbitrary integer type - template explicit Int64(T rhs) : value(static_cast(rhs)) { checkRange(rhs); } + //unsafe explicit but checked conversion for all other integer types + template explicit Int64(T rhs, typename EnableIf::result && sizeof(T) <= sizeof(std::int64_t))>::Result* = NULL) : value(static_cast(rhs)) { checkRange(rhs); } Int64& operator=(const Int64& rhs) { value = rhs.value; return *this; } @@ -126,18 +124,15 @@ inline Int64 operator>>(const Int64& lhs, int rhs) { return Int64(lhs) >>= rhs; class UInt64 { - struct DummyClass { operator size_t() { return 0U; } }; public: //safe implicit conversions UInt64() : value(0) {} UInt64(const UInt64& rhs) : value(rhs.value) {} - UInt64(unsigned int rhs) : value(rhs) {} //ambiguity intentional for types other than these - UInt64(unsigned long rhs) : value(rhs) {} - UInt64(SelectIf::result, DummyClass, std::uint64_t>::Result rhs) : - value(rhs) {} //-> std::uint64_t equals unsigned long int on x64 Linux! Still we want implicit behavior for all other systems! + template + UInt64(T rhs, typename EnableIf::result && sizeof(T) <= sizeof(std::uint64_t)>::Result* = NULL) : value(static_cast(rhs)) {} - //unsafe explicit but checked conversion from arbitrary integer type - template explicit UInt64(T rhs) : value(static_cast(rhs)) { checkRange(rhs); } + //unsafe explicit but checked conversion for all other integer types + template explicit UInt64(T rhs, typename EnableIf::result && sizeof(T) <= sizeof(std::uint64_t))>::Result* = NULL) : value(static_cast(rhs)) { checkRange(rhs); } UInt64& operator=(const UInt64& rhs) { value = rhs.value; return *this; } diff --git a/zen/last_error.h b/zen/last_error.h index d2eaebfc..6f701992 100644 --- a/zen/last_error.h +++ b/zen/last_error.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 SYSTEMFUNCTIONS_H_INCLUDED diff --git a/zen/long_path_prefix.h b/zen/long_path_prefix.h index d03409e1..d6255b85 100644 --- a/zen/long_path_prefix.h +++ b/zen/long_path_prefix.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 LONGPATHPREFIX_H_INCLUDED @@ -55,6 +55,7 @@ template inline Zstring applyLongPathPrefixImpl(const Zstring& path) { assert(!path.empty()); //nicely check almost all WinAPI accesses! + assert(!zen::cStringIsWhiteSpace(path[0])); if (path.length() >= max_path && //maximum allowed path length without prefix is (MAX_PATH - 1) !zen::startsWith(path, LONG_PATH_PREFIX)) diff --git a/zen/notify_removal.cpp b/zen/notify_removal.cpp index 2b6b9003..661822cb 100644 --- a/zen/notify_removal.cpp +++ b/zen/notify_removal.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 "notify_removal.h" diff --git a/zen/notify_removal.h b/zen/notify_removal.h index bd47684e..613d5357 100644 --- a/zen/notify_removal.h +++ b/zen/notify_removal.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 NOTIFY_H_INCLUDED diff --git a/zen/optional.h b/zen/optional.h new file mode 100644 index 00000000..1e04f52c --- /dev/null +++ b/zen/optional.h @@ -0,0 +1,62 @@ +// ************************************************************************** +// * 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 OPTIONAL_H_2857428578342203589 +#define OPTIONAL_H_2857428578342203589 + +namespace zen +{ +/* +Optional return value with static memory allocation! + -> interface like a pointer, performance like a value + + Usage: + ------ + Opt someFunction(); +{ + if (allIsWell) + return enumVal; + else + return NoValue(); +} + + Opt optValue = someFunction(); + if (optValue) + ... use *optValue ... +*/ + +struct NoValue {}; + +template +class Opt +{ +public: + Opt() : valid(false), value() {} + Opt(NoValue) : valid(false), value() {} + Opt(const T& val) : valid(true ), value(val) {} + +#ifdef _MSC_VER +private: + struct ConversionToBool { int dummy; }; +public: + operator int ConversionToBool::* () const { return valid ? &ConversionToBool::dummy : nullptr; } +#else + explicit operator bool() const { return valid; } //thank you C++11!!! +#endif + + const T& operator*() const { return value; } + /**/ T& operator*() { return value; } + + const T* operator->() const { return &value; } + /**/ T* operator->() { return &value; } +private: + const bool valid; + T value; +}; + +} + +#endif //OPTIONAL_H_2857428578342203589 diff --git a/zen/perf.h b/zen/perf.h index 688043a7..874e6093 100644 --- a/zen/perf.h +++ b/zen/perf.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 DEBUG_PERF_HEADER diff --git a/zen/privilege.h b/zen/privilege.h index 88fc8992..97d0d201 100644 --- a/zen/privilege.h +++ b/zen/privilege.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 PRIVILEGE_H_INCLUDED diff --git a/zen/read_txt.h b/zen/read_txt.h index 479f950e..d0e3f4dc 100644 --- a/zen/read_txt.h +++ b/zen/read_txt.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 PARSE_TXT_H_INCLUDED diff --git a/zen/scope_guard.h b/zen/scope_guard.h index d3633284..cc2f31e6 100644 --- a/zen/scope_guard.h +++ b/zen/scope_guard.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef ZEN_SCOPEGUARD_8971632487321434 diff --git a/zen/stl_tools.h b/zen/stl_tools.h index 96101821..03a10f96 100644 --- a/zen/stl_tools.h +++ b/zen/stl_tools.h @@ -2,13 +2,21 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef STL_TOOLS_HEADER_84567184321434 #define STL_TOOLS_HEADER_84567184321434 -//no need to drag in any STL includes +#include +#if defined _MSC_VER && _MSC_VER <= 1600 +#include +#include +#else +#include +#include +#endif + //enhancements for @@ -36,8 +44,12 @@ template BidirectionalIterator1 search_last(BidirectionalIterator1 first1, BidirectionalIterator1 last1, BidirectionalIterator2 first2, BidirectionalIterator2 last2); +//hash container: proper name + mitigate MSVC performance bug +template class hash_set; +template class hash_map; - +template +std::unique_ptr make_unique(Arg1&& arg1); //should eventually make it into the std at some time @@ -138,6 +150,28 @@ BidirectionalIterator1 search_last(const BidirectionalIterator1 first1, Bidirect --last1; } } + + +#if defined _MSC_VER && _MSC_VER <= 1600 //VS2010 performance bug in std::unordered_set<>: http://drdobbs.com/blogs/cpp/232200410 -> should be fixed in VS11 +template class hash_set : public std::set {}; +template class hash_map : public std::map {}; +#else +template class hash_set : public std::unordered_set {}; +template class hash_map : public std::unordered_map {}; +#endif + +//as long as variadic templates are not available in MSVC +template inline std::unique_ptr make_unique(Arg1&& arg1) { return std::unique_ptr(new T(std::forward(arg1))); } +template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2))); } +template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3))); } +template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4))); } +template inline std::unique_ptr make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4, Arg5&& arg5) { return std::unique_ptr(new T(std::forward(arg1), std::forward(arg2), std::forward(arg3), std::forward(arg4), std::forward(arg5))); } + +//template inline +//std::unique_ptr make_unique(Args&& ...args) +//{ +// return std::unique_ptr(new T( std::forward(args)... )); +//} } #endif //STL_TOOLS_HEADER_84567184321434 diff --git a/zen/string_base.h b/zen/string_base.h index 88da13bf..ef0d9059 100644 --- a/zen/string_base.h +++ b/zen/string_base.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 Z_BASE_H_INCLUDED diff --git a/zen/string_tools.h b/zen/string_tools.h index 5f20a2de..602c4258 100644 --- a/zen/string_tools.h +++ b/zen/string_tools.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef STRING_TOOLS_HEADER_213458973046 diff --git a/zen/string_traits.h b/zen/string_traits.h index 6c51f6dd..c06aa6e3 100644 --- a/zen/string_traits.h +++ b/zen/string_traits.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef STRING_TRAITS_HEADER_813274321443234 diff --git a/zen/symlink_target.h b/zen/symlink_target.h index b66d5c0e..20433b43 100644 --- a/zen/symlink_target.h +++ b/zen/symlink_target.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 SYMLINK_WIN_H_INCLUDED diff --git a/zen/thread.h b/zen/thread.h index 4db1e613..4598ea99 100644 --- a/zen/thread.h +++ b/zen/thread.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 BOOST_THREAD_WRAP_H diff --git a/zen/time.h b/zen/time.h index 6124d4d1..f7b64367 100644 --- a/zen/time.h +++ b/zen/time.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef ZEN_TIME_HEADER_845709281432434 diff --git a/zen/type_tools.h b/zen/type_tools.h index 03ccb5f2..03105ac8 100644 --- a/zen/type_tools.h +++ b/zen/type_tools.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef TYPE_TOOLS_HEADER_45237590734254545 @@ -78,6 +78,36 @@ struct RemoveArray { typedef T Result; }; template struct RemoveArray { typedef T Result; }; + +//########## Sorting ############################## +/* +Generate a descending binary predicate at compile time! + +Usage: + static const bool ascending = ... + makeSortDirection(old binary predicate, Int2Type()) -> new binary predicate + +or directly; + makeDescending(old binary predicate) -> new binary predicate +*/ + +template +struct LessDescending +{ + LessDescending(Predicate lessThan) : lessThan_(lessThan) {} + template bool operator()(const T& lhs, const T& rhs) const { return lessThan_(rhs, lhs); } +private: + Predicate lessThan_; +}; + +template inline +/**/ Predicate makeSortDirection(Predicate pred, Int2Type) { return pred; } + +template inline +LessDescending makeSortDirection(Predicate pred, Int2Type) { return pred; } + +template inline +LessDescending makeDescending(Predicate pred) { return pred; } } #endif //TYPE_TOOLS_HEADER_45237590734254545 diff --git a/zen/type_traits.h b/zen/type_traits.h index 0dacbb9a..d9b28525 100644 --- a/zen/type_traits.h +++ b/zen/type_traits.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef TYPE_TRAITS_HEADER_3425628658765467 diff --git a/zen/utf8.h b/zen/utf8.h index 66c6df46..3d97ca7a 100644 --- a/zen/utf8.h +++ b/zen/utf8.h @@ -2,7 +2,7 @@ // * This file is part of the zenXML project. It is distributed under the * // * Boost Software License, Version 1.0. See accompanying file * // * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. * -// * Copyright (C) 2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef STRING_UTF8_HEADER_01832479146991573473545 diff --git a/zen/warn_static.h b/zen/warn_static.h index db472ccd..a71308bb 100644 --- a/zen/warn_static.h +++ b/zen/warn_static.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 WARN_STATIC_HEADER_08724567834560832745 diff --git a/zen/win.h b/zen/win.h index 618c92fa..db86b7ca 100644 --- a/zen/win.h +++ b/zen/win.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 YAWFWH_YET_ANOTHER_WRAPPER_FOR_WINDOWS_H diff --git a/zen/win_ver.h b/zen/win_ver.h index 6f2639c6..464b7264 100644 --- a/zen/win_ver.h +++ b/zen/win_ver.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 WINDOWS_VERSION_HEADER_238470348254325 diff --git a/zen/zstring.cpp b/zen/zstring.cpp index 38d9b4c4..d17e860c 100644 --- a/zen/zstring.cpp +++ b/zen/zstring.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 "zstring.h" @@ -24,15 +24,13 @@ using namespace zen; #ifndef NDEBUG LeakChecker::~LeakChecker() { - if (activeStrings.size() > 0) + if (!activeStrings.empty()) { - int rowCount = 0; std::string leakingStrings; - for (VoidPtrSizeMap::const_iterator i = activeStrings.begin(); - i != activeStrings.end() && ++rowCount <= 20; - ++i) - leakingStrings += "\"" + rawMemToString(i->first, i->second) + "\"\n"; + int items = 0; + for (auto iter = activeStrings.begin(); iter != activeStrings.end() && items < 20; ++iter, ++items) + leakingStrings += "\"" + rawMemToString(iter->first, iter->second) + "\"\n"; const std::string message = std::string("Memory leak detected!") + "\n\n" + "Candidates:\n" + leakingStrings; diff --git a/zen/zstring.h b/zen/zstring.h index ca5d99c8..a53c1bb0 100644 --- a/zen/zstring.h +++ b/zen/zstring.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 ZSTRING_H_INCLUDED @@ -24,7 +24,7 @@ public: { boost::lock_guard dummy(lockActStrings); if (activeStrings.find(ptr) != activeStrings.end()) - reportProblem(std::string("Fatal Error: New memory points into occupied space: ") + rawMemToString(ptr, size)); + reportProblem("Fatal Error: New memory points into occupied space: " + rawMemToString(ptr, size)); activeStrings[ptr] = size; } @@ -33,7 +33,7 @@ public: { boost::lock_guard dummy(lockActStrings); if (activeStrings.find(ptr) == activeStrings.end()) - reportProblem(std::string("Fatal Error: No memory available for deallocation at this location!")); + reportProblem("Fatal Error: No memory available for deallocation at this location!"); activeStrings.erase(ptr); } @@ -50,8 +50,7 @@ private: void reportProblem(const std::string& message); //throw (std::logic_error) boost::mutex lockActStrings; - typedef std::map VoidPtrSizeMap; - VoidPtrSizeMap activeStrings; + zen::hash_map activeStrings; }; #endif //NDEBUG -- cgit