diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:18:53 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:18:53 +0200 |
commit | 32cb97237e7691d31977ab503c6ea4511e8eb3a8 (patch) | |
tree | 4e97b53e9f7b74e8cc5d7548507d9e82ae38e36f | |
parent | 4.6 (diff) | |
download | FreeFileSync-32cb97237e7691d31977ab503c6ea4511e8eb3a8.tar.gz FreeFileSync-32cb97237e7691d31977ab503c6ea4511e8eb3a8.tar.bz2 FreeFileSync-32cb97237e7691d31977ab503c6ea4511e8eb3a8.zip |
5.0
250 files changed, 14756 insertions, 13355 deletions
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 Binary files differindex 2e6e6f3c..9f4bc7d9 100644 --- a/BUILD/FreeFileSync.chm +++ b/BUILD/FreeFileSync.chm 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 @@ <TITLE></TITLE> <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="CREATED" CONTENT="20091206;16574000"> - <META NAME="CHANGED" CONTENT="20110903;15121200"> + <META NAME="CHANGED" CONTENT="20120118;19302500"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -29,17 +29,17 @@ applications</FONT></H3> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">By default FreeFileSync opens the operating system's standard file -browser on each double-click by invoking "<FONT FACE="Courier New, monospace">explorer +browser on each mouse double-click by invoking "<FONT FACE="Courier New, monospace">explorer /select, "%name"</FONT>" on Windows and "<FONT FACE="Courier New, monospace">xdg-open "%dir"</FONT>" on Linux.</FONT></P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">However -the user is free to integrate other external applications into +you are free to integrate other external applications into FreeFileSync: navigate to "</FONT><FONT FACE="Tahoma, sans-serif"><I>Menu -> Advanced -> Global settings: External Applications</I></FONT><FONT FACE="Tahoma, sans-serif">" -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:</FONT></P> +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:</FONT></P> <P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen3" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> <P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm"> <FONT FACE="Courier New, monospace">%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 @@ <pluralform>%x å—节</pluralform> </target> -<source><Symlink></source> -<target><符å·è¿žæŽ¥></target> - -<source><Directory></source> -<target><目录></target> - -<source>Size</source> -<target>大å°</target> - -<source>Date</source> -<target>日期</target> - -<source>Full path</source> -<target>完整路径</target> - -<source>Filename</source> -<target>文件å</target> - -<source>Relative path</source> -<target>相对路径</target> - -<source>Directory</source> -<target>目录</target> - -<source>Extension</source> -<target>扩展å</target> - -<source>Comparison Result</source> -<target>比较结果</target> - <source>Initial synchronization:</source> <target>åˆå§‹åŒ–åŒæ¥:</target> @@ -351,6 +321,24 @@ The command line is executed each time: <source>Logging</source> <target>记录</target> +<source>File time and size</source> +<target>文件时间和日期</target> + +<source>File content</source> +<target>文件内容</target> + +<source><Automatic></source> +<target><自动></target> + +<source>Mirror ->></source> +<target>é•œåƒ ->></target> + +<source>Update -></source> +<target>æ›´æ–° -></target> + +<source>Custom</source> +<target>自定义</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync 批处ç†æ–‡ä»¶</target> @@ -408,6 +396,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(需è¦å› 特网连接!)</target> +<source><Symlink></source> +<target><符å·è¿žæŽ¥></target> + +<source><Directory></source> +<target><目录></target> + +<source>Full path</source> +<target>完整路径</target> + +<source>Name</source> +<target>文件å</target> + +<source>Relative path</source> +<target>相对路径</target> + +<source>Directory</source> +<target>目录</target> + +<source>Size</source> +<target>大å°</target> + +<source>Date</source> +<target>日期</target> + +<source>Extension</source> +<target>扩展å</target> + +<source>Comparison Result</source> +<target>比较结果</target> + <source>Drag && drop</source> <target>拖放</target> @@ -579,27 +597,15 @@ The command line is executed each time: <source>Select variant:</source> <target>选择å˜åŒ–çš„:</target> -<source><Automatic></source> -<target><自动></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>使用一个数æ®åº“æ¥è¯†åˆ«å’Œä¼ æ’两边的改å˜. åˆ é™¤ï¼Œé‡å‘½å和冲çªä¼šè‡ªåŠ¨æ£€æµ‹.</target> -<source>Mirror ->></source> -<target>é•œåƒ ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>é•œåƒå¤‡ä»½å·¦è¾¹çš„文件夹.åŒæ¥åŽå³è¾¹çš„文件夹被修改为和左边文件夹精确匹é….</target> -<source>Update -></source> -<target>æ›´æ–° -></target> - <source>Copy new or updated files to right folder.</source> <target>å¤åˆ¶æ–°çš„或修改过的文件到å³ä¾§æ–‡ä»¶å¤¹</target> -<source>Custom</source> -<target>自定义</target> - <source>Configure your own synchronization rules.</source> <target>é…ç½®ä½ è‡ªå·±çš„åŒæ¥è§„则.</target> @@ -655,9 +661,6 @@ are the same 是相åŒçš„ </target> -<source>File time and size</source> -<target>文件时间和日期</target> - <source> Files are found equal if - file content @@ -669,9 +672,6 @@ is the same ç›¸åŒ </target> -<source>File content</source> -<target>文件内容</target> - <source>Symbolic Link handling</source> <target>符å·è¿žæŽ¥å¤„ç†æ–¹å¼</target> @@ -687,32 +687,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>æºä»£ç 用如下C++工具写æˆ:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>éžå¸¸æ„Ÿè°¢ä»¥ä¸‹æœ¬åœ°åŒ– FreeFileSync 的工作人员:</target> +<source>Feedback and suggestions are welcome</source> +<target>欢迎å馈æ„è§å’Œæ出建议</target> -<source>Feedback and suggestions are welcome at:</source> -<target>欢迎在下é¢æ出å馈æ„è§å’Œå»ºè®®:</target> +<source>Homepage</source> +<target>主页</target> <source>FreeFileSync at Sourceforge</source> <target>Sourceforge上的FreeFileSync</target> -<source>Homepage</source> -<target>主页</target> +<source>Email</source> +<target>邮箱</target> + +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>éžå¸¸æ„Ÿè°¢ä»¥ä¸‹æœ¬åœ°åŒ– FreeFileSync 的工作人员:</target> -<source>If you like FFS</source> -<target>å¦‚æžœä½ å–œæ¬¢ FFS</target> +<source>If you like FreeFileSync</source> +<target>å¦‚æžœä½ å–œæ¬¢ FreeFileSync</target> <source>Donate with PayPal</source> <target>通过PayPalæèµ </target> -<source>Email</source> -<target>邮箱</target> - -<source>Report translation error</source> -<target>报告翻译错误</target> - -<source>Published under the GNU General Public License:</source> -<target>在GNU通用公共许å¯ä¸‹å‘布:</target> +<source>Published under the GNU General Public License</source> +<target>在GNU通用公共许å¯ä¸‹å‘布</target> <source>Ignore subsequent errors</source> <target>忽略éšåŽçš„错误</target> @@ -861,6 +858,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>文件夹对</target> +<source>Compressed view</source> +<target>压缩视图</target> + <source>Select view</source> <target>选择视图</target> @@ -879,20 +879,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><多选></target> -<source>D-Click</source> -<target>åŒå‡»</target> - <source>Delete</source> <target>åˆ é™¤</target> -<source>Customize...</source> -<target>自定义...</target> +<source>Include all</source> +<target>包括所有</target> -<source>Select time span...</source> -<target>选择时间跨度...</target> - -<source>Auto-adjust columns</source> -<target>自动调整æ 宽</target> +<source>Exclude all</source> +<target>排除所有</target> <source>Icon size:</source> <target>å›¾æ ‡å¤§å°:</target> @@ -906,14 +900,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>大</target> -<source>Include all rows</source> -<target>包括所有行</target> - -<source>Exclude all rows</source> -<target>排除所有行</target> +<source>Select time span...</source> +<target>选择时间跨度...</target> -<source>Reset view</source> -<target>é‡ç½®è§†å›¾</target> +<source>Default view</source> +<target>默认视图</target> <source>Show "%x"</source> <target>显示 "%x"</target> @@ -1188,6 +1179,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>ç§»åŠ¨æ–‡ä»¶åˆ°æ—¶é—´æ ‡è®°å目录</target> +<source>Files</source> +<target>文件</target> + +<source>Percentage</source> +<target>百分比</target> + <source>%x TB</source> <target>%x TB</target> @@ -1314,6 +1311,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>目录有ä¾èµ–性ï¼åœ¨è®¾ç«‹åŒæ¥è§„则时请å°å¿ƒ:</target> +<source>Preparing synchronization...</source> +<target>æ£åœ¨å‡†å¤‡åŒæ¥...</target> + <source>Memory allocation failed!</source> <target>内å˜åˆ†é…失败!</target> @@ -1431,8 +1431,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>ç›®æ ‡ç›®å½•åä¸èƒ½ä¸ºç©º!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>ç”¨äºŽåˆ é™¤çš„ç”¨æˆ·å®šä¹‰ç›®å½•æ²¡æœ‰æŒ‡å®š!</target> +<source>Directory for file versioning was not supplied!</source> +<target>用于ä¿å˜æ–‡ä»¶åŽ†å²ç‰ˆæœ¬çš„目录没有æä¾›!</target> <source>Source directory does not exist anymore:</source> <target>æºç›®å½•å·²ç»ä¸å˜åœ¨:</target> 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 @@ <target>無效的命令列:%x</target> <source>Windows Error Code %x:</source> -<target>Windows 錯誤代碼 %x:</target> +<target>Windows錯誤代碼 %x:</target> <source>Linux Error Code %x:</source> -<target>Linux 錯誤代碼 %x:</target> +<target>Linux錯誤代碼 %x:</target> <source>Error resolving symbolic link:</source> <target>解æžéŒ¯èª¤çš„符號連çµï¼š</target> @@ -138,41 +138,11 @@ <pluralform>%x ä½å…ƒçµ„</pluralform> </target> -<source><Symlink></source> -<target><符號連çµ></target> - -<source><Directory></source> -<target><目錄></target> - -<source>Size</source> -<target>大å°</target> - -<source>Date</source> -<target>日期</target> - -<source>Full path</source> -<target>完整路徑</target> - -<source>Filename</source> -<target>檔案å稱</target> - -<source>Relative path</source> -<target>相å°è·¯å¾‘</target> - -<source>Directory</source> -<target>目錄</target> - -<source>Extension</source> -<target>擴展</target> - -<source>Comparison Result</source> -<target>比å°çµæžœ</target> - <source>Initial synchronization:</source> <target>åˆå§‹åŒ–åŒæ¥ï¼š</target> <source>One of the FreeFileSync database files is not yet existing:</source> -<target>å…¶ä¸ä¸€å€‹ FreeFileSync 資料庫檔案ä¸å˜åœ¨ï¼š</target> +<target>å…¶ä¸ä¸€å€‹FreeFileSync資料庫檔案ä¸å˜åœ¨ï¼š</target> <source>Incompatible synchronization database format:</source> <target>åŒæ¥è³‡æ–™åº«æ ¼å¼ä¸ç›¸å®¹ï¼š</target> @@ -224,7 +194,7 @@ </target> <source>Invalid FreeFileSync config file!</source> -<target>無效的 FreeFileSync é…置檔案ï¼</target> +<target>無效的FreeFileSyncé…置檔案ï¼</target> <source>Error parsing configuration file:</source> <target>分æžé…置檔案錯誤:</target> @@ -239,7 +209,7 @@ <target>讀å–å·å½±è¤‡è£½æœå‹™æ™‚錯誤ï¼</target> <source>Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version.</source> -<target>ä¸æ”¯æ´è£½ä½œ WOW64 上的å·å½±å‰¯æœ¬ã€‚請使用 FreeFileSync 64ä½å…ƒç‰ˆæœ¬ã€‚</target> +<target>ä¸æ”¯æ´è£½ä½œWOW64上的å·å½±å‰¯æœ¬ã€‚請使用FreeFileSync 64ä½å…ƒç‰ˆæœ¬ã€‚</target> <source>Could not determine volume name for file:</source> <target>無法判斷æ¤æª”案的å·æ¨™å稱:</target> @@ -254,7 +224,7 @@ <target>檔案ä¸å˜åœ¨ï¼š</target> <source>Could not read values for the following XML nodes:</source> -<target>ç„¡æ³•è®€å– XML 之後節點的值:</target> +<target>無法讀å–XML之後節點的值:</target> <source>S&ave configuration...</source> <target>儲å˜é…ç½®(&A)...</target> @@ -351,14 +321,32 @@ The command line is executed each time: <source>Logging</source> <target>日誌記錄</target> +<source>File time and size</source> +<target>檔案大å°å’Œæ—¥æœŸ</target> + +<source>File content</source> +<target>檔案内容</target> + +<source><Automatic></source> +<target><自動></target> + +<source>Mirror ->></source> +<target>é¡åƒ ->></target> + +<source>Update -></source> +<target>æ›´æ–° -></target> + +<source>Custom</source> +<target>自訂</target> + <source>FreeFileSync batch file</source> -<target>FreeFileSync 批次檔</target> +<target>FreeFileSync批次檔</target> <source>FreeFileSync configuration</source> -<target>FreeFileSync é…ç½®</target> +<target>FreeFileSyncé…ç½®</target> <source>FreeFileSync Batch Job</source> -<target>FreeFileSync 批次處ç†ä½œæ¥</target> +<target>FreeFileSync批次處ç†ä½œæ¥</target> <source>Unable to create log file!</source> <target>無法新建日誌檔ï¼</target> @@ -382,16 +370,16 @@ The command line is executed each time: <target>å·²æˆåŠŸçš„完æˆåŒæ¥ï¼</target> <source>Press "Switch" to open FreeFileSync GUI mode.</source> -<target>按下 "切æ›" é–‹å•Ÿ FreeFileSync 圖形介é¢æ“作方å¼ã€‚</target> +<target>按下 "切æ›" é–‹å•ŸFreeFileSync圖形介é¢æ“作方å¼ã€‚</target> <source>Switching to FreeFileSync GUI mode...</source> -<target>åˆ‡æ› FreeFileSync 圖形介é¢æ“作方å¼...</target> +<target>切æ›FreeFileSync圖形介é¢æ“作方å¼...</target> <source>Unable to connect to sourceforge.net!</source> -<target>無法連接到 sourceforge.netï¼</target> +<target>無法連接到sourceforge.netï¼</target> <source>A newer version of FreeFileSync is available:</source> -<target>有較新版本的 FreeFileSync å¯ç”¨ï¼š</target> +<target>有較新版本的FreeFileSyncå¯ç”¨ï¼š</target> <source>Download now?</source> <target>è¦ç«‹å³ä¸‹è¼‰å—Žï¼Ÿ</target> @@ -400,14 +388,44 @@ The command line is executed each time: <target>訊æ¯</target> <source>FreeFileSync is up to date!</source> -<target>FreeFileSync 已經是最新版本ï¼</target> +<target>FreeFileSync已經是最新版本ï¼</target> <source>Do you want FreeFileSync to automatically check for updates every week?</source> -<target>è¦æ¯é€±è‡ªå‹•æª¢æŸ¥æ›´æ–° FreeFileSync 嗎?</target> +<target>è¦æ¯é€±è‡ªå‹•æª¢æŸ¥æ›´æ–°FreeFileSync嗎?</target> <source>(Requires an Internet connection!)</source> <target>(需è¦é€£æŽ¥åˆ°ç¶²éš›ç¶²è·¯ï¼)</target> +<source><Symlink></source> +<target><符號連çµ></target> + +<source><Directory></source> +<target><目錄></target> + +<source>Full path</source> +<target>完整路徑</target> + +<source>Name</source> +<target>å稱</target> + +<source>Relative path</source> +<target>相å°è·¯å¾‘</target> + +<source>Directory</source> +<target>目錄</target> + +<source>Size</source> +<target>大å°</target> + +<source>Date</source> +<target>日期</target> + +<source>Extension</source> +<target>擴展</target> + +<source>Comparison Result</source> +<target>比å°çµæžœ</target> + <source>Drag && drop</source> <target>拖放</target> @@ -432,9 +450,6 @@ The command line is executed each time: <source>2. &Synchronize...</source> <target>2. åŒæ¥(&S)...</target> -<source>S&witch view</source> -<target>切æ›æª¢è¦–(&W)</target> - <source>&New</source> <target>新增專案(&N)</target> @@ -508,7 +523,7 @@ The command line is executed each time: <target>一些檔案和目錄將被刪除</target> <source>Total amount of data that will be transferred</source> -<target>å°‡è¦å‚³è¼¸çš„全部資料é‡</target> +<target>將被傳輸的總資料é‡</target> <source>Operation:</source> <target>æ“作:</target> @@ -579,27 +594,15 @@ The command line is executed each time: <source>Select variant:</source> <target>é¸æ“‡è®Šæ•¸ï¼š</target> -<source><Automatic></source> -<target><自動></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>å°å…©é‚Šä½¿ç”¨åŒä¸€å€‹è³‡æ–™åº«çš„è˜åˆ¥å’Œå‚³é€æ›´æ”¹ã€‚自動檢測刪除和è¡çªéƒ¨ä»½ã€‚</target> -<source>Mirror ->></source> -<target>é¡åƒ ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>é¡åƒå‚™ä»½çš„左邊的資料夾。åŒæ¥å¾Œï¼Œå³é‚Šçš„資料夾進行修改以完全相é…左邊的資料夾。</target> -<source>Update -></source> -<target>æ›´æ–° -></target> - <source>Copy new or updated files to right folder.</source> <target>將新的或更新éŽçš„檔案複製到å³é‚Šçš„資料夾ä¸ã€‚</target> -<source>Custom</source> -<target>自訂</target> - <source>Configure your own synchronization rules.</source> <target>é…ç½®ä½ è‡ªå·±çš„åŒæ¥è¦å‰‡ã€‚</target> @@ -650,9 +653,6 @@ are the same </source> <target>如果檔案大å°å’Œæœ€å¾Œä¿®æ”¹æ™‚間和日期相åŒå‰‡åˆ¤æ–·å…©è€…相åŒ</target> -<source>File time and size</source> -<target>檔案大å°å’Œæ—¥æœŸ</target> - <source> Files are found equal if - file content @@ -660,9 +660,6 @@ is the same </source> <target>如果檔案内容相åŒå‰‡åˆ¤æ–·å…©è€…相åŒ</target> -<source>File content</source> -<target>檔案内容</target> - <source>Symbolic Link handling</source> <target>符號連çµè™•ç†</target> @@ -678,32 +675,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>使用C++編寫的原始碼</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>éžå¸¸æ„Ÿè¬ FreeFileSync 當地語系化的工作人員:</target> - -<source>Feedback and suggestions are welcome at:</source> -<target>æ¡è¿Žåœ¨ä¸‹é¢æå‡ºå›žå ±å’Œå»ºè°ï¼š</target> - -<source>FreeFileSync at Sourceforge</source> -<target>FreeFileSync 在 Sourceforge</target> +<source>Feedback and suggestions are welcome</source> +<target>æ¡è¿Žå饋æ„見和建è°</target> <source>Homepage</source> <target>首é </target> -<source>If you like FFS</source> -<target>å¦‚æžœä½ å–œæ¡ FFS</target> - -<source>Donate with PayPal</source> -<target>使用 PayPal æè´ˆ</target> +<source>FreeFileSync at Sourceforge</source> +<target>FreeFileSync在Sourceforge</target> <source>Email</source> <target>ä¿¡ç®±</target> -<source>Report translation error</source> -<target>å›žå ±ç¿»è¯éŒ¯èª¤</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>éžå¸¸æ„Ÿè¬FreeFileSync當地語系化的工作人員:</target> + +<source>If you like FreeFileSync</source> +<target>å¦‚æžœä½ å–œæ¡FreeFileSync</target> + +<source>Donate with PayPal</source> +<target>使用PayPalæ款</target> -<source>Published under the GNU General Public License:</source> -<target>在GNU通用公共許å¯è‰ä¸‹ç™¼ä½ˆï¼š</target> +<source>Published under the GNU General Public License</source> +<target>在GNU通用公共許å¯è‰ä¸‹ç™¼ä½ˆ</target> <source>Ignore subsequent errors</source> <target>忽略後續錯誤</target> @@ -772,7 +766,7 @@ Exclude: \stuff\temp\* </target> <source>Synchronize all .doc, .zip and .exe files except everything in subfolder "temp".</source> -<target>åŒæ¥æ‰€æœ‰ .doc, .zip å’Œ .exe 檔案,除了"temp"å資料夾ä¸çš„所有檔案。</target> +<target>åŒæ¥æ‰€æœ‰ .docã€.zip å’Œ .exe 檔案,除了 "temp" å資料夾ä¸çš„所有檔案。</target> <source>Include</source> <target>包括</target> @@ -799,7 +793,7 @@ Exclude: \stuff\temp\* <target>異動檔案副本</target> <source>Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error.</source> -<target>ç¬¬ä¸€æ¬¡å°‡æª”å¯«å…¥åˆ°ä¸€å€‹æš«å˜ (*.ffs_tmp) é †ä¾¿å°‡å®ƒå€‘é‡æ–°å‘½å。å³ä½¿åœ¨åš´é‡éŒ¯èª¤çš„情æ³ä¸‹ï¼Œé‚„å¯ç¢ºä¿ä¸€è‡´çš„狀態。</target> +<target>第一次將檔寫入到一個暫å˜(*.ffs_tmp)ï¼Œé †ä¾¿å°‡å®ƒå€‘é‡æ–°å‘½å。å³ä½¿åœ¨åš´é‡éŒ¯èª¤çš„情æ³ä¸‹ï¼Œé‚„å¯ç¢ºä¿ä¸€è‡´çš„狀態。</target> <source>Copy locked files</source> <target>複製被鎖定的檔案</target> @@ -852,6 +846,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>資料夾å°</target> +<source>Compressed view</source> +<target>壓縮檢視</target> + <source>Select view</source> <target>é¸æ“‡æª¢è¦–</target> @@ -870,20 +867,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><多é‡é¸æ“‡></target> -<source>D-Click</source> -<target>點兩下</target> - <source>Delete</source> <target>刪除</target> -<source>Customize...</source> -<target>自訂...</target> - -<source>Select time span...</source> -<target>é¸æ“‡æ™‚間範åœ...</target> +<source>Include all</source> +<target>包括所有</target> -<source>Auto-adjust columns</source> -<target>自動調整欄寬</target> +<source>Exclude all</source> +<target>排除所有</target> <source>Icon size:</source> <target>圖示大å°ï¼š</target> @@ -897,14 +888,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>大</target> -<source>Include all rows</source> -<target>包括所有行</target> - -<source>Exclude all rows</source> -<target>排除所有行</target> +<source>Select time span...</source> +<target>é¸æ“‡æ™‚間範åœ...</target> -<source>Reset view</source> -<target>é‡ç½®æª¢è¦–</target> +<source>Default view</source> +<target>é è¨æª¢è¦–</target> <source>Show "%x"</source> <target>顯示 "%x"</target> @@ -1125,7 +1113,7 @@ Exclude: \stuff\temp\* <target>éµå¾ª</target> <source>Copy NTFS permissions</source> -<target>複製 NTFS 權é™</target> +<target>複製NTFS權é™</target> <source>Integrate external applications into context menu. The following macros are available:</source> <target>æ•´åˆä¸Šä¸‹æ–‡åŠŸèƒ½è¡¨ä¸çš„外部應用程å¼ã€‚å¯ä»¥ä½¿ç”¨ä¸‹é¢çš„巨集:</target> @@ -1179,6 +1167,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>移動檔案到一個時間標記的å目錄</target> +<source>Files</source> +<target>檔案</target> + +<source>Percentage</source> +<target>百分比</target> + <source>%x TB</source> <target>%x TB</target> @@ -1305,6 +1299,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>目錄有ä¾é 性ï¼è«‹å°å¿ƒè¨å®šåŒæ¥è¦å‰‡ï¼š</target> +<source>Preparing synchronization...</source> +<target>æ£åœ¨æº–å‚™åŒæ¥...</target> + <source>Memory allocation failed!</source> <target>記憶體分é…失敗ï¼</target> @@ -1422,8 +1419,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>目標目錄å稱ä¸èƒ½ç©ºç™½ï¼</target> -<source>User-defined directory for deletion was not specified!</source> -<target>未指定è¦åˆªé™¤çš„自定義目錄ï¼</target> +<source>Directory for file versioning was not supplied!</source> +<target>版本控制檔的目錄ä¸æä¾›ï¼</target> <source>Source directory does not exist anymore:</source> <target>來æºç›®éŒ„ä¸å˜åœ¨ï¼š</target> 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 @@ <pluralform>%x Bajtova</pluralform> </target> -<source><Symlink></source> -<target><Poveznica simbola></target> - -<source><Directory></source> -<target><Direktorij></target> - -<source>Size</source> -<target>VeliÄina</target> - -<source>Date</source> -<target>Datum</target> - -<source>Full path</source> -<target>Puna putanja</target> - -<source>Filename</source> -<target>Ime datoteke</target> - -<source>Relative path</source> -<target>Relativna Putanja</target> - -<source>Directory</source> -<target>Direktorij</target> - -<source>Extension</source> -<target>Ekstenzija</target> - -<source>Comparison Result</source> -<target>Rezultati usporedbe</target> - <source>Initial synchronization:</source> <target>PoÄetna sinkronizacija:</target> @@ -357,6 +327,24 @@ Naredba će biti izvrÅ¡ena kada: <source>Logging</source> <target>Zapisivanje</target> +<source>File time and size</source> +<target>Vrijeme i veliÄina datoteke</target> + +<source>File content</source> +<target>Sadržaj datoteke</target> + +<source><Automatic></source> +<target><Automatski></target> + +<source>Mirror ->></source> +<target>Zrcalno ->></target> + +<source>Update -></source> +<target>Ažuriraj -></target> + +<source>Custom</source> +<target>UobiÄajeno</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync batch datoteka</target> @@ -414,6 +402,36 @@ Naredba će biti izvrÅ¡ena kada: <source>(Requires an Internet connection!)</source> <target>(Zahtjeva vezu na Internet!)</target> +<source><Symlink></source> +<target><Poveznica simbola></target> + +<source><Directory></source> +<target><Direktorij></target> + +<source>Full path</source> +<target>Puna putanja</target> + +<source>Name</source> +<target>Naziv</target> + +<source>Relative path</source> +<target>Relativna Putanja</target> + +<source>Directory</source> +<target>Direktorij</target> + +<source>Size</source> +<target>VeliÄina</target> + +<source>Date</source> +<target>Datum</target> + +<source>Extension</source> +<target>Ekstenzija</target> + +<source>Comparison Result</source> +<target>Rezultati usporedbe</target> + <source>Drag && drop</source> <target>Povuci && ispusti</target> @@ -438,9 +456,6 @@ Naredba će biti izvrÅ¡ena kada: <source>2. &Synchronize...</source> <target>2. &Sinkroniziraj...</target> -<source>S&witch view</source> -<target>Pr&omjeni pogled</target> - <source>&New</source> <target>&Novo</target> @@ -585,27 +600,15 @@ Naredba će biti izvrÅ¡ena kada: <source>Select variant:</source> <target>Izaberite varijantu:</target> -<source><Automatic></source> -<target><Automatski></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identificiraj i izvedi promjene na obje strane koristeći bazu podataka. Brisanja, preimenovanja i sukobi se automatski detektiraju</target> -<source>Mirror ->></source> -<target>Zrcalno ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Zrcalna priÄuva lijeve mape. Desna mapa je ureÄ‘ena da bi bila jednaka lijevom folderu nakon sinkronizacije.</target> -<source>Update -></source> -<target>Ažuriraj -></target> - <source>Copy new or updated files to right folder.</source> <target>Kopiraj nove ili ažurirane datoteke u desnu mapu.</target> -<source>Custom</source> -<target>UobiÄajeno</target> - <source>Configure your own synchronization rules.</source> <target>Konfigurirajte vaÅ¡a vlastita sinkronizacijska pravila.</target> @@ -661,9 +664,6 @@ Datoteke se smatraju jednake ako su im jednaki </target> -<source>File time and size</source> -<target>Vrijeme i veliÄina datoteke</target> - <source> Files are found equal if - file content @@ -675,9 +675,6 @@ Datoteke se smatraju jednake ako im je jednak </target> -<source>File content</source> -<target>Sadržaj datoteke</target> - <source>Symbolic Link handling</source> <target>Upravljanje simboliÄnim poveznicama</target> @@ -693,32 +690,29 @@ jednak <source>Source code written in C++ utilizing:</source> <target>Izvorni kod napisan u C++ uz koriÅ¡tenje:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Zahvale za prijevod FreeFileSync idu:</target> +<source>Feedback and suggestions are welcome</source> +<target>Povratne informacije i prijedlozi su dobrodoÅ¡li</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Povratne informacije i prijedlozi su dobrodoÅ¡li na:</target> +<source>Homepage</source> +<target>PoÄetna stranica</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync na Sourceforge</target> -<source>Homepage</source> -<target>PoÄetna stranica</target> +<source>Email</source> +<target>Email</target> -<source>If you like FFS</source> -<target>Ako volite FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Zahvale za prijevod FreeFileSync idu:</target> + +<source>If you like FreeFileSync</source> +<target>Ako volite FreeFileSync</target> <source>Donate with PayPal</source> <target>Doniraj s PayPal</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>Prijavi greÅ¡ku u prijevodu</target> - -<source>Published under the GNU General Public License:</source> -<target>Objavljeno pod licencom GNU General Public:</target> +<source>Published under the GNU General Public License</source> +<target>Objavljeno pod licencom GNU General Public</target> <source>Ignore subsequent errors</source> <target>Ignoriraj naknadne greÅ¡ke</target> @@ -867,6 +861,9 @@ IskljuÄi: \stuff\temp\* <source>Folder pairs</source> <target>Par mape</target> +<source>Compressed view</source> +<target>Prikaz zauzeća</target> + <source>Select view</source> <target>Izaberite pogled</target> @@ -885,20 +882,14 @@ IskljuÄi: \stuff\temp\* <source><multiple selection></source> <target><viÅ¡estruki odabir></target> -<source>D-Click</source> -<target>D-Klik</target> - <source>Delete</source> <target>IzbriÅ¡i</target> -<source>Customize...</source> -<target>Prilagodi...</target> - -<source>Select time span...</source> -<target>Izaberite vremenski raspon...</target> +<source>Include all</source> +<target>UkljuÄi sve</target> -<source>Auto-adjust columns</source> -<target>Samo-prilagodi stupce</target> +<source>Exclude all</source> +<target>Izdvoji sve</target> <source>Icon size:</source> <target>VeliÄina Ikone</target> @@ -912,14 +903,11 @@ IskljuÄi: \stuff\temp\* <source>Large</source> <target>Veliko</target> -<source>Include all rows</source> -<target>UkljuÄi sve redove</target> - -<source>Exclude all rows</source> -<target>IskljuÄi sve redove</target> +<source>Select time span...</source> +<target>Izaberite vremenski raspon...</target> -<source>Reset view</source> -<target>Resetiraj pogled</target> +<source>Default view</source> +<target>Standardni prikaz</target> <source>Show "%x"</source> <target>Prikaži "%x"</target> @@ -1206,6 +1194,12 @@ IskljuÄi: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Premjesti datoteke u vremenski-oznaÄen podfolder</target> +<source>Files</source> +<target>Datoteke</target> + +<source>Percentage</source> +<target>Postotak</target> + <source>%x TB</source> <target>%x TB</target> @@ -1338,6 +1332,9 @@ IskljuÄi: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Direktoriji su u ovisnosti! Budite oprezni pri postavljanju sinkronizacijskih pravila:</target> +<source>Preparing synchronization...</source> +<target>Pripremam sinkronizaciju</target> + <source>Memory allocation failed!</source> <target>NeuspjeÅ¡no dodjeljivanje memorije!</target> @@ -1455,8 +1452,8 @@ IskljuÄi: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Ime ciljnog direktorija ne smije biti prazno!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>KorisniÄki definiran direktorij za brisanje nije definiran!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Mapa za ovakvu datoteku nije isporuÄena</target> <source>Source directory does not exist anymore:</source> <target>Izvorni direktorij viÅ¡e ne postoji:</target> 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 @@ <pluralform>%x B</pluralform> </target> -<source><Symlink></source> -<target><Symlink></target> - -<source><Directory></source> -<target><Adresář></target> - -<source>Size</source> -<target>Velikost</target> - -<source>Date</source> -<target>ÄŒas</target> - -<source>Full path</source> -<target>Plná cesta</target> - -<source>Filename</source> -<target>Jméno</target> - -<source>Relative path</source> -<target>Relativnà cesta</target> - -<source>Directory</source> -<target>Adresář</target> - -<source>Extension</source> -<target>PÅ™Ãpona</target> - -<source>Comparison Result</source> -<target>Výsledek porovnánÃ</target> - <source>Initial synchronization:</source> <target>Prvotnà synchronizace:</target> @@ -357,6 +327,24 @@ PÅ™Ãkazová řádka je spuÅ¡tÄ›na pokaždé když: <source>Logging</source> <target>Záznam zpracovánÃ</target> +<source>File time and size</source> +<target>Podle velikosti a data souboru</target> + +<source>File content</source> +<target>Podle obsahu souboru</target> + +<source><Automatic></source> +<target><- Automaticky -></target> + +<source>Mirror ->></source> +<target>Zrcadlenà ->></target> + +<source>Update -></source> +<target>Aktualizuj -></target> + +<source>Custom</source> +<target>VlastnÃ</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync dávkový soubor</target> @@ -414,6 +402,36 @@ PÅ™Ãkazová řádka je spuÅ¡tÄ›na pokaždé když: <source>(Requires an Internet connection!)</source> <target>(Vyžaduje pÅ™ipojenà k internetu!)</target> +<source><Symlink></source> +<target><Symlink></target> + +<source><Directory></source> +<target><Adresář></target> + +<source>Full path</source> +<target>Plná cesta</target> + +<source>Name</source> +<target>Jméno</target> + +<source>Relative path</source> +<target>Relativnà cesta</target> + +<source>Directory</source> +<target>Adresář</target> + +<source>Size</source> +<target>Velikost</target> + +<source>Date</source> +<target>ÄŒas</target> + +<source>Extension</source> +<target>PÅ™Ãpona</target> + +<source>Comparison Result</source> +<target>Výsledek porovnánÃ</target> + <source>Drag && drop</source> <target>Drag && Drop</target> @@ -585,27 +603,15 @@ PÅ™Ãkazová řádka je spuÅ¡tÄ›na pokaždé když: <source>Select variant:</source> <target>Vyberte variantu:</target> -<source><Automatic></source> -<target><- Automaticky -></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>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.</target> -<source>Mirror ->></source> -<target>Zrcadlenà ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Zrcadlenà levého adresáře. Pravý adresář bude zmÄ›nÄ›n tak, aby po synchronizaci byl totožný s levým.</target> -<source>Update -></source> -<target>Aktualizuj -></target> - <source>Copy new or updated files to right folder.</source> <target>KopÃrovat nové nebo aktualizované soubory do adresáře vpravo.</target> -<source>Custom</source> -<target>VlastnÃ</target> - <source>Configure your own synchronization rules.</source> <target>Nastavenà vlastnÃch pravidel synchronizace.</target> @@ -661,9 +667,6 @@ Soubory jsou shodné jestliže jsou stejné </target> -<source>File time and size</source> -<target>Podle velikosti a data souboru</target> - <source> Files are found equal if - file content @@ -675,9 +678,6 @@ Soubory jsou shodné jestliže je stejný </target> -<source>File content</source> -<target>Podle obsahu souboru</target> - <source>Symbolic Link handling</source> <target>Zpracovánà symbolických odkazů</target> @@ -693,32 +693,29 @@ je stejný <source>Source code written in C++ utilizing:</source> <target>Zdrojový kód byl napsán kompletnÄ› v C++ s pomocÃ:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>PodÄ›kovánà za pÅ™eklad FreeFileSync:</target> +<source>Feedback and suggestions are welcome</source> +<target>Komentáře a námÄ›ty jsou vždy vÃtány</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Komentáře a námÄ›ty zasÃlejte na:</target> +<source>Homepage</source> +<target>NavÅ¡tivte</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync na Sourceforge</target> -<source>Homepage</source> -<target>Homepage</target> +<source>Email</source> +<target>NapiÅ¡te</target> + +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>PodÄ›kovánà za pÅ™eklad FreeFileSync:</target> -<source>If you like FFS</source> -<target>Pokud se Vám FSS lÃbÃ</target> +<source>If you like FreeFileSync</source> +<target>Pokud se Vám FreeFileSync lÃbÃ</target> <source>Donate with PayPal</source> <target>PÅ™ispÄ›t pomocà PayPal</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>Hlásit chyby pÅ™ekladu</target> - -<source>Published under the GNU General Public License:</source> -<target>Vydáno podle GNU General Public License (GPL):</target> +<source>Published under the GNU General Public License</source> +<target>Vydáno pod GNU General Public License (GPL)</target> <source>Ignore subsequent errors</source> <target>PÅ™eskoÄit dalÅ¡Ã chyby</target> @@ -867,6 +864,9 @@ Vynechat: \nÄ›kde\nÄ›co\* <source>Folder pairs</source> <target>Adresářové páry</target> +<source>Compressed view</source> +<target>NavigaÄnà zobrazenÃ</target> + <source>Select view</source> <target>Vyberte zobrazenÃ</target> @@ -885,20 +885,14 @@ Vynechat: \nÄ›kde\nÄ›co\* <source><multiple selection></source> <target><vÃcenásobný výbÄ›r></target> -<source>D-Click</source> -<target>Dvojklik</target> - <source>Delete</source> <target>Smazat</target> -<source>Customize...</source> -<target>VlastnÃ....</target> - -<source>Select time span...</source> -<target>Zadejte Äasové rozmezÃ...</target> +<source>Include all</source> +<target>Zahrnout vÅ¡e</target> -<source>Auto-adjust columns</source> -<target>Automaticky pÅ™izpůsobit Å¡ÃÅ™ku</target> +<source>Exclude all</source> +<target>Vynechat vÅ¡e</target> <source>Icon size:</source> <target>Velikost ikon:</target> @@ -912,13 +906,10 @@ Vynechat: \nÄ›kde\nÄ›co\* <source>Large</source> <target>Velké</target> -<source>Include all rows</source> -<target>PoužÃt vÅ¡echny řádky</target> - -<source>Exclude all rows</source> -<target>Vynechat vÅ¡echny řádky</target> +<source>Select time span...</source> +<target>Zadejte Äasové rozmezÃ...</target> -<source>Reset view</source> +<source>Default view</source> <target>Výchozà zobrazenÃ</target> <source>Show "%x"</source> @@ -1206,6 +1197,12 @@ Vynechat: \nÄ›kde\nÄ›co\* <source>Move files into a time-stamped subdirectory</source> <target>PÅ™esunout soubory do ÄasovÄ› oznaÄeného podadresáře</target> +<source>Files</source> +<target>Soubory</target> + +<source>Percentage</source> +<target>Procentnà podÃl</target> + <source>%x TB</source> <target>%x TB</target> @@ -1338,6 +1335,9 @@ Vynechat: \nÄ›kde\nÄ›co\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Adresáře jsou závislé! BuÄte opatrnà s definicà synchronizaÄnÃch pravidel:</target> +<source>Preparing synchronization...</source> +<target>PÅ™Ãprava synchronizace...</target> + <source>Memory allocation failed!</source> <target>Chyba pÅ™idÄ›lenà pamÄ›ti!</target> @@ -1455,8 +1455,8 @@ Vynechat: \nÄ›kde\nÄ›co\* <source>Target directory name must not be empty!</source> <target>Nenà zadán cÃlový adresář!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Uživatelsky definovaný adresář pro mazánà nebyl zadán!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Nebyl zadán adresář pro verzovánà souborů!</target> <source>Source directory does not exist anymore:</source> <target>Zdrojový adresář již neexistuje:</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Symlink></target> - -<source><Directory></source> -<target><Directory></target> - -<source>Size</source> -<target>Størrelse</target> - -<source>Date</source> -<target>Dato</target> - -<source>Full path</source> -<target>Fuld Sti</target> - -<source>Filename</source> -<target>Filnavne</target> - -<source>Relative path</source> -<target>Filsti</target> - -<source>Directory</source> -<target>Bibliotek</target> - -<source>Extension</source> -<target>Udvidelse</target> - -<source>Comparison Result</source> -<target>Sammenlignings Resultat</target> - <source>Initial synchronization:</source> <target>Indledende synkronisering:</target> @@ -354,6 +324,24 @@ Kommando linjen bliver afviklet hver gang: <source>Logging</source> <target>Logger</target> +<source>File time and size</source> +<target>Fil tid og størrelse</target> + +<source>File content</source> +<target>Fil indhold</target> + +<source><Automatic></source> +<target><Automatisk></target> + +<source>Mirror ->></source> +<target>Spejl ->></target> + +<source>Update -></source> +<target>Opdater -></target> + +<source>Custom</source> +<target>Brugerdefineret</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync batch fil</target> @@ -411,6 +399,36 @@ Kommando linjen bliver afviklet hver gang: <source>(Requires an Internet connection!)</source> <target>(Kræver en Internet forbindelse!)</target> +<source><Symlink></source> +<target><Symlink></target> + +<source><Directory></source> +<target><Directory></target> + +<source>Full path</source> +<target>Fuld Sti</target> + +<source>Name</source> +<target>Navn</target> + +<source>Relative path</source> +<target>Filsti</target> + +<source>Directory</source> +<target>Bibliotek</target> + +<source>Size</source> +<target>Størrelse</target> + +<source>Date</source> +<target>Dato</target> + +<source>Extension</source> +<target>Udvidelse</target> + +<source>Comparison Result</source> +<target>Sammenlignings Resultat</target> + <source>Drag && drop</source> <target>Træk && slip</target> @@ -435,9 +453,6 @@ Kommando linjen bliver afviklet hver gang: <source>2. &Synchronize...</source> <target>2. &Synkroniser...</target> -<source>S&witch view</source> -<target>S&kift udseende</target> - <source>&New</source> <target>&Ny</target> @@ -582,27 +597,15 @@ Kommando linjen bliver afviklet hver gang: <source>Select variant:</source> <target>Vælg variant:</target> -<source><Automatic></source> -<target><Automatisk></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>find ændringer pÃ¥ begge sider via. database. Sletninger, omdøbninger og konflikter bliver automatisk fundet.</target> -<source>Mirror ->></source> -<target>Spejl ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Spejling af venstre mappe. Højre mappe tilpasses sÃ¥ den ligner den venstre efter synkronisering.</target> -<source>Update -></source> -<target>Opdater -></target> - <source>Copy new or updated files to right folder.</source> <target>Kopier nye eller opdaterede filer til højre mappe.</target> -<source>Custom</source> -<target>Brugerdefineret</target> - <source>Configure your own synchronization rules.</source> <target>Konfigurer dine egne synkroniserings regler.</target> @@ -658,9 +661,6 @@ Filer bliver set som ens hvis er ens </target> -<source>File time and size</source> -<target>Fil tid og størrelse</target> - <source> Files are found equal if - file content @@ -672,9 +672,6 @@ Filer er ens hvis er det samme </target> -<source>File content</source> -<target>Fil indhold</target> - <source>Symbolic Link handling</source> <target>Link hÃ¥ndtering</target> @@ -690,32 +687,29 @@ er det samme <source>Source code written in C++ utilizing:</source> <target>Source code skrevet i C++:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Stor tak for lokalisering af FreeFileSync gÃ¥r til:</target> +<source>Feedback and suggestions are welcome</source> +<target>Feedback og forslag er velkomne</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Feedback og forslag er velkommen pÃ¥:</target> +<source>Homepage</source> +<target>Hjemmeside</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync pÃ¥ Sourceforge</target> -<source>Homepage</source> -<target>Hjemmeside</target> +<source>Email</source> +<target>E-mail</target> -<source>If you like FFS</source> -<target>Hvis du kan lide FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Stor tak for lokalisering af FreeFileSync gÃ¥r til:</target> + +<source>If you like FreeFileSync</source> +<target>Hvis du kan lide FreeFileSync</target> <source>Donate with PayPal</source> <target>Doner med PayPal</target> -<source>Email</source> -<target>E-mail</target> - -<source>Report translation error</source> -<target>Rapporter oversættelses fejl</target> - -<source>Published under the GNU General Public License:</source> -<target>Udgivet under GNU General Public Licence:</target> +<source>Published under the GNU General Public License</source> +<target>Udgivet under GNU General Public Licence</target> <source>Ignore subsequent errors</source> <target>Ignorer underliggende fejl</target> @@ -864,6 +858,9 @@ Udeluk: \ting\temp\* <source>Folder pairs</source> <target>Mappe par</target> +<source>Compressed view</source> +<target>Komprimmeret tilstand</target> + <source>Select view</source> <target>Vælg udseende</target> @@ -882,20 +879,14 @@ Udeluk: \ting\temp\* <source><multiple selection></source> <target><flere valg></target> -<source>D-Click</source> -<target>Dobbelt-klik</target> - <source>Delete</source> <target>Slet</target> -<source>Customize...</source> -<target>Tilpas...</target> - -<source>Select time span...</source> -<target>Vælg tidsomrÃ¥de...</target> +<source>Include all</source> +<target>Vælg alle</target> -<source>Auto-adjust columns</source> -<target>Auto-juster kolonner</target> +<source>Exclude all</source> +<target>Fravælg alle</target> <source>Icon size:</source> <target>Ikon størrelse:</target> @@ -909,14 +900,11 @@ Udeluk: \ting\temp\* <source>Large</source> <target>Stor</target> -<source>Include all rows</source> -<target>Inkluder alle rækker</target> - -<source>Exclude all rows</source> -<target>Ekskluder alle rækker</target> +<source>Select time span...</source> +<target>Vælg tidsomrÃ¥de...</target> -<source>Reset view</source> -<target>Nulstil udseende</target> +<source>Default view</source> +<target>Standard tilstand</target> <source>Show "%x"</source> <target>Vis "%x"</target> @@ -1197,6 +1185,12 @@ Udeluk: \ting\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Flyt filer til et datomærket underbibliotek</target> +<source>Files</source> +<target>Filer</target> + +<source>Percentage</source> +<target>Procent</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1320,9 @@ Udeluk: \ting\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Biblioteker er afhængige! Vær forsigtig nÃ¥r du laver synkroniserings reglerne:</target> +<source>Preparing synchronization...</source> +<target>Forbereder synkronisering...</target> + <source>Memory allocation failed!</source> <target>Hukommelses fejl!</target> @@ -1443,8 +1440,8 @@ Udeluk: \ting\temp\* <source>Target directory name must not be empty!</source> <target>Navnet pÃ¥ destinations biblioteket mÃ¥ ikke være tomt!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Bruger-defineret bibliotek til sletning ikke defineret!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Fil versions biblioteket blev ikke angivet!</target> <source>Source directory does not exist anymore:</source> <target>Kilde biblioteket findes ikke mere:</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Symlink></target> - -<source><Directory></source> -<target><Map></target> - -<source>Size</source> -<target>Grootte</target> - -<source>Date</source> -<target>Datum</target> - -<source>Full path</source> -<target>Volledig pad</target> - -<source>Filename</source> -<target>Bestandsnaam</target> - -<source>Relative path</source> -<target>Relatief pad</target> - -<source>Directory</source> -<target>Map</target> - -<source>Extension</source> -<target>Extensie</target> - -<source>Comparison Result</source> -<target>Resultaat vergelijken</target> - <source>Initial synchronization:</source> <target>Initiële synchronisatie:</target> @@ -354,6 +324,24 @@ De opdrachtregel wordt telkens uitgevoerd indien: <source>Logging</source> <target>Loggen</target> +<source>File time and size</source> +<target>Bestands tijd-en grootte</target> + +<source>File content</source> +<target>Bestandsinhoud</target> + +<source><Automatic></source> +<target><Automatisch></target> + +<source>Mirror ->></source> +<target>Spiegelen ->></target> + +<source>Update -></source> +<target>Bijwerken -></target> + +<source>Custom</source> +<target>Aangepast</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync taakbestand</target> @@ -411,6 +399,36 @@ De opdrachtregel wordt telkens uitgevoerd indien: <source>(Requires an Internet connection!)</source> <target>(Vereist een internetverbinding!)</target> +<source><Symlink></source> +<target><Symlink></target> + +<source><Directory></source> +<target><Map></target> + +<source>Full path</source> +<target>Volledig pad</target> + +<source>Name</source> +<target>Naam</target> + +<source>Relative path</source> +<target>Relatief pad</target> + +<source>Directory</source> +<target>Map</target> + +<source>Size</source> +<target>Grootte</target> + +<source>Date</source> +<target>Datum</target> + +<source>Extension</source> +<target>Extensie</target> + +<source>Comparison Result</source> +<target>Resultaat vergelijken</target> + <source>Drag && drop</source> <target>Drag en drop</target> @@ -435,9 +453,6 @@ De opdrachtregel wordt telkens uitgevoerd indien: <source>2. &Synchronize...</source> <target>2. &Synchroniseer...</target> -<source>S&witch view</source> -<target>&Wijzig weergave</target> - <source>&New</source> <target>&Nieuw</target> @@ -582,27 +597,15 @@ De opdrachtregel wordt telkens uitgevoerd indien: <source>Select variant:</source> <target>Selecteer een variant:</target> -<source><Automatic></source> -<target><Automatisch></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identificeer en verspreid veranderingen aan beide kanten met behulp van een database. Verwijderingen, hernoemingen en conflicten worden automatisch gedetecteerd.</target> -<source>Mirror ->></source> -<target>Spiegelen ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Spiegel backup van linker map. Rechter map is bewerkt om na synchronisatie een exacte kopie te zijn van de linker map.</target> -<source>Update -></source> -<target>Bijwerken -></target> - <source>Copy new or updated files to right folder.</source> <target>Kopiëer nieuwe of geupdate bestanden naar de rechter map.</target> -<source>Custom</source> -<target>Aangepast</target> - <source>Configure your own synchronization rules.</source> <target>Configureer uw eigen synchronisatieregels.</target> @@ -658,9 +661,6 @@ Bestanden worden als gelijk bevonden indien, gelijk zijn </target> -<source>File time and size</source> -<target>Bestands tijd-en grootte</target> - <source> Files are found equal if - file content @@ -672,9 +672,6 @@ Bestanden worden als gelijk beschouwd indien, overeenkomt </target> -<source>File content</source> -<target>Bestandsinhoud</target> - <source>Symbolic Link handling</source> <target>Afhandeling van snelkoppelingen</target> @@ -690,32 +687,29 @@ overeenkomt <source>Source code written in C++ utilizing:</source> <target>Broncode geschreven in C++ met behulp van:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Extra dank voor het vertalen van FreeFileSync gaat naar:</target> +<source>Feedback and suggestions are welcome</source> +<target>Feedback en suggesties zijn welkom</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Tips en suggesties zijn welkom op:</target> +<source>Homepage</source> +<target>Homepage</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync op Sourceforge</target> -<source>Homepage</source> -<target>Homepage</target> +<source>Email</source> +<target>E-mail</target> -<source>If you like FFS</source> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Extra dank voor het vertalen van FreeFileSync gaat naar:</target> + +<source>If you like FreeFileSync</source> <target>Indien FreeFileSync u bevalt</target> <source>Donate with PayPal</source> <target>Doneer met PayPal</target> -<source>Email</source> -<target>E-mail</target> - -<source>Report translation error</source> -<target>Rapporteer een vertaalfout</target> - -<source>Published under the GNU General Public License:</source> -<target>Gepubliceerd onder de GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>Gepubliceerd onder de GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Negeer erop volgende foutmeldingen</target> @@ -864,8 +858,11 @@ Uitsluiten: \stuff\temp\* <source>Folder pairs</source> <target>Map paren</target> +<source>Compressed view</source> +<target>Compacte weergave</target> + <source>Select view</source> -<target>Kies weergave</target> +<target>Selecteer weergave</target> <source>Set direction:</source> <target>Stel richting in:</target> @@ -882,20 +879,14 @@ Uitsluiten: \stuff\temp\* <source><multiple selection></source> <target><meervoudige selectie></target> -<source>D-Click</source> -<target>Dubbele klik</target> - <source>Delete</source> <target>Verwijderen</target> -<source>Customize...</source> -<target>Aanpassen...</target> - -<source>Select time span...</source> -<target>Selecteer tijdsspanne...</target> +<source>Include all</source> +<target>Alles insluiten</target> -<source>Auto-adjust columns</source> -<target>Kolommen automatisch aanpassen</target> +<source>Exclude all</source> +<target>Alles uitsluiten</target> <source>Icon size:</source> <target>Icoon grootte:</target> @@ -909,14 +900,11 @@ Uitsluiten: \stuff\temp\* <source>Large</source> <target>Groot</target> -<source>Include all rows</source> -<target>Alle rijen opnemen</target> - -<source>Exclude all rows</source> -<target>Sluit alle rijen uit</target> +<source>Select time span...</source> +<target>Selecteer tijdsspanne...</target> -<source>Reset view</source> -<target>Stel weergave opnieuw in</target> +<source>Default view</source> +<target>Standaard weergave</target> <source>Show "%x"</source> <target>Toon "%x"</target> @@ -1197,6 +1185,12 @@ Uitsluiten: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Verplaats de bestanden naar een tijd-gemarkeerde submap</target> +<source>Files</source> +<target>Bestanden</target> + +<source>Percentage</source> +<target>Percentage</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1320,9 @@ Uitsluiten: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Mappen zijn afhankelijk van elkaar! Wees voorzichtig met het maken van synchronisatieregels:</target> +<source>Preparing synchronization...</source> +<target>Synchronisatie voorbereiden</target> + <source>Memory allocation failed!</source> <target>RAM geheugen error!</target> @@ -1443,8 +1440,8 @@ Uitsluiten: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Doel mapnaam mag niet leeg zijn!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>De door de gebruiker gedefinieerde map ter verwijdering was niet opgegeven!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Map voor bestands versiebeheer is niet ingegeven!</target> <source>Source directory does not exist anymore:</source> <target>Bronmap bestaat niet meer:</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Symlink></target> - -<source><Directory></source> -<target><Directory></target> - -<source>Size</source> -<target>Size</target> - -<source>Date</source> -<target>Date</target> - -<source>Full path</source> -<target>Full path</target> - -<source>Filename</source> -<target>Filename</target> - -<source>Relative path</source> -<target>Relative path</target> - -<source>Directory</source> -<target>Directory</target> - -<source>Extension</source> -<target>Extension</target> - -<source>Comparison Result</source> -<target>Comparison Result</target> - <source>Initial synchronization:</source> <target>Initial synchronisation:</target> @@ -354,6 +324,24 @@ The command line is executed each time: <source>Logging</source> <target>Logging</target> +<source>File time and size</source> +<target>File time and size</target> + +<source>File content</source> +<target>File content</target> + +<source><Automatic></source> +<target><Automatic></target> + +<source>Mirror ->></source> +<target>Mirror ->></target> + +<source>Update -></source> +<target>Update -></target> + +<source>Custom</source> +<target>Custom</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync batch file</target> @@ -411,6 +399,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(Requires an Internet connection!)</target> +<source><Symlink></source> +<target><Symlink></target> + +<source><Directory></source> +<target><Directory></target> + +<source>Full path</source> +<target>Full path</target> + +<source>Name</source> +<target>Name</target> + +<source>Relative path</source> +<target>Relative path</target> + +<source>Directory</source> +<target>Directory</target> + +<source>Size</source> +<target>Size</target> + +<source>Date</source> +<target>Date</target> + +<source>Extension</source> +<target>Extension</target> + +<source>Comparison Result</source> +<target>Comparison Result</target> + <source>Drag && drop</source> <target>Drag && drop</target> @@ -582,27 +600,15 @@ The command line is executed each time: <source>Select variant:</source> <target>Select variant:</target> -<source><Automatic></source> -<target><Automatic></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</target> -<source>Mirror ->></source> -<target>Mirror ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronisation.</target> -<source>Update -></source> -<target>Update -></target> - <source>Copy new or updated files to right folder.</source> <target>Copy new or updated files to right folder.</target> -<source>Custom</source> -<target>Custom</target> - <source>Configure your own synchronization rules.</source> <target>Configure your own synchronisation rules.</target> @@ -658,9 +664,6 @@ Files are found equal if are the same </target> -<source>File time and size</source> -<target>File time and size</target> - <source> Files are found equal if - file content @@ -672,9 +675,6 @@ Files are found equal if is the same </target> -<source>File content</source> -<target>File content</target> - <source>Symbolic Link handling</source> <target>Symbolic Link handling</target> @@ -690,32 +690,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>Source code written in C++ utilising:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Big thanks for localising FreeFileSync goes out to:</target> +<source>Feedback and suggestions are welcome</source> +<target>Feedback and suggestions are welcome</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Feedback and suggestions are welcome at:</target> +<source>Homepage</source> +<target>Homepage</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync at Sourceforge</target> -<source>Homepage</source> -<target>Homepage</target> +<source>Email</source> +<target>E-mail</target> -<source>If you like FFS</source> -<target>If you like FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Big thanks for localising FreeFileSync goes out to:</target> + +<source>If you like FreeFileSync</source> +<target>If you like FreeFileSync</target> <source>Donate with PayPal</source> <target>Donate with PayPal</target> -<source>Email</source> -<target>E-mail</target> - -<source>Report translation error</source> -<target>Report translation error</target> - -<source>Published under the GNU General Public License:</source> -<target>Published under the GNU General Public Licence:</target> +<source>Published under the GNU General Public License</source> +<target>Published under the GNU General Public Licence</target> <source>Ignore subsequent errors</source> <target>Ignore subsequent errors</target> @@ -864,6 +861,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>Folder pairs</target> +<source>Compressed view</source> +<target>Compressed view</target> + <source>Select view</source> <target>Select view</target> @@ -882,20 +882,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><multiple selection></target> -<source>D-Click</source> -<target>D-Click</target> - <source>Delete</source> <target>Delete</target> -<source>Customize...</source> -<target>Customise...</target> - -<source>Select time span...</source> -<target>Select time span...</target> +<source>Include all</source> +<target>Include all</target> -<source>Auto-adjust columns</source> -<target>Auto-adjust columns</target> +<source>Exclude all</source> +<target>Exclude all</target> <source>Icon size:</source> <target>Icon size:</target> @@ -909,14 +903,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>Large</target> -<source>Include all rows</source> -<target>Include all rows</target> - -<source>Exclude all rows</source> -<target>Exclude all rows</target> +<source>Select time span...</source> +<target>Select time span...</target> -<source>Reset view</source> -<target>Reset view</target> +<source>Default view</source> +<target>Default view</target> <source>Show "%x"</source> <target>Show "%x"</target> @@ -1197,6 +1188,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Move files into a time-stamped subdirectory</target> +<source>Files</source> +<target>Files</target> + +<source>Percentage</source> +<target>Percentage</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1323,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Directories are dependent! Be careful when setting up synchronisation rules:</target> +<source>Preparing synchronization...</source> +<target>Preparing synchronisation...</target> + <source>Memory allocation failed!</source> <target>Memory allocation failed!</target> @@ -1443,8 +1443,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Target directory name must not be empty!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>User-defined directory for deletion was not specified!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Directory for file versioning was not supplied!</target> <source>Source directory does not exist anymore:</source> <target>Source directory does not exist anymore:</target> 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 @@ <pluralform>%x tavua</pluralform> </target> -<source><Symlink></source> -<target><Pikakuvake></target> - -<source><Directory></source> -<target><Hakemisto></target> - -<source>Size</source> -<target>Koko</target> - -<source>Date</source> -<target>Päiväys</target> - -<source>Full path</source> -<target>Koko polku</target> - -<source>Filename</source> -<target>Tiedostonimi</target> - -<source>Relative path</source> -<target>Suhteellinen polku</target> - -<source>Directory</source> -<target>Hakemisto</target> - -<source>Extension</source> -<target>Laajennus</target> - -<source>Comparison Result</source> -<target>Vertailun tulos</target> - <source>Initial synchronization:</source> <target>Ensi täsmäytys:</target> @@ -354,6 +324,24 @@ Komento suoritetaan kun: <source>Logging</source> <target>Kirjaa</target> +<source>File time and size</source> +<target>Tiedoston aika ja koko</target> + +<source>File content</source> +<target>Tiedoston sisältö</target> + +<source><Automatic></source> +<target><- Automaattinen -></target> + +<source>Mirror ->></source> +<target>Peilaava ->></target> + +<source>Update -></source> +<target>Päivittävä -></target> + +<source>Custom</source> +<target>Oma määritelmä</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync eräajotiedosto</target> @@ -411,6 +399,36 @@ Komento suoritetaan kun: <source>(Requires an Internet connection!)</source> <target>(Vaatii Internet-yhteyden!)</target> +<source><Symlink></source> +<target><Pikakuvake></target> + +<source><Directory></source> +<target><Hakemisto></target> + +<source>Full path</source> +<target>Koko polku</target> + +<source>Name</source> +<target></target> + +<source>Relative path</source> +<target>Suhteellinen polku</target> + +<source>Directory</source> +<target>Hakemisto</target> + +<source>Size</source> +<target>Koko</target> + +<source>Date</source> +<target>Päiväys</target> + +<source>Extension</source> +<target>Laajennus</target> + +<source>Comparison Result</source> +<target>Vertailun tulos</target> + <source>Drag && drop</source> <target>Vedä ja pudota</target> @@ -582,27 +600,15 @@ Komento suoritetaan kun: <source>Select variant:</source> <target>Valitse vaihtoehto:</target> -<source><Automatic></source> -<target><- Automaattinen -></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Tunnista ja monista muutokset tietokannalla molemmille puolille. Poisto/Poikkeama/Uudelleen nimeäminan tunnistetaan automaattisesti.</target> -<source>Mirror ->></source> -<target>Peilaava ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Peilaava varmuuskopio. Oikeanpuoleinen hakemisto muutetaan täsmäytyksessä vastaamaan tarkasti vasenta.</target> -<source>Update -></source> -<target>Päivittävä -></target> - <source>Copy new or updated files to right folder.</source> <target>Kopioidaan uudet tai muuttuneet tiedostot oikeaan hakemistoon.</target> -<source>Custom</source> -<target>Oma määritelmä</target> - <source>Configure your own synchronization rules.</source> <target>Määrittele oma täsmäyssääntö.</target> @@ -658,9 +664,6 @@ Tiedostot samat jos ovat samat </target> -<source>File time and size</source> -<target>Tiedoston aika ja koko</target> - <source> Files are found equal if - file content @@ -672,9 +675,6 @@ Tiedostot samat jos, on sama </target> -<source>File content</source> -<target>Tiedoston sisältö</target> - <source>Symbolic Link handling</source> <target>Pikakuvakkeiden hallinta</target> @@ -690,32 +690,29 @@ on sama <source>Source code written in C++ utilizing:</source> <target>Koodikieli on C++ käyttäen:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Suuret kiitokset FreeFileSync:n kääntämisestä:</target> +<source>Feedback and suggestions are welcome</source> +<target></target> -<source>Feedback and suggestions are welcome at:</source> -<target>Palaute ja ehdotukset saa lähettää:</target> +<source>Homepage</source> +<target>Kotisivu</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync Sourceforge:lla</target> -<source>Homepage</source> -<target>Kotisivu</target> +<source>Email</source> +<target>S-posti</target> + +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Suuret kiitokset FreeFileSync:n kääntämisestä:</target> -<source>If you like FFS</source> -<target>Jos pidät FFS:tä</target> +<source>If you like FreeFileSync</source> +<target>Jos pidät FreeFileSync:tä</target> <source>Donate with PayPal</source> <target>Lahjoita PayPal:lla</target> -<source>Email</source> -<target>S-posti</target> - -<source>Report translation error</source> -<target>Ilmoita käännösvirheestä</target> - -<source>Published under the GNU General Public License:</source> -<target>Julkaistu lisenssillä GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>Julkaistu lisenssillä GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Jätä toistuvia virheitä huomiotta</target> @@ -864,6 +861,9 @@ Sulje pois: \stuff\temp\* <source>Folder pairs</source> <target>Hakemistoparit</target> +<source>Compressed view</source> +<target></target> + <source>Select view</source> <target>Valitse näkymä</target> @@ -882,20 +882,14 @@ Sulje pois: \stuff\temp\* <source><multiple selection></source> <target><monivalinta></target> -<source>D-Click</source> -<target>2*Klikkaa</target> - <source>Delete</source> <target>Poista</target> -<source>Customize...</source> -<target>Sovita...</target> - -<source>Select time span...</source> -<target>Valitse aikajana...</target> +<source>Include all</source> +<target></target> -<source>Auto-adjust columns</source> -<target>Säädä sarakeleveys automaattisesti</target> +<source>Exclude all</source> +<target></target> <source>Icon size:</source> <target>Koko, kuvake:</target> @@ -909,14 +903,11 @@ Sulje pois: \stuff\temp\* <source>Large</source> <target>Iso</target> -<source>Include all rows</source> -<target>Sisällytä kaikki rivit</target> - -<source>Exclude all rows</source> -<target>Sulje pois, kaikki rivit</target> +<source>Select time span...</source> +<target>Valitse aikajana...</target> -<source>Reset view</source> -<target>Palauta näkymä</target> +<source>Default view</source> +<target></target> <source>Show "%x"</source> <target>Näytä "%x"</target> @@ -1197,6 +1188,12 @@ Sulje pois: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Siirrä tiedostot aikaleimattuun hakemistoon</target> +<source>Files</source> +<target></target> + +<source>Percentage</source> +<target></target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1323,9 @@ Sulje pois: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Hakemistot riippuvuussuhteessa! Aseta täsmäyssääntöjä varovasti:</target> +<source>Preparing synchronization...</source> +<target></target> + <source>Memory allocation failed!</source> <target>Muistin varaus epäonnistui!</target> @@ -1443,8 +1443,8 @@ Sulje pois: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Kohdehakemisto ei saa olla tyhjä!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Poistolle ei ole valittu hakemistoa!</target> +<source>Directory for file versioning was not supplied!</source> +<target></target> <source>Source directory does not exist anymore:</source> <target>Lähdehakemisto puuttuu:</target> 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 @@ <target>Supprimer les paramètres de rechange</target> <source>Clear filter settings</source> -<target>Effecer la configuration du filtrage</target> +<target>Effacer la configuration du filtrage</target> <source>Create a batch job</source> <target>Créer un traitement batch</target> @@ -80,7 +80,7 @@ <target>Chercher</target> <source>Select time span</source> -<target>choisir un intervalle de temps</target> +<target>Choisir un intervalle de temps</target> <source>Show pop-up</source> <target>Montrer les boîtes de dialogue</target> @@ -113,10 +113,10 @@ <target>Ligne de commande incorrecte : %x</target> <source>Windows Error Code %x:</source> -<target>Code erreur Windows %x:</target> +<target>Code erreur Windows %x :</target> <source>Linux Error Code %x:</source> -<target>Code erreur Linux %x:</target> +<target>Code erreur Linux %x :</target> <source>Error resolving symbolic link:</source> <target>Erreur lors de la résolution du lien symbolique :</target> @@ -139,36 +139,6 @@ <pluralform>%x octets</pluralform> </target> -<source><Symlink></source> -<target><Lien_symbolique></target> - -<source><Directory></source> -<target><Répertoire></target> - -<source>Size</source> -<target>Taille</target> - -<source>Date</source> -<target>Date</target> - -<source>Full path</source> -<target>Chemin complet</target> - -<source>Filename</source> -<target>Nom du fichier</target> - -<source>Relative path</source> -<target>Chemin relatif</target> - -<source>Directory</source> -<target>Répertoire</target> - -<source>Extension</source> -<target>Extension</target> - -<source>Comparison Result</source> -<target>Résultat de la comparaison</target> - <source>Initial synchronization:</source> <target>Première synchronisation :</target> @@ -354,6 +324,24 @@ La ligne de commande est exécutée chaque fois que : <source>Logging</source> <target>Connexion</target> +<source>File time and size</source> +<target>Date et heure de modification du fichier</target> + +<source>File content</source> +<target>Contenu du fichier</target> + +<source><Automatic></source> +<target><Automatique></target> + +<source>Mirror ->></source> +<target>Miroir ->></target> + +<source>Update -></source> +<target>Mise à Jour -></target> + +<source>Custom</source> +<target>Personnaliser</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync fichier de commandes</target> @@ -411,23 +399,53 @@ La ligne de commande est exécutée chaque fois que : <source>(Requires an Internet connection!)</source> <target>(Nécessite une connexion Internet)</target> +<source><Symlink></source> +<target><Lien_symbolique></target> + +<source><Directory></source> +<target><Répertoire></target> + +<source>Full path</source> +<target>Chemin complet</target> + +<source>Name</source> +<target>Nom</target> + +<source>Relative path</source> +<target>Chemin relatif</target> + +<source>Directory</source> +<target>Répertoire</target> + +<source>Size</source> +<target>Taille</target> + +<source>Date</source> +<target>Date</target> + +<source>Extension</source> +<target>Extension</target> + +<source>Comparison Result</source> +<target>Résultat de la comparaison</target> + <source>Drag && drop</source> <target>Glisser && Déposer</target> <source>Close progress dialog</source> -<target></target> +<target>Fermer la fenêtre de progression</target> <source>Shut down</source> -<target></target> +<target>Arrêter</target> <source>Log off</source> -<target></target> +<target>Quitter</target> <source>Standby</source> -<target></target> +<target>Pause</target> <source>Hibernate</source> -<target></target> +<target>Figer</target> <source>1. &Compare</source> <target>1. &Comparer</target> @@ -435,9 +453,6 @@ La ligne de commande est exécutée chaque fois que : <source>2. &Synchronize...</source> <target>2. &Synchroniser...</target> -<source>S&witch view</source> -<target>Changer de &vue</target> - <source>&New</source> <target>&Nouveau</target> @@ -556,7 +571,7 @@ La ligne de commande est exécutée chaque fois que : <target>Retour d'informations</target> <source>Show progress dialog</source> -<target></target> +<target>Montrer la fenêtre de prograssion</target> <source>Error handling</source> <target>Erreur de gestion de fichiers</target> @@ -582,27 +597,15 @@ La ligne de commande est exécutée chaque fois que : <source>Select variant:</source> <target>Choisissez une variante :</target> -<source><Automatic></source> -<target><Automatique></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> -<target></target> - -<source>Mirror ->></source> -<target>Miroir ->></target> +<target>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.</target> <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Copie miroir du dossier de gauche. Le dossier de droite est modifié pour être strictement identique après la synchronisation.</target> -<source>Update -></source> -<target>Mise à Jour -></target> - <source>Copy new or updated files to right folder.</source> <target>Copie les fichiers nouveaux ou modifiés dans le dossier de droite.</target> -<source>Custom</source> -<target>Personnaliser</target> - <source>Configure your own synchronization rules.</source> <target>Paramétrage de vos règles de synchronisation.</target> @@ -610,7 +613,7 @@ La ligne de commande est exécutée chaque fois que : <target>Gestion des suppressions</target> <source>On completion:</source> -<target></target> +<target>A la fin :</target> <source>Configuration</source> <target>Configuration</target> @@ -658,9 +661,6 @@ Les fichiers sont considérés comme identiques si sont les mêmes </target> -<source>File time and size</source> -<target>Date et heure de modification du fichier</target> - <source> Files are found equal if - file content @@ -672,9 +672,6 @@ Les fichiers sont considérés comme identiques si est identique </target> -<source>File content</source> -<target>Contenu du fichier</target> - <source>Symbolic Link handling</source> <target>Gestion des Liens Symboliques</target> @@ -690,32 +687,29 @@ est identique <source>Source code written in C++ utilizing:</source> <target>Code source écrit en C++ utilisant :</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Pour les traductions de FreeFileSync, un grand merci à :</target> +<source>Feedback and suggestions are welcome</source> +<target>Vos commentaires et vos suggestions sont les bienvenus</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Commentaires et suggestions sont les bienvenus à :</target> +<source>Homepage</source> +<target>Accueil</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync par Sourceforge</target> -<source>Homepage</source> -<target>Accueil</target> +<source>Email</source> +<target>Email</target> + +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Pour les traductions de FreeFileSync, un grand merci à :</target> -<source>If you like FFS</source> -<target>Si vous aimez FFS</target> +<source>If you like FreeFileSync</source> +<target>Si vous aimez FreeFileSync</target> <source>Donate with PayPal</source> <target>Faites un don avec PayPal</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>Etat des erreurs de transfert</target> - -<source>Published under the GNU General Public License:</source> -<target>Publié sous licence GNU General Public License :</target> +<source>Published under the GNU General Public License</source> +<target>Publié sous licence GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Ignorer les erreurs ultérieures</target> @@ -811,7 +805,7 @@ Exclude: \stuff\temp\* <target>Copie de fichiers transactionnelle</target> <source>Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error.</source> -<target></target> +<target>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.</target> <source>Copy locked files</source> <target>Copier les fichiers verrouillés</target> @@ -864,6 +858,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>Paires de dossiers</target> +<source>Compressed view</source> +<target>Vue compressé</target> + <source>Select view</source> <target>Choisissez une vue</target> @@ -882,41 +879,32 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><sélection multiple></target> -<source>D-Click</source> -<target>Clic Droit</target> - <source>Delete</source> <target>Supprimer</target> -<source>Customize...</source> -<target>Personnaliser...</target> +<source>Include all</source> +<target>Inclure tout</target> -<source>Select time span...</source> -<target>choisir un intervalle de temps...</target> - -<source>Auto-adjust columns</source> -<target>Auto-ajustement des colonnes</target> +<source>Exclude all</source> +<target>Exclure tout</target> <source>Icon size:</source> -<target></target> +<target>Taille des icônes :</target> <source>Small</source> -<target></target> +<target>Petit</target> <source>Medium</source> -<target></target> +<target>Moyen</target> <source>Large</source> -<target></target> - -<source>Include all rows</source> -<target>Inclure toutes les lignes</target> +<target>Grand</target> -<source>Exclude all rows</source> -<target>Exclure toutes les lignes</target> +<source>Select time span...</source> +<target>choisir un intervalle de temps...</target> -<source>Reset view</source> -<target>Réinitialiser la vue</target> +<source>Default view</source> +<target>Vue par défaut</target> <source>Show "%x"</source> <target>Afficher "%x"</target> @@ -1197,6 +1185,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Déplacer les fichiers vers un sous-répertoire daté</target> +<source>Files</source> +<target>Fichiers</target> + +<source>Percentage</source> +<target>Pourcentage</target> + <source>%x TB</source> <target>%x To</target> @@ -1326,6 +1320,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Les répertoires sont imbriqués ! Attention à la mise à jour des règles de synchronisation :</target> +<source>Preparing synchronization...</source> +<target>Synchronisation en cours de préparation ...</target> + <source>Memory allocation failed!</source> <target>Erreur d'allocation de mémoire!</target> @@ -1369,10 +1366,10 @@ Exclude: \stuff\temp\* <target>Supprimer les fichiers/dossiers de droite</target> <source>Move file on left</source> -<target></target> +<target>Déplacer les fichiers à gauche</target> <source>Move file on right</source> -<target></target> +<target>Déplacer les fichiers à droite</target> <source>Overwrite left file/folder with right one</source> <target>Remplacer le fichier/dossier de gauche avec celui de droite</target> @@ -1443,8 +1440,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Le répertoire destination ne doit pas être vide !</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Le répertoire défini par l'utilisateur pour la suppression n'a pas été indiqué !</target> +<source>Directory for file versioning was not supplied!</source> +<target>Le répertoire des versions de fichiers n'a pas été indiqué !</target> <source>Source directory does not exist anymore:</source> <target>Le répertoire source n'existe plus :</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Symlink></target> - -<source><Directory></source> -<target><Verzeichnis></target> - -<source>Size</source> -<target>Größe</target> - -<source>Date</source> -<target>Datum</target> - -<source>Full path</source> -<target>Absoluter Pfad</target> - -<source>Filename</source> -<target>Dateiname</target> - -<source>Relative path</source> -<target>Relativer Pfad</target> - -<source>Directory</source> -<target>Verzeichnis</target> - -<source>Extension</source> -<target>Dateiendung</target> - -<source>Comparison Result</source> -<target>Ergebnis des Vergleichs</target> - <source>Initial synchronization:</source> <target>Erstmalige Synchronisation:</target> @@ -354,6 +324,24 @@ Die Befehlszeile wird ausgeführt wenn: <source>Logging</source> <target>Protokoll</target> +<source>File time and size</source> +<target>Datum und Größe</target> + +<source>File content</source> +<target>Dateiinhalt</target> + +<source><Automatic></source> +<target><Automatik></target> + +<source>Mirror ->></source> +<target>Spiegeln ->></target> + +<source>Update -></source> +<target>Aktualisieren -></target> + +<source>Custom</source> +<target>Eigene</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync Batchdatei</target> @@ -391,7 +379,7 @@ Die Befehlszeile wird ausgeführt wenn: <target>Wechsle in die graphische Ansicht...</target> <source>Unable to connect to sourceforge.net!</source> -<target>Es konnte keine Verbindung zu sourceforge.net aufgebaut werden!</target> +<target>Es konnte keine Verbindung zu Sourceforge.net aufgebaut werden!</target> <source>A newer version of FreeFileSync is available:</source> <target>Eine neuere Version von FreeFileSync ist verfügbar:</target> @@ -411,6 +399,36 @@ Die Befehlszeile wird ausgeführt wenn: <source>(Requires an Internet connection!)</source> <target>(Eine Internetverbindung wird benötigt!)</target> +<source><Symlink></source> +<target><Symlink></target> + +<source><Directory></source> +<target><Verzeichnis></target> + +<source>Full path</source> +<target>Absoluter Pfad</target> + +<source>Name</source> +<target>Name</target> + +<source>Relative path</source> +<target>Relativer Pfad</target> + +<source>Directory</source> +<target>Verzeichnis</target> + +<source>Size</source> +<target>Größe</target> + +<source>Date</source> +<target>Datum</target> + +<source>Extension</source> +<target>Dateiendung</target> + +<source>Comparison Result</source> +<target>Ergebnis des Vergleichs</target> + <source>Drag && drop</source> <target>Drag && Drop</target> @@ -582,27 +600,15 @@ Die Befehlszeile wird ausgeführt wenn: <source>Select variant:</source> <target>Variante auswählen:</target> -<source><Automatic></source> -<target><Automatik></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identifiziere und propagiere Änderungen auf beiden Seiten mit Hilfe einer Datenbank. Löschungen, Umbenennungen und Konflikte werden automatisch erkannt.</target> -<source>Mirror ->></source> -<target>Spiegeln ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Spiegelkopie des linken Verzeichnisses erstellen. Das rechte Verzeichnis wird dem linken exakt angeglichen.</target> -<source>Update -></source> -<target>Aktualisieren -></target> - <source>Copy new or updated files to right folder.</source> <target>Neue oder aktualisierte Dateien vom linken in das rechte Verzeichnis kopieren.</target> -<source>Custom</source> -<target>Eigene</target> - <source>Configure your own synchronization rules.</source> <target>Eigene Synchronisationsregeln definieren.</target> @@ -658,9 +664,6 @@ Dateien gelten als gleich, wenn gleich sind </target> -<source>File time and size</source> -<target>Dateizeit und -größe</target> - <source> Files are found equal if - file content @@ -672,9 +675,6 @@ Dateien gelten als gleich, wenn gleich ist </target> -<source>File content</source> -<target>Dateiinhalt</target> - <source>Symbolic Link handling</source> <target>Behandlung Symbolischer Links</target> @@ -690,32 +690,29 @@ gleich ist <source>Source code written in C++ utilizing:</source> <target>Sourcecode in C++ geschrieben mit Hilfe von:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Vielen Dank für die Lokalisation von FreeFileSync an:</target> +<source>Feedback and suggestions are welcome</source> +<target>Feedback und Vorschläge sind willkommen</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Feedback und Vorschläge sind willkommen unter:</target> +<source>Homepage</source> +<target>Homepage</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync auf Sourceforge</target> -<source>Homepage</source> -<target>Homepage</target> +<source>Email</source> +<target>Email</target> -<source>If you like FFS</source> -<target>FFS unterstützen</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Vielen Dank für die Lokalisation von FreeFileSync an:</target> + +<source>If you like FreeFileSync</source> +<target>Wenn Sie FreeFileSync mögen</target> <source>Donate with PayPal</source> <target>Mit PayPal spenden</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>Ãœbersetzungsfehler melden</target> - -<source>Published under the GNU General Public License:</source> -<target>Veröffentlicht unter der GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>Veröffentlicht unter der Allgemeinen Öffentlichen GNU-Lizenz</target> <source>Ignore subsequent errors</source> <target>Nachfolgende Fehler ignorieren</target> @@ -808,10 +805,10 @@ Ausschließen: \stuff\temp\* <target>Spalte nach unten verschieben</target> <source>Transactional file copy</source> -<target>Kopiere Dateien als Transaktion</target> +<target>Dateien als Transaktion kopieren</target> <source>Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error.</source> -<target>Dateien zuerst temporär schreiben (*.ffs_tmp), anschließend umbenennen. Dadurch wird ein konsistenter Status auch im größten Fehlerfall sichergestellt.</target> +<target>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.</target> <source>Copy locked files</source> <target>Gesperrte Dateien kopieren</target> @@ -864,6 +861,9 @@ Ausschließen: \stuff\temp\* <source>Folder pairs</source> <target>Verzeichnispaare</target> +<source>Compressed view</source> +<target>Komprimierte Ansicht</target> + <source>Select view</source> <target>Ansicht auswählen</target> @@ -882,20 +882,14 @@ Ausschließen: \stuff\temp\* <source><multiple selection></source> <target><Mehrfachauswahl></target> -<source>D-Click</source> -<target>D-Klick</target> - <source>Delete</source> <target>Löschen</target> -<source>Customize...</source> -<target>Anpassen...</target> - -<source>Select time span...</source> -<target>Zeitspanne auswählen...</target> +<source>Include all</source> +<target>Alle einschließen</target> -<source>Auto-adjust columns</source> -<target>Spalten automatisch ausrichten</target> +<source>Exclude all</source> +<target>Alle ausschließen</target> <source>Icon size:</source> <target>Symbolgröße</target> @@ -909,14 +903,11 @@ Ausschließen: \stuff\temp\* <source>Large</source> <target>Groß</target> -<source>Include all rows</source> -<target>Alle Zeilen einschließen</target> - -<source>Exclude all rows</source> -<target>Alle Zeilen ausschließen</target> +<source>Select time span...</source> +<target>Zeitspanne auswählen...</target> -<source>Reset view</source> -<target>Ansicht zurücksetzen</target> +<source>Default view</source> +<target>Standardansicht</target> <source>Show "%x"</source> <target>Zeige "%x"</target> @@ -1027,7 +1018,7 @@ Ausschließen: \stuff\temp\* <target>Vor der Synchronisation bitte zuerst einen Vergleich ausführen!</target> <source>Comma separated list</source> -<target>Kommagetrennte Liste</target> +<target>Durch Komma getrennte Liste</target> <source>Legend</source> <target>Legende</target> @@ -1073,8 +1064,8 @@ Ausschließen: \stuff\temp\* <pluralform>%x of %y rows in view</pluralform> </source> <target> -<pluralform>%x von 1 Zeile zur Ansicht</pluralform> -<pluralform>%x von %y Zeilen zur Ansicht</pluralform> +<pluralform>Zeige %x von 1 Zeile</pluralform> +<pluralform>Zeige %x von %y Zeilen</pluralform> </target> <source>Scanning...</source> @@ -1197,6 +1188,12 @@ Ausschließen: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Verschiebe Dateien in ein Unterverzeichnis mit Zeitstempel</target> +<source>Files</source> +<target>Dateien</target> + +<source>Percentage</source> +<target>Prozent</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1323,9 @@ Ausschließen: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Die Verzeichnisse sind voneinander abhängig! Achtung beim Festlegen der Synchronisationseinstellungen:</target> +<source>Preparing synchronization...</source> +<target>Bereite Synchronisation vor...</target> + <source>Memory allocation failed!</source> <target>Speicherallokation fehlgeschlagen!</target> @@ -1443,8 +1443,8 @@ Ausschließen: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Der Zielverzeichnisname darf nicht leer sein!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Kein benutzerdefiniertes Verzeichnis zum Löschen angegeben!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Das Verzeichnis für die Versionierung wurde nicht angegeben!</target> <source>Source directory does not exist anymore:</source> <target>Quellverzeichnis existiert nicht mehr:</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Συμβολικός δεσμός></target> - -<source><Directory></source> -<target><Υποκατάλογος></target> - -<source>Size</source> -<target>ÎœÎγεθος</target> - -<source>Date</source> -<target>ΗμεÏομηνία</target> - -<source>Full path</source> -<target>ΠλήÏης διαδÏομή</target> - -<source>Filename</source> -<target>Όνομα αÏχείου</target> - -<source>Relative path</source> -<target>Σχετική διαδÏομή</target> - -<source>Directory</source> -<target>Υποκατάλογος</target> - -<source>Extension</source> -<target>ΕπÎκταση</target> - -<source>Comparison Result</source> -<target>ΑποτÎλεσμα της σÏγκÏισης</target> - <source>Initial synchronization:</source> <target>ΑÏχικός συγχÏονισμός:</target> @@ -354,6 +324,24 @@ The command line is executed each time: <source>Logging</source> <target>ΚαταγÏαφή μηνυμάτων</target> +<source>File time and size</source> +<target>ΗμεÏομηνία και μÎγεθος αÏχείων</target> + +<source>File content</source> +<target>ΠεÏιεχόμενο αÏχείων</target> + +<source><Automatic></source> +<target><Αυτόματα></target> + +<source>Mirror ->></source> +<target>ΚατοπτÏισμός ->></target> + +<source>Update -></source> +<target>ΕνημÎÏωση -></target> + +<source>Custom</source> +<target>Εξατομίκευση</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync αÏχείο δÎσμης</target> @@ -411,6 +399,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(Απαιτεί σÏνδεση με το Internet)</target> +<source><Symlink></source> +<target><Συμβολικός δεσμός></target> + +<source><Directory></source> +<target><Υποκατάλογος></target> + +<source>Full path</source> +<target>ΠλήÏης διαδÏομή</target> + +<source>Name</source> +<target>Όνομα</target> + +<source>Relative path</source> +<target>Σχετική διαδÏομή</target> + +<source>Directory</source> +<target>Υποκατάλογος</target> + +<source>Size</source> +<target>ÎœÎγεθος</target> + +<source>Date</source> +<target>ΗμεÏομηνία</target> + +<source>Extension</source> +<target>ΕπÎκταση</target> + +<source>Comparison Result</source> +<target>ΑποτÎλεσμα της σÏγκÏισης</target> + <source>Drag && drop</source> <target>ΜεταφοÏά && Απόθεση</target> @@ -435,9 +453,6 @@ The command line is executed each time: <source>2. &Synchronize...</source> <target>2. &ΣυγχÏονισμός...</target> -<source>S&witch view</source> -<target>Α&λλαγή εμφάνισης</target> - <source>&New</source> <target>&ΔημιουÏγία</target> @@ -582,27 +597,15 @@ The command line is executed each time: <source>Select variant:</source> <target>ΕπιλÎξτε μια μÎθοδο:</target> -<source><Automatic></source> -<target><Αυτόματα></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>ΑναγνώÏιση και αναπαÏαγωγή των αλλαγών και στις δÏο πλευÏÎÏ‚ με τη χÏήση μιας βάσης δεδομÎνων. ΔιαγÏαφÎÏ‚, μετονομασίες και διενÎξεις ανιχνεÏονται αυτόματα.</target> -<source>Mirror ->></source> -<target>ΚατοπτÏισμός ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>ΚατοπτÏικό αντίγÏαφο του αÏιστεÏÎ¿Ï Ï…Ï€Î¿ÎºÎ±Ï„Î±Î»ÏŒÎ³Î¿Ï…. Ο υποκατάλογος δεξιά θα Ï„Ïοποποιηθεί και θα αντιστοιχεί εξολοκλήÏου στον αÏιστεÏÏŒ μετά το συγχÏονισμό</target> -<source>Update -></source> -<target>ΕνημÎÏωση -></target> - <source>Copy new or updated files to right folder.</source> <target>ΑντιγÏαφή των νÎων ή πιο Ï€Ïόσφατων αÏχείων στον υποκατάλογο δεξιά.</target> -<source>Custom</source> -<target>Εξατομίκευση</target> - <source>Configure your own synchronization rules.</source> <target>ΟÏίστε τους δικοÏÏ‚ σας κανόνες συγχÏονισμοÏ.</target> @@ -658,9 +661,6 @@ are the same είναι ίδια </target> -<source>File time and size</source> -<target>ΗμεÏομηνία και μÎγεθος αÏχείων</target> - <source> Files are found equal if - file content @@ -672,9 +672,6 @@ is the same είναι ίδιο </target> -<source>File content</source> -<target>ΠεÏιεχόμενο αÏχείων</target> - <source>Symbolic Link handling</source> <target>ΤÏόπος διαχείÏισης των συμβολικών δεσμών</target> @@ -690,32 +687,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>Ο πηγαίος κώδικας γÏάφτηκε σε C++ χÏησιμοποιώντας τα:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Για τις μεταφÏάσεις του FreeFileSync, ευχαÏιστοÏμε τους:</target> +<source>Feedback and suggestions are welcome</source> +<target>Τα σχόλια και οι Ï€Ïοτάσεις σας είναι ευπÏόσδεκτα</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Σχόλια και Ï€Ïοτάσεις είναι ευπÏόσδεκτα στα:</target> +<source>Homepage</source> +<target>Ιστοσελίδα</target> <source>FreeFileSync at Sourceforge</source> <target>Το FreeFileSync στο Sourceforge</target> -<source>Homepage</source> -<target>Ιστοσελίδα</target> +<source>Email</source> +<target>Email</target> -<source>If you like FFS</source> -<target>Αν σας αÏÎσει το FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Για τις μεταφÏάσεις του FreeFileSync, ευχαÏιστοÏμε τους:</target> + +<source>If you like FreeFileSync</source> +<target>Αν σας αÏÎσει το FreeFileSync</target> <source>Donate with PayPal</source> <target>Κάντε μια δωÏεά μÎσω PayPal</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>ΑναφÎÏετε λάθη μετάφÏασης</target> - -<source>Published under the GNU General Public License:</source> -<target>ΔιανÎμεται υπό την Γενική Άδεια Δημόσιας ΧÏήσης GNU:</target> +<source>Published under the GNU General Public License</source> +<target>ΔιανÎμεται υπό την Γενική Άδεια Δημόσιας ΧÏήσης GNU</target> <source>Ignore subsequent errors</source> <target>ΠαÏάβλεψη των επόμενων σφαλμάτων</target> @@ -864,6 +858,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>ΖεÏγη υποκαταλόγων</target> +<source>Compressed view</source> +<target>ΣυμπιεσμÎνη εμφάνιση</target> + <source>Select view</source> <target>Επιλογή εμφάνισης</target> @@ -882,20 +879,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><πολλαπλή επιλογή></target> -<source>D-Click</source> -<target>Διπλό κλικ</target> - <source>Delete</source> <target>ΔιαγÏαφή</target> -<source>Customize...</source> -<target>Î ÏοσαÏμογή...</target> - -<source>Select time span...</source> -<target>ΕπιλÎξτε το χÏονικό εÏÏος...</target> +<source>Include all</source> +<target>ΣυμπεÏίληψη όλων</target> -<source>Auto-adjust columns</source> -<target>Αυτόματη Ï€ÏοσαÏμογή των στηλών</target> +<source>Exclude all</source> +<target>ΕξαίÏεση όλων</target> <source>Icon size:</source> <target>ÎœÎγεθος εικονιδίων:</target> @@ -909,14 +900,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>Μεγάλο</target> -<source>Include all rows</source> -<target>ΣυμπεÏίληψη όλων των γÏαμμών</target> - -<source>Exclude all rows</source> -<target>ΕξαίÏεση όλων των γÏαμμών</target> +<source>Select time span...</source> +<target>ΕπιλÎξτε το χÏονικό εÏÏος...</target> -<source>Reset view</source> -<target>ΕπαναφοÏά αÏχικής εμφάνισης</target> +<source>Default view</source> +<target>Î ÏοεπιλεγμÎνη εμφάνιση</target> <source>Show "%x"</source> <target>Εμφάνιση της γÏαμμής "%x"</target> @@ -1197,6 +1185,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>ΜεταφοÏά των αÏχείων σε Îναν υποκατάλογο με Îνδειξη ÏŽÏας</target> +<source>Files</source> +<target>ΑÏχεία</target> + +<source>Percentage</source> +<target>Ποσοστό</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1320,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Οι υποκατάλογοι είναι εξαÏτώμενοι. Î Ïοσοχή κατά την εισαγωγή των κανόνων συγχÏονισμοÏ:</target> +<source>Preparing synchronization...</source> +<target>Î Ïοετοιμασία του συγχÏονισμοÏ...</target> + <source>Memory allocation failed!</source> <target>Η δÎσμευση χώÏου μνήμης απÎτυχε!</target> @@ -1443,8 +1440,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Το όνομα του υποκαταλόγου Ï€ÏοοÏÎ¹ÏƒÎ¼Î¿Ï Ï€ÏÎπει να μην είναι κενό!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Δεν οÏίστηκε από τον χÏήστη υποκατάλογος για τα αÏχεία Ï€Ïος διαγÏαφή!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Δεν Îχει οÏιστεί υποκατάλογος για τη διατήÏηση παλιών εκδόσεων!</target> <source>Source directory does not exist anymore:</source> <target>Ο υποκατάλογος Ï€ÏοÎλευσης δεν υπάÏχει πλÎον:</target> 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 @@ <pluralform>%x בייט</pluralform> </target> -<source><Symlink></source> -<target><קשור סימבולי></target> - -<source><Directory></source> -<target><מחיצה></target> - -<source>Size</source> -<target>גודל</target> - -<source>Date</source> -<target>ת×רין</target> - -<source>Full path</source> -<target>× ×ª×™×‘ מל×</target> - -<source>Filename</source> -<target>×©× ×§×•×‘×¥</target> - -<source>Relative path</source> -<target>× ×ª×™×‘ יחסי</target> - -<source>Directory</source> -<target>מחיצה</target> - -<source>Extension</source> -<target>סיומת</target> - -<source>Comparison Result</source> -<target>תוצ×ות ההשוו××”</target> - <source>Initial synchronization:</source> <target>×¡× ×›×¨×•×Ÿ ר××©×•× ×™:</target> @@ -354,6 +324,24 @@ The command line is executed each time: <source>Logging</source> <target>×¨×™×©×•× ×‘×™×•×ž×Ÿ</target> +<source>File time and size</source> +<target>זמן וגודל קובץ</target> + +<source>File content</source> +<target>תכולת הקובץ</target> + +<source><Automatic></source> +<target><×וטומטי></target> + +<source>Mirror ->></source> +<target>מר××” ->></target> + +<source>Update -></source> +<target>שדרג -></target> + +<source>Custom</source> +<target>מות××</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync קובץ ×צווה</target> @@ -411,6 +399,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(מחייב קישור ××™× ×˜×¨× ×˜×™ פעיל!)</target> +<source><Symlink></source> +<target><קשור סימבולי></target> + +<source><Directory></source> +<target><מחיצה></target> + +<source>Full path</source> +<target>× ×ª×™×‘ מל×</target> + +<source>Name</source> +<target>ש×</target> + +<source>Relative path</source> +<target>× ×ª×™×‘ יחסי</target> + +<source>Directory</source> +<target>מחיצה</target> + +<source>Size</source> +<target>גודל</target> + +<source>Date</source> +<target>ת×רין</target> + +<source>Extension</source> +<target>סיומת</target> + +<source>Comparison Result</source> +<target>תוצ×ות ההשוו××”</target> + <source>Drag && drop</source> <target>גרור והשלך</target> @@ -544,10 +562,10 @@ The command line is executed each time: <target>קבצי ×”×ž×¡× ×Ÿ</target> <source>Left</source> -<target>שמ×ל</target> +<target>ימין</target> <source>Right</source> -<target>ימין</target> +<target>שמ×ל</target> <source>Overview</source> <target>מבט כללי</target> @@ -582,26 +600,14 @@ The command line is executed each time: <source>Select variant:</source> <target>בחר ×ž×©×ª× ×”:</target> -<source><Automatic></source> -<target><×וטומטי></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>×–×”×” והפץ ×©×™× ×•×™×™× ×‘×©× ×™ ×”×¦×“×“×™× ×‘×מצעות שימוש בבסיס × ×ª×•× ×™×. מחיקות, ×©×™× ×•×™×™ שמות וסתירות ×ž×ª×’×œ×™× ×‘×ופן ×וטומטי.</target> -<source>Mirror ->></source> -<target><<- מר××”</target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> -<target>גיבוי מר××” של מחיצה שמ×לית. מחיצה ×™×ž× ×™×ª תהיה ×–×”×” לשמ×לית ל×חר ×”×¡×™× ×›×¨×•×Ÿ.</target> - -<source>Update -></source> -<target><- שדרג</target> +<target>גיבוי מר××” של מחיצה ×™×ž× ×™×ª. מחיצה שמ×לית תתעדכן ותהיה ×–×”×” ×œ×™×ž× ×™×ª ל×חר ×”×¡×™× ×›×¨×•×Ÿ.</target> <source>Copy new or updated files to right folder.</source> -<target>העתק ×§×‘×¦×™× ×—×“×©×™× ×ו ×ž×¢×•×“×›× ×™× ×œ×ž×—×™×¦×” ×”×™×ž× ×™×ª.</target> - -<source>Custom</source> -<target>מות××</target> +<target>העתק ×§×‘×¦×™× ×—×“×©×™× ×ו ×ž×¢×•×“×›× ×™× ×œ×ž×—×™×¦×” השמ×לית.</target> <source>Configure your own synchronization rules.</source> <target>סדר ×ת כללי ×”×¡× ×›×¨×•×Ÿ שלך.</target> @@ -622,16 +628,16 @@ The command line is executed each time: <target>פעולה</target> <source>File/folder exists on left side only</source> -<target>קובץ\מחיצה ×§×™×™× ×‘×¦×“ שמ×ל בלבד</target> +<target>קובץ\מחיצה ×§×™×™× ×‘×¦×“ ימין בלבד</target> <source>File/folder exists on right side only</source> -<target>קובץ\מחיצה ×§×™×™× ×‘×¦×“ ימין בלבד</target> +<target>קובץ\מחיצה ×§×™×™× ×‘×¦×“ שמ×ל בלבד</target> <source>Left file is newer</source> -<target>צד שמ×ל חדש יותר</target> +<target>קובץ בצד ימין חדש יותר</target> <source>Right file is newer</source> -<target>צד ימין חדש יותר</target> +<target>צד שמ×ל חדש יותר</target> <source>Files have different content</source> <target>×”×§×‘×¦×™× ×‘×¢×œ×™ תכולה ×©×•× ×”</target> @@ -658,9 +664,6 @@ are the same ×”× ×–×”×™× </target> -<source>File time and size</source> -<target>זמן וגודל קובץ</target> - <source> Files are found equal if - file content @@ -672,9 +675,6 @@ is the same ×”×™× ×–×”×” </target> -<source>File content</source> -<target>תכולת הקובץ</target> - <source>Symbolic Link handling</source> <target>טיפול בקישור סימבולי</target> @@ -690,32 +690,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>קוד מקור × ×›×ª×‘ ב- C++ ב×מצעות:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>תודות עבור עבודות ×”×ª×¨×’×•× ×©×œ ×ª×•×›× ×ª ×”×¡× ×›×¨×•×Ÿ:</target> +<source>Feedback and suggestions are welcome</source> +<target>משוב והצעות יתקבלו בברכה</target> -<source>Feedback and suggestions are welcome at:</source> -<target>תגובות והצעות ותקבלו בברכה:</target> +<source>Homepage</source> +<target>×תר-הבית:</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync ב Sourceforge</target> -<source>Homepage</source> -<target>×תר-הבית:</target> +<source>Email</source> +<target>דו×"ל:</target> + +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>תודות עבור עבודות ×”×ª×¨×’×•× ×©×œ ×ª×•×›× ×ª ×”×¡× ×›×¨×•×Ÿ:</target> -<source>If you like FFS</source> -<target>במידה ו-FFS מוצ×ת חן ×‘×¢×™× ×›×</target> +<source>If you like FreeFileSync</source> +<target>במידה ו-FreeFileSync מוצ×ת חן ×‘×¢×™× ×›×</target> <source>Donate with PayPal</source> <target>×ª×¨×•× ×¢× ×¤×™×™×¤×œ</target> -<source>Email</source> -<target>דו×"ל:</target> - -<source>Report translation error</source> -<target>דווח שגי×ת תרגו×:</target> - -<source>Published under the GNU General Public License:</source> -<target>×ž×¤×•×¨×¡× ×‘×ž×¡×’×¨×ª GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>×ž×¤×•×¨×¡× ×‘×ž×¡×’×¨×ª GNU General Public License</target> <source>Ignore subsequent errors</source> <target>×”×ª×¢×œ× ×ž×©×’×™×ות × ×™×©× ×•×ª</target> @@ -864,6 +861,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>זוגות מחיצות</target> +<source>Compressed view</source> +<target>תצוגה מכווצת</target> + <source>Select view</source> <target>בחר תצוגה</target> @@ -882,20 +882,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><בחירה מרובה></target> -<source>D-Click</source> -<target>לחיצה-כפולה</target> - <source>Delete</source> <target>מחק</target> -<source>Customize...</source> -<target>מות×× ×ישית...</target> +<source>Include all</source> +<target>הכלל הכל</target> -<source>Select time span...</source> -<target>בחר ×ª×—×•× ×–×ž×Ÿ...</target> - -<source>Auto-adjust columns</source> -<target>עימוד ×וטומטי</target> +<source>Exclude all</source> +<target>×”×•×¦× ×ž×Ÿ הכלל הכל</target> <source>Icon size:</source> <target>גודל סמל:</target> @@ -909,14 +903,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>גדול</target> -<source>Include all rows</source> -<target>כלול ×ת כל השורות</target> - -<source>Exclude all rows</source> -<target>×ל תכלול ×ת כל השורות</target> +<source>Select time span...</source> +<target>בחר ×ª×—×•× ×–×ž×Ÿ...</target> -<source>Reset view</source> -<target>×פס תצוגה</target> +<source>Default view</source> +<target>תצוגה בתצורת ברירת מחדל</target> <source>Show "%x"</source> <target>הר××” "%x"</target> @@ -937,28 +928,28 @@ Exclude: \stuff\temp\* <target>×¡× ×›×¨×•×Ÿ ×§×‘×¦×™× ×•×ž×—×™×¦×•×ª</target> <source>Hide files that exist on left side only</source> -<target>הסתר ×§×‘×¦×™× ×”×§×™×ž×™× ×ך ורק בצד שמ×ל</target> +<target>הסתר ×§×‘×¦×™× ×”×§×™×ž×™× ×ך ורק בצד ימין</target> <source>Show files that exist on left side only</source> -<target>הר××” ×§×‘×¦×™× ×”× ×ž×¦××™× ×ך ורק בצד שמ×ל</target> +<target>הר××” ×§×‘×¦×™× ×”× ×ž×¦××™× ×ך ורק בצד ימין</target> <source>Hide files that exist on right side only</source> -<target>הסתר ×§×‘×¦×™× ×”×§×™×ž×™× ×ך ורק בצד ימין</target> +<target>הסתר ×§×‘×¦×™× ×”×§×™×ž×™× ×ך ורק בצד שמ×ל</target> <source>Show files that exist on right side only</source> -<target>הר××” ×§×‘×¦×™× ×”× ×ž×¦××™× ×ך ורק בצד ימין</target> +<target>הר××” ×§×‘×¦×™× ×”× ×ž×¦××™× ×ך ורק בצד שמ×ל</target> <source>Hide files that are newer on left</source> -<target>הסתר ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד שמ×ל</target> +<target>הסתר ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד ימין</target> <source>Show files that are newer on left</source> -<target>הר××” ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד שמ×ל</target> +<target>הר××” ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד ימין</target> <source>Hide files that are newer on right</source> -<target>הסתר ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד ימין</target> +<target>הסתר ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד שמ×ל</target> <source>Show files that are newer on right</source> -<target>הר××” ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד ימין</target> +<target>הר××” ×§×‘×¦×™× ×—×“×©×™× ×™×•×ª×¨ בצד שמ×ל</target> <source>Hide files that are equal</source> <target>הסתר ×§×‘×¦×™× ×©××™× × ×©×•×•×™×</target> @@ -979,40 +970,40 @@ Exclude: \stuff\temp\* <target>הר××” ×§×•× ×¤×œ×™×§×˜×™×</target> <source>Hide files that will be created on the left side</source> -<target>הסתר ×§×‘×¦×™× ×©×™×™×•×¦×¨×• בצד שמ×ל</target> +<target>הסתר ×§×‘×¦×™× ×©×™×™×•×¦×¨×• בצד ימין</target> <source>Show files that will be created on the left side</source> -<target>הר××” ×§×‘×¦×™× ×©×™×•×•×¦×¨×• בצד שמ×ל</target> +<target>הר××” ×§×‘×¦×™× ×©×™×•×•×¦×¨×• בצד ימין</target> <source>Hide files that will be created on the right side</source> -<target>הסתר ×§×‘×¦×™× ×©×™×™×•×¦×¨×• בצד ימין</target> +<target>הסתר ×§×‘×¦×™× ×©×™×™×•×¦×¨×• בצד שמ×ל</target> <source>Show files that will be created on the right side</source> -<target>הר××” ×§×‘×¦×™× ×©×™×•×•×¦×¨×• בצד ימין</target> +<target>הר××” ×§×‘×¦×™× ×©×™×•×•×¦×¨×• בצד שמ×ל</target> <source>Hide files that will be deleted on the left side</source> -<target>הסתר ×§×‘×¦×™× ×©×™×ž×—×§×• בצד שמ×ל</target> +<target>הסתר ×§×‘×¦×™× ×©×™×ž×—×§×• בצד ימין</target> <source>Show files that will be deleted on the left side</source> -<target>הר××” ×§×‘×¦×™× ×©×™×ž×—×§×• בצד שמ×ל</target> +<target>הר××” ×§×‘×¦×™× ×©×™×ž×—×§×• בצד ימין</target> <source>Hide files that will be deleted on the right side</source> -<target>הסתר ×§×‘×¦×™× ×©×™×ž×—×§×• בצד ימין</target> +<target>הסתר ×§×‘×¦×™× ×©×™×ž×—×§×• בצד שמ×ל</target> <source>Show files that will be deleted on the right side</source> -<target>הר××” ×§×‘×¦×™× ×©×™×ž×—×§×• בצד ימין</target> +<target>הר××” ×§×‘×¦×™× ×©×™×ž×—×§×• בצד שמ×ל</target> <source>Hide files that will be overwritten on left side</source> -<target>הסתר ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד שמ×ל</target> +<target>הסתר ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד ימין</target> <source>Show files that will be overwritten on left side</source> -<target>הר××” ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד שמ×ל</target> +<target>הר××” ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד ימין</target> <source>Hide files that will be overwritten on right side</source> -<target>הסתר ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד ימין</target> +<target>הסתר ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד שמ×ל</target> <source>Show files that will be overwritten on right side</source> -<target>הר××” ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד ימין</target> +<target>הר××” ×§×‘×¦×™× ×©×™×“×¨×¡×• בצד שמ×ל</target> <source>Hide files that won't be copied</source> <target>הסתר ×§×‘×¦×™× ×שר ×œ× ×™×•×¢×ª×§×•</target> @@ -1197,6 +1188,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>העבר ×§×‘×¦×™× ×œ×ª×•×š מחיצות ×¢× ×©× ×”×ž×›×™×œ טביעת זמן ות×ריך</target> +<source>Files</source> +<target>קבצי×</target> + +<source>Percentage</source> +<target>×חוז</target> + <source>%x TB</source> <target>%x טרה בייט</target> @@ -1326,6 +1323,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>מחיצות תלויות! זהירות בהגדרת כללי ×¡× ×›×¨×•×Ÿ:</target> +<source>Preparing synchronization...</source> +<target>מכין ×¡×™× ×›×¨×•×Ÿ...</target> + <source>Memory allocation failed!</source> <target>הקצ×ת זכרון × ×›×©×œ×”!</target> @@ -1357,37 +1357,37 @@ Exclude: \stuff\temp\* <target>קבצי×\מחיצות ×©×•× ×™× ×‘×¢×¨×›×™ ×”×ª×›×•× ×•×ª בלבד</target> <source>Copy new file/folder to left</source> -<target>העתק קובץ\מחיצה חדש\×” מימין לשמ×ל</target> +<target>העתק קובץ\מחיצה חדש\×” משמ×ל לימין</target> <source>Copy new file/folder to right</source> -<target>העתק קובץ\מחיצה חדש\×” משמ×ל לימין</target> +<target>העתק קובץ\מחיצה חדש\×” מימין לשמ×ל</target> <source>Delete left file/folder</source> -<target>מחק קובץ\מחיצה בצד שמ×ל</target> +<target>מחק קובץ\מחיצה בצד ימין</target> <source>Delete right file/folder</source> -<target>מחק קובץ\מחיצה בצד ימין</target> +<target>מחק קובץ\מחיצה בצד שמ×ל</target> <source>Move file on left</source> -<target>העבר קובץ בצד שמ×ל</target> +<target>העבר קובץ בצד ימין</target> <source>Move file on right</source> -<target>העבר קובץ בצד ימין</target> +<target>העבר קובץ בצד שמ×ל</target> <source>Overwrite left file/folder with right one</source> -<target>העתק ודרוס קובץ\מחיצה מימין לשמ×ל</target> +<target>העתק ודרוס קובץ\מחיצה משמ×ל לימין</target> <source>Overwrite right file/folder with left one</source> -<target>העתק ודרוס קובץ\מחיצה משמ×ל לימין</target> +<target>העתק ודרוס קובץ\מחיצה מימין לשמ×ל</target> <source>Do nothing</source> <target>×ל תעשה כלו×</target> <source>Copy file attributes only to left</source> -<target>העתק ×ª×›×•× ×•×ª קובץ בלבד מימין לשמ×ל</target> +<target>העתק ×ª×›×•× ×•×ª קובץ בלבד משמ×ל לימין</target> <source>Copy file attributes only to right</source> -<target>העתק ×ª×›×•× ×•×ª קובץ בלבד משמ×ל לימין</target> +<target>העתק ×ª×›×•× ×•×ª קובץ בלבד מימין לשמ×ל</target> <source>Multiple...</source> <target>הכפל...</target> @@ -1443,8 +1443,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>×©× ×©×œ מחיצת מטרה ××™× ×• יכול להיות ריק!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>מחיצה מוגדרת משתמש למחיקה ×œ× ×ž×•×’×“×¨×ª!</target> +<source>Directory for file versioning was not supplied!</source> +<target>×œ× ×¡×•×¤×§×” מחיצה ×œ×¨×™×©×•× ×’×¨×¡×ות קבצי×</target> <source>Source directory does not exist anymore:</source> <target>מחיצת המקור ×œ× × ×ž×¦×ת:</target> 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 @@ <pluralform>%x Bájt</pluralform> </target> -<source><Symlink></source> -<target><Symlink></target> - -<source><Directory></source> -<target><Mappa></target> - -<source>Size</source> -<target>Méret</target> - -<source>Date</source> -<target>Dátum</target> - -<source>Full path</source> -<target>Teljes elérési útvonal</target> - -<source>Filename</source> -<target>Fájlnév</target> - -<source>Relative path</source> -<target>RelatÃv útvonal</target> - -<source>Directory</source> -<target>Mappa</target> - -<source>Extension</source> -<target>Kiterjesztés</target> - -<source>Comparison Result</source> -<target>Az összehasonlÃtás eredménye</target> - <source>Initial synchronization:</source> <target>ElsÅ‘ szinkronizáció:</target> @@ -354,6 +324,24 @@ A parancssor végrehajtódik minden alkalommal, ha: <source>Logging</source> <target>Naplózás</target> +<source>File time and size</source> +<target>Fájl dátuma és mérete</target> + +<source>File content</source> +<target>fájl tartalma alapján</target> + +<source><Automatic></source> +<target><Automatikus></target> + +<source>Mirror ->></source> +<target>Tükrözés ->></target> + +<source>Update -></source> +<target>FrissÃtés -></target> + +<source>Custom</source> +<target>Egyedi</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync kötegelt fájl</target> @@ -411,23 +399,53 @@ A parancssor végrehajtódik minden alkalommal, ha: <source>(Requires an Internet connection!)</source> <target>(Internetkapcsolat szükséges!)</target> +<source><Symlink></source> +<target><Symlink></target> + +<source><Directory></source> +<target><Mappa></target> + +<source>Full path</source> +<target>Teljes elérési útvonal</target> + +<source>Name</source> +<target>Név</target> + +<source>Relative path</source> +<target>RelatÃv útvonal</target> + +<source>Directory</source> +<target>Mappa</target> + +<source>Size</source> +<target>Méret</target> + +<source>Date</source> +<target>Dátum</target> + +<source>Extension</source> +<target>Kiterjesztés</target> + +<source>Comparison Result</source> +<target>Az összehasonlÃtás eredménye</target> + <source>Drag && drop</source> <target>Húzd && Ejtsd</target> <source>Close progress dialog</source> -<target></target> +<target>FolyamatjelzÅ‘ párbeszédablak bezárása</target> <source>Shut down</source> -<target></target> +<target>Gép leállÃtása</target> <source>Log off</source> -<target></target> +<target>Kijelentkezés</target> <source>Standby</source> -<target></target> +<target>Készenléti állapot</target> <source>Hibernate</source> -<target></target> +<target>Hibernálás</target> <source>1. &Compare</source> <target>1. &ÖsszehasonlÃtás</target> @@ -435,9 +453,6 @@ A parancssor végrehajtódik minden alkalommal, ha: <source>2. &Synchronize...</source> <target>2. &Szinkronizálás</target> -<source>S&witch view</source> -<target>Nézet v&áltása</target> - <source>&New</source> <target>&Új</target> @@ -556,7 +571,7 @@ A parancssor végrehajtódik minden alkalommal, ha: <target>Státusz visszajelzés</target> <source>Show progress dialog</source> -<target></target> +<target>FolyamatjelzÅ‘ párbeszédablak mutatása</target> <source>Error handling</source> <target>Hibakezelés</target> @@ -582,27 +597,15 @@ A parancssor végrehajtódik minden alkalommal, ha: <source>Select variant:</source> <target>Változat kiválasztása:</target> -<source><Automatic></source> -<target><Automatikus></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> -<target></target> - -<source>Mirror ->></source> -<target>Tükrözés ->></target> +<target>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.</target> <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>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.</target> -<source>Update -></source> -<target>FrissÃtés -></target> - <source>Copy new or updated files to right folder.</source> <target>Új vagy frissÃtett fájlok másolása a jobb oldali mappába.</target> -<source>Custom</source> -<target>Egyedi</target> - <source>Configure your own synchronization rules.</source> <target>Saját szinkronizálási szabályok beállÃtása.</target> @@ -610,7 +613,7 @@ A parancssor végrehajtódik minden alkalommal, ha: <target>Törlések kezelése</target> <source>On completion:</source> -<target></target> +<target>Végrehajtás után:</target> <source>Configuration</source> <target>BeállÃtás</target> @@ -657,9 +660,6 @@ A fájlok egyezÅ‘nek tekintendÅ‘k, ha megegyezik - a fájlméret </target> -<source>File time and size</source> -<target>Fájl dátuma és mérete</target> - <source> Files are found equal if - file content @@ -670,9 +670,6 @@ A fájlok megegyeznek, ha megegyezik - a fájlok tartalma </target> -<source>File content</source> -<target>fájl tartalma alapján</target> - <source>Symbolic Link handling</source> <target>Symlink kezelés</target> @@ -688,35 +685,32 @@ A fájlok megegyeznek, ha megegyezik <source>Source code written in C++ utilizing:</source> <target>A programot C++-ban fejlesztették a következÅ‘k felhasználásával:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target> -Nagy köszönet a FreeFileSync lokalizációjáért -a következÅ‘ személyeknek: -</target> +<source>Feedback and suggestions are welcome</source> +<target>Várjuk a visszajelzéseket és az ötleteket</target> -<source>Feedback and suggestions are welcome at:</source> -<target>A visszajelzéseket és javaslatokat ide várjuk:</target> +<source>Homepage</source> +<target>Honlap</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync a Sourceforge-on</target> -<source>Homepage</source> -<target>Honlap</target> +<source>Email</source> +<target>E-mail</target> + +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target> +Nagy köszönet a FreeFileSync lokalizációjáért +a következÅ‘ személyeknek: +</target> -<source>If you like FFS</source> -<target>FFS támogatása</target> +<source>If you like FreeFileSync</source> +<target>FreeFileSync támogatása</target> <source>Donate with PayPal</source> <target>Ha szereted a FreeFileSync-et, támogasd a PayPal segÃtségével.</target> -<source>Email</source> -<target>E-mail</target> - -<source>Report translation error</source> -<target>FordÃtói hiba bejelentése</target> - -<source>Published under the GNU General Public License:</source> -<target>Kiadva a GNU General Public License alatt:</target> +<source>Published under the GNU General Public License</source> +<target>Kiadva a GNU General Public License alatt</target> <source>Ignore subsequent errors</source> <target>KésÅ‘bbi hibák figyelmen kÃvül hagyása</target> @@ -812,7 +806,7 @@ Kizárni: \stuff\temp\* <target>Tranzakciós fájlmásolás</target> <source>Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error.</source> -<target></target> +<target>Ã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.</target> <source>Copy locked files</source> <target>Zárolt fájlok másolása</target> @@ -865,6 +859,9 @@ Kizárni: \stuff\temp\* <source>Folder pairs</source> <target>Mappa párok</target> +<source>Compressed view</source> +<target>TömörÃtett nézet</target> + <source>Select view</source> <target>Nézet kiválasztása</target> @@ -883,41 +880,32 @@ Kizárni: \stuff\temp\* <source><multiple selection></source> <target><többszörös kijelölés></target> -<source>D-Click</source> -<target>D-Klikk</target> - <source>Delete</source> <target>Törlés</target> -<source>Customize...</source> -<target>Testreszabás...</target> +<source>Include all</source> +<target>Csatolni az összeset</target> -<source>Select time span...</source> -<target>IdÅ‘intervallum kiválasztása...</target> - -<source>Auto-adjust columns</source> -<target>Oszlopok automatikus igazÃtása</target> +<source>Exclude all</source> +<target>Kizárni az összeset</target> <source>Icon size:</source> -<target></target> +<target>Ikon mérete:</target> <source>Small</source> -<target></target> +<target>Kicsi</target> <source>Medium</source> -<target></target> +<target>Közepes</target> <source>Large</source> -<target></target> - -<source>Include all rows</source> -<target>Minden sort csatolni</target> +<target>Nagy</target> -<source>Exclude all rows</source> -<target>Minden sor kizárása</target> +<source>Select time span...</source> +<target>IdÅ‘intervallum kiválasztása...</target> -<source>Reset view</source> -<target>Nézet visszaállÃtása</target> +<source>Default view</source> +<target>Alapértelmezett nézet</target> <source>Show "%x"</source> <target>"%x" mutatása</target> @@ -1198,6 +1186,12 @@ Kizárni: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Fájlok másolása idÅ‘bélyeggel ellátott almappába</target> +<source>Files</source> +<target>Fájlok</target> + +<source>Percentage</source> +<target>Százalék</target> + <source>%x TB</source> <target>%x TB</target> @@ -1327,6 +1321,9 @@ Kizárni: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>A mappák függenek egymástól! Legyen óvatos, amikor megadja a szinkronizálási szabályokat:</target> +<source>Preparing synchronization...</source> +<target>Szinkronizálás elÅ‘készÃtése...</target> + <source>Memory allocation failed!</source> <target>Sikertelen memóriafoglalás!</target> @@ -1370,10 +1367,10 @@ Kizárni: \stuff\temp\* <target>Jobb oldali fájl/mappa törlése</target> <source>Move file on left</source> -<target></target> +<target>Bal oldali fájl mozgatása</target> <source>Move file on right</source> -<target></target> +<target>Jobb oldali fájl mozgatása</target> <source>Overwrite left file/folder with right one</source> <target>Bal oldali fájl/mappa felülÃrása a jobb oldalival</target> @@ -1444,8 +1441,8 @@ Kizárni: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>A célmappa neve nem lehet üres!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>A törléshez nem lett mappa megadva a felhasználó által!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Nem lett megadva mappa a fájlok verziókezeléséhez!</target> <source>Source directory does not exist anymore:</source> <target>A forrásként megadott mappa többé nem létezik:</target> 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 @@ <pluralform>%x Byte</pluralform> </target> -<source><Symlink></source> -<target><Symlink></target> - -<source><Directory></source> -<target><Directory></target> - -<source>Size</source> -<target>Dimensione</target> - -<source>Date</source> -<target>Data</target> - -<source>Full path</source> -<target>Percorso completo</target> - -<source>Filename</source> -<target>Nome del file</target> - -<source>Relative path</source> -<target>Percorso relativo</target> - -<source>Directory</source> -<target>Directory</target> - -<source>Extension</source> -<target>Estensione</target> - -<source>Comparison Result</source> -<target>Risultato della comparazione</target> - <source>Initial synchronization:</source> <target>Prima sincronizzazione:</target> @@ -354,6 +324,24 @@ La linea di comando è eseguita ogni volta che: <source>Logging</source> <target>Logging</target> +<source>File time and size</source> +<target>Ora e dimensione file</target> + +<source>File content</source> +<target>Contenuto del file</target> + +<source><Automatic></source> +<target><Automatico></target> + +<source>Mirror ->></source> +<target>Mirror ->></target> + +<source>Update -></source> +<target>Aggiorna -></target> + +<source>Custom</source> +<target>Personalizza</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync batch file</target> @@ -411,23 +399,53 @@ La linea di comando è eseguita ogni volta che: <source>(Requires an Internet connection!)</source> <target>(Richiede una connessione Internet!)</target> +<source><Symlink></source> +<target><Symlink></target> + +<source><Directory></source> +<target><Directory></target> + +<source>Full path</source> +<target>Percorso completo</target> + +<source>Name</source> +<target>Nome</target> + +<source>Relative path</source> +<target>Percorso relativo</target> + +<source>Directory</source> +<target>Directory</target> + +<source>Size</source> +<target>Dimensione</target> + +<source>Date</source> +<target>Data</target> + +<source>Extension</source> +<target>Estensione</target> + +<source>Comparison Result</source> +<target>Risultato della comparazione</target> + <source>Drag && drop</source> <target>Drag && drop</target> <source>Close progress dialog</source> -<target></target> +<target>Chiudi stato di avanzamento</target> <source>Shut down</source> -<target></target> +<target>Arresta</target> <source>Log off</source> -<target></target> +<target>Termina sessione</target> <source>Standby</source> -<target></target> +<target>Sospendi</target> <source>Hibernate</source> -<target></target> +<target>Iberna</target> <source>1. &Compare</source> <target>1. &Compara</target> @@ -435,9 +453,6 @@ La linea di comando è eseguita ogni volta che: <source>2. &Synchronize...</source> <target>2. &Sincronizza...</target> -<source>S&witch view</source> -<target>C&ommuta vista</target> - <source>&New</source> <target>&Nuovo</target> @@ -556,7 +571,7 @@ La linea di comando è eseguita ogni volta che: <target>Feedback di stato</target> <source>Show progress dialog</source> -<target></target> +<target>Mostra stato di avanzamento</target> <source>Error handling</source> <target>Gestione degli errori</target> @@ -582,27 +597,15 @@ La linea di comando è eseguita ogni volta che: <source>Select variant:</source> <target>Selezionare una variante:</target> -<source><Automatic></source> -<target><Automatico></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identifica e propaga modifiche su entrambi i lati usando un database. Cancellazioni, ridenominazioni e conflitti sono rilevati automaticamente.</target> -<source>Mirror ->></source> -<target>Mirror ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Mirror backup della cartella di sinistra. La cartella destra verrà modificata per corrispondere esattamente alla cartella di sinistra dopo la sincronizzazione.</target> -<source>Update -></source> -<target>Aggiorna -></target> - <source>Copy new or updated files to right folder.</source> <target>Copia file nuovi o aggiornati nella cartella di destra.</target> -<source>Custom</source> -<target>Personalizza</target> - <source>Configure your own synchronization rules.</source> <target>Configura le tue regole di sincronizzazione.</target> @@ -610,7 +613,7 @@ La linea di comando è eseguita ogni volta che: <target>Gestione cancellazione</target> <source>On completion:</source> -<target></target> +<target>In completamento:</target> <source>Configuration</source> <target>Configurazione</target> @@ -658,9 +661,6 @@ I file sono considerati identici se sono identici </target> -<source>File time and size</source> -<target>Ora e dimensione file</target> - <source> Files are found equal if - file content @@ -672,9 +672,6 @@ I file sono considerati identici se è identico </target> -<source>File content</source> -<target>Contenuto del file</target> - <source>Symbolic Link handling</source> <target>Gestione Link Simbolico</target> @@ -690,32 +687,29 @@ I file sono considerati identici se <source>Source code written in C++ utilizing:</source> <target>Codice sorgente scritto in C++ utilizzando:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Per la traduzione di FreeFileSync, un grazie va a:</target> +<source>Feedback and suggestions are welcome</source> +<target>Ogni commento o suggerimento è ben accetto</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Commenti e suggerimenti sono i benvenuti:</target> +<source>Homepage</source> +<target>Homepage</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync su Sourceforge</target> -<source>Homepage</source> -<target>Homepage</target> +<source>Email</source> +<target>Email</target> -<source>If you like FFS</source> -<target>Se ti piace FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Per la traduzione di FreeFileSync, un grazie va a:</target> + +<source>If you like FreeFileSync</source> +<target>Se ti piace FreeFileSync</target> <source>Donate with PayPal</source> <target>Fai una donazione con PayPal</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>Segnala errori di traduzione</target> - -<source>Published under the GNU General Public License:</source> -<target>Pubblicato sotto licenza GNU General Public:</target> +<source>Published under the GNU General Public License</source> +<target>Pubblicato sotto licenza GNU General Public</target> <source>Ignore subsequent errors</source> <target>Ignora gli errori successivi</target> @@ -864,6 +858,9 @@ Escludi: \stuff\temp\* <source>Folder pairs</source> <target>Coppia di cartelle</target> +<source>Compressed view</source> +<target>Vista compressa</target> + <source>Select view</source> <target>Seleziona vista</target> @@ -882,20 +879,14 @@ Escludi: \stuff\temp\* <source><multiple selection></source> <target><selezione multipla></target> -<source>D-Click</source> -<target>D-Click</target> - <source>Delete</source> <target>Cancella</target> -<source>Customize...</source> -<target>Personalizza...</target> - -<source>Select time span...</source> -<target>Seleziona intervallo di tempo...</target> +<source>Include all</source> +<target>Includi tutto</target> -<source>Auto-adjust columns</source> -<target>Larghezza automatica colonne</target> +<source>Exclude all</source> +<target>Escludi tutto</target> <source>Icon size:</source> <target>Dimensione icona:</target> @@ -909,14 +900,11 @@ Escludi: \stuff\temp\* <source>Large</source> <target>Grande</target> -<source>Include all rows</source> -<target>Includi tutte le righe</target> - -<source>Exclude all rows</source> -<target>Escludi tutte le righe</target> +<source>Select time span...</source> +<target>Seleziona intervallo di tempo...</target> -<source>Reset view</source> -<target>Resetta vista</target> +<source>Default view</source> +<target>Vista normale</target> <source>Show "%x"</source> <target>Mostra "%x"</target> @@ -1197,6 +1185,12 @@ Escludi: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Sposta file in una sotto-cartella datata</target> +<source>Files</source> +<target>Files</target> + +<source>Percentage</source> +<target>Percentuale</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1320,9 @@ Escludi: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Le directory sono dipendenti! Fai attenzione quando configuri le regole di sincronizzazione:</target> +<source>Preparing synchronization...</source> +<target>Preparazione sincronizzazione...</target> + <source>Memory allocation failed!</source> <target>Allocazione di memoria fallita!</target> @@ -1443,8 +1440,8 @@ Escludi: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Il nome della cartella di destinazione non può essere nullo!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Directory personalizzata per la cancellazione non specificata!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Non è stata indicata una cartella per il file delle versioni!</target> <source>Source directory does not exist anymore:</source> <target>La directory sorgente non è più esistente:</target> 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 @@ <pluralform>%x ãƒã‚¤ãƒˆ</pluralform> </target> -<source><Symlink></source> -<target><シンボリックリンク></target> - -<source><Directory></source> -<target><ディレクトリ></target> - -<source>Size</source> -<target>サイズ</target> - -<source>Date</source> -<target>日付</target> - -<source>Full path</source> -<target>フルパス</target> - -<source>Filename</source> -<target>ファイルå</target> - -<source>Relative path</source> -<target>相対パス</target> - -<source>Directory</source> -<target>ディレクトリ</target> - -<source>Extension</source> -<target>æ‹¡å¼µå</target> - -<source>Comparison Result</source> -<target>比較çµæžœ</target> - <source>Initial synchronization:</source> <target>åŒæœŸå‡¦ç†ã®åˆæœŸåŒ–:</target> @@ -351,6 +321,24 @@ The command line is executed each time: <source>Logging</source> <target>ãƒã‚°</target> +<source>File time and size</source> +<target>ファイル時刻ã¨ã‚µã‚¤ã‚º</target> + +<source>File content</source> +<target>ファイルã®å†…容</target> + +<source><Automatic></source> +<target><自動></target> + +<source>Mirror ->></source> +<target>ミラー >></target> + +<source>Update -></source> +<target>æ›´æ–° -></target> + +<source>Custom</source> +<target>カスタム</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync ãƒãƒƒãƒãƒ•ã‚¡ã‚¤ãƒ«</target> @@ -408,6 +396,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(インターãƒãƒƒãƒˆæŽ¥ç¶šã‚’å¿…è¦ã¨ã—ã¾ã™!)</target> +<source><Symlink></source> +<target><シンボリックリンク></target> + +<source><Directory></source> +<target><ディレクトリ></target> + +<source>Full path</source> +<target>フルパス</target> + +<source>Name</source> +<target>åå‰</target> + +<source>Relative path</source> +<target>相対パス</target> + +<source>Directory</source> +<target>ディレクトリ</target> + +<source>Size</source> +<target>サイズ</target> + +<source>Date</source> +<target>日付</target> + +<source>Extension</source> +<target>æ‹¡å¼µå</target> + +<source>Comparison Result</source> +<target>比較çµæžœ</target> + <source>Drag && drop</source> <target>ドラッグ && ドãƒãƒƒãƒ—</target> @@ -579,27 +597,15 @@ The command line is executed each time: <source>Select variant:</source> <target>変数をé¸æŠž:</target> -<source><Automatic></source> -<target><自動></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>両å´ã®è˜åˆ¥ã€ãƒ—ãƒãƒ‘ティã®å¤‰æ›´ç‰¹å®šã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’使用ã—ã¾ã™ã€‚削除ã€ãƒªãƒãƒ¼ãƒ åŠã³ç«¶åˆãªã©ã¯è‡ªå‹•çš„ã«æ¤œå‡ºã•ã‚Œã¾ã™</target> -<source>Mirror ->></source> -<target>ミラー >></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>å·¦å´ã«åˆã‚ã›ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—. å³å´ã®ãƒ•ã‚©ãƒ«ãƒ€å†…容ãŒåŒæœŸå‡¦ç†å¾Œã«å·¦å´ã¨åŒã˜ã«ãªã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚</target> -<source>Update -></source> -<target>æ›´æ–° -></target> - <source>Copy new or updated files to right folder.</source> <target>æ–°ã—ã„(æ›´æ–°)ファイルをå³ãƒ•ã‚©ãƒ«ãƒ€ã«ã‚³ãƒ”ー</target> -<source>Custom</source> -<target>カスタム</target> - <source>Configure your own synchronization rules.</source> <target>ã‚ãªãŸã®è¨å®šã—ãŸåŒæœŸè¦å‰‡ã‚’使用ã—ã¾ã™ã€‚</target> @@ -655,9 +661,6 @@ are the same ã§åˆ¤æ–ã™ã‚‹ </target> -<source>File time and size</source> -<target>ファイル時刻ã¨ã‚µã‚¤ã‚º</target> - <source> Files are found equal if - file content @@ -669,9 +672,6 @@ is the same ã§åˆ¤æ–ã™ã‚‹ </target> -<source>File content</source> -<target>ファイルã®å†…容</target> - <source>Symbolic Link handling</source> <target>シンボリック・リンクã®å–り扱ã„</target> @@ -687,32 +687,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>ソースコード㯠C++ ã§æ›¸ã‹ã‚Œã¦ã„ã¾ã™</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>FreeFileSync ã®ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã¸ã®å”力ã«æ„Ÿè¬ã—ã¾ã™:</target> +<source>Feedback and suggestions are welcome</source> +<target>フィードãƒãƒƒã‚¯ã€æ案ãªã©ã¯ã“ã¡ã‚‰ã‹ã‚‰</target> -<source>Feedback and suggestions are welcome at:</source> -<target>フィードãƒãƒƒã‚¯ã€æ案ãªã©:</target> +<source>Homepage</source> +<target>ホームページ</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync at Sourceforge</target> -<source>Homepage</source> -<target>ホームページ</target> +<source>Email</source> +<target>E-メール</target> -<source>If you like FFS</source> -<target>FFS ãŒæ°—ã«å…¥ã£ãŸå ´åˆ</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>FreeFileSync ã®ãƒãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã¸ã®å”力ã«æ„Ÿè¬ã—ã¾ã™:</target> + +<source>If you like FreeFileSync</source> +<target>FreeFileSync ãŒæ°—ã«å…¥ã£ãŸå ´åˆ</target> <source>Donate with PayPal</source> <target>PayPal ã‹ã‚‰å¯„付ã™ã‚‹</target> -<source>Email</source> -<target>E-メール</target> - -<source>Report translation error</source> -<target>翻訳エラーã®è©³ç´°</target> - -<source>Published under the GNU General Public License:</source> -<target>Published under the GNU General Public Licence:</target> +<source>Published under the GNU General Public License</source> +<target>GNU 一般共有使用許諾ã«åŸºã¥ã公開ã•ã‚Œã¦ã„ã¾ã™</target> <source>Ignore subsequent errors</source> <target>以é™ã®ã‚¨ãƒ©ãƒ¼ã‚’無視</target> @@ -861,6 +858,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>フォルダ・ペア</target> +<source>Compressed view</source> +<target>簡易表示</target> + <source>Select view</source> <target>表示é¸æŠž</target> @@ -879,20 +879,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><複数é¸æŠž></target> -<source>D-Click</source> -<target>W-クリック</target> - <source>Delete</source> <target>削除</target> -<source>Customize...</source> -<target>カスタマイズ...</target> - -<source>Select time span...</source> -<target>タイムスパンをé¸æŠž...</target> +<source>Include all</source> +<target>ã™ã¹ã¦å«ã‚ã‚‹</target> -<source>Auto-adjust columns</source> -<target>列ã®è‡ªå‹•èª¿æ•´</target> +<source>Exclude all</source> +<target>ã™ã¹ã¦é™¤å¤–</target> <source>Icon size:</source> <target>アイコンサイズ:</target> @@ -906,17 +900,14 @@ Exclude: \stuff\temp\* <source>Large</source> <target>大</target> -<source>Include all rows</source> -<target>ã™ã¹ã¦ã®è¡Œã‚’å«ã‚ã‚‹</target> - -<source>Exclude all rows</source> -<target>ã™ã¹ã¦ã®è¡Œã‚’除外</target> +<source>Select time span...</source> +<target>タイムスパンをé¸æŠž...</target> -<source>Reset view</source> -<target>表示リセット</target> +<source>Default view</source> +<target>デフォルト表示</target> <source>Show "%x"</source> -<target>"%x" を表示</target> +<target>"%x" ã§è¡¨ç¤º</target> <source><Last session></source> <target><最後ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³></target> @@ -1188,6 +1179,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>ファイルをタイムスタンプåã®ã‚µãƒ–フォルダã«ç§»å‹•</target> +<source>Files</source> +<target>ファイル</target> + +<source>Percentage</source> +<target>パーセント</target> + <source>%x TB</source> <target>%x TB</target> @@ -1314,6 +1311,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>ディレクトリãŒä¾å˜é–¢ä¿‚ã«ã‚ã‚Šã¾ã™! åŒæœŸè¦å‰‡ã®è¨å®šæ™‚ã«ã¯æ³¨æ„ã—ã¦ãã ã•ã„:</target> +<source>Preparing synchronization...</source> +<target>åŒæœŸå‡¦ç†ã®æº–å‚™ä¸...</target> + <source>Memory allocation failed!</source> <target>メモリ割り当ã¦ã«å¤±æ•—!</target> @@ -1431,8 +1431,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>対象ディレクトリåãŒç©ºç™½ã§ã™!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>ユーザ定義ディレクトリãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“!</target> +<source>Directory for file versioning was not supplied!</source> +<target>ファイルãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒåˆ©ç”¨ã§ããªã„ディレクトリã§ã™!</target> <source>Source directory does not exist anymore:</source> <target>ソースディレクトリãŒå˜åœ¨ã—ã¾ã›ã‚“:</target> 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 @@ <pluralform>%x ë°”ì´íŠ¸</pluralform> </target> -<source><Symlink></source> -<target><심ë§í¬></target> - -<source><Directory></source> -<target><ë””ë ‰í† ë¦¬></target> - -<source>Size</source> -<target>í¬ê¸°</target> - -<source>Date</source> -<target>ë‚ ì§œ</target> - -<source>Full path</source> -<target>ì „ì²´ 경로</target> - -<source>Filename</source> -<target>íŒŒì¼ ì´ë¦„</target> - -<source>Relative path</source> -<target>ëŒ€ìƒ ê²½ë¡œ</target> - -<source>Directory</source> -<target>ë””ë ‰í† ë¦¬</target> - -<source>Extension</source> -<target>확장ìž</target> - -<source>Comparison Result</source> -<target>ë¹„êµ ê²°ê³¼</target> - <source>Initial synchronization:</source> <target>초기 ë™ê¸°í™” :</target> @@ -351,6 +321,24 @@ The command line is executed each time: <source>Logging</source> <target>로그 중</target> +<source>File time and size</source> +<target>íŒŒì¼ ì‹œê°„ ë° í¬ê¸°</target> + +<source>File content</source> +<target>íŒŒì¼ ë‚´ìš©</target> + +<source><Automatic></source> +<target><ìžë™></target> + +<source>Mirror ->></source> +<target>미러 ->></target> + +<source>Update -></source> +<target>ì—…ë°ì´íŠ¸ -></target> + +<source>Custom</source> +<target>ê°œì¸ ì„¤ì •</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync ì¼ê´„ 파ì¼</target> @@ -408,6 +396,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(ì¸í„°ë„· ì—°ê²°ì´ í•„ìš”í•©ë‹ˆë‹¤!)</target> +<source><Symlink></source> +<target><심ë§í¬></target> + +<source><Directory></source> +<target><ë””ë ‰í† ë¦¬></target> + +<source>Full path</source> +<target>ì „ì²´ 경로</target> + +<source>Name</source> +<target>ì´ë¦„</target> + +<source>Relative path</source> +<target>ëŒ€ìƒ ê²½ë¡œ</target> + +<source>Directory</source> +<target>ë””ë ‰í† ë¦¬</target> + +<source>Size</source> +<target>í¬ê¸°</target> + +<source>Date</source> +<target>ë‚ ì§œ</target> + +<source>Extension</source> +<target>확장ìž</target> + +<source>Comparison Result</source> +<target>ë¹„êµ ê²°ê³¼</target> + <source>Drag && drop</source> <target>드래그 && ë“œëž (마우스로 íŒŒì¼ ëŒì–´ë‹¤ 놓기)</target> @@ -432,9 +450,6 @@ The command line is executed each time: <source>2. &Synchronize...</source> <target>2. ë™ê¸°í™”</target> -<source>S&witch view</source> -<target>보기 ì „í™˜</target> - <source>&New</source> <target>ì‹ ê·œ ìž‘ì—…</target> @@ -579,27 +594,15 @@ The command line is executed each time: <source>Select variant:</source> <target>옵션 ì„ íƒ :</target> -<source><Automatic></source> -<target><ìžë™></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>ë°ì´í„°ë² ì´ìŠ¤ë¥¼ 활용하여 ì–‘ì¸¡ì˜ ë³€ê²½ì‚¬í•ì„ 확ì¸í•˜ê³ ë°˜ì˜í•©ë‹ˆë‹¤. íŒŒì¼ ì‚ì œ/ëª…ì¹ ë³€ê²½/충ëŒì€ ìžë™ìœ¼ë¡œ ê°ì§€ë©ë‹ˆë‹¤.</target> -<source>Mirror ->></source> -<target>미러 ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>좌측 í´ë” 백업 미러. ë™ê¸°í™” ì´í›„ 우측 í´ë”는 좌측 í´ë”와 ì™„ì „ížˆ ë˜‘ê°™ì´ ë§¤ì¹˜ ë˜ë„ë¡ ë³€ê²½ ë©ë‹ˆë‹¤.</target> -<source>Update -></source> -<target>ì—…ë°ì´íŠ¸ -></target> - <source>Copy new or updated files to right folder.</source> <target>ì‹ ê·œ ë˜ëŠ” ì—…ë°ì´íŠ¸ ëœ íŒŒì¼ì„ 우측 í´ë”ë¡œ 복사</target> -<source>Custom</source> -<target>ê°œì¸ ì„¤ì •</target> - <source>Configure your own synchronization rules.</source> <target>ê°œì¸ ë™ê¸°í™” 규칙 ì„¤ì •</target> @@ -655,9 +658,6 @@ are the same ë™ì¼í•œ 파ì¼ë¡œ 간주ë©ë‹ˆë‹¤. </target> -<source>File time and size</source> -<target>íŒŒì¼ ì‹œê°„ ë° í¬ê¸°</target> - <source> Files are found equal if - file content @@ -669,9 +669,6 @@ is the same ë™ì¼í•œ 파ì¼ë¡œ 간주ë©ë‹ˆë‹¤. </target> -<source>File content</source> -<target>íŒŒì¼ ë‚´ìš©</target> - <source>Symbolic Link handling</source> <target>ì‹¬ë³¼ë¦ ë§í¬ 처리</target> @@ -687,32 +684,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>소스코드는 C++ 언어로 아래 íˆ´ì„ ì‚¬ìš©í•˜ì—¬ 작성ë˜ì—ˆìŠµë‹ˆë‹¤ :</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>FreeFileSync í˜„ì§€í™”ì— ë„ì›€ì„ ì£¼ì‹ ë¶„ë“¤ê»˜ ê°ì‚¬ 드립니다 :</target> +<source>Feedback and suggestions are welcome</source> +<target>ëª¨ë“ ì˜ê²¬ ë° ê±´ì˜/ì œì•ˆì„ í™˜ì˜í•©ë‹ˆë‹¤</target> -<source>Feedback and suggestions are welcome at:</source> -<target>피드백 ë° ì œì•ˆì‚¬í•ì€ 아래로 ë³´ë‚´ 주ì‹ì‹œì˜¤ :</target> +<source>Homepage</source> +<target>홈페ì´ì§€</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync at Sourceforge [오픈소스 보기]</target> -<source>Homepage</source> -<target>홈페ì´ì§€</target> +<source>Email</source> +<target>ì´ë©”ì¼</target> -<source>If you like FFS</source> -<target>기부하기^^</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>FreeFileSync í˜„ì§€í™”ì— ë„ì›€ì„ ì£¼ì‹ ë¶„ë“¤ê»˜ ê°ì‚¬ 드립니다 :</target> + +<source>If you like FreeFileSync</source> +<target>FreeFileSync를 위한 기부</target> <source>Donate with PayPal</source> <target>PayPalë¡œ 기부하기</target> -<source>Email</source> -<target>ì´ë©”ì¼</target> - -<source>Report translation error</source> -<target>ë²ˆì— ê´€ë ¨ 오류 ë³´ê³ </target> - -<source>Published under the GNU General Public License:</source> -<target>GNU ì¼ë°˜ 공용 ë¼ì´ì„¼ìŠ¤ì— ì˜í•œ 출시 :</target> +<source>Published under the GNU General Public License</source> +<target>GNU ì¼ë°˜ 공용 ë¼ì´ì„¼ìŠ¤ì— ì˜í•œ 출시</target> <source>Ignore subsequent errors</source> <target>ì´í›„ ì¼ì–´ë‚˜ëŠ” 오류 무시</target> @@ -861,6 +855,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>í´ë” 페어(ì§)</target> +<source>Compressed view</source> +<target>압축 보기</target> + <source>Select view</source> <target>보기 ì„ íƒ</target> @@ -879,20 +876,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><복수 ì„ íƒ></target> -<source>D-Click</source> -<target>D-í´ë¦</target> - <source>Delete</source> <target>ì‚ì œ</target> -<source>Customize...</source> -<target>ê°œì¸ ì„¤ì •í™”...</target> - -<source>Select time span...</source> -<target>시간간격(타임스팬) ì„ íƒ...</target> +<source>Include all</source> +<target>ëª¨ë‘ í¬í•¨</target> -<source>Auto-adjust columns</source> -<target>ì—´ ìžë™ì •ë ¬</target> +<source>Exclude all</source> +<target>ëª¨ë‘ ì œì™¸</target> <source>Icon size:</source> <target>ì•„ì´ì½˜ í¬ê¸°</target> @@ -906,14 +897,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>í¬ê²Œ</target> -<source>Include all rows</source> -<target>ëª¨ë“ í–‰ í¬í•¨</target> - -<source>Exclude all rows</source> -<target>ì „ì²´ í–‰ ì œì™¸</target> +<source>Select time span...</source> +<target>시간간격(타임스팬) ì„ íƒ...</target> -<source>Reset view</source> -<target>보기 리셋</target> +<source>Default view</source> +<target>기본 보기</target> <source>Show "%x"</source> <target>"%x" 표시</target> @@ -1188,6 +1176,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>파ì¼ì„ 타임스탬프 ëœ ì„œë¸Œ í´ë”ë¡œ ì´ë™</target> +<source>Files</source> +<target>파ì¼</target> + +<source>Percentage</source> +<target>í¼ì„¼í‹°ì§€(백분율)</target> + <source>%x TB</source> <target>%x TB</target> @@ -1314,6 +1308,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>ë””ë ‰í† ë¦¬ê°€ ì˜ì¡´ ê´€ê³„ì— ìžˆìŠµë‹ˆë‹¤. ë™ê¸°í™” 규칙 ì„¤ì •ì‹œ 주ì˜í•˜ì‹ì‹œì˜¤.</target> +<source>Preparing synchronization...</source> +<target>ë™ê¸°í™” 준비 중...</target> + <source>Memory allocation failed!</source> <target>메모리 í• ë‹¹ 실패!</target> @@ -1431,8 +1428,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>ëŒ€ìƒ ë””ë ‰í† ë¦¬ ì´ë¦„ì´ ë¹„ì–´ì„œëŠ” 안 ë©ë‹ˆë‹¤!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>ì‚ì œí•˜ë ¤ëŠ” ì‚¬ìš©ìž ì§€ì • ë””ë ‰í† ë¦¬ê°€ ì •í•´ì§€ì§€ 않았습니다!</target> +<source>Directory for file versioning was not supplied!</source> +<target>íŒŒì¼ ë²„ì €ë‹ì„ 위한 ë””ë ‰í† ë¦¬ê°€ ì œê³µë˜ì§€ 않았습니다!</target> <source>Source directory does not exist anymore:</source> <target>소스 ë””ë ‰í† ë¦¬ê°€ ë” ì´ìƒ 존재하지 않습니다 :</target> 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 @@ <pluralform>%x Bajtów</pluralform> </target> -<source><Symlink></source> -<target><DowiÄ…zanie symboliczne></target> - -<source><Directory></source> -<target><Katalog></target> - -<source>Size</source> -<target>Rozmiar</target> - -<source>Date</source> -<target>Data</target> - -<source>Full path</source> -<target>PeÅ‚na scieżka</target> - -<source>Filename</source> -<target>Nazwa pliku</target> - -<source>Relative path</source> -<target>Relatywna Å›cieżka</target> - -<source>Directory</source> -<target>Katalog</target> - -<source>Extension</source> -<target>Rozszerzenie</target> - -<source>Comparison Result</source> -<target>Rezultat porównywania</target> - <source>Initial synchronization:</source> <target>WstÄ™pna synchronizacja:</target> @@ -357,6 +327,24 @@ Komenda jest wykonwywana za każdym razem gdy: <source>Logging</source> <target>Tworzenie logów</target> +<source>File time and size</source> +<target>Czas modyfikacji i rozmiar</target> + +<source>File content</source> +<target>Zawartość pliku</target> + +<source><Automatic></source> +<target><Automatycznie></target> + +<source>Mirror ->></source> +<target>Lustrzana ->></target> + +<source>Update -></source> +<target>Uaktualnij -></target> + +<source>Custom</source> +<target>WÅ‚asne</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync plik wsadowy</target> @@ -414,23 +402,53 @@ Komenda jest wykonwywana za każdym razem gdy: <source>(Requires an Internet connection!)</source> <target>(Wymaga poÅ‚Ä…czenia z Internetem!)</target> +<source><Symlink></source> +<target><DowiÄ…zanie symboliczne></target> + +<source><Directory></source> +<target><Katalog></target> + +<source>Full path</source> +<target>PeÅ‚na scieżka</target> + +<source>Name</source> +<target>Nazwa</target> + +<source>Relative path</source> +<target>Relatywna Å›cieżka</target> + +<source>Directory</source> +<target>Katalog</target> + +<source>Size</source> +<target>Rozmiar</target> + +<source>Date</source> +<target>Data</target> + +<source>Extension</source> +<target>Rozszerzenie</target> + +<source>Comparison Result</source> +<target>Rezultat porównywania</target> + <source>Drag && drop</source> <target>Drag && Drop</target> <source>Close progress dialog</source> -<target></target> +<target>Zamknij okno postÄ™pu</target> <source>Shut down</source> -<target></target> +<target>WyÅ‚Ä…cz komputer</target> <source>Log off</source> -<target></target> +<target>Wyloguj użytkownika</target> <source>Standby</source> -<target></target> +<target>Przejdź w stan uÅ›pienia</target> <source>Hibernate</source> -<target></target> +<target>Przejdź w stan hibernacji</target> <source>1. &Compare</source> <target>1. &Porównaj</target> @@ -438,9 +456,6 @@ Komenda jest wykonwywana za każdym razem gdy: <source>2. &Synchronize...</source> <target>2. &Synchronizuj...</target> -<source>S&witch view</source> -<target>P&rzeÅ‚Ä…cz widok</target> - <source>&New</source> <target>&Nowy</target> @@ -559,7 +574,7 @@ Komenda jest wykonwywana za każdym razem gdy: <target>Opinia statusu</target> <source>Show progress dialog</source> -<target></target> +<target>Pokaż okno postÄ™pu</target> <source>Error handling</source> <target>ObsÅ‚uga bÅ‚Ä™dów</target> @@ -585,27 +600,15 @@ Komenda jest wykonwywana za każdym razem gdy: <source>Select variant:</source> <target>Wybierz wariant:</target> -<source><Automatic></source> -<target><Automatycznie></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Znajdź i zastosuj zmiany po obu stronach przy pomocy bazy danych. UsuniÄ™nia, zmiany nazwy plików oraz konflikty sÄ… usuwane automatycznie.</target> -<source>Mirror ->></source> -<target>Lustrzana ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Lustrzana kopia lewego folderu. Prawy folder po synchronizacji jest lustrzanÄ… kopiÄ… lewego folderu.</target> -<source>Update -></source> -<target>Uaktualnij -></target> - <source>Copy new or updated files to right folder.</source> <target>Kopiuj nowe lub aktualniejsze pliki na prawÄ… stronÄ™.</target> -<source>Custom</source> -<target>WÅ‚asne</target> - <source>Configure your own synchronization rules.</source> <target>Skonfiguruj swoje wÅ‚asne zasady synchronizacji.</target> @@ -613,7 +616,7 @@ Komenda jest wykonwywana za każdym razem gdy: <target>ObsÅ‚uga usuwania</target> <source>On completion:</source> -<target></target> +<target>Po zakoÅ„czeniu:</target> <source>Configuration</source> <target>Konfiguracja</target> @@ -661,9 +664,6 @@ Pliki sÄ… równe jeżeli sÄ… równe </target> -<source>File time and size</source> -<target>Czas modyfikacji i rozmiar</target> - <source> Files are found equal if - file content @@ -675,9 +675,6 @@ Pliki sÄ… jednakowe jeżeli jest identyczna </target> -<source>File content</source> -<target>Zawartość pliku</target> - <source>Symbolic Link handling</source> <target>ObsÅ‚uga dowiÄ…zaÅ„ symbolicznych</target> @@ -693,32 +690,29 @@ jest identyczna <source>Source code written in C++ utilizing:</source> <target>Kod stworzony w C++ z wykorzystaniem:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>PodziÄ™kowania za tÅ‚umaczenie FreeFileSync:</target> +<source>Feedback and suggestions are welcome</source> +<target>Wszelkie opinie i sugestie mile widziane</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Komentarze i sugestie mile widziane na:</target> +<source>Homepage</source> +<target>Strona domowa</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync na Sourceforge</target> -<source>Homepage</source> -<target>Strona domowa</target> +<source>Email</source> +<target>Poczta</target> -<source>If you like FFS</source> -<target>Jeżeli Ci siÄ™ podoba</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>PodziÄ™kowania za tÅ‚umaczenie FreeFileSync:</target> + +<source>If you like FreeFileSync</source> +<target>Podoba Ci siÄ™ FreeFileSync?</target> <source>Donate with PayPal</source> <target>Wesprzyj z PayPal</target> -<source>Email</source> -<target>Poczta</target> - -<source>Report translation error</source> -<target>ZgÅ‚oÅ› bÅ‚Ä…d w tÅ‚umaczeniu</target> - -<source>Published under the GNU General Public License:</source> -<target>UdostÄ™pnione na zasadach licencji GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>UdostÄ™pnione na zasadach licencji GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Ignoruj kolejne bÅ‚Ä™dy</target> @@ -867,6 +861,9 @@ Wyklucz: \moje\temp\* <source>Folder pairs</source> <target>Pary folderów</target> +<source>Compressed view</source> +<target>Widok skompresowany</target> + <source>Select view</source> <target>OkreÅ›l widok</target> @@ -885,20 +882,14 @@ Wyklucz: \moje\temp\* <source><multiple selection></source> <target><zaznaczone elementy></target> -<source>D-Click</source> -<target>Podw. klikniÄ™cie</target> - <source>Delete</source> <target>UsuÅ„</target> -<source>Customize...</source> -<target>Dostosuj...</target> - -<source>Select time span...</source> -<target>OkreÅ›l przedziaÅ‚ czasowy...</target> +<source>Include all</source> +<target>Zaznacz wszystko</target> -<source>Auto-adjust columns</source> -<target>Autodopasowanie kolumn</target> +<source>Exclude all</source> +<target>Odznacz wszystko</target> <source>Icon size:</source> <target>Rozmiar ikony:</target> @@ -912,14 +903,11 @@ Wyklucz: \moje\temp\* <source>Large</source> <target>Duży</target> -<source>Include all rows</source> -<target>DoÅ‚Ä…cz wszystkie rzÄ™dy</target> - -<source>Exclude all rows</source> -<target>Wyklucz wszystkie rzÄ™dy</target> +<source>Select time span...</source> +<target>OkreÅ›l przedziaÅ‚ czasowy...</target> -<source>Reset view</source> -<target>Resetuj widok</target> +<source>Default view</source> +<target>Widok domyÅ›lny</target> <source>Show "%x"</source> <target>Pokaż "%x"</target> @@ -1206,6 +1194,12 @@ Wyklucz: \moje\temp\* <source>Move files into a time-stamped subdirectory</source> <target>PrzenieÅ› pliki do oznaczonego podkatalogu</target> +<source>Files</source> +<target>Pliki</target> + +<source>Percentage</source> +<target>Procentowo</target> + <source>%x TB</source> <target>%x TB</target> @@ -1338,6 +1332,9 @@ Wyklucz: \moje\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Katalogi sÄ… zależne! PamiÄ™taj o tym podczas ustawiania zasad synchronizacji:</target> +<source>Preparing synchronization...</source> +<target>Przygotowywanie synchronizacji...</target> + <source>Memory allocation failed!</source> <target>BÅ‚Ä…d alokacji zasobów!</target> @@ -1455,8 +1452,8 @@ Wyklucz: \moje\temp\* <source>Target directory name must not be empty!</source> <target>Katalog docelowy nie może być pusty!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Katalog użytkownika dla elementów usuniÄ™tych nie zostaÅ‚ okreÅ›lony!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Nie okreÅ›lono katalogu do wersjonowania plików!</target> <source>Source directory does not exist anymore:</source> <target>Katalog źródÅ‚owy nie istnieje:</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Link Simbólico></target> - -<source><Directory></source> -<target><Directório></target> - -<source>Size</source> -<target>Tamanho</target> - -<source>Date</source> -<target>Data</target> - -<source>Full path</source> -<target>Caminho completo</target> - -<source>Filename</source> -<target>Nome do ficheiro</target> - -<source>Relative path</source> -<target>Caminho</target> - -<source>Directory</source> -<target>Directório</target> - -<source>Extension</source> -<target>Extensão</target> - -<source>Comparison Result</source> -<target>Resultados da comparação</target> - <source>Initial synchronization:</source> <target>Sincronização inicial:</target> @@ -354,6 +324,24 @@ A linha de comandos é executada cada vez que: <source>Logging</source> <target>A escrever em log</target> +<source>File time and size</source> +<target>Data e tamanho do ficheiro</target> + +<source>File content</source> +<target>Conteúdo do ficheiro</target> + +<source><Automatic></source> +<target><Automático></target> + +<source>Mirror ->></source> +<target>Espelhar ->></target> + +<source>Update -></source> +<target>Actualizar -></target> + +<source>Custom</source> +<target>Personalizado</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync ficheiro batch</target> @@ -411,6 +399,36 @@ A linha de comandos é executada cada vez que: <source>(Requires an Internet connection!)</source> <target>(Necessita acesso à Internet!)</target> +<source><Symlink></source> +<target><Link Simbólico></target> + +<source><Directory></source> +<target><Directório></target> + +<source>Full path</source> +<target>Caminho completo</target> + +<source>Name</source> +<target>Nome</target> + +<source>Relative path</source> +<target>Caminho</target> + +<source>Directory</source> +<target>Directório</target> + +<source>Size</source> +<target>Tamanho</target> + +<source>Date</source> +<target>Data</target> + +<source>Extension</source> +<target>Extensão</target> + +<source>Comparison Result</source> +<target>Resultados da comparação</target> + <source>Drag && drop</source> <target>Arrastar && Largar</target> @@ -435,9 +453,6 @@ A linha de comandos é executada cada vez que: <source>2. &Synchronize...</source> <target>2. &Sincronizar...</target> -<source>S&witch view</source> -<target>&Mudar vista</target> - <source>&New</source> <target>&Novo</target> @@ -582,27 +597,15 @@ A linha de comandos é executada cada vez que: <source>Select variant:</source> <target>Selecione uma variante:</target> -<source><Automatic></source> -<target><Automático></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identificar e propagar mudanças em ambos os lados utilizando base de dados. Eliminar, renomear e conflitos são detetados automaticamente.</target> -<source>Mirror ->></source> -<target>Espelhar ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>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.</target> -<source>Update -></source> -<target>Actualizar -></target> - <source>Copy new or updated files to right folder.</source> <target>Copiar ficheiros novos ou actualizados para a direita</target> -<source>Custom</source> -<target>Personalizado</target> - <source>Configure your own synchronization rules.</source> <target>Configure as suas regras de sincronização.</target> @@ -658,9 +661,6 @@ Ficheiros considerados iguais se são iguais </target> -<source>File time and size</source> -<target>Data e tamanho do ficheiro</target> - <source> Files are found equal if - file content @@ -671,9 +671,6 @@ Os ficheiros são considerados iguais se - o conteúdo é o mesmo </target> -<source>File content</source> -<target>Conteúdo do ficheiro</target> - <source>Symbolic Link handling</source> <target>Tratamento de links simbólicos</target> @@ -689,32 +686,29 @@ Os ficheiros são considerados iguais se <source>Source code written in C++ utilizing:</source> <target>Código fonte escrito em C++ usando:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Pela tradução de FreeFileSync, um agradecimento a:</target> +<source>Feedback and suggestions are welcome</source> +<target>Comentários e sugestões são apreciados</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Comentários e sugestões são benvindos em:</target> +<source>Homepage</source> +<target>Site</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync na Sourceforge</target> -<source>Homepage</source> -<target>Site</target> +<source>Email</source> +<target>Email</target> -<source>If you like FFS</source> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Pela tradução de FreeFileSync, um agradecimento a:</target> + +<source>If you like FreeFileSync</source> <target>Se gosta do FreeFileSync</target> <source>Donate with PayPal</source> <target>Doar usando PayPal</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>Informar um erro de tradução</target> - -<source>Published under the GNU General Public License:</source> -<target>Publicado sobre GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>Publicado sobre GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Ignorar erros subsequentes</target> @@ -863,6 +857,9 @@ Excluir: \stuff\temp\* <source>Folder pairs</source> <target>Par de directório</target> +<source>Compressed view</source> +<target>Vista compacta</target> + <source>Select view</source> <target>Seleccionar vista</target> @@ -881,20 +878,14 @@ Excluir: \stuff\temp\* <source><multiple selection></source> <target><selecção múltipla></target> -<source>D-Click</source> -<target>Duplo Clique</target> - <source>Delete</source> <target>Eliminar</target> -<source>Customize...</source> -<target>Personalizar...</target> - -<source>Select time span...</source> -<target>Selecione intervalo de tempo...</target> +<source>Include all</source> +<target>Incluir tudo</target> -<source>Auto-adjust columns</source> -<target>Auto ajustar colunas</target> +<source>Exclude all</source> +<target>Excluir tudo</target> <source>Icon size:</source> <target>Tamanho Ãcone:</target> @@ -908,14 +899,11 @@ Excluir: \stuff\temp\* <source>Large</source> <target>Grande</target> -<source>Include all rows</source> -<target>Incluir todas as linhas</target> - -<source>Exclude all rows</source> -<target>Excluir todas linhas</target> +<source>Select time span...</source> +<target>Selecione intervalo de tempo...</target> -<source>Reset view</source> -<target>Restaurar vista</target> +<source>Default view</source> +<target>Vista normal</target> <source>Show "%x"</source> <target>Mostrar "%x"</target> @@ -1196,6 +1184,12 @@ Excluir: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Mover ficheiros para uma subpasta datada</target> +<source>Files</source> +<target>Ficheiros</target> + +<source>Percentage</source> +<target>Percentagem</target> + <source>%x TB</source> <target>%x TB</target> @@ -1325,6 +1319,9 @@ Excluir: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Directórios são dependentes! Cuidado ao definir as regras de sincronização:</target> +<source>Preparing synchronization...</source> +<target>A preparar sincronização...</target> + <source>Memory allocation failed!</source> <target>Alocação de memória falhou!</target> @@ -1442,8 +1439,8 @@ Excluir: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Nome do directório de destino não pode estar vazio!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Directório para eliminação não foi especificado!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Diretório para armazenar versões não foi definido!</target> <source>Source directory does not exist anymore:</source> <target>A pasta de origem já não existe:</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Link Simbólico></target> - -<source><Directory></source> -<target><Diretório></target> - -<source>Size</source> -<target>Tamanho</target> - -<source>Date</source> -<target>Data</target> - -<source>Full path</source> -<target>Caminho completo</target> - -<source>Filename</source> -<target>Nome do arquivo</target> - -<source>Relative path</source> -<target>Caminho relativo</target> - -<source>Directory</source> -<target>Diretório</target> - -<source>Extension</source> -<target>Extensão</target> - -<source>Comparison Result</source> -<target>Resultado da Comparação</target> - <source>Initial synchronization:</source> <target>Sincronização inicial:</target> @@ -354,6 +324,24 @@ A linha de comando é executada cada vez que: <source>Logging</source> <target>Log</target> +<source>File time and size</source> +<target>Data e tamanho do arquivo</target> + +<source>File content</source> +<target>Conteúdo do arquivo</target> + +<source><Automatic></source> +<target><Automático></target> + +<source>Mirror ->></source> +<target>Espelhar ->></target> + +<source>Update -></source> +<target>Atualizar -></target> + +<source>Custom</source> +<target>Personalizado</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync arquivo batch</target> @@ -411,23 +399,53 @@ A linha de comando é executada cada vez que: <source>(Requires an Internet connection!)</source> <target>(Requer conexão com a Internet!)</target> +<source><Symlink></source> +<target><Link Simbólico></target> + +<source><Directory></source> +<target><Diretório></target> + +<source>Full path</source> +<target>Caminho completo</target> + +<source>Name</source> +<target>Nome</target> + +<source>Relative path</source> +<target>Caminho relativo</target> + +<source>Directory</source> +<target>Diretório</target> + +<source>Size</source> +<target>Tamanho</target> + +<source>Date</source> +<target>Data</target> + +<source>Extension</source> +<target>Extensão</target> + +<source>Comparison Result</source> +<target>Resultado da Comparação</target> + <source>Drag && drop</source> <target>Arrastar && Soltar</target> <source>Close progress dialog</source> -<target></target> +<target>Fechar indicador de progresso</target> <source>Shut down</source> -<target></target> +<target>Desligar</target> <source>Log off</source> -<target></target> +<target>Fazer logoff</target> <source>Standby</source> -<target></target> +<target>Em espera</target> <source>Hibernate</source> -<target></target> +<target>Hibernar</target> <source>1. &Compare</source> <target>1. C&omparar</target> @@ -435,9 +453,6 @@ A linha de comando é executada cada vez que: <source>2. &Synchronize...</source> <target>2. S&incronizar...</target> -<source>S&witch view</source> -<target>A<erar visualização</target> - <source>&New</source> <target>&Novo</target> @@ -520,7 +535,7 @@ A linha de comando é executada cada vez que: <target>Elementos encontrados:</target> <source>Items remaining:</source> -<target>Elementos faltantes:</target> +<target>Elementos restantes:</target> <source>Speed:</source> <target>Velocidade:</target> @@ -556,7 +571,7 @@ A linha de comando é executada cada vez que: <target>Informação do Status</target> <source>Show progress dialog</source> -<target></target> +<target>Mostrar indicador de progresso</target> <source>Error handling</source> <target>Tratamento de erros</target> @@ -582,27 +597,15 @@ A linha de comando é executada cada vez que: <source>Select variant:</source> <target>Selecione um modo:</target> -<source><Automatic></source> -<target><Automático></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identifica e propaga as mudanças em ambos os lados usando um banco de dados. Arquivos apagados, renomeados e conflitantes são detectados automaticamente.</target> -<source>Mirror ->></source> -<target>Espelhar ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Backup espelho da pasta da esquerda. A pasta da direita será modificada para ficar exatamente igual à pasta da esquerda após a sincronização.</target> -<source>Update -></source> -<target>Atualizar -></target> - <source>Copy new or updated files to right folder.</source> <target>Copia arquivos novos ou atualizados para a pasta da direita</target> -<source>Custom</source> -<target>Personalizado</target> - <source>Configure your own synchronization rules.</source> <target>Configure as suas próprias regras de sincronização.</target> @@ -610,7 +613,7 @@ A linha de comando é executada cada vez que: <target>Tratamento da exclusão</target> <source>On completion:</source> -<target></target> +<target>Ao terminar:</target> <source>Configuration</source> <target>Configuração</target> @@ -658,9 +661,6 @@ Os arquivos são considerados iguais se são os mesmos </target> -<source>File time and size</source> -<target>Data e tamanho do arquivo</target> - <source> Files are found equal if - file content @@ -672,9 +672,6 @@ Os arquivos são considerados iguais se é o mesmo </target> -<source>File content</source> -<target>Conteúdo do arquivo</target> - <source>Symbolic Link handling</source> <target>Tratamento de Links Simbólicos</target> @@ -690,32 +687,29 @@ Os arquivos são considerados iguais se <source>Source code written in C++ utilizing:</source> <target>Código-fonte escrito em C++ utilizando:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Pela tradução do FreeFileSync, um agradecimento a:</target> +<source>Feedback and suggestions are welcome</source> +<target>CrÃticas e sugestões são bem-vindas</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Comentários e sugestões são bem-vindos:</target> +<source>Homepage</source> +<target>Homepage</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync na Sourceforge</target> -<source>Homepage</source> -<target>Homepage</target> +<source>Email</source> +<target>E-mail</target> -<source>If you like FFS</source> -<target>Se você gosta do FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Pela tradução do FreeFileSync, um agradecimento a:</target> + +<source>If you like FreeFileSync</source> +<target>Se você gosta do FreeFileSync</target> <source>Donate with PayPal</source> <target>Doar usando PayPal</target> -<source>Email</source> -<target>E-mail</target> - -<source>Report translation error</source> -<target>Reportar erro de tradução</target> - -<source>Published under the GNU General Public License:</source> -<target>Publicado sobre a GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>Publicado sobre a GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Ignorar erros subsequentes</target> @@ -864,6 +858,9 @@ Excluir: \stuff\temp\* <source>Folder pairs</source> <target>Pares de pastas</target> +<source>Compressed view</source> +<target>Visualização compacta</target> + <source>Select view</source> <target>Selecionar visualização</target> @@ -882,20 +879,14 @@ Excluir: \stuff\temp\* <source><multiple selection></source> <target><seleção múltipla></target> -<source>D-Click</source> -<target>Duplo Click</target> - <source>Delete</source> <target>Apagar</target> -<source>Customize...</source> -<target>Personalizar...</target> - -<source>Select time span...</source> -<target>Selecionar perÃodo de tempo...</target> +<source>Include all</source> +<target>Incluir todos</target> -<source>Auto-adjust columns</source> -<target>Autoajustar colunas</target> +<source>Exclude all</source> +<target>Excluir todos</target> <source>Icon size:</source> <target>Tamanho do Ãcone:</target> @@ -909,14 +900,11 @@ Excluir: \stuff\temp\* <source>Large</source> <target>Grande</target> -<source>Include all rows</source> -<target>Incluir todas as linhas</target> - -<source>Exclude all rows</source> -<target>Excluir todas as linhas</target> +<source>Select time span...</source> +<target>Selecionar perÃodo de tempo...</target> -<source>Reset view</source> -<target>Restaurar visualização</target> +<source>Default view</source> +<target>Visualização padrão</target> <source>Show "%x"</source> <target>Mostrar "%x"</target> @@ -1197,6 +1185,12 @@ Excluir: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Mover arquivos para um subdiretório com carimbo de tempo</target> +<source>Files</source> +<target>Arquivos</target> + +<source>Percentage</source> +<target>Percentual</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1320,9 @@ Excluir: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Diretórios são dependentes! Cuidado ao definir as regras de sincronização:</target> +<source>Preparing synchronization...</source> +<target>Preparando sincronização...</target> + <source>Memory allocation failed!</source> <target>Alocação de memória falhou!</target> @@ -1443,8 +1440,8 @@ Excluir: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Nome do diretório de destino não pode estar vazio!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Diretório especificado para arquivos apagados não foi definido!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Diretório para controle de versões não foi fornecido!</target> <source>Source directory does not exist anymore:</source> <target>Diretório de origem não existe mais:</target> 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 @@ <pluralform>%x de BaiÈ›i</pluralform> </target> -<source><Symlink></source> -<target><Simlegătură></target> - -<source><Directory></source> -<target><Dosar></target> - -<source>Size</source> -<target>Mărime</target> - -<source>Date</source> -<target>Dată</target> - -<source>Full path</source> -<target>Calea Completă</target> - -<source>Filename</source> -<target>Numele Elementului</target> - -<source>Relative path</source> -<target>Calea Relativă</target> - -<source>Directory</source> -<target>Dosar</target> - -<source>Extension</source> -<target>Extensie</target> - -<source>Comparison Result</source> -<target>Rezultatul Comparării</target> - <source>Initial synchronization:</source> <target>Sincronizare iniÈ›ială:</target> @@ -239,7 +209,7 @@ <target>Eroare la mutarea în Reciclator:</target> <source>Could not load a required DLL:</source> -<target>Nu pot încărca o filă DLL necesară:</target> +<target>Nu pot deschide o filă DLL necesară:</target> <source>Error accessing Volume Shadow Copy Service!</source> <target>Eroare la accesarea Serviciului de Conservare a Volumelor [Volume Shadow Copy]!</target> @@ -357,6 +327,24 @@ Linia de comandă este executată de fiecare dată cînd: <source>Logging</source> <target>Jurnal</target> +<source>File time and size</source> +<target>Timpul È™i Mărimea Filelor</target> + +<source>File content</source> +<target>ConÈ›inutul Filelor</target> + +<source><Automatic></source> +<target><Sincronizare Inteligentă></target> + +<source>Mirror ->></source> +<target>Clonare =>></target> + +<source>Update -></source> +<target>Actualizare =></target> + +<source>Custom</source> +<target>Sincronizare Personalizată</target> + <source>FreeFileSync batch file</source> <target>Filă cu set de comenzi FreeFileSync</target> @@ -414,8 +402,38 @@ Linia de comandă este executată de fiecare dată cînd: <source>(Requires an Internet connection!)</source> <target>(Necesită o conexiune la internet!)</target> +<source><Symlink></source> +<target><Simlegătură></target> + +<source><Directory></source> +<target><Dosar></target> + +<source>Full path</source> +<target>Cale Completă</target> + +<source>Name</source> +<target>Nume</target> + +<source>Relative path</source> +<target>Cale Relativă</target> + +<source>Directory</source> +<target>Dosar</target> + +<source>Size</source> +<target>Mărime</target> + +<source>Date</source> +<target>Dată</target> + +<source>Extension</source> +<target>Extensie</target> + +<source>Comparison Result</source> +<target>Rezultatul Comparării</target> + <source>Drag && drop</source> -<target>Trage È™i pune un dosar peste compartimentul de mai jos sau foloseÈ™te butonul de explorare</target> +<target>Trage È™i pune un dosar în cîmpul de mai jos sau foloseÈ™te butonul de explorare</target> <source>Close progress dialog</source> <target>ÃŽnchide Fereastra cu Progresul Sincronizării</target> @@ -585,27 +603,15 @@ Linia de comandă este executată de fiecare dată cînd: <source>Select variant:</source> <target>Selectează Varianta de Sincronizare:</target> -<source><Automatic></source> -<target><Sincronizare Inteligentă></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identificare È™i propagare a modificărilor din ambele părÈ›i folosind o bază de date. Ștergerile, renumirile È™i conflictele sînt detectate automat</target> -<source>Mirror ->></source> -<target>Clonare =>></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Conservare [backup] în oglindă a dosarului stîng. Dosarul drept e modificat pentru a fi identic după sincronizare cu cel stîng.</target> -<source>Update -></source> -<target>Actualizare =></target> - <source>Copy new or updated files to right folder.</source> <target>Copiere în dosarul din dreapta a filelor actualizate sau noi.</target> -<source>Custom</source> -<target>Sincronizare Personalizată</target> - <source>Configure your own synchronization rules.</source> <target>Reguli de sincronizare definite de utilizator pentru fiecare situaÈ›ie.</target> @@ -661,9 +667,6 @@ Filele sînt considerate identice dacă sînt aceleaÈ™i </target> -<source>File time and size</source> -<target>Timpul È™i Mărimea Filelor</target> - <source> Files are found equal if - file content @@ -675,9 +678,6 @@ Filele sînt considerate identice dacă este acelaÈ™i </target> -<source>File content</source> -<target>ConÈ›inutul Filelor</target> - <source>Symbolic Link handling</source> <target>Prelucrarea Legăturilor Simbolice (Simlegături)</target> @@ -693,32 +693,29 @@ este acelaÈ™i <source>Source code written in C++ utilizing:</source> <target>Cod sursă scris în C++ folosind:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>MulÈ›umiri pentru traducerea FreeFileSync:</target> +<source>Feedback and suggestions are welcome</source> +<target>Opiniile È™i sugestiile despre program sînt binevenite</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Opiniile È™i sugestiile sînt binevenite:</target> +<source>Homepage</source> +<target>Situl Softului</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync la Sourceforge</target> -<source>Homepage</source> -<target>Sit</target> +<source>Email</source> +<target>Adresa Autorului</target> -<source>If you like FFS</source> -<target>Donează pentru FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>MulÈ›umiri pentru traducerea FreeFileSync:</target> + +<source>If you like FreeFileSync</source> +<target>Donează pentru FreeFileSync</target> <source>Donate with PayPal</source> <target>Donează prin PayPal</target> -<source>Email</source> -<target>Adresă</target> - -<source>Report translation error</source> -<target>Raportează erori de trad.</target> - -<source>Published under the GNU General Public License:</source> -<target>Publicat sub licenÈ›a GNU GPL:</target> +<source>Published under the GNU General Public License</source> +<target>Publicat sub licenÈ›a GNU GPL</target> <source>Ignore subsequent errors</source> <target>Ignoră (nu lua în seamă) erorile ulterioare</target> @@ -802,7 +799,7 @@ Excluse: \stuff\temp\* <target>Mărimea maximă a filei</target> <source>&Default</source> -<target>&Implicite</target> +<target>Coloanele &Implicite</target> <source>Move column up</source> <target>Mută coloana în sus</target> @@ -811,13 +808,13 @@ Excluse: \stuff\temp\* <target>Mută coloana în jos</target> <source>Transactional file copy</source> -<target>Copiere tranzacÈ›ională a filelor</target> +<target>Copiază filele în mod tranzacÈ›ional</target> <source>Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error.</source> <target>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.</target> <source>Copy locked files</source> -<target>Copiere a filelor partajate [shared] sau zăvorîte [locked]</target> +<target>Copiază filele partajate [shared] sau zăvorîte [locked]</target> <source>Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)</source> <target>Filele partajate sau zăvorîte sînt copiate folosind Serviciul de Conservare a Volumelor din Windows [Volume Shadow Copy] (necesită drepturi de Administrator)</target> @@ -826,7 +823,7 @@ Excluse: \stuff\temp\* <target>Copiază permisiunile de acces ale filelor</target> <source>Transfer file and directory permissions (Requires Administrator rights)</source> -<target>Transferă permisiunile filelor È™i dosarelor (necesită drepturi de Administrator)</target> +<target>Permisiunile filelor È™i dosarelor sînt È™i ele transferate (necesită drepturi de Administrator)</target> <source>Hidden dialogs:</source> <target>Casete de dialog ascunse:</target> @@ -867,6 +864,9 @@ Excluse: \stuff\temp\* <source>Folder pairs</source> <target>Perechi de Dosare</target> +<source>Compressed view</source> +<target>Vedere Comprimată</target> + <source>Select view</source> <target>Selectează Vederea</target> @@ -885,20 +885,14 @@ Excluse: \stuff\temp\* <source><multiple selection></source> <target><selectare multiplă></target> -<source>D-Click</source> -<target>Clic-Dreapta</target> - <source>Delete</source> <target>Șterge</target> -<source>Customize...</source> -<target>Personalizează...</target> - -<source>Select time span...</source> -<target>Selectează intervalul de timp...</target> +<source>Include all</source> +<target>Include Tot</target> -<source>Auto-adjust columns</source> -<target>Ajustează Automat Coloanele</target> +<source>Exclude all</source> +<target>Exclude Tot</target> <source>Icon size:</source> <target>Mărimea Icoanelor Elementelor:</target> @@ -912,14 +906,11 @@ Excluse: \stuff\temp\* <source>Large</source> <target>Mare</target> -<source>Include all rows</source> -<target>Include Toate Rîndurile</target> - -<source>Exclude all rows</source> -<target>Exclude Toate Rîndurile</target> +<source>Select time span...</source> +<target>Selectează intervalul de timp...</target> -<source>Reset view</source> -<target>Resetează Vederea</target> +<source>Default view</source> +<target>Vedere Implicită</target> <source>Show "%x"</source> <target>Arată "%x"</target> @@ -934,7 +925,7 @@ Excluse: \stuff\temp\* <target>Vrei să salvezi modificările configuraÈ›iei curente?</target> <source>Configuration loaded!</source> -<target>ConfiguraÈ›ie încărcată !</target> +<target>ConfiguraÈ›ie deschisă !</target> <source>Folder Comparison and Synchronization</source> <target>Comparare È™i Sincronizare de Dosare</target> @@ -1148,7 +1139,7 @@ Excluse: \stuff\temp\* <target>UrmăreÈ™te</target> <source>Copy NTFS permissions</source> -<target>Copiere a permisiunilor NTFS</target> +<target>Copiază permisiunile NTFS</target> <source>Integrate external applications into context menu. The following macros are available:</source> <target>Comenzi pentru aplicaÈ›ii externe incluse în meniul contextual al softului. Sînt disponibile următoarele macrocomenzi:</target> @@ -1206,6 +1197,12 @@ Excluse: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Filele sînt mutate într-un subdosar special cu marcaj de timp</target> +<source>Files</source> +<target>File</target> + +<source>Percentage</source> +<target>Procent</target> + <source>%x TB</source> <target>%x TB</target> @@ -1276,7 +1273,7 @@ Excluse: \stuff\temp\* <target>Eroare la schimbarea datei de modificare:</target> <source>Error loading library function:</source> -<target>Eroare la încărcarea bibliotecii de funcÈ›ii:</target> +<target>Eroare la deschiderea bibliotecii de funcÈ›ii:</target> <source>Error reading security context:</source> <target>Eroare la citirea contextului de securitate:</target> @@ -1338,6 +1335,9 @@ Excluse: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Dosarele sînt interdependente! AtenÈ›ie la setarea regulilor de sincronizare:</target> +<source>Preparing synchronization...</source> +<target>Pregătesc sincronizarea...</target> + <source>Memory allocation failed!</source> <target>Alocarea memoriei a eÈ™uat!</target> @@ -1455,8 +1455,8 @@ Excluse: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Numele dosarului È›intă nu poate să lipsească!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Dosarul ales de utilizator pentru È™tergere nu a fost specificat !</target> +<source>Directory for file versioning was not supplied!</source> +<target>Dosarul pentru versionarea filelor n-a fost specificat!</target> <source>Source directory does not exist anymore:</source> <target>Dosarul sursă nu mai există:</target> 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 @@ <pluralform>%x Байт</pluralform> </target> -<source><Symlink></source> -<target><Ð¡Ð¸Ð¼Ð²Ð¾Ð»ÑŒÐ½Ð°Ñ ÑÑылка></target> - -<source><Directory></source> -<target><Папка></target> - -<source>Size</source> -<target>Размер</target> - -<source>Date</source> -<target>Дата</target> - -<source>Full path</source> -<target>Полный путь</target> - -<source>Filename</source> -<target>Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°</target> - -<source>Relative path</source> -<target>ОтноÑительный путь</target> - -<source>Directory</source> -<target>Папка</target> - -<source>Extension</source> -<target>РаÑширение</target> - -<source>Comparison Result</source> -<target>Результаты ÑравнениÑ</target> - <source>Initial synchronization:</source> <target>ÐŸÐµÑ€Ð²Ð¾Ð½Ð°Ñ‡Ð°Ð»ÑŒÐ½Ð°Ñ ÑинхронизациÑ:</target> @@ -357,6 +327,24 @@ The command line is executed each time: <source>Logging</source> <target>Лог-файлы</target> +<source>File time and size</source> +<target>Дата и размер файла</target> + +<source>File content</source> +<target>Содержимое файла</target> + +<source><Automatic></source> +<target><ÐвтоматичеÑкий></target> + +<source>Mirror ->></source> +<target>Зеркало ->></target> + +<source>Update -></source> +<target>Обновить -></target> + +<source>Custom</source> +<target>Выборочно</target> + <source>FreeFileSync batch file</source> <target>Файл пакетного Ð·Ð°Ð´Ð°Ð½Ð¸Ñ FreeFileSync</target> @@ -414,6 +402,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(требуетÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ðµ к Интернету!)</target> +<source><Symlink></source> +<target><Ð¡Ð¸Ð¼Ð²Ð¾Ð»ÑŒÐ½Ð°Ñ ÑÑылка></target> + +<source><Directory></source> +<target><Папка></target> + +<source>Full path</source> +<target>Полный путь</target> + +<source>Name</source> +<target>ИмÑ</target> + +<source>Relative path</source> +<target>ОтноÑительный путь</target> + +<source>Directory</source> +<target>Папка</target> + +<source>Size</source> +<target>Размер</target> + +<source>Date</source> +<target>Дата</target> + +<source>Extension</source> +<target>РаÑширение</target> + +<source>Comparison Result</source> +<target>Результаты ÑравнениÑ</target> + <source>Drag && drop</source> <target>Drag && drop</target> @@ -438,9 +456,6 @@ The command line is executed each time: <source>2. &Synchronize...</source> <target>2. &Синхронизировать</target> -<source>S&witch view</source> -<target>Переключить вид</target> - <source>&New</source> <target>&ÐоваÑ</target> @@ -588,27 +603,15 @@ The command line is executed each time: <source>Select variant:</source> <target>Варианты Ñинхронизации</target> -<source><Automatic></source> -<target><ÐвтоматичеÑкий></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Ð’Ñ‹Ñвление и раÑпроÑтранение изменений на обе Ñтороны, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð±Ð°Ð·Ñƒ данных. Удаленные, переименованные и конфликтные файлы определÑÑŽÑ‚ÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑки.</target> -<source>Mirror ->></source> -<target>Зеркало ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Ð—ÐµÑ€ÐºÐ°Ð»ÑŒÐ½Ð°Ñ (резервнаÑ) ÐºÐ¾Ð¿Ð¸Ñ Ð»ÐµÐ²Ð¾Ð¹ чаÑти. Ð’ результате Ñинхронизации Ð¿Ñ€Ð°Ð²Ð°Ñ Ð¿Ð°Ð¿ÐºÐ° будет изменена до полного ÑоответÑÑ‚Ð²Ð¸Ñ Ð»ÐµÐ²Ð¾Ð¹.</target> -<source>Update -></source> -<target>Обновить -></target> - <source>Copy new or updated files to right folder.</source> <target>Копировать новые или обновлÑÑ‚ÑŒ файлы на правой Ñтороне.</target> -<source>Custom</source> -<target>Выборочно</target> - <source>Configure your own synchronization rules.</source> <target>ÐаÑтроить Ñвои ÑобÑтвенные правила Ñинхронизации.</target> @@ -663,9 +666,6 @@ are the same - размер файла </target> -<source>File time and size</source> -<target>Дата и размер файла</target> - <source> Files are found equal if - file content @@ -673,9 +673,6 @@ is the same </source> <target>Файлы ÑчитаютÑÑ Ñ€Ð°Ð²Ð½Ñ‹Ð¼Ð¸, еÑли Ñодержание файлов одинаковое</target> -<source>File content</source> -<target>Содержимое файла</target> - <source>Symbolic Link handling</source> <target>Обращение к Ñимвольной ÑÑылке</target> @@ -691,32 +688,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>ИÑходный код напиÑан на C++ Ñ Ð¸Ñпользованием:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Большое ÑпаÑибо за перевод FreeFileSync:</target> +<source>Feedback and suggestions are welcome</source> +<target>Ð—Ð°Ð¼ÐµÑ‡Ð°Ð½Ð¸Ñ Ð¸ Ð¿Ñ€ÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸Ð²ÐµÑ‚ÑтвуютÑÑ</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Отзывы и Ð¿Ñ€ÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸Ñылайте по адреÑу:</target> +<source>Homepage</source> +<target>Оф.Ñайт</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync на Sourceforge</target> -<source>Homepage</source> -<target>Оф.Ñайт</target> +<source>Email</source> +<target>Почта</target> -<source>If you like FFS</source> -<target>ЕÑли Вам понравилÑÑ FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Большое ÑпаÑибо за перевод FreeFileSync:</target> + +<source>If you like FreeFileSync</source> +<target>ЕÑли Вам понравилÑÑ FreeFileSync</target> <source>Donate with PayPal</source> <target>Отправить деньги через PayPal</target> -<source>Email</source> -<target>Почта</target> - -<source>Report translation error</source> -<target>Сообщить об ошибке перевода</target> - -<source>Published under the GNU General Public License:</source> -<target>ИздаетÑÑ Ð¿Ð¾Ð´ лицензией GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>ИздаетÑÑ Ð¿Ð¾Ð´ лицензией GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Игнорировать поÑледующие ошибки</target> @@ -865,6 +859,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>Пары папок Ð´Ð»Ñ Ñинхронизации</target> +<source>Compressed view</source> +<target>Компактный вид</target> + <source>Select view</source> <target>Вид ÑпиÑка файлов</target> @@ -883,20 +880,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><групповое выделение></target> -<source>D-Click</source> -<target>Двойной клик</target> - <source>Delete</source> <target>Удалить</target> -<source>Customize...</source> -<target>Выбрать колонки...</target> - -<source>Select time span...</source> -<target>Выберите промежуток времени...</target> +<source>Include all</source> +<target>Включить вÑе</target> -<source>Auto-adjust columns</source> -<target>Ðвтовыравнивание ширины колонок</target> +<source>Exclude all</source> +<target>ИÑключить вÑе</target> <source>Icon size:</source> <target>Размер иконок:</target> @@ -910,14 +901,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>- большой</target> -<source>Include all rows</source> -<target>Отметить вÑе</target> - -<source>Exclude all rows</source> -<target>Ðе отмечать ничего</target> +<source>Select time span...</source> +<target>Выберите промежуток времени...</target> -<source>Reset view</source> -<target>Ð¡Ð±Ñ€Ð¾Ñ Ð½Ð°Ñтроек вида</target> +<source>Default view</source> +<target>Стандартный вид</target> <source>Show "%x"</source> <target>Показать "%x"</target> @@ -1202,11 +1190,17 @@ Exclude: \stuff\temp\* <target>ИÑпользовать "Корзину" при удалении или перезапиÑи файлов</target> <source>Versioning</source> -<target>Перемещать удалÑемые файлы в заданную папку</target> +<target>Перемещать Ñтарые верÑии файлов в заданную папку</target> <source>Move files into a time-stamped subdirectory</source> <target>Перемещать файлы в заданную папку (можно Ñоздавать архивные верÑии удаленных файлов)</target> +<source>Files</source> +<target>Файлы</target> + +<source>Percentage</source> +<target>Проценты</target> + <source>%x TB</source> <target>%x ТБ</target> @@ -1342,6 +1336,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>ЗавиÑимые папки! Будьте внимательны при наÑтройке правил Ñинхронизации:</target> +<source>Preparing synchronization...</source> +<target>Подготовка к Ñинхронизации...</target> + <source>Memory allocation failed!</source> <target>Ошибка Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð¼Ñти! (Ðе хватает памÑти)</target> @@ -1459,8 +1456,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Путь целевой папки не должен быть пуÑтым!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>ПользовательÑÐºÐ°Ñ Ð¿Ð°Ð¿ÐºÐ° Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð½Ðµ была указана!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Папка Ð´Ð»Ñ Ñтарых верÑий файлов не была указана!</target> <source>Source directory does not exist anymore:</source> <target>ИÑÑ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ° больше не ÑущеÑтвует:</target> 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 @@ <pluralform>%x Bajtov</pluralform> </target> -<source><Symlink></source> -<target><SimboliÄna povezava></target> - -<source><Directory></source> -<target><Imenik></target> - -<source>Size</source> -<target>Velikost</target> - -<source>Date</source> -<target>Datum</target> - -<source>Full path</source> -<target>Polna pot</target> - -<source>Filename</source> -<target>Ime datoteke</target> - -<source>Relative path</source> -<target>Relativna pot</target> - -<source>Directory</source> -<target>Imenik</target> - -<source>Extension</source> -<target>RazÅ¡iritev</target> - -<source>Comparison Result</source> -<target>Rezultati primerjave</target> - <source>Initial synchronization:</source> <target>ZaÄetna sinhronizacija:</target> @@ -360,6 +330,24 @@ Ukazna vrstica se izvrÅ¡i vsakiÄ ko: <source>Logging</source> <target>Beleženje</target> +<source>File time and size</source> +<target>ÄŒas in velikost datoteke</target> + +<source>File content</source> +<target>Vsebini datoteke</target> + +<source><Automatic></source> +<target><Samodejno></target> + +<source>Mirror ->></source> +<target>Zrcalno ->></target> + +<source>Update -></source> +<target>Posodobi -></target> + +<source>Custom</source> +<target>Po meri</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync paketna datoteka</target> @@ -417,6 +405,36 @@ Ukazna vrstica se izvrÅ¡i vsakiÄ ko: <source>(Requires an Internet connection!)</source> <target>(Zahteva povezavo z Internetom!)</target> +<source><Symlink></source> +<target><SimboliÄna povezava></target> + +<source><Directory></source> +<target><Imenik></target> + +<source>Full path</source> +<target>Polna pot</target> + +<source>Name</source> +<target>Ime</target> + +<source>Relative path</source> +<target>Relativna pot</target> + +<source>Directory</source> +<target>Imenik</target> + +<source>Size</source> +<target>Velikost</target> + +<source>Date</source> +<target>Datum</target> + +<source>Extension</source> +<target>RazÅ¡iritev</target> + +<source>Comparison Result</source> +<target>Rezultati primerjave</target> + <source>Drag && drop</source> <target>Povleci && spusti</target> @@ -441,9 +459,6 @@ Ukazna vrstica se izvrÅ¡i vsakiÄ ko: <source>2. &Synchronize...</source> <target>2. &Sinhroniziraj...</target> -<source>S&witch view</source> -<target>Sp&remeni pogled</target> - <source>&New</source> <target>&Novo</target> @@ -588,27 +603,15 @@ Ukazna vrstica se izvrÅ¡i vsakiÄ ko: <source>Select variant:</source> <target>Izberite varianto:</target> -<source><Automatic></source> -<target><Samodejno></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identificiraj in promoviraj spremembe na obeh straneh z uporabo podatkovne baze. Izbrisi, preimenovanja in spori so samodejno zaznani.</target> -<source>Mirror ->></source> -<target>Zrcalno ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Zrcalna varnostna kopija leve mape. Desna mapa bo spremenjena, da se bo natanÄno ujemala z levo mapo po sinhronizaciji.</target> -<source>Update -></source> -<target>Posodobi -></target> - <source>Copy new or updated files to right folder.</source> <target>Kopiraj nove ali posodobljene datoteke v desno mapo.</target> -<source>Custom</source> -<target>Po meri</target> - <source>Configure your own synchronization rules.</source> <target>Konfigurirajte vaÅ¡a lastna sinhronizacijska pravila.</target> @@ -664,9 +667,6 @@ Datoteki sta enaki, Äe sta enaka </target> -<source>File time and size</source> -<target>ÄŒas in velikost datoteke</target> - <source> Files are found equal if - file content @@ -678,9 +678,6 @@ Datoteki sta enaki, Äe enaka </target> -<source>File content</source> -<target>Vsebini datoteke</target> - <source>Symbolic Link handling</source> <target>Rokovanje s simboliÄnimi povezavami</target> @@ -696,32 +693,29 @@ enaka <source>Source code written in C++ utilizing:</source> <target>Izvorna koda napisana v C++ z uporabo:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Zahvale za prevod FreeFileSync gredo:</target> +<source>Feedback and suggestions are welcome</source> +<target>Povratne informacije in predlogi so dobrodoÅ¡li</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Povratne informacije in predlogi so dobrodoÅ¡li na:</target> +<source>Homepage</source> +<target>DomaÄa stran</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync na Sourceforge</target> -<source>Homepage</source> -<target>DomaÄa stran</target> +<source>Email</source> +<target>Email</target> -<source>If you like FFS</source> -<target>ÄŒe vam je FFS vÅ¡eÄ</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Zahvale za prevod FreeFileSync gredo:</target> + +<source>If you like FreeFileSync</source> +<target>ÄŒe vam je FreeFileSync vÅ¡eÄ</target> <source>Donate with PayPal</source> <target>Doniraj s PayPal</target> -<source>Email</source> -<target>Email</target> - -<source>Report translation error</source> -<target>PoroÄaj o napaki prevoda</target> - -<source>Published under the GNU General Public License:</source> -<target>Objavljeno pod licenco GNU General Public:</target> +<source>Published under the GNU General Public License</source> +<target>Objavljeno pod licenco GNU General Public</target> <source>Ignore subsequent errors</source> <target>Ignoriraj vse nadaljnje napake</target> @@ -870,6 +864,9 @@ IzkljuÄi: \stuff\temp\* <source>Folder pairs</source> <target>Pari map</target> +<source>Compressed view</source> +<target>Stisnjeni pogled</target> + <source>Select view</source> <target>Izberite pogled</target> @@ -888,20 +885,14 @@ IzkljuÄi: \stuff\temp\* <source><multiple selection></source> <target><mnogokratna izbira></target> -<source>D-Click</source> -<target>D-Klik</target> - <source>Delete</source> <target>IzbriÅ¡i</target> -<source>Customize...</source> -<target>Prilagodi...</target> - -<source>Select time span...</source> -<target>Izberite Äasovni okvir...</target> +<source>Include all</source> +<target>VkljuÄi vse</target> -<source>Auto-adjust columns</source> -<target>Samo-prilagodi stolpce</target> +<source>Exclude all</source> +<target>IzkljuÄi vse</target> <source>Icon size:</source> <target>Velikost ikone:</target> @@ -915,14 +906,11 @@ IzkljuÄi: \stuff\temp\* <source>Large</source> <target>Velika</target> -<source>Include all rows</source> -<target>VkljuÄi se vrstice</target> - -<source>Exclude all rows</source> -<target>IzkljuÄi vse vrstice</target> +<source>Select time span...</source> +<target>Izberite Äasovni okvir...</target> -<source>Reset view</source> -<target>Ponastavi pogled</target> +<source>Default view</source> +<target>Privzeti pogled</target> <source>Show "%x"</source> <target>Prikaži "%x"</target> @@ -1215,6 +1203,12 @@ IzkljuÄi: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Premakni datoteke v Äasovno-oznaÄen podimenik</target> +<source>Files</source> +<target>Datoteke</target> + +<source>Percentage</source> +<target>Odstotek</target> + <source>%x TB</source> <target>%x TB</target> @@ -1350,6 +1344,9 @@ IzkljuÄi: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Imeniki so v odvisnosti! Bodite pozorni, ko nastavljate sinhronizacijska pravila:</target> +<source>Preparing synchronization...</source> +<target>Pripravljam sinhronizacijo...</target> + <source>Memory allocation failed!</source> <target>NeuspeÅ¡no dodeljevanje pomnilnika!</target> @@ -1467,8 +1464,8 @@ IzkljuÄi: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Ime ciljnega imenika ne sme biti prazno!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>UporabniÅ¡ko-doloÄen imenik za brisanje ni bil naveden!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Imenik za upravljanje z datoteÄnimi raliÄicami ni bil podan!</target> <source>Source directory does not exist anymore:</source> <target>Izvorni imenik ne obstaja veÄ:</target> 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 @@ <pluralform>%x Bytes</pluralform> </target> -<source><Symlink></source> -<target><Enlace simbólico></target> - -<source><Directory></source> -<target><Directorio></target> - -<source>Size</source> -<target>Tamaño</target> - -<source>Date</source> -<target>Fecha</target> - -<source>Full path</source> -<target>Ruta completa</target> - -<source>Filename</source> -<target>Nombre del archivo</target> - -<source>Relative path</source> -<target>Ruta relativa</target> - -<source>Directory</source> -<target>Directorio</target> - -<source>Extension</source> -<target>Extensión</target> - -<source>Comparison Result</source> -<target>Resultado de la comparación</target> - <source>Initial synchronization:</source> <target>Sincronización inicial:</target> @@ -354,6 +324,24 @@ La lÃnea de comandos se ejecuta cada vez: <source>Logging</source> <target>Iniciando sesión</target> +<source>File time and size</source> +<target>Fecha y tamaño del archivo</target> + +<source>File content</source> +<target>Contenido del archivo</target> + +<source><Automatic></source> +<target><Automático></target> + +<source>Mirror ->></source> +<target>Espejo ->></target> + +<source>Update -></source> +<target>Actualizar -></target> + +<source>Custom</source> +<target>Personalizado</target> + <source>FreeFileSync batch file</source> <target>Archivo batch de FreeFileSync</target> @@ -411,6 +399,36 @@ La lÃnea de comandos se ejecuta cada vez: <source>(Requires an Internet connection!)</source> <target>(¡Conexión a Internet necesaria!)</target> +<source><Symlink></source> +<target><Enlace simbólico></target> + +<source><Directory></source> +<target><Directorio></target> + +<source>Full path</source> +<target>Ruta completa</target> + +<source>Name</source> +<target>Nombre</target> + +<source>Relative path</source> +<target>Ruta relativa</target> + +<source>Directory</source> +<target>Directorio</target> + +<source>Size</source> +<target>Tamaño</target> + +<source>Date</source> +<target>Fecha</target> + +<source>Extension</source> +<target>Extensión</target> + +<source>Comparison Result</source> +<target>Resultado de la comparación</target> + <source>Drag && drop</source> <target>Arrastrar y soltar</target> @@ -435,9 +453,6 @@ La lÃnea de comandos se ejecuta cada vez: <source>2. &Synchronize...</source> <target>2. &Sincronizar...</target> -<source>S&witch view</source> -<target>C&ambiar vista</target> - <source>&New</source> <target>&Nuevo</target> @@ -582,27 +597,15 @@ La lÃnea de comandos se ejecuta cada vez: <source>Select variant:</source> <target>Seleccione un tipo:</target> -<source><Automatic></source> -<target><Automático></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Identificar y propagar cambios en ambos lados usando una base de datos. Borrados, renombraciones y conflictos son detectados automáticamente.</target> -<source>Mirror ->></source> -<target>Espejo ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>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.</target> -<source>Update -></source> -<target>Actualizar -></target> - <source>Copy new or updated files to right folder.</source> <target>Copiar archivos nuevos o actualizados a la carpeta de la derecha.</target> -<source>Custom</source> -<target>Personalizado</target> - <source>Configure your own synchronization rules.</source> <target>Configuración de sus propias reglas de sincronización.</target> @@ -658,9 +661,6 @@ Los archivos serán considerados iguales si son iguales </target> -<source>File time and size</source> -<target>Fecha y tamaño del archivo</target> - <source> Files are found equal if - file content @@ -672,9 +672,6 @@ Los archivos serán considerados iguales si es el mismo </target> -<source>File content</source> -<target>Contenido del archivo</target> - <source>Symbolic Link handling</source> <target>Gestión de enlaces simbólicos</target> @@ -690,32 +687,29 @@ es el mismo <source>Source code written in C++ utilizing:</source> <target>Código fuente escrito en C++ utilizando:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Agradecimientos por la traducción de FreeFileSync a:</target> +<source>Feedback and suggestions are welcome</source> +<target>Feedback y sugerencias son bienvenidas</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Comentarios y sugerencias son bienvenidos en:</target> +<source>Homepage</source> +<target>Página de inicio</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync en Sourceforge</target> -<source>Homepage</source> -<target>Página de inicio</target> +<source>Email</source> +<target>Correo electrónico</target> -<source>If you like FFS</source> -<target>Si te gusta FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Agradecimientos por la traducción de FreeFileSync a:</target> + +<source>If you like FreeFileSync</source> +<target>Si te gusta FreeFileSync</target> <source>Donate with PayPal</source> <target>Donar a través de PayPal</target> -<source>Email</source> -<target>Correo electrónico</target> - -<source>Report translation error</source> -<target>Informar de errores de traducción</target> - -<source>Published under the GNU General Public License:</source> -<target>Publicado bajo "GNU General Public License":</target> +<source>Published under the GNU General Public License</source> +<target>Publicado bajo "GNU General Public License"</target> <source>Ignore subsequent errors</source> <target>Ignorar errores posteriores</target> @@ -864,6 +858,9 @@ Excluir: \stuff\temp\* <source>Folder pairs</source> <target>Pares de carpetas</target> +<source>Compressed view</source> +<target>Vista comprimida</target> + <source>Select view</source> <target>Seleccione vista</target> @@ -882,20 +879,14 @@ Excluir: \stuff\temp\* <source><multiple selection></source> <target><selección múltiple></target> -<source>D-Click</source> -<target>Doble click</target> - <source>Delete</source> <target>Eliminar</target> -<source>Customize...</source> -<target>Personalizar...</target> - -<source>Select time span...</source> -<target>Seleccionar duración</target> +<source>Include all</source> +<target>Incluir todo</target> -<source>Auto-adjust columns</source> -<target>Ajustar automáticamente las columnas</target> +<source>Exclude all</source> +<target>Excluir todo</target> <source>Icon size:</source> <target>Tamaño del icono:</target> @@ -909,14 +900,11 @@ Excluir: \stuff\temp\* <source>Large</source> <target>Grande</target> -<source>Include all rows</source> -<target>Incluir todas las filas</target> - -<source>Exclude all rows</source> -<target>Excluir todas las columnas</target> +<source>Select time span...</source> +<target>Seleccionar duración</target> -<source>Reset view</source> -<target>Reiniciar vista</target> +<source>Default view</source> +<target>Vista por defecto</target> <source>Show "%x"</source> <target>Mostrar "%x"</target> @@ -1197,6 +1185,12 @@ Excluir: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Mover archivos a un subdirectorio con marca de tiempo</target> +<source>Files</source> +<target>Archivos</target> + +<source>Percentage</source> +<target>Porcentaje</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1320,9 @@ Excluir: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>¡Los directorios son dependientes! Tenga cuidado al establecer las reglas de sincronización:</target> +<source>Preparing synchronization...</source> +<target>Preparando sincronización...</target> + <source>Memory allocation failed!</source> <target>¡La asignación de memoria ha fallado!</target> @@ -1443,8 +1440,8 @@ Excluir: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>¡El nombre del directorio de destino no debe estar vacÃo!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>¡No se ha indicado el directorio definido por el usuario para el borrado!</target> +<source>Directory for file versioning was not supplied!</source> +<target>¡El directorio para el versionamiento de archivo no ha sido especificado!</target> <source>Source directory does not exist anymore:</source> <target>El directorio origen ya no existe:</target> 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 @@ <pluralform>%x Byte</pluralform> </target> -<source><Symlink></source> -<target><Symboliska länkar></target> - -<source><Directory></source> -<target><Katalog></target> - -<source>Size</source> -<target>Storlek</target> - -<source>Date</source> -<target>Datum</target> - -<source>Full path</source> -<target>Fullständig sökväg</target> - -<source>Filename</source> -<target>Filnamn</target> - -<source>Relative path</source> -<target>Sökväg</target> - -<source>Directory</source> -<target>Katalog</target> - -<source>Extension</source> -<target>Filformat</target> - -<source>Comparison Result</source> -<target>Jämförelseresultat</target> - <source>Initial synchronization:</source> <target>Initial synkronisering:</target> @@ -354,6 +324,24 @@ Kommandot verkställes när: <source>Logging</source> <target>Loggar</target> +<source>File time and size</source> +<target>Tidsstämpling och storlek</target> + +<source>File content</source> +<target>FilinnehÃ¥ll</target> + +<source><Automatic></source> +<target><Automatisk></target> + +<source>Mirror ->></source> +<target>Spegla ->></target> + +<source>Update -></source> +<target>Uppdatera -></target> + +<source>Custom</source> +<target>Anpassat</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync batch-fil</target> @@ -411,6 +399,36 @@ Kommandot verkställes när: <source>(Requires an Internet connection!)</source> <target>(Kräver Internetuppkoppling!)</target> +<source><Symlink></source> +<target><Symboliska länkar></target> + +<source><Directory></source> +<target><Katalog></target> + +<source>Full path</source> +<target>Fullständig sökväg</target> + +<source>Name</source> +<target>Namn</target> + +<source>Relative path</source> +<target>Sökväg</target> + +<source>Directory</source> +<target>Katalog</target> + +<source>Size</source> +<target>Storlek</target> + +<source>Date</source> +<target>Datum</target> + +<source>Extension</source> +<target>Filformat</target> + +<source>Comparison Result</source> +<target>Jämförelseresultat</target> + <source>Drag && drop</source> <target>Dra && släpp</target> @@ -582,27 +600,15 @@ Kommandot verkställes när: <source>Select variant:</source> <target>Välj variant:</target> -<source><Automatic></source> -<target><Automatisk></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Använd en databas för att identifiera och sprida ändringar pÃ¥ bÃ¥da sidor. Borttagning, namnbyte och konflikter upptäcks automatiskt</target> -<source>Mirror ->></source> -<target>Spegla ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Speglar säkerhetskopia av vänster katalog. Höger katalog ändras för att exakt matcha vänster efter synkroniseringen.</target> -<source>Update -></source> -<target>Uppdatera -></target> - <source>Copy new or updated files to right folder.</source> <target>Kopiera nya och uppdaterade filer till höger katalog.</target> -<source>Custom</source> -<target>Anpassat</target> - <source>Configure your own synchronization rules.</source> <target>Konfigurera dina egna synkroniseringsregler.</target> @@ -658,9 +664,6 @@ Filer betraktas som likvärdiga om är samma. </target> -<source>File time and size</source> -<target>Tidsstämpling och storlek</target> - <source> Files are found equal if - file content @@ -672,9 +675,6 @@ Filerna betecknas som lika om, är lika </target> -<source>File content</source> -<target>FilinnehÃ¥ll</target> - <source>Symbolic Link handling</source> <target>Hantering av Symboliska länkar</target> @@ -690,32 +690,29 @@ Filerna betecknas som lika om, <source>Source code written in C++ utilizing:</source> <target>Källkod skriven i C++ med hjälp av:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Stort tack för översättningen av FreeFileSync gÃ¥r till:</target> +<source>Feedback and suggestions are welcome</source> +<target>Ã…terkoppling och förslag är välkommna</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Feedback och förslag är välkommna här:</target> +<source>Homepage</source> +<target>Hemsida</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync pÃ¥ Sourceforge</target> -<source>Homepage</source> -<target>Hemsida</target> +<source>Email</source> +<target>E-post</target> -<source>If you like FFS</source> -<target>Om du gillar FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Stort tack för översättningen av FreeFileSync gÃ¥r till:</target> + +<source>If you like FreeFileSync</source> +<target>Om du gillar FreeFileSync</target> <source>Donate with PayPal</source> <target>Donera via PayPal</target> -<source>Email</source> -<target>E-post</target> - -<source>Report translation error</source> -<target>Rapportera översättningsfel</target> - -<source>Published under the GNU General Public License:</source> -<target>Publiserad under GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>Publiserad under GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Ignorera följdfel</target> @@ -864,6 +861,9 @@ Undanta: \stuff\temp\* <source>Folder pairs</source> <target>Katalogpar</target> +<source>Compressed view</source> +<target>Komprimerad vy</target> + <source>Select view</source> <target>Välj vy</target> @@ -882,20 +882,14 @@ Undanta: \stuff\temp\* <source><multiple selection></source> <target><flerval></target> -<source>D-Click</source> -<target>HÃ¥ll ner D</target> - <source>Delete</source> <target>Ta bort</target> -<source>Customize...</source> -<target>Anpassar...</target> - -<source>Select time span...</source> -<target>Välj tidsintervall...</target> +<source>Include all</source> +<target>Inkludera alla</target> -<source>Auto-adjust columns</source> -<target>Autojustera kollumner</target> +<source>Exclude all</source> +<target>Exkludera alla</target> <source>Icon size:</source> <target>Ikonstorlek:</target> @@ -909,14 +903,11 @@ Undanta: \stuff\temp\* <source>Large</source> <target>Stor</target> -<source>Include all rows</source> -<target>Inkludera alla rader</target> - -<source>Exclude all rows</source> -<target>Undanta alla rader</target> +<source>Select time span...</source> +<target>Välj tidsintervall...</target> -<source>Reset view</source> -<target>Ã…terställ vy</target> +<source>Default view</source> +<target>Standardvy</target> <source>Show "%x"</source> <target>Visa "%x"</target> @@ -1197,6 +1188,12 @@ Undanta: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Flytta filer till en tidsstämplad underkatalog</target> +<source>Files</source> +<target>Filer</target> + +<source>Percentage</source> +<target>Procent</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1323,9 @@ Undanta: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Kataloger är beroende! Var försiktig när du sätter upp synkroniseringsregler:</target> +<source>Preparing synchronization...</source> +<target>Förbereder synkronisering...</target> + <source>Memory allocation failed!</source> <target>Minnesallokering misslyckades!</target> @@ -1443,8 +1443,8 @@ Undanta: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>MÃ¥lkatalogens namn mÃ¥ste anges</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Katalog för borttagning ej specifiserad!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Katalog för versionshantering har inte specificerats</target> <source>Source directory does not exist anymore:</source> <target>Källkatalogen finns inte längre:</target> 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 @@ <pluralform>%x Bayt</pluralform> </target> -<source><Symlink></source> -<target><SmblkbaÄŸlantı></target> - -<source><Directory></source> -<target><Klasör></target> - -<source>Size</source> -<target>Boyut</target> - -<source>Date</source> -<target>Tarih</target> - -<source>Full path</source> -<target>Tam yol</target> - -<source>Filename</source> -<target>Dosya adı</target> - -<source>Relative path</source> -<target>Bağıl klasör yolu</target> - -<source>Directory</source> -<target>Klasör</target> - -<source>Extension</source> -<target>Uzantı</target> - -<source>Comparison Result</source> -<target>KarşılaÅŸtırma sonucu</target> - <source>Initial synchronization:</source> <target>BaÅŸlangıç eÅŸleÅŸtirmesi:</target> @@ -354,6 +324,24 @@ Her seferinde çalıştırılacak komut satırı: <source>Logging</source> <target>Günlükleme</target> +<source>File time and size</source> +<target>Dosya tarih ve saati</target> + +<source>File content</source> +<target>Dosya içeriÄŸi</target> + +<source><Automatic></source> +<target><KendiliÄŸinden></target> + +<source>Mirror ->></source> +<target>Yansı ->></target> + +<source>Update -></source> +<target>Güncelle -></target> + +<source>Custom</source> +<target>Özel</target> + <source>FreeFileSync batch file</source> <target>FreeFileSync toplu iÅŸ dosyası</target> @@ -411,6 +399,36 @@ Her seferinde çalıştırılacak komut satırı: <source>(Requires an Internet connection!)</source> <target>(Ä°nternet baÄŸlantısı gereklidir!)</target> +<source><Symlink></source> +<target><SmblkbaÄŸlantı></target> + +<source><Directory></source> +<target><Klasör></target> + +<source>Full path</source> +<target>Tam yol</target> + +<source>Name</source> +<target>Ad</target> + +<source>Relative path</source> +<target>Bağıl klasör yolu</target> + +<source>Directory</source> +<target>Klasör</target> + +<source>Size</source> +<target>Boyut</target> + +<source>Date</source> +<target>Tarih</target> + +<source>Extension</source> +<target>Uzantı</target> + +<source>Comparison Result</source> +<target>KarşılaÅŸtırma sonucu</target> + <source>Drag && drop</source> <target>Klasör ya da dosyaları buraya sürükleyip bırakabilirsiniz</target> @@ -582,27 +600,15 @@ Her seferinde çalıştırılacak komut satırı: <source>Select variant:</source> <target>Davranışı seçin:</target> -<source><Automatic></source> -<target><KendiliÄŸinden></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>Ä°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.</target> -<source>Mirror ->></source> -<target>Yansı ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Sol klasörün yansı yedeÄŸi. EÅŸleÅŸtirmeden sonra saÄŸ klasör, sol klasörün tamamen aynısı olur.</target> -<source>Update -></source> -<target>Güncelle -></target> - <source>Copy new or updated files to right folder.</source> <target>Yalnız yeni ya da güncellenmiÅŸ dosyalar soldan saÄŸa kopyalanır.</target> -<source>Custom</source> -<target>Özel</target> - <source>Configure your own synchronization rules.</source> <target>Buradan kendi eÅŸleÅŸtirme kurallarınızı yapılandırabilirsiniz.</target> @@ -658,9 +664,6 @@ Dosyaların eÅŸit sayılması için aynı olmalıdır </target> -<source>File time and size</source> -<target>Dosya tarih ve saati</target> - <source> Files are found equal if - file content @@ -672,9 +675,6 @@ Dosyaların eÅŸit sayılması için aynı olmalıdır </target> -<source>File content</source> -<target>Dosya içeriÄŸi</target> - <source>Symbolic Link handling</source> <target>Sembolik baÄŸlantı iÅŸleme</target> @@ -690,32 +690,29 @@ aynı olmalıdır <source>Source code written in C++ utilizing:</source> <target>Kaynak kodu C++ kullanılarak yazılmıştır:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>FreeFileSync çevirmenlerine çok teÅŸekkürler:</target> +<source>Feedback and suggestions are welcome</source> +<target>Öneri ve geri bildirimlerinizi bekleriz</target> -<source>Feedback and suggestions are welcome at:</source> -<target>Geri bildirim ve önerileriniz için:</target> +<source>Homepage</source> +<target>Ana sayfa</target> <source>FreeFileSync at Sourceforge</source> <target>Sourceforge sitesinde FreeFileSync</target> -<source>Homepage</source> -<target>Ana sayfa</target> +<source>Email</source> +<target>E-posta</target> -<source>If you like FFS</source> -<target>FFS’i beÄŸendiyseniz</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>FreeFileSync çevirmenlerine çok teÅŸekkürler:</target> + +<source>If you like FreeFileSync</source> +<target>FreeFileSync’i beÄŸendiyseniz</target> <source>Donate with PayPal</source> <target>PayPal ile bağış yapın</target> -<source>Email</source> -<target>E-posta</target> - -<source>Report translation error</source> -<target>Çeviri hatası bildirin</target> - -<source>Published under the GNU General Public License:</source> -<target>GNU Genel Kamu Lisansı ÅŸartları altında yayınlanmıştır:</target> +<source>Published under the GNU General Public License</source> +<target>GNU Genel Kamu Lisansı ÅŸartları altında yayınlanmıştır</target> <source>Ignore subsequent errors</source> <target>Sonraki hataları yoksay</target> @@ -864,6 +861,9 @@ Katma: \stuff\temp\* <source>Folder pairs</source> <target>Klasör çiftleri</target> +<source>Compressed view</source> +<target>Sıkıştırılmış görünüm</target> + <source>Select view</source> <target>Görünümü seçin</target> @@ -882,20 +882,14 @@ Katma: \stuff\temp\* <source><multiple selection></source> <target><çoklu seçim></target> -<source>D-Click</source> -<target>D-TuÅŸu</target> - <source>Delete</source> <target>Sil</target> -<source>Customize...</source> -<target>ÖzelleÅŸtir...</target> - -<source>Select time span...</source> -<target>Zaman aralığını seçin...</target> +<source>Include all</source> +<target>Tümünü kat</target> -<source>Auto-adjust columns</source> -<target>Sütunları kendiliÄŸinden hizala</target> +<source>Exclude all</source> +<target>Tümünü dışla</target> <source>Icon size:</source> <target>Simge boyutu:</target> @@ -909,14 +903,11 @@ Katma: \stuff\temp\* <source>Large</source> <target>Büyük</target> -<source>Include all rows</source> -<target>Tüm satırları kat</target> - -<source>Exclude all rows</source> -<target>Tüm satırları dışla</target> +<source>Select time span...</source> +<target>Zaman aralığını seçin...</target> -<source>Reset view</source> -<target>Görünümü sıfırla</target> +<source>Default view</source> +<target>Varsayılan görünüm</target> <source>Show "%x"</source> <target>"%x" panelini göster</target> @@ -1197,6 +1188,12 @@ Katma: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Dosyaları zaman damgasıyla bir alt klasöre taşır</target> +<source>Files</source> +<target>Dosyalar</target> + +<source>Percentage</source> +<target>Yüzde</target> + <source>%x TB</source> <target>%x TB</target> @@ -1326,6 +1323,9 @@ Katma: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Klasörler bağımlı! EÅŸleÅŸtirme kurallarını koyarken dikkatli olun:</target> +<source>Preparing synchronization...</source> +<target>EÅŸleÅŸtirmeye hazırlanıyor...</target> + <source>Memory allocation failed!</source> <target>Bellek ayrılamadı!</target> @@ -1443,8 +1443,8 @@ Katma: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Hedef klasör adı boÅŸ olamaz!</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Silme için kullanıcının belirttiÄŸi dizin belirtilmemiÅŸ!</target> +<source>Directory for file versioning was not supplied!</source> +<target>Dosya sürümlemesi için klasör desteklenmiyor!</target> <source>Source directory does not exist anymore:</source> <target>Kaynak klasör artık yok:</target> @@ -1474,7 +1474,7 @@ Katma: \stuff\temp\* <target>Åžu yollar için geri dönüşüm kutusu kullanılamaz! Dosyalar anında ve tamamen silinir:</target> <source>A directory will be modified which is part of multiple folder pairs! Please review synchronization settings!</source> -<target>Ç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!</target> +<target>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!</target> <source>Processing folder pair:</source> <target>Ä°ÅŸlenen klasör çifti:</target> 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 @@ <pluralform>%x байтів</pluralform> </target> -<source><Symlink></source> -<target><Символьне поÑиланнÑ></target> - -<source><Directory></source> -<target><Каталог></target> - -<source>Size</source> -<target>Розмір</target> - -<source>Date</source> -<target>Дата</target> - -<source>Full path</source> -<target>Повний шлÑÑ…</target> - -<source>Filename</source> -<target>Ð†Ð¼â€™Ñ Ñ„Ð°Ð¹Ð»Ñƒ</target> - -<source>Relative path</source> -<target>ВідноÑний шлÑÑ…</target> - -<source>Directory</source> -<target>Каталог</target> - -<source>Extension</source> -<target>РозширеннÑ</target> - -<source>Comparison Result</source> -<target>Результати порівнюваннÑ</target> - <source>Initial synchronization:</source> <target>Ð’Ñтупна ÑинхронізаціÑ:</target> @@ -357,6 +327,24 @@ The command line is executed each time: <source>Logging</source> <target>Лог-файли</target> +<source>File time and size</source> +<target>Дата та розмір файлу</target> + +<source>File content</source> +<target>ВміÑÑ‚ файлу</target> + +<source><Automatic></source> +<target><Ðвтоматичний></target> + +<source>Mirror ->></source> +<target>Дзеркало ->></target> + +<source>Update -></source> +<target>Оновити -></target> + +<source>Custom</source> +<target>Вибірково</target> + <source>FreeFileSync batch file</source> <target>Файл Ð·Ð°Ð²Ð´Ð°Ð½Ð½Ñ FreeFileSync</target> @@ -414,6 +402,36 @@ The command line is executed each time: <source>(Requires an Internet connection!)</source> <target>(Ðеобхідне Ð¿Ñ–Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð½Ñ Ð´Ð¾ Інтернету!)</target> +<source><Symlink></source> +<target><Символьне поÑиланнÑ></target> + +<source><Directory></source> +<target><Каталог></target> + +<source>Full path</source> +<target>Повний шлÑÑ…</target> + +<source>Name</source> +<target></target> + +<source>Relative path</source> +<target>ВідноÑний шлÑÑ…</target> + +<source>Directory</source> +<target>Каталог</target> + +<source>Size</source> +<target>Розмір</target> + +<source>Date</source> +<target>Дата</target> + +<source>Extension</source> +<target>РозширеннÑ</target> + +<source>Comparison Result</source> +<target>Результати порівнюваннÑ</target> + <source>Drag && drop</source> <target>Drag && drop</target> @@ -588,27 +606,15 @@ The command line is executed each time: <source>Select variant:</source> <target>Виберіть варіант:</target> -<source><Automatic></source> -<target><Ðвтоматичний></target> - <source>Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically.</source> <target>ВиÑвити та поширити зміни на обидві Ñторони викориÑтовуючи базу даних. ВидаленнÑ, Ð¿ÐµÑ€ÐµÐ¹Ð¼ÐµÐ½ÑƒÐ²Ð°Ð½Ð½Ñ Ñ‚Ð° конфлікти визначаютьÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾.</target> -<source>Mirror ->></source> -<target>Дзеркало ->></target> - <source>Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization.</source> <target>Дзеркальна (резервна) ÐºÐ¾Ð¿Ñ–Ñ Ð»Ñ–Ð²Ð¾Ñ— чаÑтини. Ð’ результаті Ñинхронізації права папка змінюєтьÑÑ Ð´Ð¾ полної відповідноÑÑ‚Ñ– лівій.</target> -<source>Update -></source> -<target>Оновити -></target> - <source>Copy new or updated files to right folder.</source> <target>Копіювати нові чи оновлювати файли з правої Ñторони.</target> -<source>Custom</source> -<target>Вибірково</target> - <source>Configure your own synchronization rules.</source> <target>Ðалаштувати влаÑні правила Ñинхронізації.</target> @@ -664,9 +670,6 @@ are the same Ñпівпадають </target> -<source>File time and size</source> -<target>Дата та розмір файлу</target> - <source> Files are found equal if - file content @@ -674,9 +677,6 @@ is the same </source> <target>Файли вважаютьÑÑ Ñ€Ñ–Ð²Ð½Ð¸Ð¼Ð¸, Ñкщо вміÑÑ‚ файлів однаковий</target> -<source>File content</source> -<target>ВміÑÑ‚ файлу</target> - <source>Symbolic Link handling</source> <target>Обробка Ñимвольного поÑиланнÑ</target> @@ -692,32 +692,29 @@ is the same <source>Source code written in C++ utilizing:</source> <target>Код програми напиÑаний на C++ з викориÑтаннÑм:</target> -<source>Big thanks for localizing FreeFileSync goes out to:</source> -<target>Щира подÑка за переклад FreeFileSync:</target> +<source>Feedback and suggestions are welcome</source> +<target></target> -<source>Feedback and suggestions are welcome at:</source> -<target>Відгуки та пропозиції виÑилайте на адреÑу:</target> +<source>Homepage</source> +<target>Оф.Ñайт</target> <source>FreeFileSync at Sourceforge</source> <target>FreeFileSync на Sourceforge</target> -<source>Homepage</source> -<target>Оф.Ñайт</target> +<source>Email</source> +<target>Почта</target> -<source>If you like FFS</source> -<target>Якщо Вам ÑподобавÑÑ FFS</target> +<source>Big thanks for localizing FreeFileSync goes out to:</source> +<target>Щира подÑка за переклад FreeFileSync:</target> + +<source>If you like FreeFileSync</source> +<target>Якщо Вам ÑподобавÑÑ FreeFileSync</target> <source>Donate with PayPal</source> <target>Пожертвувати через PayPal</target> -<source>Email</source> -<target>Почта</target> - -<source>Report translation error</source> -<target>Повідомити: помилка перекладу</target> - -<source>Published under the GNU General Public License:</source> -<target>Видано за ліцензією GNU General Public License:</target> +<source>Published under the GNU General Public License</source> +<target>Видано за ліцензією GNU General Public License</target> <source>Ignore subsequent errors</source> <target>Ігнорувати наÑтупні помилки</target> @@ -866,6 +863,9 @@ Exclude: \stuff\temp\* <source>Folder pairs</source> <target>Пари папок</target> +<source>Compressed view</source> +<target></target> + <source>Select view</source> <target>СпиÑок файлів</target> @@ -884,20 +884,14 @@ Exclude: \stuff\temp\* <source><multiple selection></source> <target><груповий вибір></target> -<source>D-Click</source> -<target>Клацніть двічі</target> - <source>Delete</source> <target>Видалити</target> -<source>Customize...</source> -<target>Вибрати колонки...</target> - -<source>Select time span...</source> -<target>Виберіть інтервал чаÑу...</target> +<source>Include all</source> +<target></target> -<source>Auto-adjust columns</source> -<target>ÐÐ²Ñ‚Ð¾Ð²Ð¸Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð¸ колонок</target> +<source>Exclude all</source> +<target></target> <source>Icon size:</source> <target>Розмір іконки:</target> @@ -911,14 +905,11 @@ Exclude: \stuff\temp\* <source>Large</source> <target>великий</target> -<source>Include all rows</source> -<target>Відмінити вÑÑ–</target> - -<source>Exclude all rows</source> -<target>Виключити вÑÑ– Ñ€Ñдки</target> +<source>Select time span...</source> +<target>Виберіть інтервал чаÑу...</target> -<source>Reset view</source> -<target>Ð¡ÐºÐ¸Ð´Ð°Ð½Ð½Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½ÑŒ відображеннÑ</target> +<source>Default view</source> +<target></target> <source>Show "%x"</source> <target>Показати "%x"</target> @@ -1205,6 +1196,12 @@ Exclude: \stuff\temp\* <source>Move files into a time-stamped subdirectory</source> <target>Переміщати файли в підкатлог з чаÑовою міткою</target> +<source>Files</source> +<target></target> + +<source>Percentage</source> +<target></target> + <source>%x TB</source> <target>%x ТБ</target> @@ -1340,6 +1337,9 @@ Exclude: \stuff\temp\* <source>Directories are dependent! Be careful when setting up synchronization rules:</source> <target>Залежні каталоги! Будьте уважні при налаштуванні правил Ñинхронізації:</target> +<source>Preparing synchronization...</source> +<target></target> + <source>Memory allocation failed!</source> <target>Помилка Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ð¼â€™ÑÑ‚Ñ–! (Ðе хватает памÑти)</target> @@ -1457,8 +1457,8 @@ Exclude: \stuff\temp\* <source>Target directory name must not be empty!</source> <target>Кінцевий каталог не повинен бути порожнім</target> -<source>User-defined directory for deletion was not specified!</source> -<target>Каталог Ð´Ð»Ñ Ð²Ð¸Ð»ÑƒÑ‡ÐµÐ½Ð½Ñ ÐºÐ¾Ñ€Ð¸Ñтувачем не був вказаний!</target> +<source>Directory for file versioning was not supplied!</source> +<target></target> <source>Source directory does not exist anymore:</source> <target>Каталог-джерело вже не Ñ–Ñнує:</target> diff --git a/BUILD/Resources.zip b/BUILD/Resources.zip Binary files differindex 1b37e7b1..905fa797 100644 --- a/BUILD/Resources.zip +++ b/BUILD/Resources.zip 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 @@ <Unit filename="lib\binary.cpp" /> <Unit filename="lib\binary.h" /> <Unit filename="lib\cmp_filetime.h" /> - <Unit filename="lib\custom_grid.cpp"> - <Option target="Release" /> - <Option target="Debug-DLL" /> - </Unit> - <Unit filename="lib\custom_grid.h" /> <Unit filename="lib\db_file.cpp" /> <Unit filename="lib\db_file.h" /> <Unit filename="lib\dir_exist_async.h" /> <Unit filename="lib\dir_lock.cpp" /> <Unit filename="lib\dir_lock.h" /> - <Unit filename="lib\dir_name.h" /> <Unit filename="lib\error_log.cpp" /> <Unit filename="lib\error_log.h" /> <Unit filename="lib\ffs_paths.h" /> @@ -243,6 +237,14 @@ <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> + <Unit filename="ui\custom_grid.cpp"> + <Option target="Release" /> + <Option target="Debug-DLL" /> + </Unit> + <Unit filename="ui\custom_grid.h"> + <Option target="Release" /> + <Option target="Debug-DLL" /> + </Unit> <Unit filename="ui\dir_name.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> @@ -349,6 +351,14 @@ <Option target="Debug-DLL" /> </Unit> <Unit filename="ui\tray_icon.h" /> + <Unit filename="ui\tree_view.cpp"> + <Option target="Release" /> + <Option target="Debug-DLL" /> + </Unit> + <Unit filename="ui\tree_view.h"> + <Option target="Release" /> + <Option target="Debug-DLL" /> + </Unit> <Unit filename="ui\wx_form_build_hide_warnings.h"> <Option target="Release" /> <Option target="Debug-DLL" /> @@ -390,6 +400,14 @@ <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> + <Unit filename="wx+\grid.cpp"> + <Option target="Release" /> + <Option target="Debug-DLL" /> + </Unit> + <Unit filename="wx+\grid.h"> + <Option target="Release" /> + <Option target="Debug-DLL" /> + </Unit> <Unit filename="wx+\image_tools.h"> <Option target="Release" /> <Option target="Debug-DLL" /> @@ -432,10 +450,6 @@ <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="wx+\tree_list.h"> - <Option target="Release" /> - <Option target="Debug-DLL" /> - </Unit> <Unit filename="zen\assert_static.h" /> <Unit filename="zen\base64.h" /> <Unit filename="zen\build_info.h" /> @@ -444,7 +458,6 @@ <Unit filename="zen\com_util.h" /> <Unit filename="zen\debug_log.h" /> <Unit filename="zen\dir_watcher.h" /> - <Unit filename="zen\disable_standby.h" /> <Unit filename="zen\dll.h" /> <Unit filename="zen\dst_hack.cpp" /> <Unit filename="zen\dst_hack.h" /> @@ -453,7 +466,6 @@ <Unit filename="zen\file_handling.h" /> <Unit filename="zen\file_id.cpp" /> <Unit filename="zen\file_id.h" /> - <Unit filename="zen\file_id_internal.h" /> <Unit filename="zen\file_io.cpp" /> <Unit filename="zen\file_io.h" /> <Unit filename="zen\file_traverser.cpp" /> diff --git a/FreeFileSync.vcxproj b/FreeFileSync.vcxproj index 923a55c3..d34d50f6 100644 --- a/FreeFileSync.vcxproj +++ b/FreeFileSync.vcxproj @@ -1,309 +1 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{86C36CC7-9418-4253-9928-828486F59A00}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>FreeFileSync</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - <PlatformToolset>Windows7.1SDK</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>BUILD\Bin\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> - <GenerateManifest>false</GenerateManifest> - <TargetName>$(ProjectName)_Debug</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>BUILD\Bin\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> - <GenerateManifest>false</GenerateManifest> - <TargetName>$(ProjectName)_Debug</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>BUILD\Bin\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> - <GenerateManifest>false</GenerateManifest> - <TargetName>$(ProjectName)_$(PlatformName)</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>BUILD\Bin\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> - <GenerateManifest>false</GenerateManifest> - <TargetName>$(ProjectName)_$(PlatformName)</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_dll\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>wx+\pch.h</PrecompiledHeaderFile> - <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>zen/warn_static.h;wx+\pch.h</ForcedIncludeFiles> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <MinimalRebuild>false</MinimalRebuild> - <ShowIncludes> - </ShowIncludes> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalDependencies>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)</AdditionalDependencies> - <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets\lib\vc_dll;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> - <LinkStatus> - </LinkStatus> - <ShowProgress> - </ShowProgress> - </Link> - <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> - </ResourceCompile> - <Manifest> - <SuppressDependencyElement> - </SuppressDependencyElement> - </Manifest> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader>Use</PrecompiledHeader> - <WarningLevel>Level4</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_dll\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>wx+\pch.h</PrecompiledHeaderFile> - <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>zen/warn_static.h;wx+\pch.h</ForcedIncludeFiles> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <MinimalRebuild>false</MinimalRebuild> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalDependencies>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)</AdditionalDependencies> - <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64\lib\vc_dll;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> - <LinkStatus> - </LinkStatus> - </Link> - <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> - </ResourceCompile> - <Manifest> - <SuppressDependencyElement> - </SuppressDependencyElement> - </Manifest> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level4</WarningLevel> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PreprocessorDefinitions>ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> - <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <ForcedIncludeFiles>zen/warn_static.h</ForcedIncludeFiles> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>false</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <AdditionalDependencies>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)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> - <LinkStatus> - </LinkStatus> - <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> - </Link> - <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> - <Culture> - </Culture> - </ResourceCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level4</WarningLevel> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PreprocessorDefinitions>ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> - <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <ForcedIncludeFiles>zen/warn_static.h</ForcedIncludeFiles> - </ClCompile> - <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>false</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <AdditionalDependencies>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)</AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> - <LinkStatus> - </LinkStatus> - <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> - </Link> - <ResourceCompile> - <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> - <Culture> - </Culture> - </ResourceCompile> - <PreBuildEvent> - <Command> - </Command> - </PreBuildEvent> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="algorithm.cpp"> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> - </ClCompile> - <ClCompile Include="application.cpp" /> - <ClCompile Include="comparison.cpp" /> - <ClCompile Include="file_hierarchy.cpp" /> - <ClCompile Include="lib\binary.cpp" /> - <ClCompile Include="lib\custom_grid.cpp" /> - <ClCompile Include="lib\db_file.cpp" /> - <ClCompile Include="lib\dir_lock.cpp" /> - <ClCompile Include="lib\error_log.cpp" /> - <ClCompile Include="lib\hard_filter.cpp" /> - <ClCompile Include="lib\icon_buffer.cpp" /> - <ClCompile Include="lib\localization.cpp" /> - <ClCompile Include="lib\parallel_scan.cpp" /> - <ClCompile Include="lib\process_xml.cpp" /> - <ClCompile Include="lib\recycler.cpp" /> - <ClCompile Include="lib\resolve_path.cpp" /> - <ClCompile Include="lib\resources.cpp" /> - <ClCompile Include="lib\shadow.cpp" /> - <ClCompile Include="lib\statistics.cpp" /> - <ClCompile Include="lib\status_handler.cpp" /> - <ClCompile Include="lib\xml_base.cpp" /> - <ClCompile Include="structures.cpp" /> - <ClCompile Include="synchronization.cpp" /> - <ClCompile Include="ui\batch_config.cpp" /> - <ClCompile Include="ui\batch_status_handler.cpp" /> - <ClCompile Include="ui\check_version.cpp" /> - <ClCompile Include="ui\dir_name.cpp" /> - <ClCompile Include="ui\exec_finished_box.cpp" /> - <ClCompile Include="ui\folder_history_box.cpp" /> - <ClCompile Include="ui\grid_view.cpp" /> - <ClCompile Include="ui\gui_generated.cpp" /> - <ClCompile Include="ui\gui_status_handler.cpp" /> - <ClCompile Include="ui\main_dlg.cpp" /> - <ClCompile Include="ui\msg_popup.cpp" /> - <ClCompile Include="ui\progress_indicator.cpp" /> - <ClCompile Include="ui\search.cpp" /> - <ClCompile Include="ui\small_dlgs.cpp" /> - <ClCompile Include="ui\sync_cfg.cpp" /> - <ClCompile Include="ui\taskbar.cpp" /> - <ClCompile Include="ui\tray_icon.cpp" /> - <ClCompile Include="wx+\button.cpp" /> - <ClCompile Include="wx+\format_unit.cpp" /> - <ClCompile Include="wx+\graph.cpp" /> - <ClCompile Include="wx+\grid.cpp" /> - <ClCompile Include="wx+\mouse_move_dlg.cpp" /> - <ClCompile Include="wx+\tooltip.cpp" /> - <ClCompile Include="zenxml\unit_test.cpp" /> - <ClCompile Include="zen\dst_hack.cpp" /> - <ClCompile Include="zen\file_handling.cpp" /> - <ClCompile Include="zen\file_id.cpp" /> - <ClCompile Include="zen\file_io.cpp" /> - <ClCompile Include="zen\file_traverser.cpp" /> - <ClCompile Include="zen\privilege.cpp" /> - <ClCompile Include="zen\zstring.cpp" /> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="resource.rc" /> - </ItemGroup> - <ItemGroup> - <None Include="WxWizFrame.fbp"> - <SubType>Designer</SubType> - </None> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{86C36CC7-9418-4253-9928-828486F59A00}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>FreeFileSync</RootNamespace> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> <PlatformToolset>Windows7.1SDK</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <CharacterSet>Unicode</CharacterSet> <PlatformToolset>Windows7.1SDK</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> <PlatformToolset>Windows7.1SDK</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> <PlatformToolset>Windows7.1SDK</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <LinkIncremental>true</LinkIncremental> <OutDir>BUILD\Bin\</OutDir> <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> <GenerateManifest>false</GenerateManifest> <TargetName>$(ProjectName)_Debug</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <LinkIncremental>true</LinkIncremental> <OutDir>BUILD\Bin\</OutDir> <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> <GenerateManifest>false</GenerateManifest> <TargetName>$(ProjectName)_Debug</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>BUILD\Bin\</OutDir> <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> <GenerateManifest>false</GenerateManifest> <TargetName>$(ProjectName)_$(PlatformName)</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <LinkIncremental>false</LinkIncremental> <OutDir>BUILD\Bin\</OutDir> <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> <GenerateManifest>false</GenerateManifest> <TargetName>$(ProjectName)_$(PlatformName)</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_dll\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <PrecompiledHeaderFile>wx+\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> <ForcedIncludeFiles>zen/warn_static.h;wx+\pch.h</ForcedIncludeFiles> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <MinimalRebuild>false</MinimalRebuild> <ShowIncludes> </ShowIncludes> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> <AdditionalDependencies>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)</AdditionalDependencies> <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets\lib\vc_dll;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> <ShowProgress> </ShowProgress> </Link> <ResourceCompile> <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> </ResourceCompile> <Manifest> <SuppressDependencyElement> </SuppressDependencyElement> </Manifest> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WXUSINGDLL;ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_dll\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <PrecompiledHeaderFile>wx+\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> <ForcedIncludeFiles>zen/warn_static.h;wx+\pch.h</ForcedIncludeFiles> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <MinimalRebuild>false</MinimalRebuild> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> <AdditionalDependencies>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)</AdditionalDependencies> <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64\lib\vc_dll;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> </Link> <ResourceCompile> <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswud</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> </ResourceCompile> <Manifest> <SuppressDependencyElement> </SuppressDependencyElement> </Manifest> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level4</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <PreprocessorDefinitions>ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <MultiProcessorCompilation>true</MultiProcessorCompilation> <InlineFunctionExpansion>Default</InlineFunctionExpansion> <ForcedIncludeFiles>zen/warn_static.h</ForcedIncludeFiles> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>false</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <AdditionalDependencies>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)</AdditionalDependencies> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets\lib\vc_lib;C:\Program Files\C++\Boost\stage\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> <ResourceCompile> <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions> <Culture> </Culture> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WarningLevel>Level4</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <PreprocessorDefinitions>ZEN_PLATFORM_WINDOWS;wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>.;C:\Program Files\C++\wxWidgets-x64\include;C:\Program Files\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996;4267;4512</DisableSpecificWarnings> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <MultiProcessorCompilation>true</MultiProcessorCompilation> <ForcedIncludeFiles>zen/warn_static.h</ForcedIncludeFiles> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>false</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <AdditionalDependencies>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)</AdditionalDependencies> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> <AdditionalLibraryDirectories>C:\Program Files\C++\wxWidgets-x64\lib\vc_lib;C:\Program Files\C++\Boost\stage64\lib</AdditionalLibraryDirectories> <LinkStatus> </LinkStatus> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> <ResourceCompile> <AdditionalIncludeDirectories>C:\Program Files\C++\wxWidgets\include;C:\Program Files\C++\wxWidgets\lib\vc_lib\mswu</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);WX_CPU_AMD64</PreprocessorDefinitions> <Culture> </Culture> </ResourceCompile> <PreBuildEvent> <Command> </Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="algorithm.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> </ClCompile> <ClCompile Include="application.cpp" /> <ClCompile Include="comparison.cpp" /> <ClCompile Include="file_hierarchy.cpp" /> <ClCompile Include="lib\binary.cpp" /> <ClCompile Include="lib\db_file.cpp" /> <ClCompile Include="lib\dir_lock.cpp" /> <ClCompile Include="lib\error_log.cpp" /> <ClCompile Include="lib\hard_filter.cpp" /> <ClCompile Include="lib\icon_buffer.cpp" /> <ClCompile Include="lib\localization.cpp" /> <ClCompile Include="lib\parallel_scan.cpp" /> <ClCompile Include="lib\process_xml.cpp" /> <ClCompile Include="lib\recycler.cpp" /> <ClCompile Include="lib\resolve_path.cpp" /> <ClCompile Include="lib\resources.cpp" /> <ClCompile Include="lib\shadow.cpp" /> <ClCompile Include="lib\statistics.cpp" /> <ClCompile Include="lib\status_handler.cpp" /> <ClCompile Include="lib\xml_base.cpp" /> <ClCompile Include="structures.cpp" /> <ClCompile Include="synchronization.cpp" /> <ClCompile Include="ui\batch_config.cpp" /> <ClCompile Include="ui\batch_status_handler.cpp" /> <ClCompile Include="ui\check_version.cpp" /> <ClCompile Include="ui\custom_grid.cpp" /> <ClCompile Include="ui\dir_name.cpp" /> <ClCompile Include="ui\exec_finished_box.cpp" /> <ClCompile Include="ui\folder_history_box.cpp" /> <ClCompile Include="ui\grid_view.cpp" /> <ClCompile Include="ui\gui_generated.cpp" /> <ClCompile Include="ui\gui_status_handler.cpp" /> <ClCompile Include="ui\main_dlg.cpp" /> <ClCompile Include="ui\msg_popup.cpp" /> <ClCompile Include="ui\progress_indicator.cpp" /> <ClCompile Include="ui\search.cpp" /> <ClCompile Include="ui\small_dlgs.cpp" /> <ClCompile Include="ui\sync_cfg.cpp" /> <ClCompile Include="ui\taskbar.cpp" /> <ClCompile Include="ui\tray_icon.cpp" /> <ClCompile Include="ui\tree_view.cpp" /> <ClCompile Include="wx+\button.cpp" /> <ClCompile Include="wx+\format_unit.cpp" /> <ClCompile Include="wx+\graph.cpp" /> <ClCompile Include="wx+\grid.cpp" /> <ClCompile Include="wx+\mouse_move_dlg.cpp" /> <ClCompile Include="wx+\tooltip.cpp" /> <ClCompile Include="zenxml\unit_test.cpp" /> <ClCompile Include="zen\dst_hack.cpp" /> <ClCompile Include="zen\file_handling.cpp" /> <ClCompile Include="zen\file_id.cpp" /> <ClCompile Include="zen\file_io.cpp" /> <ClCompile Include="zen\file_traverser.cpp" /> <ClCompile Include="zen\privilege.cpp" /> <ClCompile Include="zen\zstring.cpp" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="resource.rc" /> </ItemGroup> <ItemGroup> <None Include="WxWizFrame.fbp"> <SubType>Designer</SubType> </None> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup></Project>
\ No newline at end of file @@ -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 <wx/artprov.h> #include <wx/xrc/xmlres.h> #include <wx/intl.h> -class wxStaticText; namespace zen { class BitmapButton; } namespace zen { class DirPickerCtrl; } @@ -25,9 +24,9 @@ namespace zen { class DirPickerCtrl; } #include <wx/colour.h> #include <wx/settings.h> #include <wx/stattext.h> -#include <wx/statline.h> #include <wx/sizer.h> #include <wx/statbox.h> +#include <wx/statline.h> #include <wx/bmpbuttn.h> #include <wx/button.h> #include <wx/textctrl.h> @@ -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<wxTextCtrl>(*m_panelMainFolder, *m_dirPickerMain, *m_txtCtrlDirectoryMain, sbSizerDirToWatch)); + dirNameFirst.reset(new DirectoryName<wxTextCtrl>(*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<zen::DirectoryName<wxTextCtrl>> dirNameFirst; + std::unique_ptr<zen::DirectoryName<wxTextCtrl>> dirNameFirst; std::vector<DirectoryPanel*> 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<LEFT_SIDE>(), zen::TEMP_FILE_ENDING)) + if (endsWith(fileObj.getShortName<LEFT_SIDE>(), 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<RIGHT_SIDE>(), zen::TEMP_FILE_ENDING)) + if (endsWith(fileObj.getShortName<RIGHT_SIDE>(), 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<DataSetDir, const DirContainer*> retrieveDataSetDir(const Zstring& obj class RedetermineAuto { public: - static void execute(BaseDirMapping& baseDirectory, DeterminationProblem* handler) + static void execute(BaseDirMapping& baseDirectory, std::function<void(const std::wstring&)> reportWarning) { - RedetermineAuto(baseDirectory, handler); + RedetermineAuto(baseDirectory, reportWarning); } private: - RedetermineAuto(BaseDirMapping& baseDirectory, - DeterminationProblem* handler) : + RedetermineAuto(BaseDirMapping& baseDirectory, std::function<void(const std::wstring&)> 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<DirInfoPtr, DirInfoPtr>(); //NULL } @@ -533,12 +532,12 @@ private: //---------------------------------------------------------------------- //##################### schedule potentially existing temporary files for deletion #################### - if (cat == FILE_LEFT_SIDE_ONLY && endsWith(fileObj.getFullName<LEFT_SIDE>(), zen::TEMP_FILE_ENDING)) + if (cat == FILE_LEFT_SIDE_ONLY && endsWith(fileObj.getShortName<LEFT_SIDE>(), zen::TEMP_FILE_ENDING)) { fileObj.setSyncDir(SYNC_DIR_LEFT); return; } - else if (cat == FILE_RIGHT_SIDE_ONLY && endsWith(fileObj.getFullName<RIGHT_SIDE>(), zen::TEMP_FILE_ENDING)) + else if (cat == FILE_RIGHT_SIDE_ONLY && endsWith(fileObj.getShortName<RIGHT_SIDE>(), 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<void(const std::wstring&)> reportWarning_; //detection of renamed files template <SelectedSide side> @@ -894,10 +893,10 @@ std::vector<DirectionConfig> 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<void(const std::wstring&)> 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<void(const std::wstring&)> reportWarning) { - if (folderCmp.size() == 0) + if (folderCmp.empty()) return; std::vector<DirectionConfig> 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<wxString, int> zen::deleteFromGridAndHDPreview( //assemble message containing all files to be deleted - const std::vector<FileSystemObject*>& rowsToDeleteOnLeft, - const std::vector<FileSystemObject*>& rowsToDeleteOnRight, - bool deleteOnBothSides) +std::pair<wxString, int> zen::deleteFromGridAndHDPreview(const std::vector<FileSystemObject*>& selectionLeft, + const std::vector<FileSystemObject*>& selectionRight, + bool deleteOnBothSides) { //fast replacement for wxString modelling exponential growth typedef Zbase<wchar_t> zxString; //for use with UI texts @@ -1350,46 +1348,50 @@ std::pair<wxString, int> zen::deleteFromGridAndHDPreview( //assemble message con if (deleteOnBothSides) { - //mix selected rows from left and right - std::set<FileSystemObject*> rowsToDelete(rowsToDeleteOnLeft.begin(), rowsToDeleteOnLeft.end()); - rowsToDelete.insert(rowsToDeleteOnRight.begin(), rowsToDeleteOnRight.end()); + //mix selected rows from left and right (without changing order) + std::vector<FileSystemObject*> selection; + { + hash_set<FileSystemObject*> 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<LEFT_SIDE>()) { - filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<LEFT_SIDE>()) + wxT("\n"); + filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<LEFT_SIDE>()) + L'\n'; ++totalDelCount; } if (!fsObj->isEmpty<RIGHT_SIDE>()) { - filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<RIGHT_SIDE>()) + wxT("\n"); + filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<RIGHT_SIDE>()) + 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<LEFT_SIDE>()) { - filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<LEFT_SIDE>()) + wxT("\n"); + filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<LEFT_SIDE>()) + L'\n'; ++totalDelCount; } }); - std::for_each(rowsToDeleteOnRight.begin(), rowsToDeleteOnRight.end(), + std::for_each(selectionRight.begin(), selectionRight.end(), [&](const FileSystemObject* fsObj) { if (!fsObj->isEmpty<RIGHT_SIDE>()) { - filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<RIGHT_SIDE>()) + wxT("\n"); + filesToDelete += utf8CvrtTo<zxString>(fsObj->getFullName<RIGHT_SIDE>()) + L'\n'; ++totalDelCount; } }); @@ -1495,15 +1497,15 @@ void deleteFromGridAndHDOneSide(InputIterator first, InputIterator last, } -void zen::deleteFromGridAndHD(std::vector<FileSystemObject*>& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows - std::vector<FileSystemObject*>& rowsToDeleteOnRight, //all pointers need to be bound! +void zen::deleteFromGridAndHD(const std::vector<FileSystemObject*>& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows + const std::vector<FileSystemObject*>& rowsToDeleteOnRight, //all pointers need to be bound! FolderComparison& folderCmp, //attention: rows will be physically deleted! const std::vector<DirectionConfig>& 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 <functional> #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<DirectionConfig> 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<void(const std::wstring&)> reportWarning); +void redetermineSyncDirection(const MainConfiguration& mainCfg, FolderComparison& folderCmp, std::function<void(const std::wstring&)> 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<wxString, int> deleteFromGridAndHDPreview( //returns wxString with elements to be deleted and total count of selected(!) objects, NOT total files/dirs! - const std::vector<FileSystemObject*>& rowsToDeleteOnLeft, //all pointers need to be bound! - const std::vector<FileSystemObject*>& rowsToDeleteOnRight, // +std::pair<wxString, int> deleteFromGridAndHDPreview( //returns wxString with elements to be deleted and total count of selected(!) objects, NOT total files/dirs! + const std::vector<FileSystemObject*>& selectionLeft, //all pointers need to be bound! + const std::vector<FileSystemObject*>& 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<FileSystemObject*>& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows - std::vector<FileSystemObject*>& rowsToDeleteOnRight, //all pointers need to be bound! +void deleteFromGridAndHD(const std::vector<FileSystemObject*>& rowsToDeleteOnLeft, //refresh GUI grid after deletion to remove invalid rows + const std::vector<FileSystemObject*>& rowsToDeleteOnRight, //all pointers need to be bound! FolderComparison& folderCmp, //attention: rows will be physically deleted! const std::vector<DirectionConfig>& 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<FolderPairCfg>& 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 <map> -#include <set> #include <string> -#include <unordered_set> #include <memory> #include <zen/zstring.h> #include <zen/fixed_list.h> +#include <zen/stl_tools.h> #include "structures.h" #include <zen/int64.h> #include <zen/file_id_def.h> #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 T> 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<ObjectMgr*>(id)); - return static_cast<T*>(iter == activeObjects().end() ? NULL : *iter); //static down-cast + auto iter = activeObjects().find(id); + return static_cast<const T*>(iter == activeObjects().end() ? NULL : *iter); } + static T* retrieve(ObjectId id) { return const_cast<T*>(retrieve(static_cast<ObjectIdConst>(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<ObjectMgr*>& activeObjects() { static std::set<ObjectMgr*> inst; return inst; } -#else - static std::unordered_set<ObjectMgr*>& activeObjects() { static std::unordered_set<ObjectMgr*> inst; return inst; } //external linkage (even in header file!) -#endif + static zen::hash_set<const ObjectMgr*>& activeObjects() { static zen::hash_set<const ObjectMgr*> inst; return inst; } //external linkage (even in header file!) }; //------------------------------------------------------------------ @@ -484,8 +484,8 @@ public: template <SelectedSide side> FileId getFileId () const; template <SelectedSide side> 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 <wx/dc.h> -#include <wx+/format_unit.h> -#include <wx+/string_conv.h> -#include "resources.h" -#include <typeinfo> -#include "../ui/grid_view.h" -#include "../synchronization.h" -#include <wx/dcclient.h> -#include <wx/icon.h> -#include <wx/tooltip.h> -#include <wx/settings.h> - -#ifdef FFS_WIN -#include <wx/timer.h> -#include "status_handler.h" -#include <cmath> - -#elif defined FFS_LINUX -#include <gtk/gtk.h> -#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<int>(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<wxColour, wxColour> 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<wxColour, wxColour> getRowColor(int row) = 0; //rows that are filtered out are shown in different color: <foreground, background> - - 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<int>(columnPositions.size()); - } - - virtual wxString GetColLabelValue( int col ) - { - return CustomGridRim::getTypeName(getTypeAtPos(col)); - } - - - void setupColumns(const std::vector<xmlAccess::ColumnTypes>& 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 <SelectedSide side> - 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<side>(), FILE_NAME_SEPARATOR)); - break; - case xmlAccess::FILENAME: //filename - value = toWx(fileObj.getShortName<side>()); - 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<side>()); - break; - case xmlAccess::SIZE: //file size - if (!fsObj_.isEmpty<side>()) - value = zen::toStringSep(fileObj.getFileSize<side>()); - break; - case xmlAccess::DATE: //date - if (!fsObj_.isEmpty<side>()) - value = zen::utcToLocalTimeString(fileObj.getLastWriteTime<side>()); - break; - case xmlAccess::EXTENSION: //file extension - value = toWx(fileObj.getExtension<side>()); - break; - } - } - - virtual void visit(const SymLinkMapping& linkObj) - { - switch (colType_) - { - case xmlAccess::FULL_PATH: - value = toWx(beforeLast(linkObj.getFullName<side>(), FILE_NAME_SEPARATOR)); - break; - case xmlAccess::FILENAME: //filename - value = toWx(linkObj.getShortName<side>()); - 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<side>()); - break; - case xmlAccess::SIZE: //file size - if (!fsObj_.isEmpty<side>()) - value = _("<Symlink>"); - break; - case xmlAccess::DATE: //date - if (!fsObj_.isEmpty<side>()) - value = zen::utcToLocalTimeString(linkObj.getLastWriteTime<side>()); - 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<side>()); - break; - case xmlAccess::FILENAME: - value = toWx(dirObj.getShortName<side>()); - 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<side>()); - break; - case xmlAccess::SIZE: //file size - if (!fsObj_.isEmpty<side>()) - value = _("<Directory>"); - break; - case xmlAccess::DATE: //date - if (!fsObj_.isEmpty<side>()) - 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 <SelectedSide side> - Zstring getIconFileImpl(size_t row) const //return "folder" if row points to a folder - { - const FileSystemObject* fsObj = getRawData(row); - if (fsObj && !fsObj->isEmpty<side>()) - { - struct GetIcon : public FSObjectVisitor - { - virtual void visit(const FileMapping& fileObj) - { - //Optimization: if filename exists on both sides, always use left side's file - //if (!fileObj.isEmpty<LEFT_SIDE>() && !fileObj.isEmpty<RIGHT_SIDE>()) - // iconName = fileObj.getFullName<LEFT_SIDE>(); - //else -> now with thumbnails this isn't viable anymore - iconName = fileObj.getFullName<side>(); - } - virtual void visit(const SymLinkMapping& linkObj) - { - iconName = linkObj.getLinkType<side>() == LinkDescriptor::TYPE_DIR ? - Zstr("folder") : - linkObj.getFullName<side>(); - } - virtual void visit(const DirMapping& dirObj) - { - iconName = Zstr("folder"); - } - - Zstring iconName; - } getIcon; - fsObj->accept(getIcon); - return getIcon.iconName; - } - - return Zstring(); - } - - -private: - virtual const std::pair<wxColour, wxColour> getRowColor(int row) //rows that are filtered out are shown in different color: <foreground, background> - { - std::pair<wxColour, wxColour> 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<xmlAccess::ColumnTypes> columnPositions; -}; - - -class CustomGridTableLeft : public CustomGridTableRim -{ -public: - - virtual wxString GetValue(int row, int col) - { - return CustomGridTableRim::GetValueSub<LEFT_SIDE>(row, col); - } - - virtual Zstring getIconFile(size_t row) const //return "folder" if row points to a folder - { - return getIconFileImpl<LEFT_SIDE>(row); - } -}; - - -class CustomGridTableRight : public CustomGridTableRim -{ -public: - virtual wxString GetValue(int row, int col) - { - return CustomGridTableRim::GetValueSub<RIGHT_SIDE>(row, col); - } - - virtual Zstring getIconFile(size_t row) const //return "folder" if row points to a folder - { - return getIconFileImpl<RIGHT_SIDE>(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<wxColour, wxColour> getRowColor(int row) //rows that are filtered out are shown in different color: <foreground, background> - { - std::pair<wxColour, wxColour> 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>& 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<const wxKeyEvent*> (&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<const wxMouseEvent*>(&event); - if (mouseEvent) - { - if (mouseEvent->ControlDown() || mouseEvent->ShiftDown()) - return false; - - if (mouseEvent->ButtonDown(wxMOUSE_BTN_LEFT)) - return true; - } - else - { - const wxKeyEvent* keyEvent = dynamic_cast<const wxKeyEvent*>(&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<int, int> CustomGrid::mousePosToCell(wxPoint pos) -{ - int x = -1; - int y = -1; - CalcUnscrolledPosition(pos.x, pos.y, &x, &y); - - std::pair<int, int> output(-1, -1); - if (x >= 0 && y >= 0) - { - output.first = YToRow(y); - output.second = XToCol(x); - } - return output; -} - - -std::set<size_t> CustomGrid::getAllSelectedRows() const -{ - std::set<size_t> 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<CustomGrid*>(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<CustomGrid*>(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<zen::IconBuffer>& 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<zen::IconBuffer> 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 <SelectedSide side> -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<side>()) - { - struct AssembleTooltip : public FSObjectVisitor - { - AssembleTooltip(wxString& tipMsg) : tipMsg_(tipMsg) {} - - virtual void visit(const FileMapping& fileObj) - { - tipMsg_ = copyStringTo<wxString>(std::wstring() + fileObj.getRelativeName<side>() + L"\n" + - _("Size") + L": " + zen::filesizeToShortString(to<Int64>(fileObj.getFileSize<side>())) + L"\n" + - _("Date") + L": " + zen::utcToLocalTimeString(fileObj.getLastWriteTime<side>())); - } - - virtual void visit(const SymLinkMapping& linkObj) - { - tipMsg_ = copyStringTo<wxString>(std::wstring() + linkObj.getRelativeName<side>() + L"\n" + - _("Date") + L": " + zen::utcToLocalTimeString(linkObj.getLastWriteTime<side>())); - } - - virtual void visit(const DirMapping& dirObj) - { - tipMsg_ = toWx(dirObj.getRelativeName<side>()); - } - - wxString& tipMsg_; - } assembler(toolTip); - fsObj->accept(assembler); - } - } - - - 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<int>(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::ColumnTypes>(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<xmlAccess::ColumnTypes>(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<xmlAccess::ColumnTypes> 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<int>(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_ = iconBuffer; - SetDefaultRenderer(new GridCellRenderer(failedLoads, getGridDataTableRim(), iconBuffer)); //SetDefaultRenderer takes ownership! -} - - -std::pair<CustomGridRim::RowBegin, CustomGridRim::RowEnd> 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<CustomGridTableRim*>(getGridDataTable()); //I'm tempted to use a static cast here... -} - - -void CustomGridRim::getIconsToBeLoaded(std::vector<Zstring>& 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<CustomGridTableRim*>(gridDataTable)->GetNumberCols(); - const int totalRows = const_cast<CustomGridTableRim*>(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<int>(rowsOnScreen.first); - const int rowNo = std::min(static_cast<int>(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<Zstring> iconsLeft; - m_leftGrid->getIconsToBeLoaded(iconsLeft); - - std::vector<Zstring> 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<LEFT_SIDE>(event); - event.Skip(); -} - - -CustomGridTable* CustomGridLeft::getGridDataTable() const -{ - return static_cast<CustomGridTable*>(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<RIGHT_SIDE>(event); - event.Skip(); -} - - -CustomGridTable* CustomGridRight::getGridDataTable() const -{ - return static_cast<CustomGridTable*>(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<CustomGridTable*>(GetTable()); //one of the few cases where no dynamic_cast is required! -} - - -inline -CustomGridTableMiddle* CustomGridMiddle::getGridDataTableMiddle() const -{ - return static_cast<CustomGridTableMiddle*>(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 <vector> -#include <wx/grid.h> -#include <wx+/tooltip.h> -#include "process_xml.h" -#include <memory> -#include <set> -#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<size_t> 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<SortColumn, SortDirection> SortMarker; - void setSortMarker(SortMarker marker); - - bool isLeadGrid() const; - - void setIconManager(const std::shared_ptr<zen::IconBuffer>& iconBuffer); - -protected: - void RefreshCell(int row, int col); - virtual void DrawColLabel(wxDC& dc, int col); - std::pair<int, int> 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<zen::IconBuffer>& 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<wxTimer> 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 <zen::SelectedSide side> - void setTooltip(const wxMouseEvent& event); - - void setOtherGrid(CustomGridRim* other); //call during initialization! - -private: - CustomGridTableRim* getGridDataTableRim() const; - virtual void enableFileIcons(const std::shared_ptr<zen::IconBuffer>& 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<Zstring>& newLoad); //loads all (not yet) drawn icons - - typedef size_t RowBegin; - typedef size_t RowEnd; - std::pair<RowBegin, RowEnd> getVisibleRows(); //return [first, last) number pair - - typedef size_t RowNumber; - typedef std::set<RowNumber> FailedIconLoad; - FailedIconLoad failedLoads; //save status of last icon load when drawing on GUI - - std::shared_ptr<zen::IconBuffer> 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<zen::IconBuffer>& 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 <utility> #include <wx/utils.h> 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<FileIconInitFun> fileIconInit(L"Shell32.dll", reinterpret_cast<LPCSTR>(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<Wstring>(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<wxLanguage>(language))); //throw (lngfile::ParsingError, PluralForm::ParsingError) + zen::setTranslator(new FFSLocale(languageFile, static_cast<wxLanguage>(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<std::string>(value); } template <> inline -bool readText(const std::string& input, ColumnTypes& value) +bool readText(const std::string& input, ColumnTypeRim& value) { - value = static_cast<ColumnTypes>(toNumber<int>(input)); + value = static_cast<ColumnTypeRim>(toNumber<int>(input)); + return true; +} + + +template <> inline +void writeText(const ColumnTypeNavi& value, std::string& output) +{ + output = toString<std::string>(value); +} + +template <> inline +bool readText(const std::string& input, ColumnTypeNavi& value) +{ + value = static_cast<ColumnTypeNavi>(toNumber<int>(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<ColumnAttrib> ColumnAttributes; - - typedef wxString Description; typedef wxString Commandline; typedef std::vector<std::pair<Description, Commandline> > 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<zen::ColumnAttributeNavi> columnAttribNavi; //compressed view/navigation + std::vector<zen::ColumnAttributeRim> columnAttribLeft; + std::vector<zen::ColumnAttributeRim> 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<IsWow64ProcessFun> 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<PASS_ONE>(baseMap); //delete files (or overwrite big ones with smaller ones) runPass<PASS_TWO>(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<sideSrc>(), target, copyFilePermissions); //throw FileError + zen::copySymlink(linkObj.getFullName<sideSrc>(), target, copyFilePermissions_); //throw FileError procCallback_.updateProcessedData(1, 0); linkObj.copyTo<sideTrg>(); //update SymLinkMapping @@ -1608,7 +1611,7 @@ void SynchronizeFolderPair::synchronizeLinkInt(SymLinkMapping& linkObj, SyncOper linkObj.removeObject<sideTrg>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!) reportStatus(txtOverwritingLink, target); //restore status text - zen::copySymlink(linkObj.getFullName<sideSrc>(), target, copyFilePermissions); //throw FileError + zen::copySymlink(linkObj.getFullName<sideSrc>(), target, copyFilePermissions_); //throw FileError linkObj.copyTo<sideTrg>(); //update SymLinkMapping procCallback_.updateProcessedData(1, 0); @@ -1677,7 +1680,7 @@ void SynchronizeFolderPair::synchronizeFolderInt(DirMapping& dirObj, SyncOperati const Zstring& target = dirObj.getBaseDirPf<sideTrg>() + dirObj.getRelativeName<sideSrc>(); reportInfo(txtCreatingFolder, target); - createDirectory(target, dirObj.getFullName<sideSrc>(), copyFilePermissions); //no symlink copying! + createDirectory(target, dirObj.getFullName<sideSrc>(), copyFilePermissions_); //no symlink copying! dirObj.copyTo<sideTrg>(); //update DirMapping procCallback_.updateProcessedData(1, 0); @@ -1843,10 +1846,10 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf } }; - typedef std::vector<std::pair<Zstring, Zstring> > DirPairList; + typedef std::vector<std::pair<Zstring, Zstring>> DirPairList; DirPairList significantDiff; - typedef std::vector<std::pair<Zstring, std::pair<zen::Int64, zen::Int64> > > DirSpaceRequAvailList; //dirname / space required / space available + typedef std::vector<std::pair<Zstring, std::pair<Int64, Int64>>> DirSpaceRequAvailList; //dirname / space required / space available DirSpaceRequAvailList diskSpaceMissing; std::set<Zstring> recyclMissing; @@ -1925,7 +1928,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf //check if user-defined directory for deletion was specified if (folderPairCfg.custDelFolder.empty()) { - procCallback.reportFatalError(_("User-defined directory for deletion was not specified!")); + procCallback.reportFatalError(_("Directory for file versioning was not supplied!")); skipFolderPair[folderIndex] = true; continue; } @@ -1956,28 +1959,24 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf if (significantDifferenceDetected(folderPairStat)) significantDiff.push_back(std::make_pair(j->getBaseDirPf<LEFT_SIDE>(), j->getBaseDirPf<RIGHT_SIDE>())); - //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<Int64, Int64> spaceNeeded = DiskSpaceNeeded::calculate(*j, delHandlerFp.first.deletionFreesSpace(), delHandlerFp.second.deletionFreesSpace()); - wxLongLong freeDiskSpaceLeft; - if (wxGetDiskSpace(toWx(j->getBaseDirPf<LEFT_SIDE>()), 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<double>(spaceNeeded.first)) - diskSpaceMissing.push_back(std::make_pair(j->getBaseDirPf<LEFT_SIDE>(), std::make_pair(spaceNeeded.first, freeDiskSpaceLeft.ToDouble()))); - } - - //check for sufficient free diskspace in right directory - wxLongLong freeDiskSpaceRight; - if (wxGetDiskSpace(toWx(j->getBaseDirPf<RIGHT_SIDE>()), 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<double>(spaceNeeded.second)) - diskSpaceMissing.push_back(std::make_pair(j->getBaseDirPf<RIGHT_SIDE>(), std::make_pair(spaceNeeded.second, freeDiskSpaceRight.ToDouble()))); - } + checkSpace(j->getBaseDirPf<LEFT_SIDE >(), spaceNeeded.first); + checkSpace(j->getBaseDirPf<RIGHT_SIDE>(), 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<LEFT_SIDE>() + @@ -2138,7 +2137,7 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf //execute synchronization recursively //update synchronization database (automatic sync only) - zen::ScopeGuard guardUpdateDb = zen::makeGuard([&]() + zen::ScopeGuard guardUpdateDb = zen::makeGuard([&] { if (folderPairCfg.inAutomaticMode) zen::saveToDisk(*j); //throw FileError @@ -2147,7 +2146,15 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf //guarantee removal of invalid entries (where element on both sides is empty) ZEN_ON_BLOCK_EXIT(BaseDirMapping::removeEmpty(*j);); - SynchronizeFolderPair syncFP(*this, + bool copyPermissionsFp = false; + tryReportingError(procCallback, [&] + { + copyPermissionsFp = copyFilePermissions_ && //copy permissions only if asked for and supported by *both* sides! + supportsPermissions(beforeLast(j->getBaseDirPf<LEFT_SIDE >(), FILE_NAME_SEPARATOR)) && //throw FileError + supportsPermissions(beforeLast(j->getBaseDirPf<RIGHT_SIDE>(), 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<FolderPairSyncCf syncFP.startSync(*j); //(try to gracefully) cleanup temporary folders (Recycle bin optimization) -> 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 <iterator> #include <wx/wupdlock.h> +#include <wx+/context_menu.h> #include "../lib/help_provider.h" #include <zen/file_handling.h> #include "msg_popup.h" @@ -44,11 +45,11 @@ private: virtual void OnCmpSettings( wxCommandEvent& event); virtual void OnSyncSettings( wxCommandEvent& event); virtual void OnConfigureFilter( wxCommandEvent& event); - virtual void OnHelp( wxCommandEvent& event); - void OnGlobalFilterOpenContext(wxCommandEvent& event); - void OnGlobalFilterRemConfirm(wxCommandEvent& event); + void OnCompSettingsContext(wxCommandEvent& event); + void OnSyncSettingsContext(wxCommandEvent& event); + void OnGlobalFilterContext(wxCommandEvent& event); virtual void OnCheckSaveLog( wxCommandEvent& event); virtual void OnChangeMaxLogCountTxt(wxCommandEvent& event); virtual void OnClose( wxCloseEvent& event); @@ -58,7 +59,7 @@ private: virtual void OnAddFolderPair( wxCommandEvent& event); virtual void OnRemoveFolderPair( wxCommandEvent& event); virtual void OnRemoveTopFolderPair(wxCommandEvent& event); - void OnFilesDropped(FFSFileDropEvent& event); + void OnFilesDropped(FileDropEvent& event); void addFolderPair(const std::vector<zen::FolderPairEnh>& newPairs, bool addFront = false); void removeAddFolderPair(const int pos); @@ -88,8 +89,6 @@ private: xmlAccess::XmlBatchConfig localBatchCfg; - std::unique_ptr<wxMenu> contextMenu; - std::unique_ptr<DirectoryName<FolderHistoryBox>> logfileDir; zen::EnumDescrList<xmlAccess::OnError> enumDescrMap; @@ -146,16 +145,16 @@ private: batchDlg.updateGui(); } - virtual void OnAltCompCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltCompCfg() { - FolderPairPanelBasic<GuiPanel>::OnAltCompCfgRemoveConfirm(event); + FolderPairPanelBasic<GuiPanel>::removeAltCompCfg(); batchDlg.updateGui(); } - virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltSyncCfg() { - FolderPairPanelBasic<GuiPanel>::OnAltSyncCfgRemoveConfirm(event); + FolderPairPanelBasic<GuiPanel>::removeAltSyncCfg(); batchDlg.updateGui(); } @@ -268,11 +267,13 @@ BatchDialog::BatchDialog(wxWindow* window, //init handling of first folder pair firstFolderPair.reset(new DirectoryPairBatchFirst(*this)); - m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnGlobalFilterOpenContext), NULL, this); + m_bpButtonCmpConfig ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnCompSettingsContext), NULL, this); + m_bpButtonSyncConfig->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnSyncSettingsContext), NULL, this); + m_bpButtonFilter ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(BatchDialog::OnGlobalFilterContext), NULL, this); //prepare drag & drop for loading of *.ffs_batch files setupFileDrop(*this); - Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(BatchDialog::OnFilesDropped), NULL, this); + Connect(EVENT_DROP_FILE, FileDropEventHandler(BatchDialog::OnFilesDropped), NULL, this); logfileDir.reset(new DirectoryName<FolderHistoryBox>(*m_panelBatchSettings, *m_dirPickerLogfileDir, *m_comboBoxLogfileDir)); @@ -383,25 +384,59 @@ void BatchDialog::updateGui() //re-evaluate gui after config changes } -void BatchDialog::OnGlobalFilterOpenContext(wxCommandEvent& event) +void BatchDialog::OnCompSettingsContext(wxCommandEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu + ContextMenu menu; + + auto setVariant = [&](CompareVariant var) + { + localBatchCfg.mainCfg.cmpConfig.compareVar = var; + updateGui(); + }; - wxMenuItem* itemClear = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Clear filter settings")); - contextMenu->Append(itemClear); - contextMenu->Connect(itemClear->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(BatchDialog::OnGlobalFilterRemConfirm), NULL, this); + auto currentVar = localBatchCfg.mainCfg.cmpConfig.compareVar; - if (isNullFilter(localBatchCfg.mainCfg.globalFilter)) - contextMenu->Enable(itemClear->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway + menu.addRadio(_("File time and size"), [&] { setVariant(CMP_BY_TIME_SIZE); }, currentVar == CMP_BY_TIME_SIZE); + menu.addRadio(_("File content" ), [&] { setVariant(CMP_BY_CONTENT); }, currentVar == CMP_BY_CONTENT); - PopupMenu(contextMenu.get()); //show context menu + menu.popup(*this); } -void BatchDialog::OnGlobalFilterRemConfirm(wxCommandEvent& event) +void BatchDialog::OnSyncSettingsContext(wxCommandEvent& event) { - localBatchCfg.mainCfg.globalFilter = FilterConfig(); - updateGui(); + + ContextMenu menu; + + auto setVariant = [&](DirectionConfig::Variant var) + { + localBatchCfg.mainCfg.syncCfg.directionCfg.var = var; + updateGui(); + }; + + const auto currentVar = localBatchCfg.mainCfg.syncCfg.directionCfg.var; + + menu.addRadio(_("<Automatic>"), [&] { setVariant(DirectionConfig::AUTOMATIC); }, currentVar == DirectionConfig::AUTOMATIC); + menu.addRadio(_("Mirror ->>") , [&] { setVariant(DirectionConfig::MIRROR); }, currentVar == DirectionConfig::MIRROR); + menu.addRadio(_("Update ->") , [&] { setVariant(DirectionConfig::UPDATE); }, currentVar == DirectionConfig::UPDATE); + menu.addRadio(_("Custom") , [&] { setVariant(DirectionConfig::CUSTOM); }, currentVar == DirectionConfig::CUSTOM); + + menu.popup(*this); +} + + +void BatchDialog::OnGlobalFilterContext(wxCommandEvent& event) +{ + ContextMenu menu; + + auto clearFilter = [&] + { + localBatchCfg.mainCfg.globalFilter = FilterConfig(); + updateGui(); + }; + menu.addItem( _("Clear filter settings"), clearFilter, NULL, !isNullFilter(localBatchCfg.mainCfg.globalFilter)); + + menu.popup(*this); } @@ -420,7 +455,7 @@ void BatchDialog::OnChangeMaxLogCountTxt(wxCommandEvent& event) } -void BatchDialog::OnFilesDropped(FFSFileDropEvent& event) +void BatchDialog::OnFilesDropped(FileDropEvent& event) { if (event.getFiles().empty()) return; @@ -720,7 +755,7 @@ void BatchDialog::OnRemoveFolderPair(wxCommandEvent& event) void BatchDialog::OnRemoveTopFolderPair(wxCommandEvent& event) { - if (additionalFolderPairs.size() > 0) + if (!additionalFolderPairs.empty()) { //get settings from second folder pair const FolderPairEnh cfgSecond = getEnhancedPair(additionalFolderPairs[0]); @@ -740,13 +775,13 @@ void BatchDialog::OnRemoveTopFolderPair(wxCommandEvent& event) void BatchDialog::updateGuiForFolderPair() { //adapt delete top folder pair button - if (additionalFolderPairs.size() == 0) + if (additionalFolderPairs.empty()) m_bpButtonRemovePair->Hide(); else m_bpButtonRemovePair->Show(); //adapt local filter and sync cfg for first folder pair - if (additionalFolderPairs.size() == 0 && + if (additionalFolderPairs.empty() && firstFolderPair->getAltCompConfig().get() == NULL && firstFolderPair->getAltSyncConfig().get() == NULL && isNullFilter(firstFolderPair->getAltFilterConfig())) @@ -766,7 +801,7 @@ void BatchDialog::updateGuiForFolderPair() const int maxAddFolderPairsVisible = 2; int pairHeight = sbSizerMainPair->GetSize().GetHeight(); //respect height of main pair - if (additionalFolderPairs.size() > 0) + if (!additionalFolderPairs.empty()) pairHeight += std::min<double>(maxAddFolderPairsVisible + 0.5, additionalFolderPairs.size()) * //have 0.5 * height indicate that more folders are there additionalFolderPairs[0]->GetSize().GetHeight(); diff --git a/ui/batch_config.h b/ui/batch_config.h index 5a1c177a..5d47f64d 100644 --- a/ui/batch_config.h +++ b/ui/batch_config.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef BATCHCONFIG_H_INCLUDED diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp index 02dfcb75..6308842f 100644 --- a/ui/batch_status_handler.cpp +++ b/ui/batch_status_handler.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "batch_status_handler.h" @@ -190,7 +190,7 @@ BatchStatusHandler::~BatchStatusHandler() { returnValue = -4; finalStatus = _("Synchronization aborted!"); - errorLog.logMsg(finalStatus, TYPE_ERROR); + errorLog.logMsg(finalStatus, TYPE_FATAL_ERROR); } else if (totalErrors > 0) { @@ -206,7 +206,10 @@ BatchStatusHandler::~BatchStatusHandler() //print the results list: logfile if (logFile.get()) + { logFile->writeLog(errorLog, finalStatus); + logFile.reset(); //close file now: user may do something with it in "on completion" + } //decide whether to stay on status screen or exit immediately... if (switchToGuiRequested) //-> avoid recursive yield() calls, thous switch not before ending batch mode diff --git a/ui/batch_status_handler.h b/ui/batch_status_handler.h index 719e44a9..d5a18322 100644 --- a/ui/batch_status_handler.h +++ b/ui/batch_status_handler.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef BATCHSTATUSHANDLER_H_INCLUDED diff --git a/ui/check_version.cpp b/ui/check_version.cpp index 4cf2a53a..61af5b48 100644 --- a/ui/check_version.cpp +++ b/ui/check_version.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "check_version.h" diff --git a/ui/check_version.h b/ui/check_version.h index c1331f7f..bbf8d7cb 100644 --- a/ui/check_version.h +++ b/ui/check_version.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef UPDATEVERSION_H_INCLUDED diff --git a/ui/column_attr.h b/ui/column_attr.h new file mode 100644 index 00000000..275c9dd7 --- /dev/null +++ b/ui/column_attr.h @@ -0,0 +1,120 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * +// ************************************************************************** + +#ifndef COL_ATTR_HEADER_189467891346732143214 +#define COL_ATTR_HEADER_189467891346732143214 + +#include <stddef.h> //size_t +#include <vector> + +namespace zen +{ +enum ColumnTypeRim +{ + COL_TYPE_DIRECTORY, + COL_TYPE_FULL_PATH, + COL_TYPE_REL_PATH, + COL_TYPE_FILENAME, + COL_TYPE_SIZE, + COL_TYPE_DATE, + COL_TYPE_EXTENSION +}; + +struct ColumnAttributeRim +{ + ColumnAttributeRim() : type_(COL_TYPE_DIRECTORY), width_(0), visible_(false) {} + ColumnAttributeRim(ColumnTypeRim type, int width, bool visible) : type_(type), width_(width), visible_(visible) {} + + ColumnTypeRim type_; + int width_; //negative value stretches proportionally! + bool visible_; +}; + + +namespace +{ +std::vector<ColumnAttributeRim> getDefaultColumnAttributesLeft() +{ + std::vector<ColumnAttributeRim> attr; + attr.push_back(ColumnAttributeRim(COL_TYPE_FULL_PATH, 250, false)); + attr.push_back(ColumnAttributeRim(COL_TYPE_DIRECTORY, 200, false)); + attr.push_back(ColumnAttributeRim(COL_TYPE_REL_PATH, 200, true)); + attr.push_back(ColumnAttributeRim(COL_TYPE_FILENAME, 150, true)); + attr.push_back(ColumnAttributeRim(COL_TYPE_SIZE, 80, true)); + attr.push_back(ColumnAttributeRim(COL_TYPE_DATE, 112, false)); + attr.push_back(ColumnAttributeRim(COL_TYPE_EXTENSION, 60, false)); + return attr; +} + +std::vector<ColumnAttributeRim> getDefaultColumnAttributesRight() +{ + std::vector<ColumnAttributeRim> attr; + attr.push_back(ColumnAttributeRim(COL_TYPE_FULL_PATH, 250, false)); + attr.push_back(ColumnAttributeRim(COL_TYPE_DIRECTORY, 200, false)); + attr.push_back(ColumnAttributeRim(COL_TYPE_REL_PATH, 200, false)); //already shown on left side + attr.push_back(ColumnAttributeRim(COL_TYPE_FILENAME, 150, true)); + attr.push_back(ColumnAttributeRim(COL_TYPE_SIZE, 80, true)); + attr.push_back(ColumnAttributeRim(COL_TYPE_DATE, 112, false)); + attr.push_back(ColumnAttributeRim(COL_TYPE_EXTENSION, 60, false)); + return attr; +} +} + +//------------------------------------------------------------------ + +enum ColumnTypeMiddle +{ + COL_TYPE_MIDDLE_VALUE, + COL_TYPE_BORDER +}; + + +//------------------------------------------------------------------ + +enum ColumnTypeNavi +{ + COL_TYPE_NAVI_BYTES, + COL_TYPE_NAVI_DIRECTORY +}; + + +struct ColumnAttributeNavi +{ + ColumnAttributeNavi() : type_(COL_TYPE_NAVI_DIRECTORY), width_(0), visible_(false) {} + ColumnAttributeNavi(ColumnTypeNavi type, int width, bool visible) : type_(type), width_(width), visible_(visible) {} + + ColumnTypeNavi type_; + int width_; //negative value stretches proportionally! + bool visible_; +}; + + +static const bool defaultValueShowPercentage = true; +static const ColumnTypeNavi defaultValueLastSortColumn = COL_TYPE_NAVI_DIRECTORY; //remember sort on navigation panel +static const bool defaultValueLastSortAscending = true; // + +inline +std::vector<ColumnAttributeNavi> getDefaultColumnAttributesNavi() +{ + std::vector<ColumnAttributeNavi> attr; + + ColumnAttributeNavi newEntry; + + newEntry.type_ = COL_TYPE_NAVI_DIRECTORY; + newEntry.visible_ = true; + newEntry.width_ = -1; //stretch, old value: 280; + attr.push_back(newEntry); + + newEntry.type_ = COL_TYPE_NAVI_BYTES; + newEntry.visible_ = true; + newEntry.width_ = 55; + attr.push_back(newEntry); + + return attr; +} +} + +#endif // COL_ATTR_HEADER_189467891346732143214 diff --git a/ui/custom_grid.cpp b/ui/custom_grid.cpp new file mode 100644 index 00000000..df1e9145 --- /dev/null +++ b/ui/custom_grid.cpp @@ -0,0 +1,1414 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * +// ************************************************************************** + +#include "custom_grid.h" +#include <wx/dc.h> +#include <wx/settings.h> +#include <zen/i18n.h> +#include <zen/file_error.h> +#include <wx+/tooltip.h> +#include <wx+/format_unit.h> +#include <wx+/string_conv.h> +#include <wx+/rtl.h> +#include "../file_hierarchy.h" +#include "../lib/resources.h" + +using namespace zen; +using namespace gridview; + + +const wxEventType zen::EVENT_GRID_CHECK_ROWS = wxNewEventType(); +const wxEventType zen::EVENT_GRID_SYNC_DIRECTION = wxNewEventType(); + +namespace +{ +const wxColour COLOR_ORANGE (238, 201, 0); +const wxColour COLOR_GREY (212, 208, 200); +const wxColour COLOR_YELLOW (247, 252, 62); +const wxColour COLOR_YELLOW_LIGHT(253, 252, 169); +const wxColour COLOR_CMP_RED (249, 163, 165); +const wxColour COLOR_SYNC_BLUE (201, 203, 247); +const wxColour COLOR_SYNC_GREEN (197, 248, 190); +const wxColour COLOR_NOT_ACTIVE(228, 228, 228); //light grey + + +const Zstring ICON_FILE_FOLDER = Zstr("folder"); + +const int CHECK_BOX_IMAGE = 12; //width of checkbox image +const int CHECK_BOX_WIDTH = CHECK_BOX_IMAGE + 2; //width of first block + +const size_t MIN_ROW_COUNT = 10; + +/* +class hierarchy: + GridDataBase + /|\ + ________________|________________ + | | + GridDataRim | + /|\ | + __________|__________ | + | | | + GridDataLeftRim GridDataRight GridDataMiddle +*/ + + + +void refreshCell(Grid& grid, int row, ColumnType colType, size_t compPos) +{ + wxRect cellArea = grid.getCellArea(row, colType, compPos); //returns empty rect if column not found; absolute coordinates! + if (cellArea.height > 0) + { + cellArea.SetTopLeft(grid.CalcScrolledPosition(cellArea.GetTopLeft())); + grid.getMainWin().RefreshRect(cellArea, false); + } +} + + +std::pair<int, int> getVisibleRows(Grid& grid) //returns range [from, to) +{ + const wxSize clientSize = grid.getMainWin().GetClientSize(); + if (clientSize.GetHeight() > 0) + { + wxPoint topLeft = grid.CalcUnscrolledPosition(wxPoint(0, 0)); + wxPoint bottom = grid.CalcUnscrolledPosition(wxPoint(0, clientSize.GetHeight() - 1)); + + int rowFrom = grid.getRowAtPos(topLeft.y); //returns < 0 if column not found; absolute coordinates! + if (rowFrom >= 0) + { + int rowEnd = grid.getRowAtPos(bottom.y); //returns < 0 if column not found; absolute coordinates! + if (rowEnd < 0) + rowEnd = grid.getRowCount(); + else + ++rowEnd; + return std::make_pair(rowFrom, rowEnd); + } + } + return std::make_pair(0, 0); +} + + +class IconUpdater; +class GridEventManager; + + +struct IconManager +{ + IconManager(IconBuffer::IconSize sz) : iconBuffer(sz) {} + + IconBuffer iconBuffer; + std::unique_ptr<IconUpdater> iconUpdater; //bind ownership to GridDataRim<>! +}; + +//######################################################################################################## + +class GridDataBase : public GridData +{ +public: + GridDataBase(Grid& grid) : grid_(grid) {} + + void holdOwnership(const std::shared_ptr<GridEventManager>& evtMgr) { evtMgr_ = evtMgr; } + +protected: + Grid& refGrid() { return grid_; } + const Grid& refGrid() const { return grid_; } + +private: + std::shared_ptr<GridEventManager> evtMgr_; + Grid& grid_; + +}; + +//######################################################################################################## + +template <SelectedSide side> +class GridDataRim : public GridDataBase +{ +public: + GridDataRim(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid, size_t compPos) : GridDataBase(grid), gridDataView_(gridDataView), compPos_(compPos) {} + + void setIconManager(const std::shared_ptr<IconManager>& iconMgr) { iconMgr_ = iconMgr; } + + void addIconsToBeLoaded(std::vector<Zstring>& newLoad) //loads all (not yet) drawn icons + { + //don't check too often! give worker thread some time to fetch data + if (iconMgr_) + { + const std::pair<int, int>& rowsOnScreen = getVisibleRows(refGrid()); + + //loop over all visible rows + const int firstRow = rowsOnScreen.first; + const int rowCount = rowsOnScreen.second - firstRow; + + for (int i = 0; i < rowCount; ++i) + { + //alternate when adding rows: first, last, first + 1, last - 1 ... -> Icon buffer will then load reversely, i.e. from inside out + const int currentRow = firstRow + (i % 2 == 0 ? + i / 2 : + rowCount - 1 - (i - 1) / 2); + + if (isFailedLoad(currentRow)) //find failed attempts to load icon + { + const Zstring fileName = getIconFile(currentRow); + if (!fileName.empty()) + { + //test if they are already loaded in buffer: + if (iconMgr_->iconBuffer.requestFileIcon(fileName)) + { + //do a *full* refresh for *every* failed load to update partial DC updates while scrolling + refreshCell(refGrid(), currentRow, static_cast<ColumnType>(COL_TYPE_FILENAME), compPos_); + setFailedLoad(currentRow, false); + } + else //not yet in buffer: mark for async. loading + newLoad.push_back(fileName); + } + } + } + } + } + + void setFailedLoad(size_t row, bool failed) + { + if (failedLoads.size() != refGrid().getRowCount()) + failedLoads.resize(refGrid().getRowCount()); + + if (row < failedLoads.size()) + failedLoads[row] = failed; + } + + bool isFailedLoad(size_t row) const { return row < failedLoads.size() ? failedLoads[row] != 0 : false; } + +protected: + virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus) + { + if (enabled) + { + if (selected) + dc.GradientFillLinear(rect, getColorSelectionGradientFrom(), getColorSelectionGradientTo(), wxEAST); + //ignore focus + else + clearArea(dc, rect, getBackGroundColor(row)); + } + else + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + } + + wxColor getBackGroundColor(int row) const + { + wxColor backGroundCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + + if (const FileSystemObject* fsObj = getRawData(row)) + { + //mark filtered rows + if (!fsObj->isActive()) + return COLOR_NOT_ACTIVE; + else if (!fsObj->isEmpty<side>()) //always show not existing files/dirs/symlinks as empty + { + //mark directories and symlinks + struct GetRowColor : public FSObjectVisitor + { + GetRowColor(wxColour& background) : background_(background) {} + + virtual void visit(const FileMapping& fileObj) {} + virtual void visit(const SymLinkMapping& linkObj) + { + background_ = COLOR_ORANGE; + } + virtual void visit(const DirMapping& dirObj) + { + background_ = COLOR_GREY; + } + private: + wxColour& background_; + } getCol(backGroundCol); + fsObj->accept(getCol); + } + } + return backGroundCol; + } + + const FileSystemObject* getRawData(int row) const { return gridDataView_ ? gridDataView_->getObject(row) : NULL; } + +private: + virtual size_t getRowCount() const { return std::max(MIN_ROW_COUNT, gridDataView_ ? gridDataView_->rowsOnView() : 0); } + + virtual wxString getValue(int row, ColumnType colType) const + { + if (const FileSystemObject* fsObj = getRawData(row)) + { + struct GetTextValue : public FSObjectVisitor + { + GetTextValue(ColumnTypeRim colType, const FileSystemObject& fso) : colType_(colType), fsObj_(fso) {} + virtual void visit(const FileMapping& fileObj) + { + switch (colType_) + { + case COL_TYPE_FULL_PATH: + value = toWx(beforeLast(fileObj.getFullName<side>(), FILE_NAME_SEPARATOR)); + break; + case COL_TYPE_FILENAME: //filename + value = toWx(fileObj.getShortName<side>()); + break; + case COL_TYPE_REL_PATH: //relative path + value = toWx(beforeLast(fileObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found + break; + case COL_TYPE_DIRECTORY: + value = toWx(fileObj.getBaseDirPf<side>()); + break; + case COL_TYPE_SIZE: //file size + if (!fsObj_.isEmpty<side>()) + value = zen::toStringSep(fileObj.getFileSize<side>()); + break; + case COL_TYPE_DATE: //date + if (!fsObj_.isEmpty<side>()) + value = zen::utcToLocalTimeString(fileObj.getLastWriteTime<side>()); + break; + case COL_TYPE_EXTENSION: //file extension + value = toWx(fileObj.getExtension<side>()); + break; + } + } + + virtual void visit(const SymLinkMapping& linkObj) + { + switch (colType_) + { + case COL_TYPE_FULL_PATH: + value = toWx(beforeLast(linkObj.getFullName<side>(), FILE_NAME_SEPARATOR)); + break; + case COL_TYPE_FILENAME: //filename + value = toWx(linkObj.getShortName<side>()); + break; + case COL_TYPE_REL_PATH: //relative path + value = toWx(beforeLast(linkObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found + break; + case COL_TYPE_DIRECTORY: + value = toWx(linkObj.getBaseDirPf<side>()); + break; + case COL_TYPE_SIZE: //file size + if (!fsObj_.isEmpty<side>()) + value = _("<Symlink>"); + break; + case COL_TYPE_DATE: //date + if (!fsObj_.isEmpty<side>()) + value = zen::utcToLocalTimeString(linkObj.getLastWriteTime<side>()); + break; + case COL_TYPE_EXTENSION: //file extension + value = wxEmptyString; + break; + } + } + + virtual void visit(const DirMapping& dirObj) + { + switch (colType_) + { + case COL_TYPE_FULL_PATH: + value = toWx(dirObj.getFullName<side>()); + break; + case COL_TYPE_FILENAME: + value = toWx(dirObj.getShortName<side>()); + break; + case COL_TYPE_REL_PATH: + value = toWx(beforeLast(dirObj.getObjRelativeName(), FILE_NAME_SEPARATOR)); //returns empty string if ch not found + break; + case COL_TYPE_DIRECTORY: + value = toWx(dirObj.getBaseDirPf<side>()); + break; + case COL_TYPE_SIZE: //file size + if (!fsObj_.isEmpty<side>()) + value = _("<Directory>"); + break; + case COL_TYPE_DATE: //date + if (!fsObj_.isEmpty<side>()) + value = wxEmptyString; + break; + case COL_TYPE_EXTENSION: //file extension + value = wxEmptyString; + break; + } + } + ColumnTypeRim colType_; + wxString value; + + const FileSystemObject& fsObj_; + } getVal(static_cast<ColumnTypeRim>(colType), *fsObj); + fsObj->accept(getVal); + return getVal.value; + } + //if data is not found: + return wxEmptyString; + } + + static const int CELL_BORDER = 2; + + + virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType) + { + wxRect rectTmp = drawCellBorder(dc, rect); + + const bool isActive = [&]() -> bool + { + if (const FileSystemObject* fsObj = this->getRawData(row)) + return fsObj->isActive(); + return true; + }(); + + //draw file icon + if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_FILENAME) + { + if (iconMgr_) + { + rectTmp.x += CELL_BORDER; + rectTmp.width -= CELL_BORDER; + + const int iconSize = iconMgr_->iconBuffer.getSize(); + if (rectTmp.GetWidth() >= iconSize) + { + // Partitioning: + // _______________________________ + // | border | icon | border | text | + // ------------------------------- + + const Zstring fileName = getIconFile(row); + if (!fileName.empty()) + { + wxIcon icon; + + //first check if it is a directory icon: + if (fileName == ICON_FILE_FOLDER) + icon = iconMgr_->iconBuffer.genericDirIcon(); + else //retrieve file icon + { + if (!iconMgr_->iconBuffer.requestFileIcon(fileName, &icon)) //returns false if icon is not in buffer + { + icon = iconMgr_->iconBuffer.genericFileIcon(); //better than nothing + setFailedLoad(row, true); //save status of failed icon load -> used for async. icon loading + //falsify only! we want to avoid writing incorrect success values when only partially updating the DC, e.g. when scrolling, + //see repaint behavior of ::ScrollWindow() function! + } + } + + if (icon.IsOk()) + { + //center icon if it is too small + const int posX = rectTmp.GetX() + std::max(0, (iconSize - icon.GetWidth()) / 2); + const int posY = rectTmp.GetY() + std::max(0, (rectTmp.GetHeight() - icon.GetHeight()) / 2); + + drawIconRtlNoMirror(dc, icon, wxPoint(posX, posY), buffer); + + //convert icon to greyscale if row is not active + if (!isActive) + { + wxBitmap bmp(icon.GetWidth(), icon.GetHeight()); + wxMemoryDC memDc(bmp); + memDc.Blit(0, 0, icon.GetWidth(), icon.GetHeight(), &dc, posX, posY); //blit in + + bmp = wxBitmap(bmp.ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3)); //treat all channels equally! + memDc.SelectObject(bmp); + + dc.Blit(posX, posY, icon.GetWidth(), icon.GetHeight(), &memDc, 0, 0); //blit out + } + } + } + } + rectTmp.x += iconSize; + rectTmp.width -= iconSize; + } + + rectTmp.x += CELL_BORDER; + rectTmp.width -= CELL_BORDER; + + drawCellText(dc, rectTmp, getValue(row, colType), isActive, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); + } + else + { + int alignment = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL; + + //have file size right-justified (but don't change for RTL languages) + if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_SIZE && grid.GetLayoutDirection() != wxLayout_RightToLeft) + { + rectTmp.width -= CELL_BORDER; + alignment = wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL; + } + else + { + rectTmp.x += CELL_BORDER; + rectTmp.width -= CELL_BORDER; + } + + drawCellText(dc, rectTmp, getValue(row, colType), isActive, alignment); + } + } + + virtual size_t getBestSize(wxDC& dc, int row, ColumnType colType) + { + // Partitioning: + // ________________________________________ + // | border | icon | border | text | border | + // ---------------------------------------- + + int bestSize = 0; + if (static_cast<ColumnTypeRim>(colType) == COL_TYPE_FILENAME && iconMgr_) + bestSize += CELL_BORDER + iconMgr_->iconBuffer.getSize(); + + bestSize += CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth(); + + return bestSize + CELL_BORDER + 1; //add additional right border + 1 pix for border line + } + + virtual wxString getColumnLabel(ColumnType colType) const + { + switch (static_cast<ColumnTypeRim>(colType)) + { + case COL_TYPE_FULL_PATH: + return _("Full path"); + case COL_TYPE_FILENAME: + return _("Name"); //= short name + case COL_TYPE_REL_PATH: + return _("Relative path"); + case COL_TYPE_DIRECTORY: + return _("Directory"); + case COL_TYPE_SIZE: + return _("Size"); + case COL_TYPE_DATE: + return _("Date"); + case COL_TYPE_EXTENSION: + return _("Extension"); + } + return wxEmptyString; + } + + virtual void renderColumnLabel(Grid& tree, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted) + { + wxRect rectInside = drawColumnLabelBorder(dc, rect); + drawColumnLabelBackground(dc, rectInside, highlighted); + + const int COLUMN_BORDER_LEFT = 4; + + rectInside.x += COLUMN_BORDER_LEFT; + rectInside.width -= COLUMN_BORDER_LEFT; + drawColumnLabelText(dc, rectInside, getColumnLabel(colType)); + + //draw sort marker + if (gridDataView_) + { + auto sortInfo = gridDataView_->getSortInfo(); + if (sortInfo) + { + if (colType == static_cast<ColumnType>(sortInfo->type_) && (compPos_ == gridview::COMP_LEFT) == sortInfo->onLeft_) + { + const wxBitmap& marker = GlobalResources::getImage(sortInfo->ascending_ ? L"sortAscending" : L"sortDescending"); + wxPoint markerBegin = rectInside.GetTopLeft() + wxPoint((rectInside.width - marker.GetWidth()) / 2, 0); + dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel border + } + } + } + } + + Zstring getIconFile(size_t row) const //return ICON_FILE_FOLDER if row points to a folder + { + const FileSystemObject* fsObj = getRawData(row); + if (fsObj && !fsObj->isEmpty<side>()) + { + struct GetIcon : public FSObjectVisitor + { + virtual void visit(const FileMapping& fileObj) + { + iconName = fileObj.getFullName<side>(); + } + virtual void visit(const SymLinkMapping& linkObj) + { + iconName = linkObj.getLinkType<side>() == LinkDescriptor::TYPE_DIR ? + Zstr("folder") : + linkObj.getFullName<side>(); + } + virtual void visit(const DirMapping& dirObj) + { + iconName = Zstr("folder"); + } + + Zstring iconName; + } getIcon; + fsObj->accept(getIcon); + return getIcon.iconName; + } + return Zstring(); + } + + virtual wxString getToolTip(int row, ColumnType colType) const + { + wxString toolTip; + const FileSystemObject* fsObj = getRawData(row); + if (fsObj && !fsObj->isEmpty<side>()) + { + struct AssembleTooltip : public FSObjectVisitor + { + AssembleTooltip(wxString& tipMsg) : tipMsg_(tipMsg) {} + + virtual void visit(const FileMapping& fileObj) + { + tipMsg_ = copyStringTo<wxString>(std::wstring() + fileObj.getRelativeName<side>() + L"\n" + + _("Size") + L": " + zen::filesizeToShortString(to<Int64>(fileObj.getFileSize<side>())) + L"\n" + + _("Date") + L": " + zen::utcToLocalTimeString(fileObj.getLastWriteTime<side>())); + } + + virtual void visit(const SymLinkMapping& linkObj) + { + tipMsg_ = copyStringTo<wxString>(std::wstring() + linkObj.getRelativeName<side>() + L"\n" + + _("Date") + L": " + zen::utcToLocalTimeString(linkObj.getLastWriteTime<side>())); + } + + virtual void visit(const DirMapping& dirObj) + { + tipMsg_ = toWx(dirObj.getRelativeName<side>()); + } + + wxString& tipMsg_; + } assembler(toolTip); + fsObj->accept(assembler); + } + return toolTip; + } + + std::shared_ptr<const zen::GridView> gridDataView_; + std::shared_ptr<IconManager> iconMgr_; + std::vector<char> failedLoads; //effectively a vector<bool> of size "number of rows" + const size_t compPos_; + std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable +}; + + +class GridDataLeft : public GridDataRim<LEFT_SIDE> +{ +public: + GridDataLeft(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid, size_t compPos) : GridDataRim<LEFT_SIDE>(gridDataView, grid, compPos) {} + + void setNavigationMarker(std::vector<const HierarchyObject*>&& markedFiles, + std::vector<const HierarchyObject*>&& markedContainer) + { + markedFiles_ .swap(markedFiles); + markedContainer_.swap(markedContainer); + } + +private: + virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus) + { + GridDataRim<LEFT_SIDE>::renderRowBackgound(dc, rect, row, enabled, selected, hasFocus); + + //mark rows selected on navigation grid: + if (enabled && !selected) + { + const bool markRow = [&]() -> bool + { + if (const FileSystemObject* fsObj = getRawData(row)) + { + if (dynamic_cast<const FileMapping*>(fsObj) || dynamic_cast<const SymLinkMapping*>(fsObj)) + { + for (auto iter = markedFiles_.begin(); iter != markedFiles_.end(); ++iter) + if (*iter == &(fsObj->parent())) //mark files/links wich have the given parent + return true; + } + else if (auto dirObj = dynamic_cast<const DirMapping*>(fsObj)) + { + for (auto iter = markedContainer_.begin(); iter != markedContainer_.end(); ++iter) + if (*iter == dirObj) //mark directories which *are* the given HierarchyObject* + return true; + } + + for (auto iter = markedContainer_.begin(); iter != markedContainer_.end(); ++iter) + { + //mark all objects which have the HierarchyObject as *any* matching ancestor + const HierarchyObject* parent = &(fsObj->parent()); + for (;;) + { + if (*iter == parent) + return true; + + if (auto dirObj = dynamic_cast<const DirMapping*>(parent)) + parent = &(dirObj->parent()); + else + break; + } + } + } + return false; + }(); + + if (markRow) + { + //const wxColor COLOR_TREE_SELECTION_GRADIENT = wxColor(101, 148, 255); //H:158 S:255 V:178 + const wxColor COLOR_TREE_SELECTION_GRADIENT = getColorSelectionGradientFrom(); + + wxRect rectTmp = rect; + rectTmp.width /= 20; + dc.GradientFillLinear(rectTmp, COLOR_TREE_SELECTION_GRADIENT, GridDataRim<LEFT_SIDE>::getBackGroundColor(row), wxEAST); + } + } + } + + std::vector<const HierarchyObject*> markedFiles_; //mark files/symlinks directly within a container + std::vector<const HierarchyObject*> markedContainer_; //mark full container including all child-objects + //DO NOT DEREFERENCE!!!! NOT GUARANTEED TO BE VALID!!! +}; + + +class GridDataRight : public GridDataRim<RIGHT_SIDE> +{ +public: + GridDataRight(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid, size_t compPos) : GridDataRim<RIGHT_SIDE>(gridDataView, grid, compPos) {} +}; + + + + +//######################################################################################################## + +class GridDataMiddle : public GridDataBase +{ +public: + GridDataMiddle(const std::shared_ptr<const zen::GridView>& gridDataView, Grid& grid) : + GridDataBase(grid), + gridDataView_(gridDataView), + syncPreviewActive(true) {} + + void onSelectBegin(const wxPoint& clientPos, int row, ColumnType colType) + { + if (static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE) + { + refGrid().clearSelection(gridview::COMP_MIDDLE); + dragSelection.reset(new std::pair<int, BlockPosition>(row, mousePosToBlock(clientPos, row))); + } + } + + void onSelectEnd(int row) + { + refGrid().clearSelection(gridview::COMP_MIDDLE); + + //issue custom event + if (dragSelection) + { + const int rowFrom = dragSelection->first; + const int rowTo = row; + + if (0 <= rowFrom && rowFrom < static_cast<int>(refGrid().getRowCount()) && + 0 <= rowTo && rowTo < static_cast<int>(refGrid().getRowCount())) //row is -1 on capture lost! + { + if (wxEvtHandler* evtHandler = refGrid().GetEventHandler()) + switch (dragSelection->second) + { + case BLOCKPOS_CHECK_BOX: + { + const FileSystemObject* fsObj = getRawData(rowFrom); + const bool setIncluded = fsObj ? !fsObj->isActive() : true; + + CheckRowsEvent evt(rowFrom, rowTo, setIncluded); + evtHandler->ProcessEvent(evt); + } + break; + case BLOCKPOS_LEFT: + { + SyncDirectionEvent evt(rowFrom, rowTo, SYNC_DIR_LEFT); + evtHandler->ProcessEvent(evt); + } + break; + case BLOCKPOS_MIDDLE: + { + SyncDirectionEvent evt(rowFrom, rowTo, SYNC_DIR_NONE); + evtHandler->ProcessEvent(evt); + } + break; + case BLOCKPOS_RIGHT: + { + SyncDirectionEvent evt(rowFrom, rowTo, SYNC_DIR_RIGHT); + evtHandler->ProcessEvent(evt); + } + break; + } + } + dragSelection.reset(); + } + } + + void onMouseMovement(const wxPoint& clientPos, int row, ColumnType colType, size_t compPos) + { + //manage block highlighting and custom tooltip + if (dragSelection) + { + toolTip.hide(); //handle custom tooltip + } + else + { + if (compPos == gridview::COMP_MIDDLE && static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE) + { + if (highlight) //refresh old highlight + refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE); + + highlight.reset(new std::pair<int, BlockPosition>(row, mousePosToBlock(clientPos, row))); + refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE); + + //show custom tooltip + showToolTip(row, refGrid().getMainWin().ClientToScreen(clientPos)); + } + else + onMouseLeave(); + } + } + + void onMouseLeave() + { + if (highlight) + { + refreshCell(refGrid(), highlight->first, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE); + highlight.reset(); + } + + toolTip.hide(); //handle custom tooltip + } + + void setSyncPreviewActive(bool value) { syncPreviewActive = value; } + +private: + virtual size_t getRowCount() const { return std::max(MIN_ROW_COUNT, gridDataView_ ? gridDataView_->rowsOnView() : 0); } + + virtual wxString getValue(int row, ColumnType colType) const + { + if (static_cast<ColumnTypeMiddle>(colType) == COL_TYPE_MIDDLE_VALUE) + { + const FileSystemObject* fsObj = getRawData(row); + if (fsObj) + return syncPreviewActive ? getSymbol(fsObj->getSyncOperation()) : getSymbol(fsObj->getCategory()); + } + return wxEmptyString; + } + + + virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus) + { + drawCellBackground(dc, rect, enabled, selected, hasFocus, getBackGroundColor(row)); + } + + virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType) + { + switch (static_cast<ColumnTypeMiddle>(colType)) + { + case COL_TYPE_MIDDLE_VALUE: + { + wxRect rectInside = drawCellBorder(dc, rect); + + const FileSystemObject* fsObj = getRawData(row); + if (fsObj) + { + //draw checkbox + wxRect checkBoxArea = rectInside; + checkBoxArea.SetWidth(CHECK_BOX_WIDTH); + + const bool rowHighlighted = dragSelection ? row == dragSelection->first : highlight ? row == highlight->first : false; + const BlockPosition highlightBlock = dragSelection ? dragSelection->second : highlight ? highlight->second : BLOCKPOS_CHECK_BOX; + + if (rowHighlighted && highlightBlock == BLOCKPOS_CHECK_BOX) + drawBitmapRtlMirror(dc, GlobalResources::getImage(fsObj->isActive() ? L"checkboxTrueFocus" : L"checkboxFalseFocus"), checkBoxArea, wxALIGN_CENTER, buffer); + else //default + drawBitmapRtlMirror(dc, GlobalResources::getImage(fsObj->isActive() ? L"checkboxTrue" : L"checkboxFalse" ), checkBoxArea, wxALIGN_CENTER, buffer); + + rectInside.width -= CHECK_BOX_WIDTH; + rectInside.x += CHECK_BOX_WIDTH; + + //synchronization preview + if (syncPreviewActive) + { + if (rowHighlighted && highlightBlock != BLOCKPOS_CHECK_BOX) + switch (highlightBlock) + { + case BLOCKPOS_CHECK_BOX: + break; + case BLOCKPOS_LEFT: + drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_LEFT, true)), rectInside, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, buffer); + break; + case BLOCKPOS_MIDDLE: + drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_NONE, true)), rectInside, wxALIGN_CENTER, buffer); + break; + case BLOCKPOS_RIGHT: + drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_RIGHT, true)), rectInside, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, buffer); + break; + } + else //default + drawBitmapRtlMirror(dc, getSyncOpImage(fsObj->getSyncOperation()), rectInside, wxALIGN_CENTER, buffer); + } + else //comparison results view + drawBitmapRtlMirror(dc, getCmpResultImage(fsObj->getCategory()), rectInside, wxALIGN_CENTER, buffer); + } + } + break; + case COL_TYPE_BORDER: + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)); + break; + } + } + + virtual wxString getColumnLabel(ColumnType colType) const { return wxEmptyString; } + + virtual void renderColumnLabel(Grid& tree, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted) + { + switch (static_cast<ColumnTypeMiddle>(colType)) + { + case COL_TYPE_MIDDLE_VALUE: + drawColumnLabelBackground(dc, rect, highlighted); + + if (syncPreviewActive) + dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("syncViewSmall")), rect, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL); + else + dc.DrawLabel(wxEmptyString, GlobalResources::getImage(wxT("cmpViewSmall")), rect, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL); + break; + + case COL_TYPE_BORDER: + drawCellBackground(dc, rect, true, false, true, wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)); + break; + } + } + + const FileSystemObject* getRawData(int row) const { return gridDataView_ ? gridDataView_->getObject(row) : NULL; } + + wxColor getBackGroundColor(int row) const + { + const FileSystemObject* fsObj = getRawData(row); + if (fsObj) + { + if (!fsObj->isActive()) + return COLOR_NOT_ACTIVE; + else + { + if (syncPreviewActive) //synchronization preview + { + switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction + { + case SO_DO_NOTHING: + case SO_EQUAL: + break; //usually white + + case SO_CREATE_NEW_LEFT: + case SO_OVERWRITE_LEFT: + case SO_DELETE_LEFT: + case SO_MOVE_LEFT_SOURCE: + case SO_MOVE_LEFT_TARGET: + case SO_COPY_METADATA_TO_LEFT: + return COLOR_SYNC_BLUE; + + case SO_CREATE_NEW_RIGHT: + case SO_OVERWRITE_RIGHT: + case SO_DELETE_RIGHT: + case SO_MOVE_RIGHT_SOURCE: + case SO_MOVE_RIGHT_TARGET: + case SO_COPY_METADATA_TO_RIGHT: + return COLOR_SYNC_GREEN; + + case SO_UNRESOLVED_CONFLICT: + return COLOR_YELLOW; + } + } + else //comparison results view + { + switch (fsObj->getCategory()) + { + case FILE_LEFT_SIDE_ONLY: + case FILE_LEFT_NEWER: + return COLOR_SYNC_BLUE; //COLOR_CMP_BLUE; + + case FILE_RIGHT_SIDE_ONLY: + case FILE_RIGHT_NEWER: + return COLOR_SYNC_GREEN; //COLOR_CMP_GREEN; + case FILE_DIFFERENT: + return COLOR_CMP_RED; + case FILE_EQUAL: + break; //usually white + case FILE_CONFLICT: + return COLOR_YELLOW; + case FILE_DIFFERENT_METADATA: + return COLOR_YELLOW_LIGHT; + } + } + } + } + return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + } + + enum BlockPosition //each cell can be divided into four blocks concerning mouse selections + { + BLOCKPOS_CHECK_BOX, + BLOCKPOS_LEFT, + BLOCKPOS_MIDDLE, + BLOCKPOS_RIGHT + }; + + //determine blockposition within cell + BlockPosition mousePosToBlock(const wxPoint& clientPos, int row) const + { + const int absX = refGrid().CalcUnscrolledPosition(clientPos).x; + + const wxRect rect = refGrid().getCellArea(row, static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), gridview::COMP_MIDDLE); //returns empty rect if column not found; absolute coordinates! + if (rect.width > CHECK_BOX_WIDTH && rect.height > 0) + { + const FileSystemObject* const fsObj = getRawData(row); + if (fsObj && syncPreviewActive && + fsObj->getSyncOperation() != SO_EQUAL) //in sync-preview equal files shall be treated as in cmp result, i.e. as full checkbox + { + // cell: + // ---------------------------------- + // | checkbox | left | middle | right| + // ---------------------------------- + + const double blockWidth = (rect.GetWidth() - CHECK_BOX_WIDTH) / 3.0; + if (rect.GetX() + CHECK_BOX_WIDTH <= absX && absX < rect.GetX() + rect.GetWidth()) + { + if (absX < rect.GetX() + CHECK_BOX_WIDTH + blockWidth) + return BLOCKPOS_LEFT; + else if (absX < rect.GetX() + CHECK_BOX_WIDTH + 2 * blockWidth) + return BLOCKPOS_MIDDLE; + else + return BLOCKPOS_RIGHT; + } + } + + } + return BLOCKPOS_CHECK_BOX; + } + + void showToolTip(int row, wxPoint posScreen) + { + const FileSystemObject* fsObj = getRawData(row); + if (fsObj) + { + if (syncPreviewActive) //synchronization preview + { + const wchar_t* imageName = [&]() -> const wchar_t* + { + const SyncOperation syncOp = fsObj->getSyncOperation(); + switch (syncOp) + { + case SO_CREATE_NEW_LEFT: + return L"createLeft"; + case SO_CREATE_NEW_RIGHT: + return L"createRight"; + case SO_DELETE_LEFT: + return L"deleteLeft"; + case SO_DELETE_RIGHT: + return L"deleteRight"; + case SO_MOVE_LEFT_SOURCE: + return L"moveLeftSource"; + case SO_MOVE_LEFT_TARGET: + return L"moveLeftTarget"; + case SO_MOVE_RIGHT_SOURCE: + return L"moveRightSource"; + case SO_MOVE_RIGHT_TARGET: + return L"moveRightTarget"; + case SO_OVERWRITE_LEFT: + return L"updateLeft"; + case SO_COPY_METADATA_TO_LEFT: + return L"moveLeft"; + case SO_OVERWRITE_RIGHT: + return L"updateRight"; + case SO_COPY_METADATA_TO_RIGHT: + return L"moveRight"; + case SO_DO_NOTHING: + return L"none"; + case SO_EQUAL: + return L"equal"; + case SO_UNRESOLVED_CONFLICT: + return L"conflict"; + }; + assert(false); + return L""; + }(); + const auto& img = mirrorIfRtl(GlobalResources::getImage(imageName)); + toolTip.show(getSyncOpDescription(*fsObj), posScreen, &img); + } + else + { + const wchar_t* imageName = [&]() -> const wchar_t* + { + const CompareFilesResult cmpRes = fsObj->getCategory(); + switch (cmpRes) + { + case FILE_LEFT_SIDE_ONLY: + return L"leftOnly"; + case FILE_RIGHT_SIDE_ONLY: + return L"rightOnly"; + case FILE_LEFT_NEWER: + return L"leftNewer"; + case FILE_RIGHT_NEWER: + return L"rightNewer"; + case FILE_DIFFERENT: + return L"different"; + case FILE_EQUAL: + return L"equal"; + case FILE_DIFFERENT_METADATA: + return L"conflict"; + case FILE_CONFLICT: + return L"conflict"; + } + assert(false); + return L""; + }(); + const auto& img = mirrorIfRtl(GlobalResources::getImage(imageName)); + toolTip.show(getCategoryDescription(*fsObj), posScreen, &img); + } + } + else + toolTip.hide(); //if invalid row... + } + + virtual wxString getToolTip(ColumnType colType) const { return syncPreviewActive ? _("Synchronization Preview") : _("Comparison Result"); } + + std::shared_ptr<const zen::GridView> gridDataView_; + bool syncPreviewActive; + std::unique_ptr<std::pair<int, BlockPosition>> highlight; //(row, block) current mouse highlight + std::unique_ptr<std::pair<int, BlockPosition>> dragSelection; //(row, block) + std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable + zen::Tooltip toolTip; +}; + +//######################################################################################################## + +class GridEventManager : private wxEvtHandler +{ +public: + GridEventManager(Grid& grid, + GridDataLeft& provLeft, + GridDataMiddle& provMiddle, + GridDataRight& provRight) : grid_(grid), provLeft_(provLeft), provMiddle_(provMiddle), provRight_(provRight) + { + grid_.Connect(EVENT_GRID_COL_RESIZE, GridColumnResizeEventHandler(GridEventManager::onResizeColumn), NULL, this); + + grid_.getMainWin().Connect(wxEVT_MOTION, wxMouseEventHandler(GridEventManager::onMouseMovement), NULL, this); + grid_.getMainWin().Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(GridEventManager::onMouseLeave ), NULL, this); + grid_.getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler (GridEventManager::onKeyDown ), NULL, this); + + grid_.Connect(EVENT_GRID_MOUSE_LEFT_DOWN, GridClickEventHandler (GridEventManager::onSelectBegin), NULL, this); + grid_.Connect(EVENT_GRID_SELECT_RANGE, GridRangeSelectEventHandler(GridEventManager::onSelectEnd ), NULL, this); + } + +private: + void onMouseMovement(wxMouseEvent& event) + { + const wxPoint& topLeftAbs = grid_.CalcUnscrolledPosition(event.GetPosition()); + const Opt<std::pair<ColumnType, size_t>> colInfo = grid_.getColumnAtPos(topLeftAbs.x); + const int row = grid_.getRowAtPos(topLeftAbs.y); //returns < 0 if column not found; absolute coordinates! + if (colInfo) + { + //redirect mouse movement to middle grid component + provMiddle_.onMouseMovement(event.GetPosition(), row, colInfo->first, colInfo->second); + } + event.Skip(); + } + + void onMouseLeave(wxMouseEvent& event) + { + provMiddle_.onMouseLeave(); + event.Skip(); + } + + void onSelectBegin(GridClickEvent& event) + { + if (event.compPos_ == gridview::COMP_MIDDLE) + provMiddle_.onSelectBegin(event.GetPosition(), event.row_, event.colType_); + event.Skip(); + } + + void onSelectEnd(GridRangeSelectEvent& event) + { + if (event.compPos_ == gridview::COMP_MIDDLE) + provMiddle_.onSelectEnd(event.rowTo_); + event.Skip(); + } + + void onKeyDown(wxKeyEvent& event) + { + int keyCode = event.GetKeyCode(); + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + { + if (keyCode == WXK_LEFT) + keyCode = WXK_RIGHT; + else if (keyCode == WXK_RIGHT) + keyCode = WXK_LEFT; + else if (keyCode == WXK_NUMPAD_LEFT) + keyCode = WXK_NUMPAD_RIGHT; + else if (keyCode == WXK_NUMPAD_RIGHT) + keyCode = WXK_NUMPAD_LEFT; + } + + //skip middle component when navigating via keyboard + + int row = grid_.getGridCursor().first; + if (row < 0) + row = 0; + + if (event.ShiftDown()) + ; + else if (event.ControlDown()) + ; + else + switch (keyCode) + { + case WXK_LEFT: + case WXK_NUMPAD_LEFT: + grid_.setGridCursor(row, gridview::COMP_LEFT); + return; //swallow event + + case WXK_RIGHT: + case WXK_NUMPAD_RIGHT: + grid_.setGridCursor(row, gridview::COMP_RIGHT); + return; //swallow event + } + + event.Skip(); + } + + void onResizeColumn(GridColumnResizeEvent& event) + { + auto resizeOtherSide = [&](size_t compPosOther) + { + std::vector<Grid::ColumnAttribute> colAttr = grid_.getColumnConfig(compPosOther); + + std::for_each(colAttr.begin(), colAttr.end(), [&](Grid::ColumnAttribute& ca) + { + if (ca.type_ == event.colType_) + ca.width_ = event.width_; + }); + + grid_.setColumnConfig(colAttr, compPosOther); //set column count + widths + }; + + switch (event.compPos_) + { + case gridview::COMP_LEFT: + resizeOtherSide(gridview::COMP_RIGHT); + break; + case gridview::COMP_MIDDLE: + break; + case gridview::COMP_RIGHT: + resizeOtherSide(gridview::COMP_LEFT); + break; + } + } + + Grid& grid_; + GridDataLeft& provLeft_; + GridDataMiddle& provMiddle_; + GridDataRight& provRight_; +}; +} + +//######################################################################################################## + +void gridview::init(Grid& grid, const std::shared_ptr<const zen::GridView>& gridDataView) +{ + grid.setComponentCount(3); + + auto provLeft_ = std::make_shared<GridDataLeft >(gridDataView, grid, gridview::COMP_LEFT ); + auto provMiddle_ = std::make_shared<GridDataMiddle>(gridDataView, grid); + auto provRight_ = std::make_shared<GridDataRight >(gridDataView, grid, gridview::COMP_RIGHT); + + grid.setDataProvider(provLeft_ , gridview::COMP_LEFT); //data providers reference grid => + grid.setDataProvider(provMiddle_, gridview::COMP_MIDDLE); //ownership must belong *exclusively* to grid! + grid.setDataProvider(provRight_ , gridview::COMP_RIGHT); + + auto evtMgr = std::make_shared<GridEventManager>(grid, *provLeft_, *provMiddle_, *provRight_); + provLeft_ ->holdOwnership(evtMgr); + provMiddle_->holdOwnership(evtMgr); + provRight_ ->holdOwnership(evtMgr); + + grid.enableColumnMove (false, gridview::COMP_MIDDLE); + grid.enableColumnResize(false, gridview::COMP_MIDDLE); + + std::vector<Grid::ColumnAttribute> attribMiddle; + attribMiddle.push_back(Grid::ColumnAttribute(static_cast<ColumnType>(COL_TYPE_BORDER), 5)); + attribMiddle.push_back(Grid::ColumnAttribute(static_cast<ColumnType>(COL_TYPE_MIDDLE_VALUE), 60)); + attribMiddle.push_back(Grid::ColumnAttribute(static_cast<ColumnType>(COL_TYPE_BORDER), 5)); + + grid.setColumnConfig(attribMiddle, gridview::COMP_MIDDLE); +} + + +namespace +{ +std::vector<ColumnAttributeRim> makeConsistent(const std::vector<ColumnAttributeRim>& attribs) +{ + std::set<ColumnTypeRim> usedTypes; + + std::vector<ColumnAttributeRim> output; + //remove duplicates + std::copy_if(attribs.begin(), attribs.end(), std::back_inserter(output), + [&](const ColumnAttributeRim& a) { return usedTypes.insert(a.type_).second; }); + + //make sure each type is existing! -> should *only* be a problem if user manually messes with globalsettings.xml + const auto& defAttr = getDefaultColumnAttributesLeft(); + std::copy_if(defAttr.begin(), defAttr.end(), std::back_inserter(output), + [&](const ColumnAttributeRim& a) { return usedTypes.insert(a.type_).second; }); + + return output; +} +} + +std::vector<Grid::ColumnAttribute> gridview::convertConfig(const std::vector<ColumnAttributeRim>& attribs) +{ + const auto& attribClean = makeConsistent(attribs); + + std::vector<Grid::ColumnAttribute> output; + std::transform(attribClean.begin(), attribClean.end(), std::back_inserter(output), + [&](const ColumnAttributeRim& a) { return Grid::ColumnAttribute(static_cast<ColumnType>(a.type_), a.width_, a.visible_); }); + + return output; +} + + +std::vector<ColumnAttributeRim> gridview::convertConfig(const std::vector<Grid::ColumnAttribute>& attribs) +{ + std::vector<ColumnAttributeRim> output; + + std::transform(attribs.begin(), attribs.end(), std::back_inserter(output), + [&](const Grid::ColumnAttribute& ca) { return ColumnAttributeRim(static_cast<ColumnTypeRim>(ca.type_), ca.width_, ca.visible_); }); + + return makeConsistent(output); +} + + +namespace +{ +class IconUpdater : private wxEvtHandler //update file icons periodically: use SINGLE instance to coordinate left and right grid in parallel +{ +public: + IconUpdater(GridDataLeft& provLeft, GridDataRight& provRight, IconBuffer& iconBuffer) : provLeft_(provLeft), provRight_(provRight), iconBuffer_(iconBuffer) + { + timer.Connect(wxEVT_TIMER, wxEventHandler(IconUpdater::loadIconsAsynchronously), NULL, this); + timer.Start(50); //timer interval in ms + } + +private: + void loadIconsAsynchronously(wxEvent& event) //loads all (not yet) drawn icons + { + std::vector<Zstring> newLoad; + provLeft_ .addIconsToBeLoaded(newLoad); //loads all (not yet) drawn icons + provRight_.addIconsToBeLoaded(newLoad); // + iconBuffer_.setWorkload(newLoad); + } + + GridDataLeft& provLeft_; + GridDataRight& provRight_; + IconBuffer& iconBuffer_; + wxTimer timer; +}; +} + + +void gridview::setIconSize(Grid& grid, IconBuffer::IconSize sz) +{ + auto* provLeft = dynamic_cast<GridDataLeft*>(grid.getDataProvider(gridview::COMP_LEFT)); + auto* provRight = dynamic_cast<GridDataRight*>(grid.getDataProvider(gridview::COMP_RIGHT)); + + if (provLeft && provRight) + { + std::shared_ptr<IconManager> iconMgr = std::make_shared<IconManager>(sz); + iconMgr->iconUpdater.reset(new IconUpdater(*provLeft, *provRight, iconMgr->iconBuffer)); + + provLeft ->setIconManager(iconMgr); + provRight->setIconManager(iconMgr); + grid.setRowHeight(iconMgr->iconBuffer.getSize() + 1); //+ 1 for line between rows + grid.Refresh(); + } + else + assert(false); +} + + +void gridview::clearSelection(Grid& grid) +{ + grid.clearSelection(gridview::COMP_LEFT); + grid.clearSelection(gridview::COMP_MIDDLE); + grid.clearSelection(gridview::COMP_RIGHT); +} + + +void gridview::setNavigationMarker(Grid& grid, + std::vector<const HierarchyObject*>&& markedFiles, + std::vector<const HierarchyObject*>&& markedContainer) +{ + if (auto* provLeft = dynamic_cast<GridDataLeft*>(grid.getDataProvider(gridview::COMP_LEFT))) + provLeft->setNavigationMarker(std::move(markedFiles), std::move(markedContainer)); + else + assert(false); + grid.Refresh(); +} + + +void gridview::setSyncPreviewActive(Grid& grid, bool value) +{ + if (auto* provMiddle = dynamic_cast<GridDataMiddle*>(grid.getDataProvider(gridview::COMP_MIDDLE))) + provMiddle->setSyncPreviewActive(value); + else + assert(false); +} + +wxBitmap zen::getSyncOpImage(SyncOperation syncOp) +{ + switch (syncOp) //evaluate comparison result and sync direction + { + case SO_CREATE_NEW_LEFT: + return GlobalResources::getImage(L"createLeftSmall"); + case SO_CREATE_NEW_RIGHT: + return GlobalResources::getImage(L"createRightSmall"); + case SO_DELETE_LEFT: + return GlobalResources::getImage(L"deleteLeftSmall"); + case SO_DELETE_RIGHT: + return GlobalResources::getImage(L"deleteRightSmall"); + case SO_MOVE_LEFT_SOURCE: + return GlobalResources::getImage(L"moveLeftSourceSmall"); + case SO_MOVE_LEFT_TARGET: + return GlobalResources::getImage(L"moveLeftTargetSmall"); + case SO_MOVE_RIGHT_SOURCE: + return GlobalResources::getImage(L"moveRightSourceSmall"); + case SO_MOVE_RIGHT_TARGET: + return GlobalResources::getImage(L"moveRightTargetSmall"); + case SO_OVERWRITE_RIGHT: + return GlobalResources::getImage(L"updateRightSmall"); + case SO_COPY_METADATA_TO_RIGHT: + return GlobalResources::getImage(L"moveRightSmall"); + case SO_OVERWRITE_LEFT: + return GlobalResources::getImage(L"updateLeftSmall"); + case SO_COPY_METADATA_TO_LEFT: + return GlobalResources::getImage(L"moveLeftSmall"); + case SO_DO_NOTHING: + return GlobalResources::getImage(L"noneSmall"); + case SO_EQUAL: + return GlobalResources::getImage(L"equalSmall"); + case SO_UNRESOLVED_CONFLICT: + return GlobalResources::getImage(L"conflictSmall"); + } + return wxNullBitmap; +} + + +wxBitmap zen::getCmpResultImage(CompareFilesResult cmpResult) +{ + switch (cmpResult) + { + case FILE_LEFT_SIDE_ONLY: + return GlobalResources::getImage(L"leftOnlySmall"); + case FILE_RIGHT_SIDE_ONLY: + return GlobalResources::getImage(L"rightOnlySmall"); + case FILE_LEFT_NEWER: + return GlobalResources::getImage(L"leftNewerSmall"); + case FILE_RIGHT_NEWER: + return GlobalResources::getImage(L"rightNewerSmall"); + case FILE_DIFFERENT: + return GlobalResources::getImage(L"differentSmall"); + case FILE_EQUAL: + return GlobalResources::getImage(L"equalSmall"); + case FILE_CONFLICT: + case FILE_DIFFERENT_METADATA: + return GlobalResources::getImage(L"conflictSmall"); + } + return wxNullBitmap; +} diff --git a/ui/custom_grid.h b/ui/custom_grid.h new file mode 100644 index 00000000..4c07c150 --- /dev/null +++ b/ui/custom_grid.h @@ -0,0 +1,83 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * +// ************************************************************************** + +#ifndef CUSTOMGRID_H_INCLUDED +#define CUSTOMGRID_H_INCLUDED + +#include <wx+/grid.h> +#include "grid_view.h" +#include "column_attr.h" +#include "../lib/icon_buffer.h" + +namespace zen +{ +//setup grid to show grid view within three components: +namespace gridview +{ +static const size_t COMP_LEFT = 0; +static const size_t COMP_MIDDLE = 1; +static const size_t COMP_RIGHT = 2; + +void init(Grid& grid, const std::shared_ptr<const GridView>& gridDataView); + +std::vector<Grid::ColumnAttribute> convertConfig(const std::vector<ColumnAttributeRim>& attribs); //+ make consistent +std::vector<ColumnAttributeRim> convertConfig(const std::vector<Grid::ColumnAttribute>& attribs); // + +void setSyncPreviewActive(Grid& grid, bool value); + +void setIconSize(Grid& grid, IconBuffer::IconSize sz); + +void clearSelection(Grid& grid); //clear all components + +//mark rows selected in navigation/compressed tree and navigate to leading object +void setNavigationMarker(Grid& grid, + std::vector<const HierarchyObject*>&& markedFiles, //mark files/symlinks directly within a container + std::vector<const HierarchyObject*>&& markedContainer); //mark full container including child-objects +} + +wxBitmap getSyncOpImage(SyncOperation syncOp); +wxBitmap getCmpResultImage(CompareFilesResult cmpResult); + + +//---------- custom events for middle grid ---------- + +//(UN-)CHECKING ROWS FROM SYNCHRONIZATION +extern const wxEventType EVENT_GRID_CHECK_ROWS; +//SELECTING SYNC DIRECTION +extern const wxEventType EVENT_GRID_SYNC_DIRECTION; + +struct CheckRowsEvent : public wxCommandEvent +{ + CheckRowsEvent(int rowFrom, int rowTo, bool setIncluded) : wxCommandEvent(EVENT_GRID_CHECK_ROWS), rowFrom_(rowFrom), rowTo_(rowTo), setIncluded_(setIncluded) {} + virtual wxEvent* Clone() const { return new CheckRowsEvent(*this); } + + const int rowFrom_; + const int rowTo_; + const bool setIncluded_; +}; + + +struct SyncDirectionEvent : public wxCommandEvent +{ + SyncDirectionEvent(int rowFrom, int rowTo, SyncDirection direction) : wxCommandEvent(EVENT_GRID_SYNC_DIRECTION), rowFrom_(rowFrom), rowTo_(rowTo), direction_(direction) {} + virtual wxEvent* Clone() const { return new SyncDirectionEvent(*this); } + + const int rowFrom_; + const int rowTo_; + const SyncDirection direction_; +}; + +typedef void (wxEvtHandler::*CheckRowsEventFunction)(CheckRowsEvent&); +typedef void (wxEvtHandler::*SyncDirectionEventFunction)(SyncDirectionEvent&); + +#define CheckRowsEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(CheckRowsEventFunction, &func) + +#define SyncDirectionEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(SyncDirectionEventFunction, &func) +} + +#endif // CUSTOMGRID_H_INCLUDED diff --git a/ui/dir_name.cpp b/ui/dir_name.cpp index 7d747609..84670356 100644 --- a/ui/dir_name.cpp +++ b/ui/dir_name.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "dir_name.h" @@ -20,13 +20,13 @@ using namespace zen; namespace { -void setDirectoryNameImpl(const wxString& dirname, wxDirPickerCtrl* dirPicker, wxWindow& tooltipWnd, wxStaticBoxSizer* staticBox, size_t timeout) +void setDirectoryNameImpl(const wxString& dirname, wxDirPickerCtrl* dirPicker, wxWindow& tooltipWnd, wxStaticText* staticText, size_t timeout) { const wxString dirFormatted = toWx(getFormattedDirectoryName(toZ(dirname))); tooltipWnd.SetToolTip(dirFormatted); //wxComboBox bug: the edit control is not updated... http://trac.wxwidgets.org/ticket/12659 - if (staticBox) + if (staticText) { //change static box label only if there is a real difference to what is shown in wxTextCtrl anyway wxString dirNormalized = dirname; @@ -34,7 +34,7 @@ void setDirectoryNameImpl(const wxString& dirname, wxDirPickerCtrl* dirPicker, w if (!dirNormalized.empty() && !endsWith(dirNormalized, FILE_NAME_SEPARATOR)) dirNormalized += FILE_NAME_SEPARATOR; - staticBox->GetStaticBox()->SetLabel(dirNormalized == dirFormatted ? wxString(_("Drag && drop")) : dirFormatted); + staticText->SetLabel(dirNormalized == dirFormatted ? wxString(_("Drag && drop")) : dirFormatted); } if (dirPicker && !dirFormatted.empty()) @@ -52,12 +52,12 @@ void setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker, wxWindow& tooltipWnd, - wxStaticBoxSizer* staticBox, + wxStaticText* staticText, size_t timeout = 200) //pointers are optional { if (txtCtrl) txtCtrl->ChangeValue(dirname); - setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticBox, timeout); + setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticText, timeout); } @@ -65,12 +65,12 @@ void setDirectoryName(const wxString& dirname, FolderHistoryBox* comboBox, wxDirPickerCtrl* dirPicker, wxWindow& tooltipWnd, - wxStaticBoxSizer* staticBox, + wxStaticText* staticText, size_t timeout = 200) //pointers are optional { if (comboBox) comboBox->setValue(dirname); - setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticBox, timeout); + setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticText, timeout); } } //############################################################################################################## @@ -79,23 +79,23 @@ template <class NameControl> DirectoryName<NameControl>::DirectoryName(wxWindow& dropWindow, wxDirPickerCtrl& dirPicker, NameControl& dirName, - wxStaticBoxSizer* staticBox, + wxStaticText* staticText, wxWindow* dropWindow2) : dropWindow_(dropWindow), dropWindow2_(dropWindow2), dirPicker_(dirPicker), dirName_(dirName), - staticBox_(staticBox) + staticText_(staticText) { //prepare drag & drop setupFileDrop(dropWindow); - if (dropWindow2) - setupFileDrop(*dropWindow2); + dropWindow.Connect(EVENT_DROP_FILE, FileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this); - //redirect drag & drop event back to this class - dropWindow.Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this); if (dropWindow2) - dropWindow2->Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this); + { + setupFileDrop(*dropWindow2); + dropWindow2->Connect(EVENT_DROP_FILE, FileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this); + } //keep dirPicker and dirName synchronous dirName_ .Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DirectoryName::OnWriteDirManually), NULL, this); @@ -112,16 +112,17 @@ DirectoryName<NameControl>::~DirectoryName() template <class NameControl> -void DirectoryName<NameControl>::OnFilesDropped(FFSFileDropEvent& event) +void DirectoryName<NameControl>::OnFilesDropped(FileDropEvent& event) { - if (event.getFiles().empty()) + const auto& files = event.getFiles(); + if (files.empty()) return; - if (acceptDrop(event.getFiles())) + if (acceptDrop(files, event.getDropPosition(), event.getDropWindow())) { const wxString fileName = event.getFiles()[0]; if (dirExists(toZ(fileName))) - setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticBox_); + setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticText_); else { wxString parentName = beforeLast(fileName, utf8CvrtTo<wxString>(FILE_NAME_SEPARATOR)); //returns empty string if ch not found @@ -130,18 +131,20 @@ void DirectoryName<NameControl>::OnFilesDropped(FFSFileDropEvent& event) parentName += FILE_NAME_SEPARATOR; #endif if (dirExists(toZ(parentName))) - setDirectoryName(parentName, &dirName_, &dirPicker_, dirName_, staticBox_); + setDirectoryName(parentName, &dirName_, &dirPicker_, dirName_, staticText_); else //set original name unconditionally: usecase: inactive mapped network shares - setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticBox_); + setDirectoryName(fileName, &dirName_, &dirPicker_, dirName_, staticText_); } } + else + event.Skip(); //let other handlers try!!! } template <class NameControl> void DirectoryName<NameControl>::OnWriteDirManually(wxCommandEvent& event) { - setDirectoryName(event.GetString(), static_cast<NameControl*>(NULL), &dirPicker_, dirName_, staticBox_, 100); //potentially slow network access: wait 100 ms at most + setDirectoryName(event.GetString(), static_cast<NameControl*>(NULL), &dirPicker_, dirName_, staticText_, 100); //potentially slow network access: wait 100 ms at most event.Skip(); } @@ -150,7 +153,7 @@ template <class NameControl> void DirectoryName<NameControl>::OnDirSelected(wxFileDirPickerEvent& event) { const wxString newPath = event.GetPath(); - setDirectoryName(newPath, &dirName_, NULL, dirName_, staticBox_); + setDirectoryName(newPath, &dirName_, NULL, dirName_, staticText_); event.Skip(); } @@ -165,7 +168,7 @@ wxString DirectoryName<NameControl>::getName() const template <class NameControl> void DirectoryName<NameControl>::setName(const wxString& dirname) { - setDirectoryName(dirname, &dirName_, &dirPicker_, dirName_, staticBox_); + setDirectoryName(dirname, &dirName_, &dirPicker_, dirName_, staticText_); } diff --git a/ui/dir_name.h b/ui/dir_name.h index 43f2015d..d491cacc 100644 --- a/ui/dir_name.h +++ b/ui/dir_name.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef DRAGANDDROP_H_INCLUDED @@ -12,6 +12,7 @@ #include <wx/sizer.h> #include <wx/filepicker.h> #include <wx+/file_drop.h> +#include <wx/stattext.h> namespace zen { @@ -21,10 +22,10 @@ template <class NameControl> //NameControl may be wxTextCtrl, FolderHistoryBox class DirectoryName: private wxEvtHandler { public: - DirectoryName(wxWindow& dropWindow, - wxDirPickerCtrl& dirPicker, - NameControl& dirName, - wxStaticBoxSizer* staticBox = NULL, + DirectoryName(wxWindow& dropWindow, + wxDirPickerCtrl& dirPicker, + NameControl& dirName, + wxStaticText* staticText = NULL, wxWindow* dropWindow2 = NULL); //optional ~DirectoryName(); @@ -33,9 +34,9 @@ public: void setName(const wxString& dirname); private: - virtual bool acceptDrop(const std::vector<wxString>& droppedFiles) { return true; }; //return true if drop should be processed + virtual bool acceptDrop(const std::vector<wxString>& droppedFiles, const wxPoint& clientPos, const wxWindow& wnd) { return true; }; //return true if drop should be processed - void OnFilesDropped(FFSFileDropEvent& event); + void OnFilesDropped(FileDropEvent& event); void OnWriteDirManually(wxCommandEvent& event); void OnDirSelected(wxFileDirPickerEvent& event); @@ -43,7 +44,7 @@ private: const wxWindow* dropWindow2_; wxDirPickerCtrl& dirPicker_; NameControl& dirName_; - wxStaticBoxSizer* staticBox_; //optional + wxStaticText* staticText_; //optional }; } diff --git a/ui/exec_finished_box.cpp b/ui/exec_finished_box.cpp index 49c490ad..06fad778 100644 --- a/ui/exec_finished_box.cpp +++ b/ui/exec_finished_box.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "exec_finished_box.h" diff --git a/ui/exec_finished_box.h b/ui/exec_finished_box.h index c179f5c0..87108a7d 100644 --- a/ui/exec_finished_box.h +++ b/ui/exec_finished_box.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef EXEC_FINISHED_BOX_18947773210473214 diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp index 6ce8ee88..7f7b08ef 100644 --- a/ui/folder_history_box.cpp +++ b/ui/folder_history_box.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "folder_history_box.h" diff --git a/ui/folder_history_box.h b/ui/folder_history_box.h index e48b7fce..d28f3c72 100644 --- a/ui/folder_history_box.h +++ b/ui/folder_history_box.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef CUSTOMCOMBOBOX_H_INCLUDED diff --git a/ui/folder_pair.h b/ui/folder_pair.h index 43a7b279..010d6162 100644 --- a/ui/folder_pair.h +++ b/ui/folder_pair.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef FOLDERPAIR_H_INCLUDED @@ -13,6 +13,7 @@ #include "small_dlgs.h" #include "sync_cfg.h" #include <wx/event.h> +#include <wx+/context_menu.h> #include <wx/menu.h> #include <wx+/string_conv.h> #include "../lib/norm_filter.h" @@ -85,76 +86,55 @@ protected: basicPanel_(basicPanel) { //register events for removal of alternate configuration - basicPanel_.m_bpButtonAltCompCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfgRemove ), NULL, this); - basicPanel_.m_bpButtonAltSyncCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfgRemove ), NULL, this); - basicPanel_.m_bpButtonLocalFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgRemove), NULL, this); + basicPanel_.m_bpButtonAltCompCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfgContext ), NULL, this); + basicPanel_.m_bpButtonAltSyncCfg ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfgContext ), NULL, this); + basicPanel_.m_bpButtonLocalFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgContext), NULL, this); basicPanel_.m_bpButtonAltCompCfg-> Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfg ), NULL, this); basicPanel_.m_bpButtonAltSyncCfg-> Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfg ), NULL, this); basicPanel_.m_bpButtonLocalFilter->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfg), NULL, this); - basicPanel_.m_bpButtonRemovePair->SetBitmapLabel(GlobalResources::getImage(wxT("removeFolderPair"))); + basicPanel_.m_bpButtonRemovePair->SetBitmapLabel(GlobalResources::getImage(L"removeFolderPair")); } - virtual void OnAltCompCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltCompCfg() { altCompConfig.reset(); refreshButtons(); } - virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltSyncCfg() { altSyncConfig.reset(); refreshButtons(); } - virtual void OnLocalFilterCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeLocalFilterCfg() { localFilter = FilterConfig(); refreshButtons(); } private: - void OnAltCompCfgRemove(wxCommandEvent& event) + void OnAltCompCfgContext(wxCommandEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemRemove = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Remove alternate settings")); - contextMenu->Append(itemRemove); - contextMenu->Connect(itemRemove->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FolderPairPanelBasic::OnAltCompCfgRemoveConfirm), NULL, this); - - if (!altCompConfig.get()) - contextMenu->Enable(itemRemove->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway - - basicPanel_.PopupMenu(contextMenu.get()); //show context menu + ContextMenu menu; + menu.addItem(_("Remove alternate settings"), [this] { this->removeAltCompCfg(); }, NULL, altCompConfig.get() != NULL); + menu.popup(basicPanel_); } - void OnAltSyncCfgRemove(wxCommandEvent& event) + void OnAltSyncCfgContext(wxCommandEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemRemove = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Remove alternate settings")); - contextMenu->Append(itemRemove); - contextMenu->Connect(itemRemove->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FolderPairPanelBasic::OnAltSyncCfgRemoveConfirm), NULL, this); - - if (!altSyncConfig.get()) - contextMenu->Enable(itemRemove->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway - - basicPanel_.PopupMenu(contextMenu.get()); //show context menu + ContextMenu menu; + menu.addItem(_("Remove alternate settings"), [this] { this->removeAltSyncCfg(); }, NULL, altSyncConfig.get() != NULL); + menu.popup(basicPanel_); } - void OnLocalFilterCfgRemove(wxCommandEvent& event) + void OnLocalFilterCfgContext(wxCommandEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemClear = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Clear filter settings")); - contextMenu->Append(itemClear); - contextMenu->Connect(itemClear->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FolderPairPanelBasic::OnLocalFilterCfgRemoveConfirm), NULL, this); - - if (isNullFilter(localFilter)) - contextMenu->Enable(itemClear->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway - - basicPanel_.PopupMenu(contextMenu.get()); //show context menu + ContextMenu menu; + menu.addItem(_("Clear filter settings"), [this] { this->removeLocalFilterCfg(); }, NULL, !isNullFilter(localFilter)); + menu.popup(basicPanel_); } @@ -219,8 +199,6 @@ private: AltCompCfgPtr altCompConfig; //optional: present if non-NULL AltSyncCfgPtr altSyncConfig; // FilterConfig localFilter; - - std::unique_ptr<wxMenu> contextMenu; }; } diff --git a/ui/grid_view.cpp b/ui/grid_view.cpp index 7ed2bde1..8460b238 100644 --- a/ui/grid_view.cpp +++ b/ui/grid_view.cpp @@ -1,32 +1,18 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "grid_view.h" #include "sorting.h" #include "../synchronization.h" #include <zen/stl_tools.h> +//#include <zen/perf.h> using namespace zen; -GridView::StatusCmpResult::StatusCmpResult() : - existsLeftOnly(false), - existsRightOnly(false), - existsLeftNewer(false), - existsRightNewer(false), - existsDifferent(false), - existsEqual(false), - existsConflict(false), - - filesOnLeftView(0), - foldersOnLeftView(0), - filesOnRightView(0), - foldersOnRightView(0) {} - - template <class StatusResult> void getNumbers(const FileSystemObject& fsObj, StatusResult& result) { @@ -71,6 +57,70 @@ void getNumbers(const FileSystemObject& fsObj, StatusResult& result) } +template <class Predicate> +void GridView::updateView(Predicate pred) +{ + viewRef.clear(); + rowPositions.clear(); + rowPositionsFirstChild.clear(); + + std::for_each(sortedRef.begin(), sortedRef.end(), + [&](const RefIndex& ref) + { + if (const FileSystemObject* fsObj = FileSystemObject::retrieve(ref.objId)) + if (pred(*fsObj)) + { + //save row position for direct random access to FileMapping or DirMapping + rowPositions.insert(std::make_pair(ref.objId, viewRef.size())); //costs: 0.28 µs per call - MSVC based on std::set + + //save row position to identify first child *on sorted subview* of DirMapping or BaseDirMapping in case latter are filtered out + const HierarchyObject* parent = &(fsObj->parent()); + for (;;) //map all yet unassociated parents to this row + { + const auto rv = rowPositionsFirstChild.insert(std::make_pair(parent, viewRef.size())); + if (!rv.second) + break; + + if (auto dirObj = dynamic_cast<const DirMapping*>(parent)) + parent = &(dirObj->parent()); + else + break; + } + + //build subview + viewRef.push_back(ref.objId); + } + }); +} + + +int GridView::findRowDirect(FileSystemObject::ObjectIdConst objId) const +{ + auto iter = rowPositions.find(objId); + return iter != rowPositions.end() ? iter->second : -1; +} + +int GridView::findRowFirstChild(const HierarchyObject* hierObj) const +{ + auto iter = rowPositionsFirstChild.find(hierObj); + return iter != rowPositionsFirstChild.end() ? iter->second : -1; +} + + +GridView::StatusCmpResult::StatusCmpResult() : + existsLeftOnly (false), + existsRightOnly (false), + existsLeftNewer (false), + existsRightNewer(false), + existsDifferent (false), + existsEqual (false), + existsConflict (false), + filesOnLeftView (0), + foldersOnLeftView (0), + filesOnRightView (0), + foldersOnRightView(0) {} + + GridView::StatusCmpResult GridView::updateCmpResult(bool hideFiltered, //maps sortedRef to viewRef bool leftOnlyFilesActive, bool rightOnlyFilesActive, @@ -82,75 +132,65 @@ GridView::StatusCmpResult GridView::updateCmpResult(bool hideFiltered, //maps so { StatusCmpResult output; - viewRef.clear(); - - for (std::vector<RefIndex>::const_iterator j = sortedRef.begin(); j != sortedRef.end(); ++j) + updateView([&](const FileSystemObject& fsObj) -> bool { - const FileSystemObject* fsObj = FileSystemObject::retrieve(j->objId); - if (fsObj) - { - //hide filtered row, if corresponding option is set - if (hideFiltered && !fsObj->isActive()) - continue; - - switch (fsObj->getCategory()) - { - case FILE_LEFT_SIDE_ONLY: - output.existsLeftOnly = true; - if (!leftOnlyFilesActive) continue; - break; - case FILE_RIGHT_SIDE_ONLY: - output.existsRightOnly = true; - if (!rightOnlyFilesActive) continue; - break; - case FILE_LEFT_NEWER: - output.existsLeftNewer = true; - if (!leftNewerFilesActive) continue; - break; - case FILE_RIGHT_NEWER: - output.existsRightNewer = true; - if (!rightNewerFilesActive) continue; - break; - case FILE_DIFFERENT: - output.existsDifferent = true; - if (!differentFilesActive) continue; - break; - case FILE_EQUAL: - output.existsEqual = true; - if (!equalFilesActive) continue; - break; - case FILE_CONFLICT: - case FILE_DIFFERENT_METADATA: //no extra button on screen - output.existsConflict = true; - if (!conflictFilesActive) continue; - break; - } - - //calculate total number of bytes for each side - getNumbers(*fsObj, output); + if (hideFiltered && !fsObj.isActive()) + return false; - viewRef.push_back(j->objId); + switch (fsObj.getCategory()) + { + case FILE_LEFT_SIDE_ONLY: + output.existsLeftOnly = true; + if (!leftOnlyFilesActive) return false; + break; + case FILE_RIGHT_SIDE_ONLY: + output.existsRightOnly = true; + if (!rightOnlyFilesActive) return false; + break; + case FILE_LEFT_NEWER: + output.existsLeftNewer = true; + if (!leftNewerFilesActive) return false; + break; + case FILE_RIGHT_NEWER: + output.existsRightNewer = true; + if (!rightNewerFilesActive) return false; + break; + case FILE_DIFFERENT: + output.existsDifferent = true; + if (!differentFilesActive) return false; + break; + case FILE_EQUAL: + output.existsEqual = true; + if (!equalFilesActive) return false; + break; + case FILE_CONFLICT: + case FILE_DIFFERENT_METADATA: //no extra button on screen + output.existsConflict = true; + if (!conflictFilesActive) return false; + break; } - } + //calculate total number of bytes for each side + getNumbers(fsObj, output); + return true; + }); return output; } GridView::StatusSyncPreview::StatusSyncPreview() : - existsSyncCreateLeft(false), + existsSyncCreateLeft (false), existsSyncCreateRight(false), - existsSyncDeleteLeft(false), + existsSyncDeleteLeft (false), existsSyncDeleteRight(false), - existsSyncDirLeft(false), - existsSyncDirRight(false), - existsSyncDirNone(false), - existsSyncEqual(false), - existsConflict(false), - - filesOnLeftView(0), - foldersOnLeftView(0), - filesOnRightView(0), + existsSyncDirLeft (false), + existsSyncDirRight (false), + existsSyncDirNone (false), + existsSyncEqual (false), + existsConflict (false), + filesOnLeftView (0), + foldersOnLeftView (0), + filesOnRightView (0), foldersOnRightView(0) {} @@ -167,86 +207,76 @@ GridView::StatusSyncPreview GridView::updateSyncPreview(bool hideFiltered, //map { StatusSyncPreview output; - viewRef.clear(); - - for (std::vector<RefIndex>::const_iterator j = sortedRef.begin(); j != sortedRef.end(); ++j) + updateView([&](const FileSystemObject& fsObj) -> bool { - const FileSystemObject* fsObj = FileSystemObject::retrieve(j->objId); - if (fsObj) - { - //hide filtered row, if corresponding option is set - if (hideFiltered && !fsObj->isActive()) - continue; - - switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction - { - case SO_CREATE_NEW_LEFT: - case SO_MOVE_LEFT_TARGET: - output.existsSyncCreateLeft = true; - if (!syncCreateLeftActive) continue; - break; - case SO_CREATE_NEW_RIGHT: - case SO_MOVE_RIGHT_TARGET: - output.existsSyncCreateRight = true; - if (!syncCreateRightActive) continue; - break; - case SO_DELETE_LEFT: - case SO_MOVE_LEFT_SOURCE: - output.existsSyncDeleteLeft = true; - if (!syncDeleteLeftActive) continue; - break; - case SO_DELETE_RIGHT: - case SO_MOVE_RIGHT_SOURCE: - output.existsSyncDeleteRight = true; - if (!syncDeleteRightActive) continue; - break; - case SO_OVERWRITE_RIGHT: - case SO_COPY_METADATA_TO_RIGHT: //no extra button on screen - output.existsSyncDirRight = true; - if (!syncDirOverwRightActive) continue; - break; - case SO_OVERWRITE_LEFT: - case SO_COPY_METADATA_TO_LEFT: //no extra button on screen - output.existsSyncDirLeft = true; - if (!syncDirOverwLeftActive) continue; - break; - case SO_DO_NOTHING: - output.existsSyncDirNone = true; - if (!syncDirNoneActive) continue; - break; - case SO_EQUAL: - output.existsSyncEqual = true; - if (!syncEqualActive) continue; - break; - case SO_UNRESOLVED_CONFLICT: - output.existsConflict = true; - if (!conflictFilesActive) continue; - break; - } - - //calculate total number of bytes for each side - getNumbers(*fsObj, output); + if (hideFiltered && !fsObj.isActive()) + return false; - viewRef.push_back(j->objId); + switch (fsObj.getSyncOperation()) //evaluate comparison result and sync direction + { + case SO_CREATE_NEW_LEFT: + case SO_MOVE_LEFT_TARGET: + output.existsSyncCreateLeft = true; + if (!syncCreateLeftActive) return false; + break; + case SO_CREATE_NEW_RIGHT: + case SO_MOVE_RIGHT_TARGET: + output.existsSyncCreateRight = true; + if (!syncCreateRightActive) return false; + break; + case SO_DELETE_LEFT: + case SO_MOVE_LEFT_SOURCE: + output.existsSyncDeleteLeft = true; + if (!syncDeleteLeftActive) return false; + break; + case SO_DELETE_RIGHT: + case SO_MOVE_RIGHT_SOURCE: + output.existsSyncDeleteRight = true; + if (!syncDeleteRightActive) return false; + break; + case SO_OVERWRITE_RIGHT: + case SO_COPY_METADATA_TO_RIGHT: //no extra button on screen + output.existsSyncDirRight = true; + if (!syncDirOverwRightActive) return false; + break; + case SO_OVERWRITE_LEFT: + case SO_COPY_METADATA_TO_LEFT: //no extra button on screen + output.existsSyncDirLeft = true; + if (!syncDirOverwLeftActive) return false; + break; + case SO_DO_NOTHING: + output.existsSyncDirNone = true; + if (!syncDirNoneActive) return false; + break; + case SO_EQUAL: + output.existsSyncEqual = true; + if (!syncEqualActive) return false; + break; + case SO_UNRESOLVED_CONFLICT: + output.existsConflict = true; + if (!conflictFilesActive) return false; + break; } - } + + //calculate total number of bytes for each side + getNumbers(fsObj, output); + return true; + }); return output; } -void GridView::getAllFileRef(const std::set<size_t>& guiRows, std::vector<FileSystemObject*>& output) +void GridView::getAllFileRef(const std::set<size_t>& rows, std::vector<FileSystemObject*>& output) { - std::set<size_t>::const_iterator upperEnd = guiRows.lower_bound(rowsOnView()); //loop over valid rows only! - output.clear(); - output.reserve(guiRows.size()); + output.reserve(rows.size()); - std::for_each(guiRows.begin(), upperEnd, + auto iterLast = rows.lower_bound(rowsOnView()); //loop over valid rows only! + std::for_each(rows.begin(), iterLast, [&](size_t pos) { - FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef[pos]); - if (fsObj) + if (FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef[pos])) output.push_back(fsObj); }); } @@ -255,20 +285,14 @@ void GridView::getAllFileRef(const std::set<size_t>& guiRows, std::vector<FileSy void GridView::removeInvalidRows() { viewRef.clear(); + rowPositions.clear(); + rowPositionsFirstChild.clear(); //remove rows that have been deleted meanwhile vector_remove_if(sortedRef, [&](const RefIndex& refIdx) { return FileSystemObject::retrieve(refIdx.objId) == NULL; }); } -void GridView::clearAllRows() -{ - std::vector<FileSystemObject::ObjectID>().swap(viewRef); //free mem - std::vector<RefIndex>().swap(sortedRef); // - folderCmp.clear(); -} - - class GridView::SerializeHierarchy { public: @@ -305,15 +329,15 @@ private: }; -void GridView::setData(FolderComparison& newData) +void GridView::setData(FolderComparison& folderCmp) { - clearAllRows(); + //clear everything + std::vector<FileSystemObject::ObjectId>().swap(viewRef); //free mem + std::vector<RefIndex>().swap(sortedRef); // + currentSort.reset(); - folderCmp.swap(newData); - - //fill sortedRef - for (auto j = begin(folderCmp); j != end(folderCmp); ++j) - SerializeHierarchy(sortedRef, j - folderCmp.begin()).execute(*j); + for (auto iter = begin(folderCmp); iter != end(folderCmp); ++iter) + SerializeHierarchy(sortedRef, iter - begin(folderCmp)).execute(*iter); } @@ -450,20 +474,19 @@ public: }; //------------------------------------------------------------------------------------------------------- -bool GridView::getDefaultDirection(SortType type) //true: ascending; false: descending +bool GridView::getDefaultSortDirection(ColumnTypeRim type) //true: ascending; false: descending { switch (type) { - case SORT_BY_FILESIZE: - case SORT_BY_DATE: + case COL_TYPE_SIZE: + case COL_TYPE_DATE: return false; - case SORT_BY_REL_NAME: - case SORT_BY_FILENAME: - case SORT_BY_EXTENSION: - case SORT_BY_CMP_RESULT: - case SORT_BY_DIRECTORY: - case SORT_BY_SYNC_DIRECTION: + case COL_TYPE_DIRECTORY: + case COL_TYPE_FULL_PATH: + case COL_TYPE_REL_PATH: + case COL_TYPE_FILENAME: + case COL_TYPE_EXTENSION: return true; } assert(false); @@ -471,49 +494,53 @@ bool GridView::getDefaultDirection(SortType type) //true: ascending; false: desc } -void GridView::sortView(SortType type, bool onLeft, bool ascending) +void GridView::sortView(ColumnTypeRim type, bool onLeft, bool ascending) { viewRef.clear(); + rowPositions.clear(); + rowPositionsFirstChild.clear(); + currentSort.reset(new SortInfo(type, onLeft, ascending)); switch (type) { - case SORT_BY_REL_NAME: + case COL_TYPE_FULL_PATH: + case COL_TYPE_REL_PATH: if ( ascending) std::sort(sortedRef.begin(), sortedRef.end(), LessRelativeName<true>()); else if (!ascending) std::sort(sortedRef.begin(), sortedRef.end(), LessRelativeName<false>()); break; - case SORT_BY_FILENAME: + case COL_TYPE_FILENAME: if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<true, LEFT_SIDE >()); else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<true, RIGHT_SIDE>()); else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<false, LEFT_SIDE >()); else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessShortFileName<false, RIGHT_SIDE>()); break; - case SORT_BY_FILESIZE: + case COL_TYPE_SIZE: if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<true, LEFT_SIDE >()); else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<true, RIGHT_SIDE>()); else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<false, LEFT_SIDE >()); else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFilesize<false, RIGHT_SIDE>()); break; - case SORT_BY_DATE: + case COL_TYPE_DATE: if ( ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<true, LEFT_SIDE >()); else if ( ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<true, RIGHT_SIDE>()); else if (!ascending && onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<false, LEFT_SIDE >()); else if (!ascending && !onLeft) std::sort(sortedRef.begin(), sortedRef.end(), LessFiletime<false, RIGHT_SIDE>()); break; - case SORT_BY_EXTENSION: + case COL_TYPE_EXTENSION: if ( ascending && onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<true, LEFT_SIDE >()); else if ( ascending && !onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<true, RIGHT_SIDE>()); else if (!ascending && onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<false, LEFT_SIDE >()); else if (!ascending && !onLeft) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessExtension<false, RIGHT_SIDE>()); break; - case SORT_BY_CMP_RESULT: - if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<true >()); - else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<false>()); - break; - case SORT_BY_SYNC_DIRECTION: - if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<true >()); - else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<false>()); - break; - case SORT_BY_DIRECTORY: + //case SORT_BY_CMP_RESULT: + // if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<true >()); + // else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessCmpResult<false>()); + // break; + //case SORT_BY_SYNC_DIRECTION: + // if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<true >()); + // else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), LessSyncDirection<false>()); + // break; + case COL_TYPE_DIRECTORY: if ( ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), [](const RefIndex a, const RefIndex b) { return a.folderIndex < b.folderIndex; }); else if (!ascending) std::stable_sort(sortedRef.begin(), sortedRef.end(), [](const RefIndex a, const RefIndex b) { return a.folderIndex > b.folderIndex; }); break; diff --git a/ui/grid_view.h b/ui/grid_view.h index 608ddec0..8623f11f 100644 --- a/ui/grid_view.h +++ b/ui/grid_view.h @@ -1,30 +1,32 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef GRIDVIEW_H_INCLUDED #define GRIDVIEW_H_INCLUDED #include <set> +#include "column_attr.h" #include "../file_hierarchy.h" namespace zen { -//gui view of FolderComparison +//grid view of FolderComparison class GridView { public: //direct data access via row number - const FileSystemObject* getObject(size_t row) const; //returns NULL if object is not found; logarithmic complexity - FileSystemObject* getObject(size_t row); // - size_t rowsOnView() const; //only the currently visible elements - size_t rowsTotal() const; //total number of rows available + const FileSystemObject* getObject(size_t row) const; //returns NULL if object is not found; complexity: constant! + /**/ + FileSystemObject* getObject(size_t row); // + size_t rowsOnView() const { return viewRef .size(); } //only visible elements + size_t rowsTotal () const { return sortedRef.size(); } //total rows available //get references to FileSystemObject: no NULL-check needed! Everything's bound. - void getAllFileRef(const std::set<size_t>& guiRows, std::vector<FileSystemObject*>& output); + void getAllFileRef(const std::set<size_t>& rows, std::vector<FileSystemObject*>& output); struct StatusCmpResult { @@ -92,52 +94,55 @@ public: bool syncEqualActive, bool conflictFilesActive); + void setData(FolderComparison& newData); + void removeInvalidRows(); //remove rows that have been deleted meanwhile: call after manual deletion and synchronization! + //sorting... + bool static getDefaultSortDirection(zen::ColumnTypeRim type); //true: ascending; false: descending - FolderComparison& getDataTentative(); //get data for operation that does NOT add or reorder rows! (deletion is okay) - void setData(FolderComparison& newData); //set data, taking ownership: warning std::swap() is used!!! - void removeInvalidRows(); //remove rows that have been deleted meanwhile: call after manual deletion and synchronization! - void clearAllRows(); //clears everything + void sortView(zen::ColumnTypeRim type, bool onLeft, bool ascending); //always call this method for sorting, never sort externally! - //sorting... - enum SortType + struct SortInfo { - SORT_BY_REL_NAME, - SORT_BY_FILENAME, - SORT_BY_FILESIZE, - SORT_BY_DATE, - SORT_BY_EXTENSION, - SORT_BY_CMP_RESULT, - SORT_BY_DIRECTORY, - SORT_BY_SYNC_DIRECTION + SortInfo(zen::ColumnTypeRim type, bool onLeft, bool ascending) : type_(type), onLeft_(onLeft), ascending_(ascending) {} + zen::ColumnTypeRim type_; + bool onLeft_; + bool ascending_; }; + const SortInfo* getSortInfo() const { return currentSort.get(); } //return NULL if currently not sorted - bool static getDefaultDirection(SortType type); //true: ascending; false: descending - - void sortView(SortType type, bool onLeft, bool ascending); //always call this method for sorting, never sort externally! + int findRowDirect(FileSystemObject::ObjectIdConst objId) const; // find an object's row position on view list directly, return < 0 if not found + int findRowFirstChild(const HierarchyObject* hierObj) const; // find first child of DirMapping or BaseDirMapping *on sorted sub view* + //"hierObj" may be invalid, it is NOT dereferenced, return < 0 if not found private: - class SerializeHierarchy; - struct RefIndex { - RefIndex(size_t folderInd, FileSystemObject::ObjectID id) : + RefIndex(unsigned int folderInd, FileSystemObject::ObjectId id) : folderIndex(folderInd), objId(id) {} - size_t folderIndex; - FileSystemObject::ObjectID objId; + unsigned int folderIndex; + FileSystemObject::ObjectId objId; }; - std::vector<FileSystemObject::ObjectID> viewRef; //partial view on sortedRef - // | - // | (update...) - // \|/ - std::vector<RefIndex> sortedRef; //equivalent to folderCmp, but may be sorted - // | - // | (setData) - // \|/ - FolderComparison folderCmp; //actual comparison data: owned by GridView! + template <class Predicate> void updateView(Predicate pred); + + zen::hash_map<FileSystemObject::ObjectIdConst, size_t> rowPositions; //find row positions on sortedRef directly + zen::hash_map<const HierarchyObject*, size_t> rowPositionsFirstChild; //find first child on sortedRef of a hierarchy object + //NEVER DEREFERENCE HierarchyObject*!!! lookup only! + + std::vector<FileSystemObject::ObjectId> viewRef; //partial view on sortedRef + /* /|\ + | (update...) + | */ + std::vector<RefIndex> sortedRef; //flat view of weak pointers on folderCmp; may be sorted + /* /|\ + | (setData...) + | */ + //std::shared_ptr<FolderComparison> folderCmp; //actual comparison data: owned by GridView! + + class SerializeHierarchy; //sorting classes template <bool ascending> @@ -160,6 +165,8 @@ private: template <bool ascending> class LessSyncDirection; + + std::unique_ptr<SortInfo> currentSort; }; @@ -189,26 +196,6 @@ FileSystemObject* GridView::getObject(size_t row) //code re-use of const method: see Meyers Effective C++ return const_cast<FileSystemObject*>(static_cast<const GridView&>(*this).getObject(row)); } - - -inline -size_t GridView::rowsOnView() const -{ - return viewRef.size(); -} - - -inline -FolderComparison& GridView::getDataTentative() -{ - return folderCmp; -} - -inline -size_t GridView::rowsTotal() const //total number of rows available -{ - return sortedRef.size(); -} } diff --git a/ui/gui_generated.cpp b/ui/gui_generated.cpp index b79c320f..124354e6 100644 --- a/ui/gui_generated.cpp +++ b/ui/gui_generated.cpp @@ -5,10 +5,10 @@ // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "../lib/custom_grid.h" #include "../wx+/button.h" #include "../wx+/dir_picker.h" #include "../wx+/graph.h" +#include "../wx+/grid.h" #include "../wx+/toggle_button.h" #include "exec_finished_box.h" #include "folder_history_box.h" @@ -20,922 +20,818 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize ); - - m_menubar1 = new wxMenuBar( 0 ); - m_menuFile = new wxMenu(); - m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL ); - #ifdef __WXMSW__ - m_menuItem10->SetBitmaps( wxNullBitmap ); - #elif defined( __WXGTK__ ) - m_menuItem10->SetBitmap( wxNullBitmap ); - #endif - m_menuFile->Append( m_menuItem10 ); - - m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); - #ifdef __WXMSW__ - m_menuItem11->SetBitmaps( wxNullBitmap ); - #elif defined( __WXGTK__ ) - m_menuItem11->SetBitmap( wxNullBitmap ); - #endif - m_menuFile->Append( m_menuItem11 ); - - wxMenuItem* m_separator1; - m_separator1 = m_menuFile->AppendSeparator(); - - m_menuItemSwitchView = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&witch view") ) + wxT('\t') + wxT("F8"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSwitchView ); - - wxMenuItem* m_separator2; - m_separator2 = m_menuFile->AppendSeparator(); - - m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl-N"), wxEmptyString, wxITEM_NORMAL ); - #ifdef __WXMSW__ - m_menuItemNew->SetBitmaps( wxNullBitmap ); - #elif defined( __WXGTK__ ) - m_menuItemNew->SetBitmap( wxNullBitmap ); - #endif - m_menuFile->Append( m_menuItemNew ); - - m_menuItemSave = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("Ctrl-S"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSave ); - - m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("Ctrl-O"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemLoad ); - - wxMenuItem* m_separator3; - m_separator3 = m_menuFile->AppendSeparator(); - - wxMenuItem* m_menuItem4; - m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Ctrl-Q"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItem4 ); - - m_menubar1->Append( m_menuFile, _("&Program") ); - - m_menuAdvanced = new wxMenu(); - m_menuLanguages = new wxMenu(); - m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages ); - - wxMenuItem* m_separator4; - m_separator4 = m_menuAdvanced->AppendSeparator(); - - m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuAdvanced->Append( m_menuItemGlobSett ); - - m_menuItem7 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Create batch job...") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuAdvanced->Append( m_menuItem7 ); - - wxMenuItem* m_menuItem5; - m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuAdvanced->Append( m_menuItem5 ); - - m_menubar1->Append( m_menuAdvanced, _("&Advanced") ); - - m_menuHelp = new wxMenu(); - wxMenuItem* m_menuItemReadme; - m_menuItemReadme = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemReadme ); - - m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemCheckVer ); - - wxMenuItem* m_separator5; - m_separator5 = m_menuHelp->AppendSeparator(); - - m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("Shift-F1"), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemAbout ); - - m_menubar1->Append( m_menuHelp, _("&Help") ); - - this->SetMenuBar( m_menubar1 ); - - bSizerPanelHolder = new wxBoxSizer( wxVERTICAL ); - - m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL ); - bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer155; - bSizer155 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer155->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxFlexGridSizer* fgSizer121; - fgSizer121 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer121->SetFlexibleDirection( wxBOTH ); - fgSizer121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticTextCmpVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCmpVariant->Wrap( -1 ); - m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - fgSizer121->Add( m_staticTextCmpVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP, 1 ); - - - fgSizer121->Add( 0, 0, 1, 0, 5 ); - - wxBoxSizer* bSizer30; - bSizer30 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonCompare = new zen::BitmapButton( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,42 ), 0 ); - m_buttonCompare->SetDefault(); - m_buttonCompare->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) ); - m_buttonCompare->SetToolTip( _("Compare both sides") ); - - bSizer30->Add( m_buttonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonAbort = new wxButton( m_panelTopButtons, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,42 ), 0 ); - m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) ); - m_buttonAbort->Enable( false ); - m_buttonAbort->Hide(); - - bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - fgSizer121->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); - m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); - - fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 ); - - bSizer155->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - bSizerTopButtons->Add( bSizer155, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerTopButtons->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer1551; - bSizer1551 = new wxBoxSizer( wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer12; - fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer12->SetFlexibleDirection( wxBOTH ); - fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticTextSyncVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSyncVariant->Wrap( -1 ); - m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - fgSizer12->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP, 1 ); - - m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); - m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); - - fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); - - m_buttonStartSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( 180,42 ), 0 ); - m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) ); - m_buttonStartSync->SetToolTip( _("Start synchronization") ); - - fgSizer12->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer1551->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - - bSizer1551->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerTopButtons->Add( bSizer1551, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelTopButtons->SetSizer( bSizerTopButtons ); - m_panelTopButtons->Layout(); - bSizerTopButtons->Fit( m_panelTopButtons ); - bSizerPanelHolder->Add( m_panelTopButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1601; - bSizer1601 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer91; - bSizer91 = new wxBoxSizer( wxHORIZONTAL ); - - m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelTopLeft->SetMinSize( wxSize( 1,1 ) ); - - sbSizerDirLeft = new wxStaticBoxSizer( new wxStaticBox( m_panelTopLeft, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); - - m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - sbSizerDirLeft->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - sbSizerDirLeft->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_directoryLeft = new FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizerDirLeft->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new zen::DirPickerCtrl( m_panelTopLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - sbSizerDirLeft->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelTopLeft->SetSizer( sbSizerDirLeft ); - m_panelTopLeft->Layout(); - sbSizerDirLeft->Fit( m_panelTopLeft ); - bSizer91->Add( m_panelTopLeft, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelTopMiddle = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer93; - bSizer93 = new wxBoxSizer( wxVERTICAL ); - - - bSizer93->Add( 0, 3, 0, 0, 5 ); - - m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW ); - m_bpButtonSwapSides->SetToolTip( _("Swap sides") ); - - bSizer93->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer160; - bSizer160 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer160->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonAltCompCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer160->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); - - m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer160->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer93->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panelTopMiddle->SetSizer( bSizer93 ); - m_panelTopMiddle->Layout(); - bSizer93->Fit( m_panelTopMiddle ); - bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelTopRight->SetMinSize( wxSize( 1,1 ) ); - - sbSizerDirRight = new wxStaticBoxSizer( new wxStaticBox( m_panelTopRight, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); - - m_directoryRight = new FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizerDirRight->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new zen::DirPickerCtrl( m_panelTopRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - sbSizerDirRight->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelTopRight->SetSizer( sbSizerDirRight ); - m_panelTopRight->Layout(); - sbSizerDirRight->Fit( m_panelTopRight ); - bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 ); - - m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL ); - m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 ); - m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) ); - - bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); - - m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs ); - m_scrolledWindowFolderPairs->Layout(); - bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs ); - bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelDirectoryPairs->SetSizer( bSizer1601 ); - m_panelDirectoryPairs->Layout(); - bSizer1601->Fit( m_panelDirectoryPairs ); - bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_panelGrids = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelGrids->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) ); - - bSizerGridHolder = new wxBoxSizer( wxHORIZONTAL ); - - m_panelLeft = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - m_gridLeft = new CustomGridLeft( m_panelLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridLeft->CreateGrid( 15, 4 ); - m_gridLeft->EnableEditing( false ); - m_gridLeft->EnableGridLines( true ); - m_gridLeft->EnableDragGridSize( true ); - m_gridLeft->SetMargins( 0, 0 ); - - // Columns - m_gridLeft->EnableDragColMove( false ); - m_gridLeft->EnableDragColSize( true ); - m_gridLeft->SetColLabelSize( 20 ); - m_gridLeft->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - - // Rows - m_gridLeft->EnableDragRowSize( false ); - m_gridLeft->SetRowLabelSize( 38 ); - m_gridLeft->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridLeft->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - m_gridLeft->SetMinSize( wxSize( 1,1 ) ); - - bSizer7->Add( m_gridLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelLeft->SetSizer( bSizer7 ); - m_panelLeft->Layout(); - bSizer7->Fit( m_panelLeft ); - bSizerGridHolder->Add( m_panelLeft, 1, wxEXPAND, 5 ); - - m_panelMiddle = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer18; - bSizer18 = new wxBoxSizer( wxVERTICAL ); - - m_gridMiddle = new CustomGridMiddle( m_panelMiddle, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridMiddle->CreateGrid( 15, 1 ); - m_gridMiddle->EnableEditing( false ); - m_gridMiddle->EnableGridLines( true ); - m_gridMiddle->EnableDragGridSize( false ); - m_gridMiddle->SetMargins( 0, 0 ); - - // Columns - m_gridMiddle->SetColSize( 0, 60 ); - m_gridMiddle->EnableDragColMove( false ); - m_gridMiddle->EnableDragColSize( false ); - m_gridMiddle->SetColLabelSize( 20 ); - m_gridMiddle->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Rows - m_gridMiddle->EnableDragRowSize( false ); - m_gridMiddle->SetRowLabelSize( 0 ); - m_gridMiddle->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridMiddle->SetDefaultCellFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Arial") ) ); - m_gridMiddle->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - bSizer18->Add( m_gridMiddle, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_panelMiddle->SetSizer( bSizer18 ); - m_panelMiddle->Layout(); - bSizer18->Fit( m_panelMiddle ); - bSizerGridHolder->Add( m_panelMiddle, 0, wxEXPAND, 5 ); - - m_panelRight = new wxPanel( m_panelGrids, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxVERTICAL ); - - m_gridRight = new CustomGridRight( m_panelRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridRight->CreateGrid( 15, 4 ); - m_gridRight->EnableEditing( false ); - m_gridRight->EnableGridLines( true ); - m_gridRight->EnableDragGridSize( true ); - m_gridRight->SetMargins( 0, 0 ); - - // Columns - m_gridRight->EnableDragColMove( false ); - m_gridRight->EnableDragColSize( true ); - m_gridRight->SetColLabelSize( 20 ); - m_gridRight->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - - // Rows - m_gridRight->EnableDragRowSize( false ); - m_gridRight->SetRowLabelSize( 0 ); - m_gridRight->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridRight->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - m_gridRight->SetMinSize( wxSize( 1,1 ) ); - - bSizer10->Add( m_gridRight, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelRight->SetSizer( bSizer10 ); - m_panelRight->Layout(); - bSizer10->Fit( m_panelRight ); - bSizerGridHolder->Add( m_panelRight, 1, wxEXPAND, 5 ); - - m_panelGrids->SetSizer( bSizerGridHolder ); - m_panelGrids->Layout(); - bSizerGridHolder->Fit( m_panelGrids ); - bSizerPanelHolder->Add( m_panelGrids, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizerConfig = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer151; - bSizer151 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonSave->SetToolTip( _("Save current configuration to file") ); - - bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLoad = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonLoad->SetToolTip( _("Load configuration from file") ); - - bSizer151->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_listBoxHistory = new wxListBox( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_SORT ); - m_listBoxHistory->SetToolTip( _("Last used configurations (press DEL to remove from list)") ); - m_listBoxHistory->SetMinSize( wxSize( -1,40 ) ); - - bSizerConfig->Add( m_listBoxHistory, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelConfig->SetSizer( bSizerConfig ); - m_panelConfig->Layout(); - bSizerConfig->Fit( m_panelConfig ); - bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 ); - - m_panelFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer171; - bSizer171 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - bSizer171->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") ); - - bSizer171->Add( m_checkBoxHideFilt, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelFilter->SetSizer( bSizer171 ); - m_panelFilter->Layout(); - bSizer171->Fit( m_panelFilter ); - bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 ); - - m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizerStatistics = new wxBoxSizer( wxHORIZONTAL ); - - - bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxFlexGridSizer* fgSizer5; - fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 ); - fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_bitmapCreate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlCreate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlCreate->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapUpdate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlUpdate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlUpdate->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer5->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerStatistics->Add( fgSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxFlexGridSizer* fgSizer6; - fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 ); - fgSizer6->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_bitmapDelete = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer6->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlDelete = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlDelete->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer6->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); - - fgSizer6->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlData = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); - - fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerStatistics->Add( fgSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - - bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_panelStatistics->SetSizer( bSizerStatistics ); - m_panelStatistics->Layout(); - bSizerStatistics->Fit( m_panelStatistics ); - bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL ); - - - bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - bSizerViewFilter->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_panelViewFilter->SetSizer( bSizerViewFilter ); - m_panelViewFilter->Layout(); - bSizerViewFilter->Fit( m_panelViewFilter ); - bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer451; - bSizer451 = new wxBoxSizer( wxHORIZONTAL ); - - bSizer451->SetMinSize( wxSize( -1,22 ) ); - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 ); - - m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftDirs->Wrap( -1 ); - bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL ); - - - bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); - - m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 ); - - m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftFiles->Wrap( -1 ); - bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); - - m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftBytes->Wrap( -1 ); - bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer451->Add( bSizer53, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); - - m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); - - - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusMiddle->Wrap( -1 ); - m_staticTextStatusMiddle->SetFont( wxFont( 8, 74, 90, 92, false, wxT("MS Shell Dlg 2") ) ); - - bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); - - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 ); - - m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightDirs->Wrap( -1 ); - bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL ); - - - bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); - - m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 ); - - m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightFiles->Wrap( -1 ); - bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); - - m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightBytes->Wrap( -1 ); - bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer50; - bSizer50 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer50->Add( 0, 0, 1, wxALIGN_BOTTOM, 5 ); - - m_bitmap15 = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); - bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 5 ); - - bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM, 5 ); - - bSizer451->Add( bSizer52, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); - - m_panelStatusBar->SetSizer( bSizer451 ); - m_panelStatusBar->Layout(); - bSizer451->Fit( m_panelStatusBar ); - bSizerPanelHolder->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - this->SetSizer( bSizerPanelHolder ); - this->Layout(); - bSizerPanelHolder->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); - this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); - this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); - this->Connect( m_menuItemSwitchView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) ); - this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); - this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); - this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); - this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); - this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); - this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); - this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); - this->Connect( m_menuItemReadme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); - this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); - this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); - m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); - m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); - m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); - m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); - m_dirPickerRight->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this ); - m_gridLeft->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this ); - m_gridMiddle->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this ); - m_gridMiddle->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this ); - m_gridMiddle->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this ); - m_gridRight->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this ); - m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); - m_bpButtonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); - m_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); - m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); - m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); - m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); - m_bpButtonSyncDirOverwLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); - m_bpButtonSyncDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); - m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); - m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); - m_bpButtonEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); - m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); - m_bpButtonSyncDirNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); - m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); - m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); - m_bpButtonSyncDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); - m_bpButtonSyncDirOverwRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); - m_bpButtonSyncCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); - m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); + this->SetSizeHints( wxSize( 640,400 ), wxDefaultSize ); + + m_menubar1 = new wxMenuBar( 0 ); + m_menuFile = new wxMenu(); + m_menuItem10 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("1. &Compare") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL ); +#ifdef __WXMSW__ + m_menuItem10->SetBitmaps( wxNullBitmap ); +#elif defined( __WXGTK__ ) + m_menuItem10->SetBitmap( wxNullBitmap ); +#endif + m_menuFile->Append( m_menuItem10 ); + + m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); +#ifdef __WXMSW__ + m_menuItem11->SetBitmaps( wxNullBitmap ); +#elif defined( __WXGTK__ ) + m_menuItem11->SetBitmap( wxNullBitmap ); +#endif + m_menuFile->Append( m_menuItem11 ); + + wxMenuItem* m_separator1; + m_separator1 = m_menuFile->AppendSeparator(); + + m_menuItemNew = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL ); +#ifdef __WXMSW__ + m_menuItemNew->SetBitmaps( wxNullBitmap ); +#elif defined( __WXGTK__ ) + m_menuItemNew->SetBitmap( wxNullBitmap ); +#endif + m_menuFile->Append( m_menuItemNew ); + + m_menuItemSave = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("S&ave configuration...") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemSave ); + + m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("&Load configuration...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemLoad ); + + wxMenuItem* m_separator3; + m_separator3 = m_menuFile->AppendSeparator(); + + wxMenuItem* m_menuItem4; + m_menuItem4 = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItem4 ); + + m_menubar1->Append( m_menuFile, _("&Program") ); + + m_menuAdvanced = new wxMenu(); + m_menuLanguages = new wxMenu(); + m_menuAdvanced->Append( -1, _("&Language"), m_menuLanguages ); + + wxMenuItem* m_separator4; + m_separator4 = m_menuAdvanced->AppendSeparator(); + + m_menuItemGlobSett = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Global settings...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuAdvanced->Append( m_menuItemGlobSett ); + + m_menuItem7 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Create batch job...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuAdvanced->Append( m_menuItem7 ); + + wxMenuItem* m_menuItem5; + m_menuItem5 = new wxMenuItem( m_menuAdvanced, wxID_ANY, wxString( _("&Export file list...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuAdvanced->Append( m_menuItem5 ); + + m_menubar1->Append( m_menuAdvanced, _("&Advanced") ); + + m_menuHelp = new wxMenu(); + wxMenuItem* m_menuItemReadme; + m_menuItemReadme = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemReadme ); + + m_menuItemCheckVer = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for new version") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemCheckVer ); + + wxMenuItem* m_separator5; + m_separator5 = m_menuHelp->AppendSeparator(); + + m_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemAbout ); + + m_menubar1->Append( m_menuHelp, _("&Help") ); + + this->SetMenuBar( m_menubar1 ); + + bSizerPanelHolder = new wxBoxSizer( wxVERTICAL ); + + m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL ); + bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer155; + bSizer155 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer155->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxFlexGridSizer* fgSizer121; + fgSizer121 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer121->SetFlexibleDirection( wxBOTH ); + fgSizer121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextCmpVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCmpVariant->Wrap( -1 ); + m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + fgSizer121->Add( m_staticTextCmpVariant, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxTOP, 1 ); + + + fgSizer121->Add( 0, 0, 1, 0, 5 ); + + wxBoxSizer* bSizer30; + bSizer30 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonCompare = new zen::BitmapButton( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,42 ), 0 ); + m_buttonCompare->SetDefault(); + m_buttonCompare->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) ); + m_buttonCompare->SetToolTip( _("Compare both sides") ); + + bSizer30->Add( m_buttonCompare, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonAbort = new wxButton( m_panelTopButtons, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 180,42 ), 0 ); + m_buttonAbort->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) ); + m_buttonAbort->Enable( false ); + m_buttonAbort->Hide(); + + bSizer30->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + fgSizer121->Add( bSizer30, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); + m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); + + fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 ); + + bSizer155->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + bSizerTopButtons->Add( bSizer155, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerTopButtons->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer1551; + bSizer1551 = new wxBoxSizer( wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer12; + fgSizer12 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer12->SetFlexibleDirection( wxBOTH ); + fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer12->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticTextSyncVariant = new wxStaticText( m_panelTopButtons, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSyncVariant->Wrap( -1 ); + m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + fgSizer12->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP, 1 ); + + m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); + m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); + + fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); + + m_buttonStartSync = new zen::BitmapButton( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( 180,42 ), 0 ); + m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxEmptyString ) ); + m_buttonStartSync->SetToolTip( _("Start synchronization") ); + + fgSizer12->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer1551->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + + bSizer1551->Add( 15, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerTopButtons->Add( bSizer1551, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelTopButtons->SetSizer( bSizerTopButtons ); + m_panelTopButtons->Layout(); + bSizerTopButtons->Fit( m_panelTopButtons ); + bSizerPanelHolder->Add( m_panelTopButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1601; + bSizer1601 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer91; + bSizer91 = new wxBoxSizer( wxHORIZONTAL ); + + m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelTopLeft->SetMinSize( wxSize( 1,-1 ) ); + + wxBoxSizer* bSizer180; + bSizer180 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer181->Add( 25, 0, 0, 0, 5 ); + + m_staticTextFinalPathLeft = new wxStaticText( m_panelTopLeft, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFinalPathLeft->Wrap( -1 ); + bSizer181->Add( m_staticTextFinalPathLeft, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 ); + + bSizer180->Add( bSizer181, 0, 0, 5 ); + + wxBoxSizer* bSizer182; + bSizer182 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + bSizer182->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer182->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_directoryLeft = new FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer182->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new zen::DirPickerCtrl( m_panelTopLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + bSizer182->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer180->Add( bSizer182, 0, wxEXPAND, 5 ); + + m_panelTopLeft->SetSizer( bSizer180 ); + m_panelTopLeft->Layout(); + bSizer180->Fit( m_panelTopLeft ); + bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelTopMiddle = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer93; + bSizer93 = new wxBoxSizer( wxVERTICAL ); + + + bSizer93->Add( 0, 3, 0, 0, 5 ); + + m_bpButtonSwapSides = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW ); + m_bpButtonSwapSides->SetToolTip( _("Swap sides") ); + + bSizer93->Add( m_bpButtonSwapSides, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer160; + bSizer160 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer160->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonAltCompCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer160->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_bpButtonAltSyncCfg = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer160->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer160->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer93->Add( bSizer160, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_panelTopMiddle->SetSizer( bSizer93 ); + m_panelTopMiddle->Layout(); + bSizer93->Fit( m_panelTopMiddle ); + bSizer91->Add( m_panelTopMiddle, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelTopRight->SetMinSize( wxSize( 1,-1 ) ); + + wxBoxSizer* bSizer183; + bSizer183 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer184; + bSizer184 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer184->Add( 25, 0, 0, 0, 5 ); + + m_staticTextFinalPathRight = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFinalPathRight->Wrap( -1 ); + bSizer184->Add( m_staticTextFinalPathRight, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 2 ); + + bSizer183->Add( bSizer184, 0, 0, 5 ); + + wxBoxSizer* bSizer179; + bSizer179 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryRight = new FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer179->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new zen::DirPickerCtrl( m_panelTopRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer179->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer183->Add( bSizer179, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelTopRight->SetSizer( bSizer183 ); + m_panelTopRight->Layout(); + bSizer183->Fit( m_panelTopRight ); + bSizer91->Add( m_panelTopRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 ); + + bSizer1601->Add( bSizer91, 0, wxEXPAND, 5 ); + + m_scrolledWindowFolderPairs = new wxScrolledWindow( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHSCROLL|wxVSCROLL ); + m_scrolledWindowFolderPairs->SetScrollRate( 5, 5 ); + m_scrolledWindowFolderPairs->SetMinSize( wxSize( -1,0 ) ); + + bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); + + m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs ); + m_scrolledWindowFolderPairs->Layout(); + bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs ); + bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelDirectoryPairs->SetSizer( bSizer1601 ); + m_panelDirectoryPairs->Layout(); + bSizer1601->Fit( m_panelDirectoryPairs ); + bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_gridNavi = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridNavi->SetScrollRate( 5, 5 ); + bSizerPanelHolder->Add( m_gridNavi, 1, wxEXPAND, 5 ); + + m_gridMain = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridMain->SetScrollRate( 5, 5 ); + bSizerPanelHolder->Add( m_gridMain, 1, wxEXPAND, 5 ); + + m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizerConfig = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer151; + bSizer151 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonSave->SetToolTip( _("Save current configuration to file") ); + + bSizer151->Add( m_bpButtonSave, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLoad = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonLoad->SetToolTip( _("Load configuration from file") ); + + bSizer151->Add( m_bpButtonLoad, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerConfig->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_listBoxHistory = new wxListBox( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_NEEDED_SB|wxLB_SORT ); + m_listBoxHistory->SetToolTip( _("Last used configurations (press DEL to remove from list)") ); + m_listBoxHistory->SetMinSize( wxSize( -1,40 ) ); + + bSizerConfig->Add( m_listBoxHistory, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelConfig->SetSizer( bSizerConfig ); + m_panelConfig->Layout(); + bSizerConfig->Fit( m_panelConfig ); + bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 ); + + m_panelFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer171; + bSizer171 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + bSizer171->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") ); + + bSizer171->Add( m_checkBoxHideFilt, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelFilter->SetSizer( bSizer171 ); + m_panelFilter->Layout(); + bSizer171->Fit( m_panelFilter ); + bSizerPanelHolder->Add( m_panelFilter, 0, 0, 5 ); + + m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizerStatistics = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxFlexGridSizer* fgSizer5; + fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 5 ); + fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_bitmapCreate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlCreate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlCreate->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlCreate->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_textCtrlCreate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapUpdate = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlUpdate = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlUpdate->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlUpdate->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer5->Add( m_textCtrlUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatistics->Add( fgSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + wxFlexGridSizer* fgSizer6; + fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 5 ); + fgSizer6->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_bitmapDelete = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer6->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlDelete = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlDelete->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlDelete->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer6->Add( m_textCtrlDelete, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); + + fgSizer6->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlData = new wxTextCtrl( m_panelStatistics, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); + + fgSizer6->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatistics->Add( fgSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + + bSizerStatistics->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_panelStatistics->SetSizer( bSizerStatistics ); + m_panelStatistics->Layout(); + bSizerStatistics->Fit( m_panelStatistics ); + bSizerPanelHolder->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bpButtonSyncCreateLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDirOverwLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDirOverwLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDeleteLeft = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDeleteLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonLeftOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonLeftNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonEqual = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonEqual, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonDifferent = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDirNone = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDirNone, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonRightNewer = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonRightOnly = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDeleteRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDeleteRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncDirOverwRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncDirOverwRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonSyncCreateRight = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonSyncCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonConflict = new ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + bSizerViewFilter->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_panelViewFilter->SetSizer( bSizerViewFilter ); + m_panelViewFilter->Layout(); + bSizerViewFilter->Fit( m_panelViewFilter ); + bSizerPanelHolder->Add( m_panelViewFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelStatusBar = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer451; + bSizer451 = new wxBoxSizer( wxHORIZONTAL ); + + bSizer451->SetMinSize( wxSize( -1,22 ) ); + wxBoxSizer* bSizer53; + bSizer53 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftDirs->Wrap( -1 ); + bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); + + m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftFiles->Wrap( -1 ); + bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); + + m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftBytes->Wrap( -1 ); + bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer451->Add( bSizer53, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + + m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline9, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 2 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatusMiddle = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusMiddle->Wrap( -1 ); + m_staticTextStatusMiddle->SetFont( wxFont( 8, 74, 90, 92, false, wxT("MS Shell Dlg 2") ) ); + + bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer451->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 2 ); + + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightDirs->Wrap( -1 ); + bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); + + m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 ); + + m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightFiles->Wrap( -1 ); + bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); + + m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightBytes->Wrap( -1 ); + bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer50; + bSizer50 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer50->Add( 0, 0, 1, wxALIGN_BOTTOM, 5 ); + + m_bitmapResizeCorner = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); + bSizer50->Add( m_bitmapResizeCorner, 0, wxALIGN_BOTTOM, 5 ); + + bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM, 5 ); + + bSizer451->Add( bSizer52, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + + m_panelStatusBar->SetSizer( bSizer451 ); + m_panelStatusBar->Layout(); + bSizer451->Fit( m_panelStatusBar ); + bSizerPanelHolder->Add( m_panelStatusBar, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + this->SetSizer( bSizerPanelHolder ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); + this->Connect( m_menuItem10->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); + this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); + this->Connect( m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); + this->Connect( m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); + this->Connect( m_menuItemLoad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); + this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); + this->Connect( m_menuItemGlobSett->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); + this->Connect( m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); + this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); + this->Connect( m_menuItemReadme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); + this->Connect( m_menuItemCheckVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); + this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); + m_buttonCompare->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); + m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); + m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); + m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); + m_dirPickerRight->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); + m_bpButtonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); + m_listBoxHistory->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); + m_listBoxHistory->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); + m_checkBoxHideFilt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); + m_bpButtonSyncCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); + m_bpButtonSyncDirOverwLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); + m_bpButtonSyncDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); + m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); + m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); + m_bpButtonEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); + m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); + m_bpButtonSyncDirNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); + m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); + m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); + m_bpButtonSyncDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); + m_bpButtonSyncDirOverwRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); + m_bpButtonSyncCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); + m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); } MainDialogGenerated::~MainDialogGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSwitchView ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); - this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); - this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); - m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); - m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); - m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); - m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); - m_dirPickerRight->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnLeftGridDoubleClick ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortLeftGrid ), NULL, this ); - m_gridLeft->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelLeft ), NULL, this ); - m_gridMiddle->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddle ), NULL, this ); - m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortMiddleGrid ), NULL, this ); - m_gridMiddle->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextMiddleLabel ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( MainDialogGenerated::OnRightGridDoubleClick ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRim ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( MainDialogGenerated::OnSortRightGrid ), NULL, this ); - m_gridRight->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( MainDialogGenerated::OnContextRimLabelRight ), NULL, this ); - m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); - m_bpButtonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); - m_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); - m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); - m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); - m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); - m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); - m_bpButtonSyncDirOverwLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); - m_bpButtonSyncDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); - m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); - m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); - m_bpButtonEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); - m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); - m_bpButtonSyncDirNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); - m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); - m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); - m_bpButtonSyncDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); - m_bpButtonSyncDirOverwRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); - m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); - m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::OnClose ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnCompare ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnNewConfig ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ) ); + this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuQuit ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuGlobalSettings ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuBatchJob ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuExportFileList ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnShowHelp ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuCheckVersion ) ); + this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnMenuAbout ) ); + m_buttonCompare->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCompare ), NULL, this ); + m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncSettings ), NULL, this ); + m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnStartSync ), NULL, this ); + m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); + m_dirPickerRight->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSaveConfig ), NULL, this ); + m_bpButtonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLoadConfig ), NULL, this ); + m_listBoxHistory->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogGenerated::OnCfgHistoryKeyEvent ), NULL, this ); + m_listBoxHistory->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainDialogGenerated::OnLoadFromHistory ), NULL, this ); + m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConfigureFilter ), NULL, this ); + m_checkBoxHideFilt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnHideFilteredButton ), NULL, this ); + m_bpButtonSyncCreateLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateLeft ), NULL, this ); + m_bpButtonSyncDirOverwLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirLeft ), NULL, this ); + m_bpButtonSyncDeleteLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteLeft ), NULL, this ); + m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftOnlyFiles ), NULL, this ); + m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnLeftNewerFiles ), NULL, this ); + m_bpButtonEqual->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnEqualFiles ), NULL, this ); + m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnDifferentFiles ), NULL, this ); + m_bpButtonSyncDirNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirNone ), NULL, this ); + m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightNewerFiles ), NULL, this ); + m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRightOnlyFiles ), NULL, this ); + m_bpButtonSyncDeleteRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDeleteRight ), NULL, this ); + m_bpButtonSyncDirOverwRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncDirRight ), NULL, this ); + m_bpButtonSyncCreateRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSyncCreateRight ), NULL, this ); + m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnConflictFiles ), NULL, this ); + } FolderPairGenerated::FolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { - wxBoxSizer* bSizer74; - bSizer74 = new wxBoxSizer( wxHORIZONTAL ); - - m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - bSizer134->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - bSizer134->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panelLeft->SetSizer( bSizer134 ); - m_panelLeft->Layout(); - bSizer134->Fit( m_panelLeft ); - bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer95; - bSizer95 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer95->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bpButtonAltCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer95->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); - - m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer95->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer95->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_panel20->SetSizer( bSizer95 ); - m_panel20->Layout(); - bSizer95->Fit( m_panel20 ); - bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer135; - bSizer135 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - bSizer135->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panelRight->SetSizer( bSizer135 ); - m_panelRight->Layout(); - bSizer135->Fit( m_panelRight ); - bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - this->SetSizer( bSizer74 ); - this->Layout(); - bSizer74->Fit( this ); + wxBoxSizer* bSizer74; + bSizer74 = new wxBoxSizer( wxHORIZONTAL ); + + m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelLeft->SetMinSize( wxSize( 1,-1 ) ); + + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer134->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + bSizer134->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelLeft->SetSizer( bSizer134 ); + m_panelLeft->Layout(); + bSizer134->Fit( m_panelLeft ); + bSizer74->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 ); + + m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer95; + bSizer95 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer95->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bpButtonAltCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer95->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); + + m_bpButtonAltSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer95->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer95->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_panel20->SetSizer( bSizer95 ); + m_panel20->Layout(); + bSizer95->Fit( m_panel20 ); + bSizer74->Add( m_panel20, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelRight->SetMinSize( wxSize( 1,-1 ) ); + + wxBoxSizer* bSizer135; + bSizer135 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer135->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelRight->SetSizer( bSizer135 ); + m_panelRight->Layout(); + bSizer135->Fit( m_panelRight ); + bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 ); + + this->SetSizer( bSizer74 ); + this->Layout(); + bSizer74->Fit( this ); } FolderPairGenerated::~FolderPairGenerated() @@ -944,159 +840,159 @@ FolderPairGenerated::~FolderPairGenerated() CompareStatusGenerated::CompareStatusGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { - wxBoxSizer* bSizer40; - bSizer40 = new wxBoxSizer( wxVERTICAL ); - - - bSizer40->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer48; - bSizer48 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText30->Wrap( -1 ); - m_staticText30->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - m_textCtrlStatus->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer40->Add( bSizer48, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH ); - bSizer40->Add( m_gauge2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxVERTICAL ); - - bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText321 = new wxStaticText( this, wxID_ANY, _("Items found:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText321->Wrap( -1 ); - m_staticText321->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextScanned->Wrap( -1 ); - m_staticTextScanned->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); - - bSizer157->Add( bSizerFilesFound, 0, 0, 5 ); - - bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText46 = new wxStaticText( this, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText46->Wrap( -1 ); - m_staticText46->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 ); - - wxBoxSizer* bSizer154; - bSizer154 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextFilesRemaining->Wrap( -1 ); - m_staticTextFilesRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText117 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText117->Wrap( -1 ); - m_staticText117->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticText117, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataRemaining->Wrap( -1 ); - m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText118 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText118->Wrap( -1 ); - m_staticText118->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizer154->Add( m_staticText118, 0, wxALIGN_BOTTOM, 5 ); - - bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); - - bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 ); - - bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - sSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText104->Wrap( -1 ); - m_staticText104->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSpeed->Wrap( -1 ); - m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL ); - - m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemFixed->Wrap( -1 ); - m_staticTextTimeRemFixed->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextRemTime = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRemTime->Wrap( -1 ); - m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - sSizerTimeRemaining->Add( m_staticTextRemTime, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticText* m_staticText37; - m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText37->Wrap( -1 ); - m_staticText37->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - - bSizer40->Add( 0, 0, 1, wxEXPAND, 5 ); - - this->SetSizer( bSizer40 ); - this->Layout(); - bSizer40->Fit( this ); + wxBoxSizer* bSizer40; + bSizer40 = new wxBoxSizer( wxVERTICAL ); + + + bSizer40->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer48; + bSizer48 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText30 = new wxStaticText( this, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText30->Wrap( -1 ); + m_staticText30->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer48->Add( m_staticText30, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + m_textCtrlStatus->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer48->Add( m_textCtrlStatus, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer40->Add( bSizer48, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_gauge2 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL|wxGA_SMOOTH ); + bSizer40->Add( m_gauge2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer157; + bSizer157 = new wxBoxSizer( wxVERTICAL ); + + bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText321 = new wxStaticText( this, wxID_ANY, _("Items found:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText321->Wrap( -1 ); + m_staticText321->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerFilesFound->Add( m_staticText321, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextScanned = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextScanned->Wrap( -1 ); + m_staticTextScanned->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerFilesFound->Add( m_staticTextScanned, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); + + bSizer157->Add( bSizerFilesFound, 0, 0, 5 ); + + bSizerFilesRemaining = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText46 = new wxStaticText( this, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText46->Wrap( -1 ); + m_staticText46->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerFilesRemaining->Add( m_staticText46, 0, wxALIGN_BOTTOM, 5 ); + + wxBoxSizer* bSizer154; + bSizer154 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticTextFilesRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFilesRemaining->Wrap( -1 ); + m_staticTextFilesRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticTextFilesRemaining, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText117 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText117->Wrap( -1 ); + m_staticText117->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticText117, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticTextDataRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataRemaining->Wrap( -1 ); + m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText118 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText118->Wrap( -1 ); + m_staticText118->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizer154->Add( m_staticText118, 0, wxALIGN_BOTTOM, 5 ); + + bSizerFilesRemaining->Add( bSizer154, 0, wxALIGN_BOTTOM|wxLEFT, 5 ); + + bSizer157->Add( bSizerFilesRemaining, 0, 0, 5 ); + + bSizer42->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + sSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText104 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText104->Wrap( -1 ); + m_staticText104->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + sSizerSpeed->Add( m_staticText104, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextSpeed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSpeed->Wrap( -1 ); + m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + sSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer42->Add( sSizerSpeed, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer42->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sSizerTimeRemaining = new wxBoxSizer( wxHORIZONTAL ); + + m_staticTextTimeRemFixed = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemFixed->Wrap( -1 ); + m_staticTextTimeRemFixed->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + sSizerTimeRemaining->Add( m_staticTextTimeRemFixed, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextRemTime = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRemTime->Wrap( -1 ); + m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + sSizerTimeRemaining->Add( m_staticTextRemTime, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer42->Add( sSizerTimeRemaining, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + sSizerTimeElapsed = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticText* m_staticText37; + m_staticText37 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText37->Wrap( -1 ); + m_staticText37->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + sSizerTimeElapsed->Add( m_staticText37, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextTimeElapsed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + sSizerTimeElapsed->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer42->Add( sSizerTimeElapsed, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer40->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + + bSizer40->Add( 0, 0, 1, wxEXPAND, 5 ); + + this->SetSizer( bSizer40 ); + this->Layout(); + bSizer40->Fit( this ); } CompareStatusGenerated::~CompareStatusGenerated() @@ -1105,525 +1001,529 @@ CompareStatusGenerated::~CompareStatusGenerated() BatchDlgGenerated::BatchDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 560,320 ), wxDefaultSize ); - - wxBoxSizer* bSizer54; - bSizer54 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer87; - bSizer87 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap27 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer87->Add( m_bitmap27, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer87->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer87->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Create a batch file for automated synchronization. To start in batch mode simply double-click the file or execute via command line: FreeFileSync.exe <ffs_batch file>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText44->Wrap( 460 ); - bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer87->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer54->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - m_listbook1 = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_DEFAULT ); - m_panelOverview = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer67; - bSizer67 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer120; - bSizer120 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer175; - bSizer175 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer241; - sbSizer241 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare") ), wxHORIZONTAL ); - - m_bpButtonCmpConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); - m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); - - sbSizer241->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); - - - sbSizer241->Add( 10, 0, 0, 0, 5 ); - - m_staticTextCmpVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCmpVariant->Wrap( -1 ); - m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - sbSizer241->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer175->Add( sbSizer241, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer175->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer26; - sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL ); - - m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 ); - - bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer175->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer252; - sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL ); - - m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSyncVariant->Wrap( -1 ); - m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - sbSizer252->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - sbSizer252->Add( 10, 0, 0, 0, 5 ); - - m_bpButtonSyncConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); - m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); - - sbSizer252->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); - - bSizer175->Add( sbSizer252, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer120->Add( bSizer175, 0, wxEXPAND, 5 ); - - - bSizer120->Add( 0, 5, 0, 0, 5 ); - - m_scrolledWindow6 = new wxScrolledWindow( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_scrolledWindow6->SetScrollRate( 5, 5 ); - wxBoxSizer* bSizer141; - bSizer141 = new wxBoxSizer( wxVERTICAL ); - - sbSizerMainPair = new wxBoxSizer( wxHORIZONTAL ); - - m_panelMainPair = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); - wxBoxSizer* bSizer147; - bSizer147 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer1361; - bSizer1361 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonAddPair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - bSizer1361->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - bSizer1361->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer147->Add( bSizer1361, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer143; - bSizer143 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer145; - bSizer145 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText532 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText532->Wrap( -1 ); - m_staticText532->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer145->Add( m_staticText532, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer145, 1, 0, 5 ); - - wxBoxSizer* bSizer146; - bSizer146 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText5411 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText5411->Wrap( -1 ); - m_staticText5411->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer146->Add( m_staticText5411, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer146, 1, 0, 5 ); - - bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_panelMainPair->SetSizer( bSizer147 ); - m_panelMainPair->Layout(); - bSizer147->Fit( m_panelMainPair ); - sbSizerMainPair->Add( m_panelMainPair, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxVERTICAL ); - - m_panelLeft = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1141; - bSizer1141 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - bSizer1141->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelLeft->SetSizer( bSizer1141 ); - m_panelLeft->Layout(); - bSizer1141->Fit( m_panelLeft ); - bSizer158->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelRight = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer115; - bSizer115 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelRight->SetSizer( bSizer115 ); - m_panelRight->Layout(); - bSizer115->Fit( m_panelRight ); - bSizer158->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizerMainPair->Add( bSizer158, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer177; - bSizer177 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonAltCompCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer177->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLocalFilter = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer177->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 ); - - m_bpButtonAltSyncCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer177->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizerMainPair->Add( bSizer177, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer141->Add( sbSizerMainPair, 0, wxEXPAND, 5 ); - - bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); - - bSizer141->Add( bSizerAddFolderPairs, 1, wxEXPAND, 5 ); - - m_scrolledWindow6->SetSizer( bSizer141 ); - m_scrolledWindow6->Layout(); - bSizer141->Fit( m_scrolledWindow6 ); - bSizer120->Add( m_scrolledWindow6, 1, wxEXPAND, 5 ); - - - bSizer120->Add( 0, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 10 ); - - m_panelOverview->SetSizer( bSizer67 ); - m_panelOverview->Layout(); - bSizer67->Fit( m_panelOverview ); - m_listbook1->AddPage( m_panelOverview, _("Overview"), true ); - m_panelBatchSettings = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer117; - bSizer117 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer172; - bSizer172 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer1722; - bSizer1722 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer24; - sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Status feedback") ), wxVERTICAL ); - - m_checkBoxShowProgress = new wxCheckBox( m_panelBatchSettings, wxID_ANY, _("Show progress dialog"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer24->Add( m_checkBoxShowProgress, 0, wxALL|wxEXPAND, 5 ); - - bSizer1722->Add( sbSizer24, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer1722->Add( 10, 0, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer25; - sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); - - wxArrayString m_choiceHandleErrorChoices; - m_choiceHandleError = new wxChoice( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); - m_choiceHandleError->SetSelection( 0 ); - sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer1722->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer172->Add( bSizer1722, 0, wxEXPAND, 5 ); - - - bSizer172->Add( 0, 5, 0, 0, 5 ); - - sbSizerLogfileDir = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Logging") ), wxVERTICAL ); - - wxBoxSizer* bSizer152; - bSizer152 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText96 = new wxStaticText( m_panelBatchSettings, wxID_ANY, _("Maximum number of log files:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText96->Wrap( -1 ); - bSizer152->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - - bSizer152->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_spinCtrlLogCountMax = new wxSpinCtrl( m_panelBatchSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer152->Add( m_spinCtrlLogCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizerLogfileDir->Add( bSizer152, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_panelLogfile = new wxPanel( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1721; - bSizer1721 = new wxBoxSizer( wxVERTICAL ); - - m_staticText94 = new wxStaticText( m_panelLogfile, wxID_ANY, _("Select log file directory:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText94->Wrap( -1 ); - bSizer1721->Add( m_staticText94, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - wxBoxSizer* bSizer170; - bSizer170 = new wxBoxSizer( wxHORIZONTAL ); - - m_comboBoxLogfileDir = new FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer170->Add( m_comboBoxLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLogfileDir = new zen::DirPickerCtrl( m_panelLogfile, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLogfileDir->SetToolTip( _("Select a folder") ); - - bSizer170->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer1721->Add( bSizer170, 0, wxEXPAND, 5 ); - - m_panelLogfile->SetSizer( bSizer1721 ); - m_panelLogfile->Layout(); - bSizer1721->Fit( m_panelLogfile ); - sbSizerLogfileDir->Add( m_panelLogfile, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer172->Add( sbSizerLogfileDir, 0, wxEXPAND, 5 ); - - bSizer117->Add( bSizer172, 1, wxEXPAND|wxALL, 10 ); - - m_panelBatchSettings->SetSizer( bSizer117 ); - m_panelBatchSettings->Layout(); - bSizer117->Fit( m_panelBatchSettings ); - m_listbook1->AddPage( m_panelBatchSettings, _("Batch settings"), false ); - #ifndef __WXGTK__ // Small icon style not supported in GTK - wxListView* m_listbook1ListView = m_listbook1->GetListView(); - long m_listbook1Flags = m_listbook1ListView->GetWindowStyleFlag(); - m_listbook1Flags = ( m_listbook1Flags & ~wxLC_ICON ) | wxLC_SMALL_ICON; - m_listbook1ListView->SetWindowStyleFlag( m_listbook1Flags ); - #endif - - bSizer54->Add( m_listbook1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxBoxSizer* bSizer68; - bSizer68 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonSave->SetDefault(); - m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer68->Add( m_buttonSave, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Load"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonLoad->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer68->Add( m_buttonLoad, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer54->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - this->SetSizer( bSizer54 ); - this->Layout(); - bSizer54->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); - m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); - m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); - m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_spinCtrlLogCountMax->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this ); - m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); - m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); - m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxSize( 560,320 ), wxDefaultSize ); + + wxBoxSizer* bSizer54; + bSizer54 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer87; + bSizer87 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap27 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer87->Add( m_bitmap27, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Batch job"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer87->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer87->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Create a batch file for automated synchronization. To start in batch mode simply double-click the file or execute via command line: FreeFileSync.exe <ffs_batch file>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText44->Wrap( 460 ); + bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer87->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer54->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + m_listbook1 = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_DEFAULT ); + m_panelOverview = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer67; + bSizer67 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer120; + bSizer120 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer175; + bSizer175 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer1701; + bSizer1701 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer241; + sbSizer241 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Compare") ), wxHORIZONTAL ); + + m_bpButtonCmpConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); + m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); + + sbSizer241->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); + + + sbSizer241->Add( 10, 0, 0, 0, 5 ); + + m_staticTextCmpVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCmpVariant->Wrap( -1 ); + m_staticTextCmpVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + m_staticTextCmpVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + sbSizer241->Add( m_staticTextCmpVariant, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer1701->Add( sbSizer241, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer175->Add( bSizer1701, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxStaticBoxSizer* sbSizer26; + sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Filter files") ), wxVERTICAL ); + + m_bpButtonFilter = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + sbSizer26->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 15 ); + + bSizer175->Add( sbSizer26, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer171; + bSizer171 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer252; + sbSizer252 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Synchronize...") ), wxHORIZONTAL ); + + m_staticTextSyncVariant = new wxStaticText( m_panelOverview, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSyncVariant->Wrap( -1 ); + m_staticTextSyncVariant->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + m_staticTextSyncVariant->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + sbSizer252->Add( m_staticTextSyncVariant, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer252->Add( 10, 0, 0, 0, 5 ); + + m_bpButtonSyncConfig = new wxBitmapButton( m_panelOverview, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,42 ), wxBU_AUTODRAW ); + m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); + + sbSizer252->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL, 3 ); + + bSizer171->Add( sbSizer252, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + bSizer175->Add( bSizer171, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer120->Add( bSizer175, 0, wxEXPAND, 5 ); + + + bSizer120->Add( 0, 5, 0, 0, 5 ); + + m_scrolledWindow6 = new wxScrolledWindow( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWindow6->SetScrollRate( 5, 5 ); + wxBoxSizer* bSizer141; + bSizer141 = new wxBoxSizer( wxVERTICAL ); + + sbSizerMainPair = new wxBoxSizer( wxHORIZONTAL ); + + m_panelMainPair = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); + wxBoxSizer* bSizer147; + bSizer147 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer1361; + bSizer1361 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonAddPair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + bSizer1361->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panelMainPair, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer1361->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer147->Add( bSizer1361, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer143; + bSizer143 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer145; + bSizer145 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText532 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText532->Wrap( -1 ); + m_staticText532->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer145->Add( m_staticText532, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer145, 1, 0, 5 ); + + wxBoxSizer* bSizer146; + bSizer146 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText5411 = new wxStaticText( m_panelMainPair, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5411->Wrap( -1 ); + m_staticText5411->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer146->Add( m_staticText5411, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer146, 1, 0, 5 ); + + bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_panelMainPair->SetSizer( bSizer147 ); + m_panelMainPair->Layout(); + bSizer147->Fit( m_panelMainPair ); + sbSizerMainPair->Add( m_panelMainPair, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxVERTICAL ); + + m_panelLeft = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1141; + bSizer1141 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + bSizer1141->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelLeft->SetSizer( bSizer1141 ); + m_panelLeft->Layout(); + bSizer1141->Fit( m_panelLeft ); + bSizer158->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelRight = new wxPanel( m_scrolledWindow6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer115; + bSizer115 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelRight->SetSizer( bSizer115 ); + m_panelRight->Layout(); + bSizer115->Fit( m_panelRight ); + bSizer158->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizerMainPair->Add( bSizer158, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer177; + bSizer177 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonAltCompCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer177->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLocalFilter = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer177->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 ); + + m_bpButtonAltSyncCfg = new wxBitmapButton( m_scrolledWindow6, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer177->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizerMainPair->Add( bSizer177, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer141->Add( sbSizerMainPair, 0, wxEXPAND, 5 ); + + bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); + + bSizer141->Add( bSizerAddFolderPairs, 1, wxEXPAND, 5 ); + + m_scrolledWindow6->SetSizer( bSizer141 ); + m_scrolledWindow6->Layout(); + bSizer141->Fit( m_scrolledWindow6 ); + bSizer120->Add( m_scrolledWindow6, 1, wxEXPAND, 5 ); + + + bSizer120->Add( 0, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 10 ); + + m_panelOverview->SetSizer( bSizer67 ); + m_panelOverview->Layout(); + bSizer67->Fit( m_panelOverview ); + m_listbook1->AddPage( m_panelOverview, _("Overview"), true ); + m_panelBatchSettings = new wxPanel( m_listbook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer117; + bSizer117 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer172; + bSizer172 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer1722; + bSizer1722 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer24; + sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Status feedback") ), wxVERTICAL ); + + m_checkBoxShowProgress = new wxCheckBox( m_panelBatchSettings, wxID_ANY, _("Show progress dialog"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer24->Add( m_checkBoxShowProgress, 0, wxALL|wxEXPAND, 5 ); + + bSizer1722->Add( sbSizer24, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer1722->Add( 10, 0, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer25; + sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); + + wxArrayString m_choiceHandleErrorChoices; + m_choiceHandleError = new wxChoice( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); + m_choiceHandleError->SetSelection( 0 ); + sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer1722->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + bSizer172->Add( bSizer1722, 0, wxEXPAND, 5 ); + + + bSizer172->Add( 0, 5, 0, 0, 5 ); + + sbSizerLogfileDir = new wxStaticBoxSizer( new wxStaticBox( m_panelBatchSettings, wxID_ANY, _("Logging") ), wxVERTICAL ); + + wxBoxSizer* bSizer152; + bSizer152 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText96 = new wxStaticText( m_panelBatchSettings, wxID_ANY, _("Maximum number of log files:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText96->Wrap( -1 ); + bSizer152->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + bSizer152->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_spinCtrlLogCountMax = new wxSpinCtrl( m_panelBatchSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer152->Add( m_spinCtrlLogCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizerLogfileDir->Add( bSizer152, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_panelLogfile = new wxPanel( m_panelBatchSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1721; + bSizer1721 = new wxBoxSizer( wxVERTICAL ); + + m_staticText94 = new wxStaticText( m_panelLogfile, wxID_ANY, _("Select log file directory:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText94->Wrap( -1 ); + bSizer1721->Add( m_staticText94, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + wxBoxSizer* bSizer170; + bSizer170 = new wxBoxSizer( wxHORIZONTAL ); + + m_comboBoxLogfileDir = new FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer170->Add( m_comboBoxLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLogfileDir = new zen::DirPickerCtrl( m_panelLogfile, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLogfileDir->SetToolTip( _("Select a folder") ); + + bSizer170->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer1721->Add( bSizer170, 0, wxEXPAND, 5 ); + + m_panelLogfile->SetSizer( bSizer1721 ); + m_panelLogfile->Layout(); + bSizer1721->Fit( m_panelLogfile ); + sbSizerLogfileDir->Add( m_panelLogfile, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer172->Add( sbSizerLogfileDir, 0, wxEXPAND, 5 ); + + bSizer117->Add( bSizer172, 1, wxEXPAND|wxALL, 10 ); + + m_panelBatchSettings->SetSizer( bSizer117 ); + m_panelBatchSettings->Layout(); + bSizer117->Fit( m_panelBatchSettings ); + m_listbook1->AddPage( m_panelBatchSettings, _("Batch settings"), false ); +#ifndef __WXGTK__ // Small icon style not supported in GTK + wxListView* m_listbook1ListView = m_listbook1->GetListView(); + long m_listbook1Flags = m_listbook1ListView->GetWindowStyleFlag(); + m_listbook1Flags = ( m_listbook1Flags & ~wxLC_ICON ) | wxLC_SMALL_ICON; + m_listbook1ListView->SetWindowStyleFlag( m_listbook1Flags ); +#endif + + bSizer54->Add( m_listbook1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer68; + bSizer68 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonSave = new wxButton( this, wxID_SAVE, _("&Save"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonSave->SetDefault(); + m_buttonSave->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer68->Add( m_buttonSave, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonLoad = new wxButton( this, wxID_OPEN, _("&Load"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonLoad->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer68->Add( m_buttonLoad, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer68->Add( m_button6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer54->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + this->SetSizer( bSizer54 ); + this->Layout(); + bSizer54->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); + m_bpButtonCmpConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); + m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); + m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_spinCtrlLogCountMax->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this ); + m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); + m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); + m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); } BatchDlgGenerated::~BatchDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); - m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); - m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); - m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); - m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); - m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_spinCtrlLogCountMax->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this ); - m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); - m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); - m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::OnClose ) ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnHelp ), NULL, this ); + m_bpButtonCmpConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCmpSettings ), NULL, this ); + m_bpButtonFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnConfigureFilter ), NULL, this ); + m_bpButtonSyncConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSyncSettings ), NULL, this ); + m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnRemoveTopFolderPair ), NULL, this ); + m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BatchDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_spinCtrlLogCountMax->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BatchDlgGenerated::OnChangeMaxLogCountTxt ), NULL, this ); + m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnSaveBatchJob ), NULL, this ); + m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnLoadBatchJob ), NULL, this ); + m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCancel ), NULL, this ); + } BatchFolderPairGenerated::BatchFolderPairGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { - wxBoxSizer* bSizer142; - bSizer142 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer140; - bSizer140 = new wxBoxSizer( wxHORIZONTAL ); - - m_panel32 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); - wxBoxSizer* bSizer147; - bSizer147 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer136; - bSizer136 = new wxBoxSizer( wxVERTICAL ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panel32, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - bSizer136->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer147->Add( bSizer136, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer143; - bSizer143 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer145; - bSizer145 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText53 = new wxStaticText( m_panel32, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText53->Wrap( -1 ); - m_staticText53->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer145->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer145, 1, 0, 5 ); - - wxBoxSizer* bSizer146; - bSizer146 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText541 = new wxStaticText( m_panel32, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText541->Wrap( -1 ); - m_staticText541->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer146->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer143->Add( bSizer146, 1, 0, 5 ); - - bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_panel32->SetSizer( bSizer147 ); - m_panel32->Layout(); - bSizer147->Fit( m_panel32 ); - bSizer140->Add( m_panel32, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer144; - bSizer144 = new wxBoxSizer( wxVERTICAL ); - - m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer114; - bSizer114 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLeft->SetToolTip( _("Select a folder") ); - - bSizer114->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelLeft->SetSizer( bSizer114 ); - m_panelLeft->Layout(); - bSizer114->Fit( m_panelLeft ); - bSizer144->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer115; - bSizer115 = new wxBoxSizer( wxHORIZONTAL ); - - m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerRight->SetToolTip( _("Select a folder") ); - - bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelRight->SetSizer( bSizer115 ); - m_panelRight->Layout(); - bSizer115->Fit( m_panelRight ); - bSizer144->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer140->Add( bSizer144, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer176; - bSizer176 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonAltCompCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer176->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLocalFilter = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer176->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 ); - - m_bpButtonAltSyncCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer176->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer140->Add( bSizer176, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer142->Add( bSizer140, 0, wxEXPAND, 5 ); - - - bSizer142->Add( 0, 5, 0, 0, 5 ); - - this->SetSizer( bSizer142 ); - this->Layout(); - bSizer142->Fit( this ); + wxBoxSizer* bSizer142; + bSizer142 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer140; + bSizer140 = new wxBoxSizer( wxHORIZONTAL ); + + m_panel32 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER ); + wxBoxSizer* bSizer147; + bSizer147 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer136; + bSizer136 = new wxBoxSizer( wxVERTICAL ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panel32, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer136->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer147->Add( bSizer136, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer143; + bSizer143 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer145; + bSizer145 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText53 = new wxStaticText( m_panel32, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText53->Wrap( -1 ); + m_staticText53->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer145->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer145, 1, 0, 5 ); + + wxBoxSizer* bSizer146; + bSizer146 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText541 = new wxStaticText( m_panel32, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText541->Wrap( -1 ); + m_staticText541->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer146->Add( m_staticText541, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer143->Add( bSizer146, 1, 0, 5 ); + + bSizer147->Add( bSizer143, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_panel32->SetSizer( bSizer147 ); + m_panel32->Layout(); + bSizer147->Fit( m_panel32 ); + bSizer140->Add( m_panel32, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer144; + bSizer144 = new wxBoxSizer( wxVERTICAL ); + + m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer114; + bSizer114 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryLeft = new FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new zen::DirPickerCtrl( m_panelLeft, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLeft->SetToolTip( _("Select a folder") ); + + bSizer114->Add( m_dirPickerLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelLeft->SetSizer( bSizer114 ); + m_panelLeft->Layout(); + bSizer114->Fit( m_panelLeft ); + bSizer144->Add( m_panelLeft, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer115; + bSizer115 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryRight = new FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new zen::DirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer115->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelRight->SetSizer( bSizer115 ); + m_panelRight->Layout(); + bSizer115->Fit( m_panelRight ); + bSizer144->Add( m_panelRight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer140->Add( bSizer144, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer176; + bSizer176 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonAltCompCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer176->Add( m_bpButtonAltCompCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLocalFilter = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer176->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 3 ); + + m_bpButtonAltSyncCfg = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer176->Add( m_bpButtonAltSyncCfg, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer140->Add( bSizer176, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer142->Add( bSizer140, 0, wxEXPAND, 5 ); + + + bSizer142->Add( 0, 5, 0, 0, 5 ); + + this->SetSizer( bSizer142 ); + this->Layout(); + bSizer142->Fit( this ); } BatchFolderPairGenerated::~BatchFolderPairGenerated() @@ -1632,2145 +1532,2140 @@ BatchFolderPairGenerated::~BatchFolderPairGenerated() SyncCfgDlgGenerated::SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer181; - bSizer181 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer29; - bSizer29 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer7; - sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Select variant:") ), wxVERTICAL ); - - wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 4, 3, 8, 5 ); - fgSizer1->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_radioBtnAutomatic = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnAutomatic->SetValue( true ); - m_radioBtnAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_radioBtnAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonAutomatic = new wxButton( this, wxID_ANY, _("<Automatic>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_buttonAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText81 = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText81->Wrap( 410 ); - fgSizer1->Add( m_staticText81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_radioBtnMirror = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_radioBtnMirror, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonOneWay = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOneWay->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8->Wrap( 410 ); - fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_radioBtnUpdate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_radioBtnUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonUpdate = new wxButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_buttonUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText101 = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( 410 ); - fgSizer1->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_radioBtnCustom = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonUpdate1 = new wxButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonUpdate1->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer1->Add( m_buttonUpdate1, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText9->Wrap( 410 ); - fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - sbSizer7->Add( fgSizer1, 0, 0, 5 ); - - bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 ); - - - bSizer29->Add( 0, 5, 1, 0, 5 ); - - sbSizerCustDelDir = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxHORIZONTAL ); - - wxArrayString m_choiceHandleDeletionChoices; - m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 ); - m_choiceHandleDeletion->SetSelection( 0 ); - sbSizerCustDelDir->Add( m_choiceHandleDeletion, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1151; - bSizer1151 = new wxBoxSizer( wxHORIZONTAL ); - - m_customDelFolder = new FolderHistoryBox( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer1151->Add( m_customDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerCustomDelFolder = new zen::DirPickerCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer1151->Add( m_dirPickerCustomDelFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelCustomDeletionDir->SetSizer( bSizer1151 ); - m_panelCustomDeletionDir->Layout(); - bSizer1151->Fit( m_panelCustomDeletionDir ); - sbSizerCustDelDir->Add( m_panelCustomDeletionDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer29->Add( sbSizerCustDelDir, 0, wxEXPAND, 5 ); - - bSizer201 = new wxBoxSizer( wxHORIZONTAL ); - - sbSizerErrorHandling = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); - - wxArrayString m_choiceHandleErrorChoices; - m_choiceHandleError = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); - m_choiceHandleError->SetSelection( 0 ); - sbSizerErrorHandling->Add( m_choiceHandleError, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer201->Add( sbSizerErrorHandling, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 ); - - sbSizerExecFinished = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("On completion:") ), wxHORIZONTAL ); - - m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer201->Add( sbSizerExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer29->Add( bSizer201, 0, wxEXPAND|wxTOP, 5 ); - - bSizer181->Add( bSizer29, 0, wxEXPAND, 5 ); - - - bSizer181->Add( 10, 0, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer2453245; - sbSizer2453245 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); - - - sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bitmapDatabase = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 70,70 ), 0 ); - sbSizer2453245->Add( m_bitmapDatabase, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); - - sbSizerSyncDirections = new wxBoxSizer( wxVERTICAL ); - - wxGridSizer* gSizer3; - gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); - - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - m_staticText21->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText31->Wrap( -1 ); - m_staticText31->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - sbSizerSyncDirections->Add( gSizer3, 0, wxBOTTOM|wxEXPAND, 5 ); - - wxBoxSizer* bSizer121; - bSizer121 = new wxBoxSizer( wxVERTICAL ); - - bSizerLeftOnly = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftOnly->SetToolTip( _("File/folder exists on left side only") ); - - bSizerLeftOnly->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerLeftOnly->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizerLeftOnly->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizerLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizerRightOnly = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightOnly->SetToolTip( _("File/folder exists on right side only") ); - - bSizerRightOnly->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerRightOnly->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizerRightOnly->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizerRightOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizerLeftNewer = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftNewer->SetToolTip( _("Left file is newer") ); - - bSizerLeftNewer->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerLeftNewer->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizerLeftNewer->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizerLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizerRightNewer = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightNewer->SetToolTip( _("Right file is newer") ); - - bSizerRightNewer->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerRightNewer->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizerRightNewer->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizerRightNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizerDifferent = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapDifferent->SetToolTip( _("Files have different content") ); - - bSizerDifferent->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerDifferent->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizerDifferent->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizerDifferent, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizerConflict = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapConflict->SetToolTip( _("Conflict/file cannot be categorized") ); - - bSizerConflict->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerConflict->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizerConflict->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizerConflict, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - sbSizer2453245->Add( sbSizerSyncDirections, 0, wxEXPAND, 5 ); - - - sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer181->Add( sbSizer2453245, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer7->Add( bSizer181, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - wxBoxSizer* bSizer291; - bSizer291 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer7->Add( bSizer291, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); - - this->SetSizer( bSizer7 ); - this->Layout(); - bSizer7->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); - m_radioBtnAutomatic->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_buttonAutomatic->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_buttonAutomatic->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this ); - m_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); - m_radioBtnUpdate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this ); - m_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); - m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); - m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); - m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); - m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer29; + bSizer29 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer7; + sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Select variant:") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 4, 3, 8, 5 ); + fgSizer1->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_radioBtnAutomatic = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnAutomatic->SetValue( true ); + m_radioBtnAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_radioBtnAutomatic, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonAutomatic = new wxButton( this, wxID_ANY, _("<Automatic>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonAutomatic->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_buttonAutomatic, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText81 = new wxStaticText( this, wxID_ANY, _("Identify and propagate changes on both sides using a database. Deletions, renaming and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( 410 ); + fgSizer1->Add( m_staticText81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_radioBtnMirror = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnMirror->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_radioBtnMirror, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonOneWay = new wxButton( this, wxID_ANY, _("Mirror ->>"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOneWay->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_buttonOneWay, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText8 = new wxStaticText( this, wxID_ANY, _("Mirror backup of left folder. Right folder is modified to exactly match left folder after synchronization."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8->Wrap( 410 ); + fgSizer1->Add( m_staticText8, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_radioBtnUpdate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_radioBtnUpdate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonUpdate = new wxButton( this, wxID_ANY, _("Update ->"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonUpdate->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_buttonUpdate, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText101 = new wxStaticText( this, wxID_ANY, _("Copy new or updated files to right folder."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( 410 ); + fgSizer1->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_radioBtnCustom = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnCustom->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonUpdate1 = new wxButton( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonUpdate1->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer1->Add( m_buttonUpdate1, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( 410 ); + fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + sbSizer7->Add( fgSizer1, 0, 0, 5 ); + + bSizer29->Add( sbSizer7, 0, wxEXPAND, 5 ); + + + bSizer29->Add( 0, 5, 1, 0, 5 ); + + sbSizerCustDelDir = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxHORIZONTAL ); + + wxArrayString m_choiceHandleDeletionChoices; + m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 ); + m_choiceHandleDeletion->SetSelection( 0 ); + sbSizerCustDelDir->Add( m_choiceHandleDeletion, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1151; + bSizer1151 = new wxBoxSizer( wxHORIZONTAL ); + + m_customDelFolder = new FolderHistoryBox( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer1151->Add( m_customDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerCustomDelFolder = new zen::DirPickerCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1151->Add( m_dirPickerCustomDelFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelCustomDeletionDir->SetSizer( bSizer1151 ); + m_panelCustomDeletionDir->Layout(); + bSizer1151->Fit( m_panelCustomDeletionDir ); + sbSizerCustDelDir->Add( m_panelCustomDeletionDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer29->Add( sbSizerCustDelDir, 0, wxEXPAND, 5 ); + + bSizer201 = new wxBoxSizer( wxHORIZONTAL ); + + sbSizerErrorHandling = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); + + wxArrayString m_choiceHandleErrorChoices; + m_choiceHandleError = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); + m_choiceHandleError->SetSelection( 0 ); + sbSizerErrorHandling->Add( m_choiceHandleError, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer201->Add( sbSizerErrorHandling, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 ); + + sbSizerExecFinished = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("On completion:") ), wxHORIZONTAL ); + + m_comboBoxExecFinished = new ExecFinishedBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + sbSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer201->Add( sbSizerExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer29->Add( bSizer201, 0, wxEXPAND|wxTOP, 5 ); + + bSizer181->Add( bSizer29, 0, wxEXPAND, 5 ); + + + bSizer181->Add( 10, 0, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer2453245; + sbSizer2453245 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), wxVERTICAL ); + + + sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bitmapDatabase = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 70,70 ), 0 ); + sbSizer2453245->Add( m_bitmapDatabase, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); + + sbSizerSyncDirections = new wxBoxSizer( wxVERTICAL ); + + wxGridSizer* gSizer3; + gSizer3 = new wxGridSizer( 1, 2, 0, 5 ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Category"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + m_staticText21->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + gSizer3->Add( m_staticText21, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText31 = new wxStaticText( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText31->Wrap( -1 ); + m_staticText31->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + gSizer3->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + sbSizerSyncDirections->Add( gSizer3, 0, wxBOTTOM|wxEXPAND, 5 ); + + wxBoxSizer* bSizer121; + bSizer121 = new wxBoxSizer( wxVERTICAL ); + + bSizerLeftOnly = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapLeftOnly->SetToolTip( _("File/folder exists on left side only") ); + + bSizerLeftOnly->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerLeftOnly->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizerLeftOnly->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizerLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizerRightOnly = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapRightOnly->SetToolTip( _("File/folder exists on right side only") ); + + bSizerRightOnly->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerRightOnly->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizerRightOnly->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizerRightOnly, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizerLeftNewer = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapLeftNewer->SetToolTip( _("Left file is newer") ); + + bSizerLeftNewer->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerLeftNewer->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizerLeftNewer->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizerLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizerRightNewer = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapRightNewer->SetToolTip( _("Right file is newer") ); + + bSizerRightNewer->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerRightNewer->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizerRightNewer->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizerRightNewer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizerDifferent = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapDifferent->SetToolTip( _("Files have different content") ); + + bSizerDifferent->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerDifferent->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizerDifferent->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizerDifferent, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizerConflict = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapConflict->SetToolTip( _("Conflict/file cannot be categorized") ); + + bSizerConflict->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerConflict->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizerConflict->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizerConflict, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + sbSizer2453245->Add( sbSizerSyncDirections, 0, wxEXPAND, 5 ); + + + sbSizer2453245->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer181->Add( sbSizer2453245, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer7->Add( bSizer181, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer291->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer291->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer7->Add( bSizer291, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); + + this->SetSizer( bSizer7 ); + this->Layout(); + bSizer7->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); + m_radioBtnAutomatic->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_buttonAutomatic->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_buttonAutomatic->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this ); + m_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); + m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); + m_buttonOneWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); + m_radioBtnUpdate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this ); + m_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_buttonUpdate1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_buttonUpdate1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); + m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); + m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); + m_bpButtonConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); + m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); } SyncCfgDlgGenerated::~SyncCfgDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); - m_radioBtnAutomatic->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_buttonAutomatic->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); - m_buttonAutomatic->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this ); - m_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); - m_buttonOneWay->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); - m_radioBtnUpdate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); - m_buttonUpdate->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this ); - m_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_buttonUpdate1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); - m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); - m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); - m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); - m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); - m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); - m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); - m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); - m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncCfgDlgGenerated::OnClose ) ); + m_radioBtnAutomatic->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_buttonAutomatic->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncAutomatic ), NULL, this ); + m_buttonAutomatic->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncAutomaticDouble ), NULL, this ); + m_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); + m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncMirror ), NULL, this ); + m_buttonOneWay->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncMirrorDouble ), NULL, this ); + m_radioBtnUpdate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncUpdate ), NULL, this ); + m_buttonUpdate->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncUpdateDouble ), NULL, this ); + m_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_buttonUpdate1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_buttonUpdate1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SyncCfgDlgGenerated::OnSyncCustomDouble ), NULL, this ); + m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), NULL, this ); + m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_bpButtonLeftOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExLeftSideOnly ), NULL, this ); + m_bpButtonRightOnly->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnExRightSideOnly ), NULL, this ); + m_bpButtonLeftNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnLeftNewer ), NULL, this ); + m_bpButtonRightNewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnRightNewer ), NULL, this ); + m_bpButtonDifferent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnDifferent ), NULL, this ); + m_bpButtonConflict->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnConflict ), NULL, this ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnApply ), NULL, this ); + m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnCancel ), NULL, this ); + } CmpCfgDlgGenerated::CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer136; - bSizer136 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer55; - bSizer55 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer6; - sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer16; - fgSizer16 = new wxFlexGridSizer( 2, 3, 0, 0 ); - fgSizer16->SetFlexibleDirection( wxBOTH ); - fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnSizeDate->SetValue( true ); - m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") ); - - fgSizer16->Add( m_radioBtnSizeDate, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapByTime->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") ); - - fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,42 ), 0 ); - m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") ); - - fgSizer16->Add( m_buttonTimeSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); - - m_radioBtnContent = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); - - fgSizer16->Add( m_radioBtnContent, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); - - fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonContent = new wxButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,42 ), 0 ); - m_buttonContent->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - m_buttonContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); - - fgSizer16->Add( m_buttonContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - sbSizer6->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 ); - - - bSizer55->Add( 0, 4, 0, 0, 5 ); - - wxBoxSizer* bSizer177; - bSizer177 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer25; - sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Symbolic Link handling") ), wxVERTICAL ); - - wxArrayString m_choiceHandleSymlinksChoices; - m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 ); - m_choiceHandleSymlinks->SetSelection( -1 ); - sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer177->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer177->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer55->Add( bSizer177, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer22; - bSizer22 = new wxBoxSizer( wxHORIZONTAL ); - - m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button10->SetDefault(); - m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer55->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer136->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - this->SetSizer( bSizer136 ); - this->Layout(); - bSizer136->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); - m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_buttonTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_buttonTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this ); - m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this ); - m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); - m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); - m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer136; + bSizer136 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer55; + bSizer55 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer6; + sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Compare by...") ), wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer16; + fgSizer16 = new wxFlexGridSizer( 2, 3, 0, 0 ); + fgSizer16->SetFlexibleDirection( wxBOTH ); + fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_radioBtnSizeDate = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnSizeDate->SetValue( true ); + m_radioBtnSizeDate->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") ); + + fgSizer16->Add( m_radioBtnSizeDate, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapByTime = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapByTime->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") ); + + fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,42 ), 0 ); + m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - last write time and date\n - file size\nare the same") ); + + fgSizer16->Add( m_buttonTimeSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 ); + + m_radioBtnContent = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); + + fgSizer16->Add( m_radioBtnContent, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapByContent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapByContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); + + fgSizer16->Add( m_bitmapByContent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonContent = new wxButton( this, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,42 ), 0 ); + m_buttonContent->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_buttonContent->SetToolTip( _("Files are found equal if\n - file content\nis the same") ); + + fgSizer16->Add( m_buttonContent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + sbSizer6->Add( fgSizer16, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 ); + + + bSizer55->Add( 0, 4, 0, 0, 5 ); + + wxBoxSizer* bSizer177; + bSizer177 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer25; + sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Symbolic Link handling") ), wxVERTICAL ); + + wxArrayString m_choiceHandleSymlinksChoices; + m_choiceHandleSymlinks = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleSymlinksChoices, 0 ); + m_choiceHandleSymlinks->SetSelection( -1 ); + sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer177->Add( sbSizer25, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + bSizer177->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer55->Add( bSizer177, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxHORIZONTAL ); + + m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button10->SetDefault(); + m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_button6 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button6->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer22->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer55->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer136->Add( bSizer55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + this->SetSizer( bSizer136 ); + this->Layout(); + bSizer136->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); + m_radioBtnSizeDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_buttonTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_buttonTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this ); + m_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this ); + m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); + m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); + m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); } CmpCfgDlgGenerated::~CmpCfgDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); - m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_buttonTimeSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); - m_buttonTimeSize->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this ); - m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this ); - m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); - m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); - m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CmpCfgDlgGenerated::OnClose ) ); + m_radioBtnSizeDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_buttonTimeSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnTimeSize ), NULL, this ); + m_buttonTimeSize->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnTimeSizeDouble ), NULL, this ); + m_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( CmpCfgDlgGenerated::OnContentDouble ), NULL, this ); + m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); + m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnOkay ), NULL, this ); + m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnCancel ), NULL, this ); + } SyncStatusDlgGenerated::SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 470,200 ), wxDefaultSize ); - - wxBoxSizer* bSizer172; - bSizer172 = new wxBoxSizer( wxVERTICAL ); - - m_panelBackground = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizerTop = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer42; - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapStatus = new wxStaticBitmap( m_panelBackground, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); - bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - - m_staticTextStatus = new wxStaticText( m_panelBackground, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatus->Wrap( -1 ); - m_staticTextStatus->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) ); - - bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_animationControl1 = new wxAnimationCtrl( m_panelBackground, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE ); - m_animationControl1->SetMinSize( wxSize( 45,45 ) ); - - bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizerTop->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizerCurrentOperation = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText2511 = new wxStaticText( m_panelBackground, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2511->Wrap( -1 ); - m_staticText2511->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); - - bSizerCurrentOperation->Add( m_staticText2511, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlInfo = new wxTextCtrl( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizerCurrentOperation->Add( m_textCtrlInfo, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerTop->Add( bSizerCurrentOperation, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_panelProgress = new wxPanel( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - bSizer171 = new wxBoxSizer( wxHORIZONTAL ); - - bSizerProgressStat = new wxStaticBoxSizer( new wxStaticBox( m_panelProgress, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer10; - fgSizer10 = new wxFlexGridSizer( 0, 2, 0, 5 ); - fgSizer10->SetFlexibleDirection( wxBOTH ); - fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticTextItemsRem = new wxStaticText( m_panelProgress, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextItemsRem->Wrap( -1 ); - m_staticTextItemsRem->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - fgSizer10->Add( m_staticTextItemsRem, 0, wxALIGN_BOTTOM, 5 ); - - bSizerItemsRem = new wxBoxSizer( wxHORIZONTAL ); - - m_staticTextRemainingObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticTextRemainingObj->Wrap( -1 ); - m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerItemsRem->Add( m_staticTextRemainingObj, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText96 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText96->Wrap( -1 ); - m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerItemsRem->Add( m_staticText96, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticTextDataRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataRemaining->Wrap( -1 ); - m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerItemsRem->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText97 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText97->Wrap( -1 ); - m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerItemsRem->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 ); - - fgSizer10->Add( bSizerItemsRem, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextItemsProc = new wxStaticText( m_panelProgress, wxID_ANY, _("Items processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextItemsProc->Wrap( -1 ); - m_staticTextItemsProc->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - fgSizer10->Add( m_staticTextItemsProc, 0, wxALIGN_BOTTOM, 5 ); - - bSizerItemsProc = new wxBoxSizer( wxHORIZONTAL ); - - m_staticTextProcessedObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticTextProcessedObj->Wrap( -1 ); - m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerItemsProc->Add( m_staticTextProcessedObj, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText98 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText98->Wrap( -1 ); - m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerItemsProc->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticTextDataProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataProcessed->Wrap( -1 ); - m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerItemsProc->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText99->Wrap( -1 ); - m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerItemsProc->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 ); - - fgSizer10->Add( bSizerItemsProc, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextSpeedDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSpeedDescr->Wrap( -1 ); - m_staticTextSpeedDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - fgSizer10->Add( m_staticTextSpeedDescr, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextSpeed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSpeed->Wrap( -1 ); - m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - fgSizer10->Add( m_staticTextSpeed, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText55 = new wxStaticText( m_panelProgress, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText55->Wrap( -1 ); - m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - fgSizer10->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextTimeElapsed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - fgSizer10->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextRemTimeDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRemTimeDescr->Wrap( -1 ); - m_staticTextRemTimeDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - fgSizer10->Add( m_staticTextRemTimeDescr, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRemTime->Wrap( -1 ); - m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - fgSizer10->Add( m_staticTextRemTime, 0, wxALIGN_BOTTOM, 5 ); - - bSizerProgressStat->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer171->Add( bSizerProgressStat, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer171->Add( 10, 0, 0, 0, 5 ); - - m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelGraph->SetBackgroundColour( wxColour( 255, 255, 255 ) ); - - bSizer171->Add( m_panelGraph, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panelProgress->SetSizer( bSizer171 ); - m_panelProgress->Layout(); - bSizer171->Fit( m_panelProgress ); - bSizerTop->Add( m_panelProgress, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - bSizerFinalStat = new wxBoxSizer( wxVERTICAL ); - - m_listbookResult = new wxListbook( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP ); - wxSize m_listbookResultImageSize = wxSize( 180,1 ); - int m_listbookResultIndex = 0; - wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() ); - m_listbookResult->AssignImageList( m_listbookResultImages ); - wxBitmap m_listbookResultBitmap; - wxImage m_listbookResultImage; - - bSizerFinalStat->Add( m_listbookResult, 1, wxEXPAND, 5 ); - - bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_gauge1 = new wxGauge( m_panelBackground, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL ); - bSizerTop->Add( m_gauge1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - bSizerExecFinished = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText87 = new wxStaticText( m_panelBackground, wxID_ANY, _("On completion:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText87->Wrap( -1 ); - m_staticText87->SetFont( wxFont( 8, 74, 90, 90, false, wxT("MS Shell Dlg 2") ) ); - - bSizerExecFinished->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_comboBoxExecFinished = new ExecFinishedBox( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerTop->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bSizer28 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer28->Add( 0, 0, 1, 0, 5 ); - - m_buttonOK = new wxButton( m_panelBackground, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,30 ), 0 ); - m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - m_buttonOK->Enable( false ); - - bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_buttonPause = new wxButton( m_panelBackground, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,30 ), 0 ); - m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_buttonAbort = new wxButton( m_panelBackground, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,30 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - - bSizer28->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizerTop->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panelBackground->SetSizer( bSizerTop ); - m_panelBackground->Layout(); - bSizerTop->Fit( m_panelBackground ); - bSizer172->Add( m_panelBackground, 1, wxEXPAND, 5 ); - - this->SetSizer( bSizer172 ); - this->Layout(); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); - this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); - m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); + this->SetSizeHints( wxSize( 470,200 ), wxDefaultSize ); + + wxBoxSizer* bSizer172; + bSizer172 = new wxBoxSizer( wxVERTICAL ); + + m_panelBackground = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizerTop = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer42; + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapStatus = new wxStaticBitmap( m_panelBackground, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); + bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + m_staticTextStatus = new wxStaticText( m_panelBackground, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatus->Wrap( -1 ); + m_staticTextStatus->SetFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) ); + + bSizer42->Add( m_staticTextStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_animationControl1 = new wxAnimationCtrl( m_panelBackground, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE ); + m_animationControl1->SetMinSize( wxSize( 45,45 ) ); + + bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizerTop->Add( bSizer42, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizerCurrentOperation = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText2511 = new wxStaticText( m_panelBackground, wxID_ANY, _("Operation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2511->Wrap( -1 ); + m_staticText2511->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); + + bSizerCurrentOperation->Add( m_staticText2511, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlInfo = new wxTextCtrl( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizerCurrentOperation->Add( m_textCtrlInfo, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerTop->Add( bSizerCurrentOperation, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_panelProgress = new wxPanel( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizer171 = new wxBoxSizer( wxHORIZONTAL ); + + bSizerProgressStat = new wxStaticBoxSizer( new wxStaticBox( m_panelProgress, wxID_ANY, wxEmptyString ), wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer10; + fgSizer10 = new wxFlexGridSizer( 0, 2, 0, 5 ); + fgSizer10->SetFlexibleDirection( wxBOTH ); + fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextItemsRem = new wxStaticText( m_panelProgress, wxID_ANY, _("Items remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextItemsRem->Wrap( -1 ); + m_staticTextItemsRem->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + fgSizer10->Add( m_staticTextItemsRem, 0, wxALIGN_BOTTOM, 5 ); + + bSizerItemsRem = new wxBoxSizer( wxHORIZONTAL ); + + m_staticTextRemainingObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextRemainingObj->Wrap( -1 ); + m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerItemsRem->Add( m_staticTextRemainingObj, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText96 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText96->Wrap( -1 ); + m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerItemsRem->Add( m_staticText96, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticTextDataRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataRemaining->Wrap( -1 ); + m_staticTextDataRemaining->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerItemsRem->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText97 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText97->Wrap( -1 ); + m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerItemsRem->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 ); + + fgSizer10->Add( bSizerItemsRem, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextItemsProc = new wxStaticText( m_panelProgress, wxID_ANY, _("Items processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextItemsProc->Wrap( -1 ); + m_staticTextItemsProc->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + fgSizer10->Add( m_staticTextItemsProc, 0, wxALIGN_BOTTOM, 5 ); + + bSizerItemsProc = new wxBoxSizer( wxHORIZONTAL ); + + m_staticTextProcessedObj = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextProcessedObj->Wrap( -1 ); + m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerItemsProc->Add( m_staticTextProcessedObj, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText98 = new wxStaticText( m_panelProgress, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText98->Wrap( -1 ); + m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerItemsProc->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticTextDataProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataProcessed->Wrap( -1 ); + m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerItemsProc->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText99->Wrap( -1 ); + m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerItemsProc->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 ); + + fgSizer10->Add( bSizerItemsProc, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextSpeedDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSpeedDescr->Wrap( -1 ); + m_staticTextSpeedDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + fgSizer10->Add( m_staticTextSpeedDescr, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextSpeed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSpeed->Wrap( -1 ); + m_staticTextSpeed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + fgSizer10->Add( m_staticTextSpeed, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText55 = new wxStaticText( m_panelProgress, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText55->Wrap( -1 ); + m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + fgSizer10->Add( m_staticText55, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextTimeElapsed = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + fgSizer10->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextRemTimeDescr = new wxStaticText( m_panelProgress, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRemTimeDescr->Wrap( -1 ); + m_staticTextRemTimeDescr->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + fgSizer10->Add( m_staticTextRemTimeDescr, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextRemTime = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRemTime->Wrap( -1 ); + m_staticTextRemTime->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + fgSizer10->Add( m_staticTextRemTime, 0, wxALIGN_BOTTOM, 5 ); + + bSizerProgressStat->Add( fgSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer171->Add( bSizerProgressStat, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer171->Add( 10, 0, 0, 0, 5 ); + + m_panelGraph = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelGraph->SetBackgroundColour( wxColour( 255, 255, 255 ) ); + + bSizer171->Add( m_panelGraph, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panelProgress->SetSizer( bSizer171 ); + m_panelProgress->Layout(); + bSizer171->Fit( m_panelProgress ); + bSizerTop->Add( m_panelProgress, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + bSizerFinalStat = new wxBoxSizer( wxVERTICAL ); + + m_listbookResult = new wxListbook( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP ); + wxSize m_listbookResultImageSize = wxSize( 180,1 ); + int m_listbookResultIndex = 0; + wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() ); + m_listbookResult->AssignImageList( m_listbookResultImages ); + wxBitmap m_listbookResultBitmap; + wxImage m_listbookResultImage; + + bSizerFinalStat->Add( m_listbookResult, 1, wxEXPAND, 5 ); + + bSizerTop->Add( bSizerFinalStat, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_gauge1 = new wxGauge( m_panelBackground, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,14 ), wxGA_HORIZONTAL ); + bSizerTop->Add( m_gauge1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + bSizerExecFinished = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText87 = new wxStaticText( m_panelBackground, wxID_ANY, _("On completion:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText87->Wrap( -1 ); + m_staticText87->SetFont( wxFont( 8, 74, 90, 90, false, wxT("MS Shell Dlg 2") ) ); + + bSizerExecFinished->Add( m_staticText87, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_comboBoxExecFinished = new ExecFinishedBox( m_panelBackground, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizerExecFinished->Add( m_comboBoxExecFinished, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerTop->Add( bSizerExecFinished, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bSizer28 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer28->Add( 0, 0, 1, 0, 5 ); + + m_buttonOK = new wxButton( m_panelBackground, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,30 ), 0 ); + m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + m_buttonOK->Enable( false ); + + bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_buttonPause = new wxButton( m_panelBackground, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,30 ), 0 ); + m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_buttonAbort = new wxButton( m_panelBackground, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,30 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + + bSizer28->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizerTop->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_panelBackground->SetSizer( bSizerTop ); + m_panelBackground->Layout(); + bSizerTop->Fit( m_panelBackground ); + bSizer172->Add( m_panelBackground, 1, wxEXPAND, 5 ); + + this->SetSizer( bSizer172 ); + this->Layout(); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); + this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); + m_buttonPause->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); } SyncStatusDlgGenerated::~SyncStatusDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); - this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); - m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncStatusDlgGenerated::OnClose ) ); + this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( SyncStatusDlgGenerated::OnIconize ) ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnOkay ), NULL, this ); + m_buttonPause->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnPause ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncStatusDlgGenerated::OnAbort ), NULL, this ); + } LogControlGenerated::LogControlGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { - wxBoxSizer* bSizer153; - bSizer153 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer154; - bSizer154 = new wxBoxSizer( wxVERTICAL ); - - m_bpButtonErrors = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW ); - bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonWarnings = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW ); - bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_bpButtonInfo = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW ); - bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer153->Add( m_textCtrlInfo, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - this->SetSizer( bSizer153 ); - this->Layout(); - bSizer153->Fit( this ); - - // Connect Events - m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this ); - m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this ); - m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this ); + wxBoxSizer* bSizer153; + bSizer153 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer154; + bSizer154 = new wxBoxSizer( wxVERTICAL ); + + m_bpButtonErrors = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW ); + bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonWarnings = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW ); + bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_bpButtonInfo = new ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), wxBU_AUTODRAW ); + bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer153->Add( m_textCtrlInfo, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer153 ); + this->Layout(); + bSizer153->Fit( this ); + + // Connect Events + m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this ); + m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this ); + m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this ); } LogControlGenerated::~LogControlGenerated() { - // Disconnect Events - m_bpButtonErrors->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this ); - m_bpButtonWarnings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this ); - m_bpButtonInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this ); - + // Disconnect Events + m_bpButtonErrors->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnErrors ), NULL, this ); + m_bpButtonWarnings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnWarnings ), NULL, this ); + m_bpButtonInfo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogControlGenerated::OnInfo ), NULL, this ); + } AboutDlgGenerated::AboutDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer31; - bSizer31 = new wxBoxSizer( wxVERTICAL ); - - - bSizer31->Add( 0, 5, 0, 0, 5 ); - - m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel5->SetBackgroundColour( wxColour( 255, 255, 255 ) ); - - wxBoxSizer* bSizer36; - bSizer36 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap11 = new wxStaticBitmap( m_panel5, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 404,55 ), 0 ); - bSizer36->Add( m_bitmap11, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel5->SetSizer( bSizer36 ); - m_panel5->Layout(); - bSizer36->Fit( m_panel5 ); - bSizer31->Add( m_panel5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_build = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_build->Wrap( -1 ); - bSizer31->Add( m_build, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer31->Add( 0, 10, 0, 0, 5 ); - - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxVERTICAL ); - - m_panel33 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxTAB_TRAVERSAL ); - m_panel33->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizerCodeInfo = new wxBoxSizer( wxVERTICAL ); - - m_staticText72 = new wxStaticText( m_panel33, wxID_ANY, _("Source code written in C++ utilizing:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText72->Wrap( -1 ); - m_staticText72->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - - bSizerCodeInfo->Add( m_staticText72, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - wxBoxSizer* bSizer167; - bSizer167 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer171; - bSizer171 = new wxBoxSizer( wxHORIZONTAL ); - - m_hyperlink9 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MinGW"), wxT("http://www.mingw.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink9->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer171->Add( m_hyperlink9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink11 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("MS Visual C++"), wxT("http://msdn.microsoft.com/library/60k1461a.aspx"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink11->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer171->Add( m_hyperlink11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink10 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Code::Blocks"), wxT("http://www.codeblocks.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink10->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer171->Add( m_hyperlink10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink13 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Boost"), wxT("http://www.boost.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink13->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer171->Add( m_hyperlink13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink7 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxWidgets"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink7->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer171->Add( m_hyperlink7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink16 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Artistic Style"), wxT("http://astyle.sourceforge.net"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink16->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer171->Add( m_hyperlink16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - bSizer167->Add( bSizer171, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer172; - bSizer172 = new wxBoxSizer( wxHORIZONTAL ); - - m_hyperlink8 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Loki"), wxT("http://sourceforge.net/projects/loki-lib"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink8->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer172->Add( m_hyperlink8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink15 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("zenXML"), wxT("http://sourceforge.net/projects/zenxml/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink15->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer172->Add( m_hyperlink15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink12 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Google Test"), wxT("http://code.google.com/p/googletest"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink12->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer172->Add( m_hyperlink12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink18 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("Unicode NSIS"), wxT("http://www.scratchpaper.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink18->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer172->Add( m_hyperlink18, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_hyperlink14 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("wxFormBuilder"), wxT("http://wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink14->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer172->Add( m_hyperlink14, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - bSizer167->Add( bSizer172, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizerCodeInfo->Add( bSizer167, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_hyperlink21 = new wxHyperlinkCtrl( m_panel33, wxID_ANY, _("- ZenJu -"), wxT("mailto:zhnmju123@gmx.de"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink21->SetFont( wxFont( 10, 74, 93, 92, false, wxT("Segoe Print") ) ); - m_hyperlink21->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_hyperlink21->SetToolTip( _("zhnmju123@gmx.de") ); - - bSizerCodeInfo->Add( m_hyperlink21, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_panel33->SetSizer( bSizerCodeInfo ); - m_panel33->Layout(); - bSizerCodeInfo->Fit( m_panel33 ); - bSizer53->Add( m_panel33, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_scrolledWindowTranslators = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); - m_scrolledWindowTranslators->SetScrollRate( 5, 5 ); - m_scrolledWindowTranslators->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_scrolledWindowTranslators->SetMinSize( wxSize( -1,180 ) ); - - bSizerTranslators = new wxBoxSizer( wxVERTICAL ); - - m_staticText54 = new wxStaticText( m_scrolledWindowTranslators, wxID_ANY, _("Big thanks for localizing FreeFileSync goes out to:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText54->Wrap( -1 ); - m_staticText54->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizerTranslators->Add( m_staticText54, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); - - - bSizerTranslators->Add( 0, 5, 0, 0, 5 ); - - fgSizerTranslators = new wxFlexGridSizer( 50, 3, 5, 20 ); - fgSizerTranslators->SetFlexibleDirection( wxBOTH ); - fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - bSizerTranslators->Add( fgSizerTranslators, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_scrolledWindowTranslators->SetSizer( bSizerTranslators ); - m_scrolledWindowTranslators->Layout(); - bSizerTranslators->Fit( m_scrolledWindowTranslators ); - bSizer53->Add( m_scrolledWindowTranslators, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 5 ); - - bSizer31->Add( bSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 25 ); - - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - m_staticText131 = new wxStaticText( this, wxID_ANY, _("Feedback and suggestions are welcome at:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText131->Wrap( -1 ); - m_staticText131->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - bSizer31->Add( m_staticText131, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer156; - bSizer156 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - m_bitmap9->SetToolTip( _("FreeFileSync at Sourceforge") ); - - bSizer156->Add( m_bitmap9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Homepage"), wxT("http://sourceforge.net/projects/freefilesync/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink1->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - m_hyperlink1->SetToolTip( _("http://sourceforge.net/projects/freefilesync/") ); - - bSizer156->Add( m_hyperlink1, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_hyperlink3 = new wxHyperlinkCtrl( this, wxID_ANY, _("If you like FFS"), wxT("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zhnmju123@gmx.de&lc=US¤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 ); + 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 ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::OnClose ) ); + m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::OnOK ), NULL, this ); + } ErrorDlgGenerated::ErrorDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore subsequent errors"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") ); - - bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonIgnore = new wxButton( this, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonIgnore->SetDefault(); - m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - - bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); - m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); - m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer26; + bSizer26 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_checkBoxIgnoreErrors = new wxCheckBox( this, wxID_ANY, _("Ignore subsequent errors"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxIgnoreErrors->SetToolTip( _("Hide further error messages during the current process") ); + + bSizer24->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonIgnore = new wxButton( this, wxID_OK, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonIgnore->SetDefault(); + m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonRetry = new wxButton( this, wxID_RETRY, _("&Retry"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonRetry->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonRetry, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + + bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); + m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); + m_buttonRetry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); } ErrorDlgGenerated::~ErrorDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); - m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); - m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ErrorDlgGenerated::OnClose ) ); + m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnIgnore ), NULL, this ); + m_buttonRetry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnRetry ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ErrorDlgGenerated::OnAbort ), NULL, this ); + } WarningDlgGenerated::WarningDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonIgnore = new wxButton( this, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonIgnore->SetDefault(); - m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonSwitch->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - - bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); - m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); - m_buttonSwitch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); - m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer26; + bSizer26 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer24->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonIgnore = new wxButton( this, wxID_IGNORE, _("&Ignore"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonIgnore->SetDefault(); + m_buttonIgnore->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonIgnore, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonSwitch = new wxButton( this, wxID_MORE, _("&Switch"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonSwitch->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonSwitch, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonAbort, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + + bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); + m_buttonIgnore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); + m_buttonSwitch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); + m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); } WarningDlgGenerated::~WarningDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); - m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); - m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); - m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarningDlgGenerated::OnClose ) ); + m_buttonIgnore->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnIgnore ), NULL, this ); + m_buttonSwitch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnSwitch ), NULL, this ); + m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarningDlgGenerated::OnAbort ), NULL, this ); + } QuestionDlgGenerated::QuestionDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); - bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_checkBoxDontAskAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer24->Add( m_checkBoxDontAskAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonYes = new wxButton( this, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonYes->SetDefault(); - m_buttonYes->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonYes, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonNo = new wxButton( this, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonNo->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonNo, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonCancel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - - bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); - m_checkBoxDontAskAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this ); - m_buttonYes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); - m_buttonNo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer26; + bSizer26 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap10 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); + bSizer26->Add( m_bitmap10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrl8->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer26->Add( m_textCtrl8, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + bSizer24->Add( bSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_checkBoxDontAskAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer24->Add( m_checkBoxDontAskAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonYes = new wxButton( this, wxID_YES, _("&Yes"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonYes->SetDefault(); + m_buttonYes->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonYes, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonNo = new wxButton( this, wxID_NO, _("&No"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonNo->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonNo, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonCancel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + + bSizer25->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); + m_checkBoxDontAskAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this ); + m_buttonYes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); + m_buttonNo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); } QuestionDlgGenerated::~QuestionDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); - m_checkBoxDontAskAgain->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this ); - m_buttonYes->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); - m_buttonNo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDlgGenerated::OnClose ) ); + m_checkBoxDontAskAgain->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCheckBoxDontShowAgain ), NULL, this ); + m_buttonYes->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnYes ), NULL, this ); + m_buttonNo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnNo ), NULL, this ); + m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDlgGenerated::OnCancel ), NULL, this ); + } DeleteDlgGenerated::DeleteDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); - - - bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer41; - bSizer41 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer24->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlMessage->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer24->Add( m_textCtrlMessage, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - wxBoxSizer* bSizer99; - bSizer99 = new wxBoxSizer( wxHORIZONTAL ); - - m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") ); - - bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - - bSizer99->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxUseRecycler->SetValue(true); - bSizer99->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer25->Add( m_buttonCancel, 0, wxALL, 5 ); - - bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer24 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); - m_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); - m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + + bSizer24->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer41; + bSizer41 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer41->Add( m_bitmap12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + m_staticTextHeader->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer41->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer24->Add( bSizer41, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlMessage->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer24->Add( m_textCtrlMessage, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + wxBoxSizer* bSizer99; + bSizer99 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkBoxDeleteBothSides = new wxCheckBox( this, wxID_ANY, _("Delete on both sides"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxDeleteBothSides->SetToolTip( _("Delete on both sides even if the file is selected on one side only") ); + + bSizer99->Add( m_checkBoxDeleteBothSides, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + bSizer99->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("Use Recycle Bin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxUseRecycler->SetValue(true); + bSizer99->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonOK, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonCancel->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer25->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer24->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer24 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); + m_checkBoxDeleteBothSides->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); + m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); } DeleteDlgGenerated::~DeleteDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); - m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); - m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::OnClose ) ); + m_checkBoxDeleteBothSides->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnDelOnBothSides ), NULL, this ); + m_checkBoxUseRecycler->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnUseRecycler ), NULL, this ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnOK ), NULL, this ); + m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::OnCancel ), NULL, this ); + } FilterDlgGenerated::FilterDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 370,380 ), wxDefaultSize ); - - wxBoxSizer* bSizer21; - bSizer21 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer86; - bSizer86 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap26 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer86->Add( m_bitmap26, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticTexHeader = new wxStaticText( m_panel8, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTexHeader->Wrap( -1 ); - m_staticTexHeader->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer21->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxHORIZONTAL ); - - bSizer70->SetMinSize( wxSize( 550,-1 ) ); - - bSizer70->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that match all filter settings will be selected for synchronization.\nNote: The name filter must be specified relative(!) to main synchronization directories."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticText44->Wrap( 550 ); - bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer70->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 10 ); - - - bSizer21->Add( 0, 5, 0, 0, 5 ); - - m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer69; - bSizer69 = new wxBoxSizer( wxVERTICAL ); - - m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxVERTICAL ); - - m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText45->Wrap( -1 ); - m_staticText45->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - - bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 ); - - m_staticText83 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter relative file or directory names separated by ';' or a new line."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText83->Wrap( -1 ); - bSizer52->Add( m_staticText83, 0, 0, 5 ); - - m_staticText84 = new wxStaticText( m_panel13, wxID_ANY, _("2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - bSizer52->Add( m_staticText84, 0, 0, 5 ); - - m_staticText85 = new wxStaticText( m_panel13, wxID_ANY, _("3. Exclude files directly on main grid via context menu."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText85->Wrap( -1 ); - bSizer52->Add( m_staticText85, 0, 0, 5 ); - - bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); - - wxStaticBoxSizer* sbSizer21; - sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL ); - - wxBoxSizer* bSizer66; - bSizer66 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText181->Wrap( -1 ); - bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1811->Wrap( 250 ); - m_staticText1811->SetFont( wxFont( 8, 70, 93, 90, false, wxEmptyString ) ); - - bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_panel13->SetSizer( bSizer69 ); - m_panel13->Layout(); - bSizer69->Fit( m_panel13 ); - bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 ); - - - bSizer21->Add( 0, 0, 0, 0, 5 ); - - wxBoxSizer* bSizer159; - bSizer159 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer166; - bSizer166 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer8; - sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Include") ), wxHORIZONTAL ); - - m_bitmapInclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - sbSizer8->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); - - m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); - sbSizer8->Add( m_textCtrlInclude, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bSizer166->Add( sbSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer26; - sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Exclude") ), wxHORIZONTAL ); - - m_bitmapExclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - sbSizer26->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); - sbSizer26->Add( m_textCtrlExclude, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer166->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bSizer159->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer159->Add( 5, 0, 0, 0, 5 ); - - wxBoxSizer* bSizer160; - bSizer160 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer25; - sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Date") ), wxHORIZONTAL ); - - wxBoxSizer* bSizer169; - bSizer169 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapFilterDate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 34,34 ), 0 ); - bSizer169->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - wxBoxSizer* bSizer165; - bSizer165 = new wxBoxSizer( wxVERTICAL ); - - m_staticText103 = new wxStaticText( this, wxID_ANY, _("Select time span"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText103->Wrap( -1 ); - bSizer165->Add( m_staticText103, 0, 0, 5 ); - - wxBoxSizer* bSizer164; - bSizer164 = new wxBoxSizer( wxVERTICAL ); - - wxArrayString m_choiceUnitTimespanChoices; - m_choiceUnitTimespan = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 ); - m_choiceUnitTimespan->SetSelection( 0 ); - bSizer164->Add( m_choiceUnitTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_spinCtrlTimespan = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - m_spinCtrlTimespan->Hide(); - - bSizer164->Add( m_spinCtrlTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer165->Add( bSizer164, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer169->Add( bSizer165, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer25->Add( bSizer169, 0, 0, 5 ); - - bSizer160->Add( sbSizer25, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer81; - sbSizer81 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Size") ), wxHORIZONTAL ); - - wxBoxSizer* bSizer170; - bSizer170 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapFilterSize = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 ); - bSizer170->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); - - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxVERTICAL ); - - m_staticText101 = new wxStaticText( this, wxID_ANY, _("Minimum file size"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( -1 ); - bSizer158->Add( m_staticText101, 0, 0, 5 ); - - wxBoxSizer* bSizer162; - bSizer162 = new wxBoxSizer( wxVERTICAL ); - - m_spinCtrlMinSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer162->Add( m_spinCtrlMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxArrayString m_choiceUnitMinSizeChoices; - m_choiceUnitMinSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 ); - m_choiceUnitMinSize->SetSelection( 0 ); - bSizer162->Add( m_choiceUnitMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer158->Add( bSizer162, 0, wxBOTTOM, 5 ); - - m_staticText102 = new wxStaticText( this, wxID_ANY, _("Maximum file size"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText102->Wrap( -1 ); - bSizer158->Add( m_staticText102, 0, 0, 5 ); - - wxBoxSizer* bSizer163; - bSizer163 = new wxBoxSizer( wxVERTICAL ); - - m_spinCtrlMaxSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer163->Add( m_spinCtrlMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxArrayString m_choiceUnitMaxSizeChoices; - m_choiceUnitMaxSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 ); - m_choiceUnitMaxSize->SetSelection( 0 ); - bSizer163->Add( m_choiceUnitMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer158->Add( bSizer163, 0, wxTOP, 5 ); - - bSizer170->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer81->Add( bSizer170, 0, 0, 5 ); - - bSizer160->Add( sbSizer81, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bSizer159->Add( bSizer160, 0, wxEXPAND, 5 ); - - bSizer21->Add( bSizer159, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxBoxSizer* bSizer22; - bSizer22 = new wxBoxSizer( wxHORIZONTAL ); - - m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button10->SetDefault(); - m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_button17 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer21->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxEXPAND, 5 ); - - this->SetSizer( bSizer21 ); - this->Layout(); - bSizer21->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); - m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); - m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); - m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); - m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); - m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); - m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); - m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxSize( 370,380 ), wxDefaultSize ); + + wxBoxSizer* bSizer21; + bSizer21 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer86; + bSizer86 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap26 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer86->Add( m_bitmap26, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticTexHeader = new wxStaticText( m_panel8, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTexHeader->Wrap( -1 ); + m_staticTexHeader->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticTexHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer21->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxHORIZONTAL ); + + bSizer70->SetMinSize( wxSize( 550,-1 ) ); + + bSizer70->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that match all filter settings will be selected for synchronization.\nNote: The name filter must be specified relative(!) to main synchronization directories."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticText44->Wrap( 550 ); + bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer70->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 10 ); + + + bSizer21->Add( 0, 5, 0, 0, 5 ); + + m_panel13 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer69; + bSizer69 = new wxBoxSizer( wxVERTICAL ); + + m_staticline10 = new wxStaticLine( m_panel13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxVERTICAL ); + + m_staticText45 = new wxStaticText( m_panel13, wxID_ANY, _("Hints:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText45->Wrap( -1 ); + m_staticText45->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + + bSizer52->Add( m_staticText45, 0, wxBOTTOM, 5 ); + + m_staticText83 = new wxStaticText( m_panel13, wxID_ANY, _("1. Enter relative file or directory names separated by ';' or a new line."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + bSizer52->Add( m_staticText83, 0, 0, 5 ); + + m_staticText84 = new wxStaticText( m_panel13, wxID_ANY, _("2. Use wildcard characters '*' and '?'."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText84->Wrap( -1 ); + bSizer52->Add( m_staticText84, 0, 0, 5 ); + + m_staticText85 = new wxStaticText( m_panel13, wxID_ANY, _("3. Exclude files directly on main grid via context menu."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText85->Wrap( -1 ); + bSizer52->Add( m_staticText85, 0, 0, 5 ); + + bSizer69->Add( bSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); + + wxStaticBoxSizer* sbSizer21; + sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_panel13, wxID_ANY, _("Example") ), wxVERTICAL ); + + wxBoxSizer* bSizer66; + bSizer66 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText181 = new wxStaticText( m_panel13, wxID_ANY, _("Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\*"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText181->Wrap( -1 ); + bSizer66->Add( m_staticText181, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText1811 = new wxStaticText( m_panel13, wxID_ANY, _("Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\"."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1811->Wrap( 250 ); + m_staticText1811->SetFont( wxFont( 8, 70, 93, 90, false, wxEmptyString ) ); + + bSizer66->Add( m_staticText1811, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + sbSizer21->Add( bSizer66, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + bSizer69->Add( sbSizer21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_panel13->SetSizer( bSizer69 ); + m_panel13->Layout(); + bSizer69->Fit( m_panel13 ); + bSizer21->Add( m_panel13, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxEXPAND, 5 ); + + + bSizer21->Add( 0, 0, 0, 0, 5 ); + + wxBoxSizer* bSizer159; + bSizer159 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer166; + bSizer166 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer8; + sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Include") ), wxHORIZONTAL ); + + m_bitmapInclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + sbSizer8->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); + + m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + sbSizer8->Add( m_textCtrlInclude, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bSizer166->Add( sbSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer26; + sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Exclude") ), wxHORIZONTAL ); + + m_bitmapExclude = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + sbSizer26->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + sbSizer26->Add( m_textCtrlExclude, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer166->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bSizer159->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer159->Add( 5, 0, 0, 0, 5 ); + + wxBoxSizer* bSizer160; + bSizer160 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer25; + sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Date") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer169; + bSizer169 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapFilterDate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 34,34 ), 0 ); + bSizer169->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + wxBoxSizer* bSizer165; + bSizer165 = new wxBoxSizer( wxVERTICAL ); + + m_staticText103 = new wxStaticText( this, wxID_ANY, _("Select time span"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText103->Wrap( -1 ); + bSizer165->Add( m_staticText103, 0, 0, 5 ); + + wxBoxSizer* bSizer164; + bSizer164 = new wxBoxSizer( wxVERTICAL ); + + wxArrayString m_choiceUnitTimespanChoices; + m_choiceUnitTimespan = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 ); + m_choiceUnitTimespan->SetSelection( 0 ); + bSizer164->Add( m_choiceUnitTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_spinCtrlTimespan = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + m_spinCtrlTimespan->Hide(); + + bSizer164->Add( m_spinCtrlTimespan, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer165->Add( bSizer164, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer169->Add( bSizer165, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer25->Add( bSizer169, 0, 0, 5 ); + + bSizer160->Add( sbSizer25, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer81; + sbSizer81 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Size") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer170; + bSizer170 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapFilterSize = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 ); + bSizer170->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); + + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxVERTICAL ); + + m_staticText101 = new wxStaticText( this, wxID_ANY, _("Minimum file size"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( -1 ); + bSizer158->Add( m_staticText101, 0, 0, 5 ); + + wxBoxSizer* bSizer162; + bSizer162 = new wxBoxSizer( wxVERTICAL ); + + m_spinCtrlMinSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer162->Add( m_spinCtrlMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxArrayString m_choiceUnitMinSizeChoices; + m_choiceUnitMinSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 ); + m_choiceUnitMinSize->SetSelection( 0 ); + bSizer162->Add( m_choiceUnitMinSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer158->Add( bSizer162, 0, wxBOTTOM, 5 ); + + m_staticText102 = new wxStaticText( this, wxID_ANY, _("Maximum file size"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText102->Wrap( -1 ); + bSizer158->Add( m_staticText102, 0, 0, 5 ); + + wxBoxSizer* bSizer163; + bSizer163 = new wxBoxSizer( wxVERTICAL ); + + m_spinCtrlMaxSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer163->Add( m_spinCtrlMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxArrayString m_choiceUnitMaxSizeChoices; + m_choiceUnitMaxSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 ); + m_choiceUnitMaxSize->SetSelection( 0 ); + bSizer163->Add( m_choiceUnitMaxSize, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer158->Add( bSizer163, 0, wxTOP, 5 ); + + bSizer170->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer81->Add( bSizer170, 0, 0, 5 ); + + bSizer160->Add( sbSizer81, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bSizer159->Add( bSizer160, 0, wxEXPAND, 5 ); + + bSizer21->Add( bSizer159, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxHORIZONTAL ); + + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer22->Add( m_button9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer22->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_button10 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button10->SetDefault(); + m_button10->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer22->Add( m_button10, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_button17 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button17->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer22->Add( m_button17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer21->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxEXPAND, 5 ); + + this->SetSizer( bSizer21 ); + this->Layout(); + bSizer21->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); + m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); + m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); + m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); + m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); + m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); + m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); + m_button10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); + m_button17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); } FilterDlgGenerated::~FilterDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); - m_textCtrlInclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); - m_textCtrlExclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); - m_choiceUnitTimespan->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); - m_choiceUnitMinSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); - m_choiceUnitMaxSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); - m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); - m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); - m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( FilterDlgGenerated::OnClose ) ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnHelp ), NULL, this ); + m_textCtrlInclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); + m_textCtrlExclude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateNameFilter ), NULL, this ); + m_choiceUnitTimespan->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); + m_choiceUnitMinSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); + m_choiceUnitMaxSize->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( FilterDlgGenerated::OnUpdateChoice ), NULL, this ); + m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnDefault ), NULL, this ); + m_button10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnApply ), NULL, this ); + m_button17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FilterDlgGenerated::OnCancel ), NULL, this ); + } CustomizeColsDlgGenerated::CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer96; - bSizer96 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer99; - bSizer99 = new wxBoxSizer( wxHORIZONTAL ); - - wxArrayString m_checkListColumnsChoices; - m_checkListColumns = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListColumnsChoices, 0 ); - bSizer99->Add( m_checkListColumns, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer98; - bSizer98 = new wxBoxSizer( wxVERTICAL ); - - m_bpButton29 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButton29->SetToolTip( _("Move column up") ); - - bSizer98->Add( m_bpButton29, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bpButton30 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButton30->SetToolTip( _("Move column down") ); - - bSizer98->Add( m_bpButton30, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer99->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer96->Add( bSizer99, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer97; - bSizer97 = new wxBoxSizer( wxHORIZONTAL ); - - m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button9, 0, wxALL, 5 ); - - - bSizer97->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_button28 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button28->SetDefault(); - m_button28->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer97->Add( m_button28, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button29, 0, wxALL, 5 ); - - bSizer96->Add( bSizer97, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - this->SetSizer( bSizer96 ); - this->Layout(); - bSizer96->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); - m_bpButton29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); - m_bpButton30->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); - m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); - m_button28->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer96; + bSizer96 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer99; + bSizer99 = new wxBoxSizer( wxHORIZONTAL ); + + wxArrayString m_checkListColumnsChoices; + m_checkListColumns = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListColumnsChoices, 0 ); + bSizer99->Add( m_checkListColumns, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer98; + bSizer98 = new wxBoxSizer( wxVERTICAL ); + + m_bpButton29 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton29->SetToolTip( _("Move column up") ); + + bSizer98->Add( m_bpButton29, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bpButton30 = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButton30->SetToolTip( _("Move column down") ); + + bSizer98->Add( m_bpButton30, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer99->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer96->Add( bSizer99, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxHORIZONTAL ); + + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button9, 0, wxALL, 5 ); + + + bSizer97->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_button28 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button28->SetDefault(); + m_button28->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer97->Add( m_button28, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button29, 0, wxALL, 5 ); + + bSizer96->Add( bSizer97, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + this->SetSizer( bSizer96 ); + this->Layout(); + bSizer96->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); + m_bpButton29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); + m_bpButton30->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); + m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); + m_button28->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); } CustomizeColsDlgGenerated::~CustomizeColsDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); - m_bpButton29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); - m_bpButton30->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); - m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); - m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CustomizeColsDlgGenerated::OnClose ) ); + m_bpButton29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveUp ), NULL, this ); + m_bpButton30->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnMoveDown ), NULL, this ); + m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnDefault ), NULL, this ); + m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CustomizeColsDlgGenerated::OnCancel ), NULL, this ); + } GlobalSettingsDlgGenerated::GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize ); - - wxBoxSizer* bSizer95; - bSizer95 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer86; - bSizer86 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer86->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); - m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxVERTICAL ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText56->Wrap( -1 ); - m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); - - bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - bSizer95->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer95->Add( 0, 5, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer23; - sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Transactional file copy"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer23->Add( m_checkBoxTransCopy, 0, wxEXPAND|wxALL, 5 ); - - m_staticText82 = new wxStaticText( this, wxID_ANY, _("Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText82->Wrap( 400 ); - m_staticText82->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - sbSizer23->Add( m_staticText82, 0, wxLEFT, 20 ); - - m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 ); - - m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCopyLocked->Wrap( 400 ); - m_staticTextCopyLocked->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - sbSizer23->Add( m_staticTextCopyLocked, 0, wxLEFT|wxEXPAND, 20 ); - - m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 ); - - m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and directory permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8211->Wrap( 400 ); - m_staticText8211->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - - sbSizer23->Add( m_staticText8211, 0, wxLEFT|wxEXPAND, 20 ); - - bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer261; - sbSizer261 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - wxBoxSizer* bSizer101; - bSizer101 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText100 = new wxStaticText( this, wxID_ANY, _("Hidden dialogs:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText100->Wrap( -1 ); - bSizer101->Add( m_staticText100, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer101->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_buttonResetDialogs = new zen::BitmapButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxSize( 80,-1 ), 0 ); - m_buttonResetDialogs->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - m_buttonResetDialogs->SetToolTip( _("Show hidden dialogs") ); - - bSizer101->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - sbSizer261->Add( bSizer101, 0, wxEXPAND, 5 ); - - bSizer95->Add( sbSizer261, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - wxStaticBoxSizer* sbSizer26; - sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("External applications") ), wxHORIZONTAL ); - - - sbSizer26->Add( 5, 0, 0, 0, 5 ); - - m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - - // Grid - m_gridCustomCommand->CreateGrid( 5, 2 ); - m_gridCustomCommand->EnableEditing( true ); - m_gridCustomCommand->EnableGridLines( true ); - m_gridCustomCommand->EnableDragGridSize( false ); - m_gridCustomCommand->SetMargins( 0, 0 ); - - // Columns - m_gridCustomCommand->SetColSize( 0, 165 ); - m_gridCustomCommand->SetColSize( 1, 196 ); - m_gridCustomCommand->EnableDragColMove( false ); - m_gridCustomCommand->EnableDragColSize( true ); - m_gridCustomCommand->SetColLabelSize( 20 ); - m_gridCustomCommand->SetColLabelValue( 0, _("Description") ); - m_gridCustomCommand->SetColLabelValue( 1, _("Command line") ); - m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Rows - m_gridCustomCommand->EnableDragRowSize( false ); - m_gridCustomCommand->SetRowLabelSize( 0 ); - m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - - // Label Appearance - - // Cell Defaults - m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - sbSizer26->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxVERTICAL ); - - m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 ); - - m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 ); - - sbSizer26->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - sbSizer26->Add( 5, 0, 0, 0, 5 ); - - bSizer95->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - wxBoxSizer* bSizer97; - bSizer97 = new wxBoxSizer( wxHORIZONTAL ); - - m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button9, 0, wxALL, 5 ); - - - bSizer97->Add( 0, 0, 1, 0, 5 ); - - m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button29, 0, wxALL, 5 ); - - bSizer95->Add( bSizer97, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - this->SetSizer( bSizer95 ); - this->Layout(); - bSizer95->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); - m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); - m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); - m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); - m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxSize( 280,230 ), wxDefaultSize ); + + wxBoxSizer* bSizer95; + bSizer95 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer86; + bSizer86 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer86->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + + bSizer86->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL ); + m_panel8->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxVERTICAL ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Global settings"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText56->Wrap( -1 ); + m_staticText56->SetFont( wxFont( 16, 70, 90, 92, false, wxEmptyString ) ); + + bSizer72->Add( m_staticText56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer86->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer95->Add( bSizer86, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer95->Add( 0, 5, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer23; + sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + m_checkBoxTransCopy = new wxCheckBox( this, wxID_ANY, _("Transactional file copy"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer23->Add( m_checkBoxTransCopy, 0, wxEXPAND|wxALL, 5 ); + + m_staticText82 = new wxStaticText( this, wxID_ANY, _("Write to a temporary file (*.ffs_tmp) first then rename it. This guarantees a consistent state even in case of fatal error."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText82->Wrap( 400 ); + m_staticText82->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + sbSizer23->Add( m_staticText82, 0, wxLEFT, 20 ); + + m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 ); + + m_staticTextCopyLocked = new wxStaticText( this, wxID_ANY, _("Copy shared or locked files using Volume Shadow Copy Service (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCopyLocked->Wrap( 400 ); + m_staticTextCopyLocked->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + sbSizer23->Add( m_staticTextCopyLocked, 0, wxLEFT|wxEXPAND, 20 ); + + m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 ); + + m_staticText8211 = new wxStaticText( this, wxID_ANY, _("Transfer file and directory permissions (Requires Administrator rights)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8211->Wrap( 400 ); + m_staticText8211->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + sbSizer23->Add( m_staticText8211, 0, wxLEFT|wxEXPAND, 20 ); + + bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer261; + sbSizer261 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxBoxSizer* bSizer101; + bSizer101 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText100 = new wxStaticText( this, wxID_ANY, _("Hidden dialogs:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText100->Wrap( -1 ); + bSizer101->Add( m_staticText100, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer101->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_buttonResetDialogs = new zen::BitmapButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxSize( 80,-1 ), 0 ); + m_buttonResetDialogs->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + m_buttonResetDialogs->SetToolTip( _("Show hidden dialogs") ); + + bSizer101->Add( m_buttonResetDialogs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + sbSizer261->Add( bSizer101, 0, wxEXPAND, 5 ); + + bSizer95->Add( sbSizer261, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + wxStaticBoxSizer* sbSizer26; + sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("External applications") ), wxHORIZONTAL ); + + + sbSizer26->Add( 5, 0, 0, 0, 5 ); + + m_gridCustomCommand = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + // Grid + m_gridCustomCommand->CreateGrid( 5, 2 ); + m_gridCustomCommand->EnableEditing( true ); + m_gridCustomCommand->EnableGridLines( true ); + m_gridCustomCommand->EnableDragGridSize( false ); + m_gridCustomCommand->SetMargins( 0, 0 ); + + // Columns + m_gridCustomCommand->SetColSize( 0, 165 ); + m_gridCustomCommand->SetColSize( 1, 196 ); + m_gridCustomCommand->EnableDragColMove( false ); + m_gridCustomCommand->EnableDragColSize( true ); + m_gridCustomCommand->SetColLabelSize( 20 ); + m_gridCustomCommand->SetColLabelValue( 0, _("Description") ); + m_gridCustomCommand->SetColLabelValue( 1, _("Command line") ); + m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Rows + m_gridCustomCommand->EnableDragRowSize( false ); + m_gridCustomCommand->SetRowLabelSize( 0 ); + m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + + // Label Appearance + + // Cell Defaults + m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); + sbSizer26->Add( m_gridCustomCommand, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer157; + bSizer157 = new wxBoxSizer( wxVERTICAL ); + + m_bpButtonAddRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + bSizer157->Add( m_bpButtonAddRow, 0, 0, 5 ); + + m_bpButtonRemoveRow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + bSizer157->Add( m_bpButtonRemoveRow, 0, 0, 5 ); + + sbSizer26->Add( bSizer157, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + sbSizer26->Add( 5, 0, 0, 0, 5 ); + + bSizer95->Add( sbSizer26, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxHORIZONTAL ); + + m_button9 = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button9->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button9, 0, wxALL, 5 ); + + + bSizer97->Add( 0, 0, 1, 0, 5 ); + + m_buttonOkay = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button29, 0, wxALL, 5 ); + + bSizer95->Add( bSizer97, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + this->SetSizer( bSizer95 ); + this->Layout(); + bSizer95->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); + m_buttonResetDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); + m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); + m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); + m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); } GlobalSettingsDlgGenerated::~GlobalSettingsDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); - m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); - m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); - m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); - m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); - m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); - m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GlobalSettingsDlgGenerated::OnClose ) ); + m_buttonResetDialogs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnResetDialogs ), NULL, this ); + m_bpButtonAddRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnAddRow ), NULL, this ); + m_bpButtonRemoveRow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnRemoveRow ), NULL, this ); + m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnDefault ), NULL, this ); + m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnOkay ), NULL, this ); + m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalSettingsDlgGenerated::OnCancel ), NULL, this ); + } SyncPreviewDlgGenerated::SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonStartSync = new zen::BitmapButton( this, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 ); - m_buttonStartSync->SetDefault(); - m_buttonStartSync->SetFont( wxFont( 14, 70, 90, 92, false, wxT("Arial Black") ) ); - m_buttonStartSync->SetToolTip( _("Start synchronization") ); - - bSizer158->Add( m_buttonStartSync, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer158->Add( m_staticline16, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - wxStaticBoxSizer* sbSizer28; - sbSizer28 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Variant") ), wxVERTICAL ); - - m_staticTextVariant = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextVariant->Wrap( -1 ); - m_staticTextVariant->SetFont( wxFont( 10, 70, 90, 92, false, wxT("Arial Black") ) ); - - sbSizer28->Add( m_staticTextVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer158->Add( sbSizer28, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer134->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer141; - bSizer141 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer161; - sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxVERTICAL ); - - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxHORIZONTAL ); - - wxFlexGridSizer* fgSizer5; - fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 5 ); - fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer5->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText94 = new wxStaticText( this, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText94->Wrap( -1 ); - m_staticText94->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer5->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapCreate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlCreateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlCreateL->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlCreateL->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer5->Add( m_textCtrlCreateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapUpdate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlUpdateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlUpdateL->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlUpdateL->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer5->Add( m_textCtrlUpdateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmapDelete = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlDeleteL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlDeleteL->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlDeleteL->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer5->Add( m_textCtrlDeleteL, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer157->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - wxFlexGridSizer* fgSizer51; - fgSizer51 = new wxFlexGridSizer( 0, 1, 0, 5 ); - fgSizer51->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText95 = new wxStaticText( this, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText95->Wrap( -1 ); - m_staticText95->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer51->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlCreateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlCreateR->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlCreateR->SetToolTip( _("Number of files and directories that will be created") ); - - fgSizer51->Add( m_textCtrlCreateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlUpdateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlUpdateR->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlUpdateR->SetToolTip( _("Number of files that will be overwritten") ); - - fgSizer51->Add( m_textCtrlUpdateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlDeleteR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); - m_textCtrlDeleteR->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlDeleteR->SetToolTip( _("Number of files and directories that will be deleted") ); - - fgSizer51->Add( m_textCtrlDeleteR, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer157->Add( fgSizer51, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer161->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - sbSizer161->Add( 0, 10, 0, 0, 5 ); - - wxBoxSizer* bSizer156; - bSizer156 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); - - bSizer156->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); - - - bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_CENTRE|wxTE_READONLY ); - m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); - - bSizer156->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); - - sbSizer161->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - - bSizer134->Add( bSizer141, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer142; - bSizer142 = new wxBoxSizer( wxHORIZONTAL ); - - m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer142->Add( m_checkBoxDontShowAgain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer142->Add( 10, 0, 1, 0, 5 ); - - m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer142->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer134->Add( bSizer142, 0, wxEXPAND, 5 ); - - this->SetSizer( bSizer134 ); - this->Layout(); - bSizer134->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); - m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); - m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonStartSync = new zen::BitmapButton( this, wxID_ANY, _("Start"), wxDefaultPosition, wxSize( -1,40 ), 0 ); + m_buttonStartSync->SetDefault(); + m_buttonStartSync->SetFont( wxFont( 14, 70, 90, 92, false, wxT("Arial Black") ) ); + m_buttonStartSync->SetToolTip( _("Start synchronization") ); + + bSizer158->Add( m_buttonStartSync, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline16 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer158->Add( m_staticline16, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer28; + sbSizer28 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Variant") ), wxVERTICAL ); + + m_staticTextVariant = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextVariant->Wrap( -1 ); + m_staticTextVariant->SetFont( wxFont( 10, 70, 90, 92, false, wxT("Arial Black") ) ); + + sbSizer28->Add( m_staticTextVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer158->Add( sbSizer28, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer134->Add( bSizer158, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline14, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer141; + bSizer141 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer161; + sbSizer161 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Statistics") ), wxVERTICAL ); + + wxBoxSizer* bSizer157; + bSizer157 = new wxBoxSizer( wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer5; + fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 5 ); + fgSizer5->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer5->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText94 = new wxStaticText( this, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText94->Wrap( -1 ); + m_staticText94->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer5->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapCreate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreate->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_bitmapCreate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlCreateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlCreateL->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlCreateL->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer5->Add( m_textCtrlCreateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapUpdate = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdate->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer5->Add( m_bitmapUpdate, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlUpdateL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlUpdateL->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlUpdateL->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer5->Add( m_textCtrlUpdateL, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmapDelete = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDelete->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer5->Add( m_bitmapDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlDeleteL = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlDeleteL->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlDeleteL->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer5->Add( m_textCtrlDeleteL, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer157->Add( fgSizer5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + wxFlexGridSizer* fgSizer51; + fgSizer51 = new wxFlexGridSizer( 0, 1, 0, 5 ); + fgSizer51->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText95 = new wxStaticText( this, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText95->Wrap( -1 ); + m_staticText95->SetFont( wxFont( 9, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer51->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlCreateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlCreateR->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlCreateR->SetToolTip( _("Number of files and directories that will be created") ); + + fgSizer51->Add( m_textCtrlCreateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlUpdateR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlUpdateR->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlUpdateR->SetToolTip( _("Number of files that will be overwritten") ); + + fgSizer51->Add( m_textCtrlUpdateR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlDeleteR = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_READONLY|wxTE_RIGHT ); + m_textCtrlDeleteR->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlDeleteR->SetToolTip( _("Number of files and directories that will be deleted") ); + + fgSizer51->Add( m_textCtrlDeleteR, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer157->Add( fgSizer51, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer161->Add( bSizer157, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + sbSizer161->Add( 0, 10, 0, 0, 5 ); + + wxBoxSizer* bSizer156; + bSizer156 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapData = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapData->SetToolTip( _("Total amount of data that will be transferred") ); + + bSizer156->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5 ); + + + bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_textCtrlData = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), wxTE_CENTRE|wxTE_READONLY ); + m_textCtrlData->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_textCtrlData->SetToolTip( _("Total amount of data that will be transferred") ); + + bSizer156->Add( m_textCtrlData, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer156->Add( 0, 0, 1, wxEXPAND, 5 ); + + sbSizer161->Add( bSizer156, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + bSizer141->Add( sbSizer161, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + bSizer134->Add( bSizer141, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline12, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer142; + bSizer142 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("Do not show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer142->Add( m_checkBoxDontShowAgain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer142->Add( 10, 0, 1, 0, 5 ); + + m_button16 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button16->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer142->Add( m_button16, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer134->Add( bSizer142, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer134 ); + this->Layout(); + bSizer134->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); + m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); + m_button16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); } SyncPreviewDlgGenerated::~SyncPreviewDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); - m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); - m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncPreviewDlgGenerated::OnClose ) ); + m_buttonStartSync->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnStartSync ), NULL, this ); + m_button16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncPreviewDlgGenerated::OnCancel ), NULL, this ); + } PopupFrameGenerated1::PopupFrameGenerated1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMain->Wrap( 600 ); - bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - this->SetSizer( bSizer158 ); - this->Layout(); - bSizer158->Fit( this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeft = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer158->Add( m_bitmapLeft, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextMain = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMain->Wrap( 600 ); + bSizer158->Add( m_staticTextMain, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer158 ); + this->Layout(); + bSizer158->Fit( this ); } PopupFrameGenerated1::~PopupFrameGenerated1() @@ -3779,130 +3674,130 @@ PopupFrameGenerated1::~PopupFrameGenerated1() SearchDialogGenerated::SearchDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer161; - bSizer161 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer166; - bSizer166 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer162; - bSizer162 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( -1 ); - bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 ); - bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer166->Add( 0, 5, 0, 0, 5 ); - - m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer166->Add( m_checkBoxMatchCase, 0, wxALL, 5 ); - - bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer97; - bSizer97 = new wxBoxSizer( wxVERTICAL ); - - m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonFindNext->SetDefault(); - m_buttonFindNext->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer97->Add( m_buttonFindNext, 0, wxEXPAND|wxTOP|wxRIGHT, 5 ); - - m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button29, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - this->SetSizer( bSizer161 ); - this->Layout(); - bSizer161->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); - m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); - m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); - m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer161; + bSizer161 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer166; + bSizer166 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer162; + bSizer162 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText101 = new wxStaticText( this, wxID_ANY, _("Find what:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( -1 ); + bSizer162->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlSearchTxt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 220,-1 ), 0 ); + bSizer162->Add( m_textCtrlSearchTxt, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer166->Add( bSizer162, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer166->Add( 0, 5, 0, 0, 5 ); + + m_checkBoxMatchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer166->Add( m_checkBoxMatchCase, 0, wxALL, 5 ); + + bSizer161->Add( bSizer166, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxVERTICAL ); + + m_buttonFindNext = new wxButton( this, wxID_OK, _("&Find next"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonFindNext->SetDefault(); + m_buttonFindNext->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer97->Add( m_buttonFindNext, 0, wxEXPAND|wxTOP|wxRIGHT, 5 ); + + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button29, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + bSizer161->Add( bSizer97, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer161 ); + this->Layout(); + bSizer161->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); + m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); + m_buttonFindNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); + m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); } SearchDialogGenerated::~SearchDialogGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); - m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); - m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); - m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SearchDialogGenerated::OnClose ) ); + m_textCtrlSearchTxt->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SearchDialogGenerated::OnText ), NULL, this ); + m_buttonFindNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnFindNext ), NULL, this ); + m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SearchDialogGenerated::OnCancel ), NULL, this ); + } SelectTimespanDlgGenerated::SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer96; - bSizer96 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer98; - bSizer98 = new wxBoxSizer( wxHORIZONTAL ); - - m_calendarFrom = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS ); - bSizer98->Add( m_calendarFrom, 0, wxALL, 5 ); - - m_calendarTo = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS ); - bSizer98->Add( m_calendarTo, 0, wxALL, 5 ); - - bSizer96->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer97; - bSizer97 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer97->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_buttonOkay = new wxButton( this, wxID_ANY, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); - m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer97->Add( m_button29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer97->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer96->Add( bSizer97, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - this->SetSizer( bSizer96 ); - this->Layout(); - bSizer96->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) ); - m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this ); - m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this ); - m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer96; + bSizer96 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer98; + bSizer98 = new wxBoxSizer( wxHORIZONTAL ); + + m_calendarFrom = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS ); + bSizer98->Add( m_calendarFrom, 0, wxALL, 5 ); + + m_calendarTo = new wxCalendarCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS ); + bSizer98->Add( m_calendarTo, 0, wxALL, 5 ); + + bSizer96->Add( bSizer98, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer97; + bSizer97 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer97->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_buttonOkay = new wxButton( this, wxID_ANY, _("&OK"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + bSizer97->Add( m_buttonOkay, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_button29 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize( -1,30 ), 0 ); + m_button29->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer97->Add( m_button29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer97->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer96->Add( bSizer97, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + this->SetSizer( bSizer96 ); + this->Layout(); + bSizer96->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) ); + m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this ); + m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this ); + m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this ); } SelectTimespanDlgGenerated::~SelectTimespanDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) ); - m_calendarFrom->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this ); - m_calendarTo->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this ); - m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this ); - m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::OnClose ) ); + m_calendarFrom->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionFrom ), NULL, this ); + m_calendarTo->Disconnect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::OnChangeSelectionTo ), NULL, this ); + m_buttonOkay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnOkay ), NULL, this ); + m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::OnCancel ), NULL, this ); + } diff --git a/ui/gui_generated.h b/ui/gui_generated.h index 3fa64c80..4cc32873 100644 --- a/ui/gui_generated.h +++ b/ui/gui_generated.h @@ -11,16 +11,14 @@ #include <wx/artprov.h> #include <wx/xrc/xmlres.h> #include <wx/intl.h> -class CustomGridLeft; -class CustomGridMiddle; -class CustomGridRight; class ExecFinishedBox; class FolderHistoryBox; class ToggleButton; class wxStaticText; -namespace zen{ class BitmapButton; } -namespace zen{ class DirPickerCtrl; } -namespace zen{ class Graph2D; } +namespace zen { class BitmapButton; } +namespace zen { class DirPickerCtrl; } +namespace zen { class Graph2D; } +namespace zen { class Grid; } #include <wx/string.h> #include <wx/bitmap.h> @@ -38,9 +36,7 @@ namespace zen{ class Graph2D; } #include <wx/panel.h> #include <wx/combobox.h> #include <wx/filepicker.h> -#include <wx/statbox.h> #include <wx/scrolwin.h> -#include <wx/grid.h> #include <wx/listbox.h> #include <wx/checkbox.h> #include <wx/statbmp.h> @@ -48,6 +44,7 @@ namespace zen{ class Graph2D; } #include <wx/statline.h> #include <wx/frame.h> #include <wx/gauge.h> +#include <wx/statbox.h> #include <wx/choice.h> #include <wx/spinctrl.h> #include <wx/listbook.h> @@ -58,6 +55,7 @@ namespace zen{ class Graph2D; } #include <wx/imaglist.h> #include <wx/hyperlink.h> #include <wx/checklst.h> +#include <wx/grid.h> #include <wx/calctrl.h> #include "../zen/i18n.h" @@ -68,977 +66,953 @@ namespace zen{ class Graph2D; } /////////////////////////////////////////////////////////////////////////////// /// Class MainDialogGenerated /////////////////////////////////////////////////////////////////////////////// -class MainDialogGenerated : public wxFrame +class MainDialogGenerated : public wxFrame { - private: - - protected: - wxMenuBar* m_menubar1; - wxMenu* m_menuFile; - wxMenuItem* m_menuItem10; - wxMenuItem* m_menuItem11; - wxMenuItem* m_menuItemSwitchView; - wxMenuItem* m_menuItemNew; - wxMenuItem* m_menuItemSave; - wxMenuItem* m_menuItemLoad; - wxMenu* m_menuAdvanced; - wxMenu* m_menuLanguages; - wxMenuItem* m_menuItemGlobSett; - wxMenuItem* m_menuItem7; - wxMenu* m_menuHelp; - wxMenuItem* m_menuItemCheckVer; - wxMenuItem* m_menuItemAbout; - wxBoxSizer* bSizerPanelHolder; - wxPanel* m_panelTopButtons; - wxBoxSizer* bSizerTopButtons; - wxStaticText* m_staticTextCmpVariant; - zen::BitmapButton* m_buttonCompare; - wxButton* m_buttonAbort; - wxBitmapButton* m_bpButtonCmpConfig; - wxStaticText* m_staticTextSyncVariant; - wxBitmapButton* m_bpButtonSyncConfig; - zen::BitmapButton* m_buttonStartSync; - wxPanel* m_panelDirectoryPairs; - wxStaticBoxSizer* sbSizerDirLeft; - wxBitmapButton* m_bpButtonAddPair; - wxPanel* m_panelTopMiddle; - wxBitmapButton* m_bpButtonSwapSides; - wxStaticBoxSizer* sbSizerDirRight; - wxScrolledWindow* m_scrolledWindowFolderPairs; - wxBoxSizer* bSizerAddFolderPairs; - wxPanel* m_panelGrids; - wxBoxSizer* bSizerGridHolder; - CustomGridLeft* m_gridLeft; - wxPanel* m_panelMiddle; - CustomGridMiddle* m_gridMiddle; - CustomGridRight* m_gridRight; - wxPanel* m_panelConfig; - wxBoxSizer* bSizerConfig; - wxBitmapButton* m_bpButtonSave; - wxBitmapButton* m_bpButtonLoad; - wxListBox* m_listBoxHistory; - wxPanel* m_panelFilter; - wxBitmapButton* m_bpButtonFilter; - wxCheckBox* m_checkBoxHideFilt; - wxPanel* m_panelStatistics; - wxBoxSizer* bSizerStatistics; - wxStaticBitmap* m_bitmapCreate; - wxTextCtrl* m_textCtrlCreate; - wxStaticBitmap* m_bitmapUpdate; - wxTextCtrl* m_textCtrlUpdate; - wxStaticBitmap* m_bitmapDelete; - wxTextCtrl* m_textCtrlDelete; - wxStaticBitmap* m_bitmapData; - wxTextCtrl* m_textCtrlData; - wxPanel* m_panelViewFilter; - wxBoxSizer* bSizerViewFilter; - ToggleButton* m_bpButtonSyncCreateLeft; - ToggleButton* m_bpButtonSyncDirOverwLeft; - ToggleButton* m_bpButtonSyncDeleteLeft; - ToggleButton* m_bpButtonLeftOnly; - ToggleButton* m_bpButtonLeftNewer; - ToggleButton* m_bpButtonEqual; - ToggleButton* m_bpButtonDifferent; - ToggleButton* m_bpButtonSyncDirNone; - ToggleButton* m_bpButtonRightNewer; - ToggleButton* m_bpButtonRightOnly; - ToggleButton* m_bpButtonSyncDeleteRight; - ToggleButton* m_bpButtonSyncDirOverwRight; - ToggleButton* m_bpButtonSyncCreateRight; - ToggleButton* m_bpButtonConflict; - wxPanel* m_panelStatusBar; - wxBoxSizer* bSizerStatusLeftDirectories; - wxStaticBitmap* m_bitmapSmallDirectoryLeft; - wxStaticText* m_staticTextStatusLeftDirs; - wxBoxSizer* bSizerStatusLeftFiles; - wxStaticBitmap* m_bitmapSmallFileLeft; - wxStaticText* m_staticTextStatusLeftFiles; - wxStaticText* m_staticTextStatusLeftBytes; - wxStaticLine* m_staticline9; - wxStaticText* m_staticTextStatusMiddle; - wxStaticLine* m_staticline10; - wxBoxSizer* bSizerStatusRightDirectories; - wxStaticBitmap* m_bitmapSmallDirectoryRight; - wxStaticText* m_staticTextStatusRightDirs; - wxBoxSizer* bSizerStatusRightFiles; - wxStaticBitmap* m_bitmapSmallFileRight; - wxStaticText* m_staticTextStatusRightFiles; - wxStaticText* m_staticTextStatusRightBytes; - wxStaticBitmap* m_bitmap15; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); } - virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSwitchView( wxCommandEvent& event ) { event.Skip(); } - virtual void OnNewConfig( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); } - virtual void OnLoadConfig( wxCommandEvent& event ) { event.Skip(); } - virtual void OnMenuQuit( wxCommandEvent& event ) { event.Skip(); } - virtual void OnMenuGlobalSettings( wxCommandEvent& event ) { event.Skip(); } - virtual void OnMenuBatchJob( wxCommandEvent& event ) { event.Skip(); } - virtual void OnMenuExportFileList( wxCommandEvent& event ) { event.Skip(); } - virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } - virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); } - virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); } - virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } - virtual void OnDirSelected( wxFileDirPickerEvent& event ) { event.Skip(); } - virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); } - virtual void OnLeftGridDoubleClick( wxGridEvent& event ) { event.Skip(); } - virtual void OnContextRim( wxGridEvent& event ) { event.Skip(); } - virtual void OnSortLeftGrid( wxGridEvent& event ) { event.Skip(); } - virtual void OnContextRimLabelLeft( wxGridEvent& event ) { event.Skip(); } - virtual void OnContextMiddle( wxGridEvent& event ) { event.Skip(); } - virtual void OnSortMiddleGrid( wxGridEvent& event ) { event.Skip(); } - virtual void OnContextMiddleLabel( wxGridEvent& event ) { event.Skip(); } - virtual void OnRightGridDoubleClick( wxGridEvent& event ) { event.Skip(); } - virtual void OnSortRightGrid( wxGridEvent& event ) { event.Skip(); } - virtual void OnContextRimLabelRight( wxGridEvent& event ) { event.Skip(); } - virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) { event.Skip(); } - virtual void OnLoadFromHistory( wxCommandEvent& event ) { event.Skip(); } - virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); } - virtual void OnHideFilteredButton( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncCreateLeft( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncDirLeft( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncDeleteLeft( wxCommandEvent& event ) { event.Skip(); } - virtual void OnLeftOnlyFiles( wxCommandEvent& event ) { event.Skip(); } - virtual void OnLeftNewerFiles( wxCommandEvent& event ) { event.Skip(); } - virtual void OnEqualFiles( wxCommandEvent& event ) { event.Skip(); } - virtual void OnDifferentFiles( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncDirNone( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRightNewerFiles( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRightOnlyFiles( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncDeleteRight( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncDirRight( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncCreateRight( wxCommandEvent& event ) { event.Skip(); } - virtual void OnConflictFiles( wxCommandEvent& event ) { event.Skip(); } - - - public: - wxPanel* m_panelTopLeft; - wxBitmapButton* m_bpButtonRemovePair; - FolderHistoryBox* m_directoryLeft; - zen::DirPickerCtrl* m_dirPickerLeft; - wxBitmapButton* m_bpButtonAltCompCfg; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - wxPanel* m_panelTopRight; - FolderHistoryBox* m_directoryRight; - zen::DirPickerCtrl* m_dirPickerRight; - wxPanel* m_panelLeft; - wxPanel* m_panelRight; - - MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - - ~MainDialogGenerated(); - +private: + +protected: + wxMenuBar* m_menubar1; + wxMenu* m_menuFile; + wxMenuItem* m_menuItem10; + wxMenuItem* m_menuItem11; + wxMenuItem* m_menuItemNew; + wxMenuItem* m_menuItemSave; + wxMenuItem* m_menuItemLoad; + wxMenu* m_menuAdvanced; + wxMenu* m_menuLanguages; + wxMenuItem* m_menuItemGlobSett; + wxMenuItem* m_menuItem7; + wxMenu* m_menuHelp; + wxMenuItem* m_menuItemCheckVer; + wxMenuItem* m_menuItemAbout; + wxBoxSizer* bSizerPanelHolder; + wxPanel* m_panelTopButtons; + wxBoxSizer* bSizerTopButtons; + wxStaticText* m_staticTextCmpVariant; + zen::BitmapButton* m_buttonCompare; + wxButton* m_buttonAbort; + wxBitmapButton* m_bpButtonCmpConfig; + wxStaticText* m_staticTextSyncVariant; + wxBitmapButton* m_bpButtonSyncConfig; + zen::BitmapButton* m_buttonStartSync; + wxPanel* m_panelDirectoryPairs; + wxStaticText* m_staticTextFinalPathLeft; + wxBitmapButton* m_bpButtonAddPair; + wxPanel* m_panelTopMiddle; + wxBitmapButton* m_bpButtonSwapSides; + wxStaticText* m_staticTextFinalPathRight; + wxScrolledWindow* m_scrolledWindowFolderPairs; + wxBoxSizer* bSizerAddFolderPairs; + zen::Grid* m_gridNavi; + zen::Grid* m_gridMain; + wxPanel* m_panelConfig; + wxBoxSizer* bSizerConfig; + wxBitmapButton* m_bpButtonSave; + wxBitmapButton* m_bpButtonLoad; + wxListBox* m_listBoxHistory; + wxPanel* m_panelFilter; + wxBitmapButton* m_bpButtonFilter; + wxCheckBox* m_checkBoxHideFilt; + wxPanel* m_panelStatistics; + wxBoxSizer* bSizerStatistics; + wxStaticBitmap* m_bitmapCreate; + wxTextCtrl* m_textCtrlCreate; + wxStaticBitmap* m_bitmapUpdate; + wxTextCtrl* m_textCtrlUpdate; + wxStaticBitmap* m_bitmapDelete; + wxTextCtrl* m_textCtrlDelete; + wxStaticBitmap* m_bitmapData; + wxTextCtrl* m_textCtrlData; + wxPanel* m_panelViewFilter; + wxBoxSizer* bSizerViewFilter; + ToggleButton* m_bpButtonSyncCreateLeft; + ToggleButton* m_bpButtonSyncDirOverwLeft; + ToggleButton* m_bpButtonSyncDeleteLeft; + ToggleButton* m_bpButtonLeftOnly; + ToggleButton* m_bpButtonLeftNewer; + ToggleButton* m_bpButtonEqual; + ToggleButton* m_bpButtonDifferent; + ToggleButton* m_bpButtonSyncDirNone; + ToggleButton* m_bpButtonRightNewer; + ToggleButton* m_bpButtonRightOnly; + ToggleButton* m_bpButtonSyncDeleteRight; + ToggleButton* m_bpButtonSyncDirOverwRight; + ToggleButton* m_bpButtonSyncCreateRight; + ToggleButton* m_bpButtonConflict; + wxPanel* m_panelStatusBar; + wxBoxSizer* bSizerStatusLeftDirectories; + wxStaticBitmap* m_bitmapSmallDirectoryLeft; + wxStaticText* m_staticTextStatusLeftDirs; + wxBoxSizer* bSizerStatusLeftFiles; + wxStaticBitmap* m_bitmapSmallFileLeft; + wxStaticText* m_staticTextStatusLeftFiles; + wxStaticText* m_staticTextStatusLeftBytes; + wxStaticLine* m_staticline9; + wxStaticText* m_staticTextStatusMiddle; + wxStaticLine* m_staticline10; + wxBoxSizer* bSizerStatusRightDirectories; + wxStaticBitmap* m_bitmapSmallDirectoryRight; + wxStaticText* m_staticTextStatusRightDirs; + wxBoxSizer* bSizerStatusRightFiles; + wxStaticBitmap* m_bitmapSmallFileRight; + wxStaticText* m_staticTextStatusRightFiles; + wxStaticText* m_staticTextStatusRightBytes; + wxStaticBitmap* m_bitmapResizeCorner; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnCompare( wxCommandEvent& event ) { event.Skip(); } + virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); } + virtual void OnNewConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLoadConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuQuit( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuGlobalSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuExportFileList( wxCommandEvent& event ) { event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuCheckVersion( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDirSelected( wxFileDirPickerEvent& event ) { event.Skip(); } + virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCfgHistoryKeyEvent( wxKeyEvent& event ) { event.Skip(); } + virtual void OnLoadFromHistory( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnHideFilteredButton( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncCreateLeft( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDirLeft( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDeleteLeft( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftOnlyFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftNewerFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnEqualFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDifferentFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDirNone( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRightNewerFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRightOnlyFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDeleteRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncDirRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncCreateRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConflictFiles( wxCommandEvent& event ) { event.Skip(); } + + +public: + wxPanel* m_panelTopLeft; + wxBitmapButton* m_bpButtonRemovePair; + FolderHistoryBox* m_directoryLeft; + zen::DirPickerCtrl* m_dirPickerLeft; + wxBitmapButton* m_bpButtonAltCompCfg; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + wxPanel* m_panelTopRight; + FolderHistoryBox* m_directoryRight; + zen::DirPickerCtrl* m_dirPickerRight; + + MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 702,522 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + + ~MainDialogGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class FolderPairGenerated /////////////////////////////////////////////////////////////////////////////// -class FolderPairGenerated : public wxPanel +class FolderPairGenerated : public wxPanel { - private: - - protected: - - public: - wxPanel* m_panelLeft; - wxBitmapButton* m_bpButtonRemovePair; - FolderHistoryBox* m_directoryLeft; - zen::DirPickerCtrl* m_dirPickerLeft; - wxPanel* m_panel20; - wxBitmapButton* m_bpButtonAltCompCfg; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - wxPanel* m_panelRight; - FolderHistoryBox* m_directoryRight; - zen::DirPickerCtrl* m_dirPickerRight; - - FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~FolderPairGenerated(); - +private: + +protected: + +public: + wxPanel* m_panelLeft; + wxBitmapButton* m_bpButtonRemovePair; + FolderHistoryBox* m_directoryLeft; + zen::DirPickerCtrl* m_dirPickerLeft; + wxPanel* m_panel20; + wxBitmapButton* m_bpButtonAltCompCfg; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + wxPanel* m_panelRight; + FolderHistoryBox* m_directoryRight; + zen::DirPickerCtrl* m_dirPickerRight; + + FolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~FolderPairGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class CompareStatusGenerated /////////////////////////////////////////////////////////////////////////////// -class CompareStatusGenerated : public wxPanel +class CompareStatusGenerated : public wxPanel { - private: - - protected: - wxStaticText* m_staticText30; - wxTextCtrl* m_textCtrlStatus; - wxGauge* m_gauge2; - wxBoxSizer* bSizer42; - wxBoxSizer* bSizerFilesFound; - wxStaticText* m_staticText321; - wxStaticText* m_staticTextScanned; - wxBoxSizer* bSizerFilesRemaining; - wxStaticText* m_staticText46; - wxStaticText* m_staticTextFilesRemaining; - wxStaticText* m_staticText117; - wxStaticText* m_staticTextDataRemaining; - wxStaticText* m_staticText118; - wxBoxSizer* sSizerSpeed; - wxStaticText* m_staticText104; - wxStaticText* m_staticTextSpeed; - wxBoxSizer* sSizerTimeRemaining; - wxStaticText* m_staticTextTimeRemFixed; - wxStaticText* m_staticTextRemTime; - wxBoxSizer* sSizerTimeElapsed; - wxStaticText* m_staticTextTimeElapsed; - - public: - - CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxRAISED_BORDER|wxTAB_TRAVERSAL ); - ~CompareStatusGenerated(); - +private: + +protected: + wxStaticText* m_staticText30; + wxTextCtrl* m_textCtrlStatus; + wxGauge* m_gauge2; + wxBoxSizer* bSizer42; + wxBoxSizer* bSizerFilesFound; + wxStaticText* m_staticText321; + wxStaticText* m_staticTextScanned; + wxBoxSizer* bSizerFilesRemaining; + wxStaticText* m_staticText46; + wxStaticText* m_staticTextFilesRemaining; + wxStaticText* m_staticText117; + wxStaticText* m_staticTextDataRemaining; + wxStaticText* m_staticText118; + wxBoxSizer* sSizerSpeed; + wxStaticText* m_staticText104; + wxStaticText* m_staticTextSpeed; + wxBoxSizer* sSizerTimeRemaining; + wxStaticText* m_staticTextTimeRemFixed; + wxStaticText* m_staticTextRemTime; + wxBoxSizer* sSizerTimeElapsed; + wxStaticText* m_staticTextTimeElapsed; + +public: + + CompareStatusGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxRAISED_BORDER|wxTAB_TRAVERSAL ); + ~CompareStatusGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class BatchDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class BatchDlgGenerated : public wxDialog +class BatchDlgGenerated : public wxDialog { - private: - - protected: - wxStaticBitmap* m_bitmap27; - wxPanel* m_panel8; - wxStaticText* m_staticText56; - wxStaticText* m_staticText44; - wxBitmapButton* m_bpButtonHelp; - wxListbook* m_listbook1; - wxPanel* m_panelOverview; - wxBitmapButton* m_bpButtonCmpConfig; - wxStaticText* m_staticTextCmpVariant; - wxBitmapButton* m_bpButtonFilter; - wxStaticText* m_staticTextSyncVariant; - wxBitmapButton* m_bpButtonSyncConfig; - wxBoxSizer* sbSizerMainPair; - wxPanel* m_panelMainPair; - wxStaticText* m_staticText532; - wxStaticText* m_staticText5411; - wxBoxSizer* bSizerAddFolderPairs; - wxPanel* m_panelBatchSettings; - wxCheckBox* m_checkBoxShowProgress; - wxChoice* m_choiceHandleError; - wxStaticBoxSizer* sbSizerLogfileDir; - wxStaticText* m_staticText96; - wxSpinCtrl* m_spinCtrlLogCountMax; - wxPanel* m_panelLogfile; - wxStaticText* m_staticText94; - zen::DirPickerCtrl* m_dirPickerLogfileDir; - wxButton* m_buttonSave; - wxButton* m_buttonLoad; - wxButton* m_button6; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); } - virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); } - virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } - virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } - virtual void OnChangeMaxLogCountTxt( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); } - virtual void OnLoadBatchJob( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - wxScrolledWindow* m_scrolledWindow6; - wxBitmapButton* m_bpButtonAddPair; - wxBitmapButton* m_bpButtonRemovePair; - wxPanel* m_panelLeft; - FolderHistoryBox* m_directoryLeft; - zen::DirPickerCtrl* m_dirPickerLeft; - wxPanel* m_panelRight; - FolderHistoryBox* m_directoryRight; - zen::DirPickerCtrl* m_dirPickerRight; - wxBitmapButton* m_bpButtonAltCompCfg; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - FolderHistoryBox* m_comboBoxLogfileDir; - - BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create a batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~BatchDlgGenerated(); - +private: + +protected: + wxStaticBitmap* m_bitmap27; + wxPanel* m_panel8; + wxStaticText* m_staticText56; + wxStaticText* m_staticText44; + wxBitmapButton* m_bpButtonHelp; + wxListbook* m_listbook1; + wxPanel* m_panelOverview; + wxBitmapButton* m_bpButtonCmpConfig; + wxStaticText* m_staticTextCmpVariant; + wxBitmapButton* m_bpButtonFilter; + wxStaticText* m_staticTextSyncVariant; + wxBitmapButton* m_bpButtonSyncConfig; + wxBoxSizer* sbSizerMainPair; + wxPanel* m_panelMainPair; + wxStaticText* m_staticText532; + wxStaticText* m_staticText5411; + wxBoxSizer* bSizerAddFolderPairs; + wxPanel* m_panelBatchSettings; + wxCheckBox* m_checkBoxShowProgress; + wxChoice* m_choiceHandleError; + wxStaticBoxSizer* sbSizerLogfileDir; + wxStaticText* m_staticText96; + wxSpinCtrl* m_spinCtrlLogCountMax; + wxPanel* m_panelLogfile; + wxStaticText* m_staticText94; + zen::DirPickerCtrl* m_dirPickerLogfileDir; + wxButton* m_buttonSave; + wxButton* m_buttonLoad; + wxButton* m_button6; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCmpSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConfigureFilter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeMaxLogCountTxt( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSaveBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLoadBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + wxScrolledWindow* m_scrolledWindow6; + wxBitmapButton* m_bpButtonAddPair; + wxBitmapButton* m_bpButtonRemovePair; + wxPanel* m_panelLeft; + FolderHistoryBox* m_directoryLeft; + zen::DirPickerCtrl* m_dirPickerLeft; + wxPanel* m_panelRight; + FolderHistoryBox* m_directoryRight; + zen::DirPickerCtrl* m_dirPickerRight; + wxBitmapButton* m_bpButtonAltCompCfg; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + FolderHistoryBox* m_comboBoxLogfileDir; + + BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Create a batch job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~BatchDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class BatchFolderPairGenerated /////////////////////////////////////////////////////////////////////////////// -class BatchFolderPairGenerated : public wxPanel +class BatchFolderPairGenerated : public wxPanel { - private: - - protected: - wxPanel* m_panel32; - wxStaticText* m_staticText53; - wxStaticText* m_staticText541; - wxPanel* m_panelLeft; - wxPanel* m_panelRight; - - public: - wxBitmapButton* m_bpButtonRemovePair; - FolderHistoryBox* m_directoryLeft; - zen::DirPickerCtrl* m_dirPickerLeft; - FolderHistoryBox* m_directoryRight; - zen::DirPickerCtrl* m_dirPickerRight; - wxBitmapButton* m_bpButtonAltCompCfg; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - - BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~BatchFolderPairGenerated(); - +private: + +protected: + wxPanel* m_panel32; + wxStaticText* m_staticText53; + wxStaticText* m_staticText541; + wxPanel* m_panelLeft; + wxPanel* m_panelRight; + +public: + wxBitmapButton* m_bpButtonRemovePair; + FolderHistoryBox* m_directoryLeft; + zen::DirPickerCtrl* m_dirPickerLeft; + FolderHistoryBox* m_directoryRight; + zen::DirPickerCtrl* m_dirPickerRight; + wxBitmapButton* m_bpButtonAltCompCfg; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + + BatchFolderPairGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~BatchFolderPairGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class SyncCfgDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class SyncCfgDlgGenerated : public wxDialog +class SyncCfgDlgGenerated : public wxDialog { - private: - - protected: - wxRadioButton* m_radioBtnAutomatic; - wxButton* m_buttonAutomatic; - wxStaticText* m_staticText81; - wxRadioButton* m_radioBtnMirror; - wxButton* m_buttonOneWay; - wxStaticText* m_staticText8; - wxRadioButton* m_radioBtnUpdate; - wxButton* m_buttonUpdate; - wxStaticText* m_staticText101; - wxRadioButton* m_radioBtnCustom; - wxButton* m_buttonUpdate1; - wxStaticText* m_staticText9; - wxStaticBoxSizer* sbSizerCustDelDir; - wxChoice* m_choiceHandleDeletion; - wxPanel* m_panelCustomDeletionDir; - FolderHistoryBox* m_customDelFolder; - zen::DirPickerCtrl* m_dirPickerCustomDelFolder; - wxBoxSizer* bSizer201; - wxStaticBoxSizer* sbSizerErrorHandling; - wxChoice* m_choiceHandleError; - wxStaticBoxSizer* sbSizerExecFinished; - ExecFinishedBox* m_comboBoxExecFinished; - wxStaticBitmap* m_bitmapDatabase; - wxBoxSizer* sbSizerSyncDirections; - wxStaticText* m_staticText21; - wxStaticText* m_staticText31; - wxBoxSizer* bSizerLeftOnly; - wxStaticBitmap* m_bitmapLeftOnly; - wxBitmapButton* m_bpButtonLeftOnly; - wxBoxSizer* bSizerRightOnly; - wxStaticBitmap* m_bitmapRightOnly; - wxBitmapButton* m_bpButtonRightOnly; - wxBoxSizer* bSizerLeftNewer; - wxStaticBitmap* m_bitmapLeftNewer; - wxBitmapButton* m_bpButtonLeftNewer; - wxBoxSizer* bSizerRightNewer; - wxStaticBitmap* m_bitmapRightNewer; - wxBitmapButton* m_bpButtonRightNewer; - wxBoxSizer* bSizerDifferent; - wxStaticBitmap* m_bitmapDifferent; - wxBitmapButton* m_bpButtonDifferent; - wxBoxSizer* bSizerConflict; - wxStaticBitmap* m_bitmapConflict; - wxBitmapButton* m_bpButtonConflict; - wxButton* m_buttonOK; - wxButton* m_button16; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnSyncAutomatic( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncAutomaticDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void OnSyncMirror( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void OnChangeDeletionHandling( wxCommandEvent& event ) { event.Skip(); } - virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } - virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); } - virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); } - virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); } - virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); } - virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); } - virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~SyncCfgDlgGenerated(); - +private: + +protected: + wxRadioButton* m_radioBtnAutomatic; + wxButton* m_buttonAutomatic; + wxStaticText* m_staticText81; + wxRadioButton* m_radioBtnMirror; + wxButton* m_buttonOneWay; + wxStaticText* m_staticText8; + wxRadioButton* m_radioBtnUpdate; + wxButton* m_buttonUpdate; + wxStaticText* m_staticText101; + wxRadioButton* m_radioBtnCustom; + wxButton* m_buttonUpdate1; + wxStaticText* m_staticText9; + wxStaticBoxSizer* sbSizerCustDelDir; + wxChoice* m_choiceHandleDeletion; + wxPanel* m_panelCustomDeletionDir; + FolderHistoryBox* m_customDelFolder; + zen::DirPickerCtrl* m_dirPickerCustomDelFolder; + wxBoxSizer* bSizer201; + wxStaticBoxSizer* sbSizerErrorHandling; + wxChoice* m_choiceHandleError; + wxStaticBoxSizer* sbSizerExecFinished; + ExecFinishedBox* m_comboBoxExecFinished; + wxStaticBitmap* m_bitmapDatabase; + wxBoxSizer* sbSizerSyncDirections; + wxStaticText* m_staticText21; + wxStaticText* m_staticText31; + wxBoxSizer* bSizerLeftOnly; + wxStaticBitmap* m_bitmapLeftOnly; + wxBitmapButton* m_bpButtonLeftOnly; + wxBoxSizer* bSizerRightOnly; + wxStaticBitmap* m_bitmapRightOnly; + wxBitmapButton* m_bpButtonRightOnly; + wxBoxSizer* bSizerLeftNewer; + wxStaticBitmap* m_bitmapLeftNewer; + wxBitmapButton* m_bpButtonLeftNewer; + wxBoxSizer* bSizerRightNewer; + wxStaticBitmap* m_bitmapRightNewer; + wxBitmapButton* m_bpButtonRightNewer; + wxBoxSizer* bSizerDifferent; + wxStaticBitmap* m_bitmapDifferent; + wxBitmapButton* m_bpButtonDifferent; + wxBoxSizer* bSizerConflict; + wxStaticBitmap* m_bitmapConflict; + wxBitmapButton* m_bpButtonConflict; + wxButton* m_buttonOK; + wxButton* m_button16; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnSyncAutomatic( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncAutomaticDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void OnSyncMirror( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void OnChangeDeletionHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnExLeftSideOnly( wxCommandEvent& event ) { event.Skip(); } + virtual void OnExRightSideOnly( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftNewer( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRightNewer( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDifferent( wxCommandEvent& event ) { event.Skip(); } + virtual void OnConflict( wxCommandEvent& event ) { event.Skip(); } + virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + SyncCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~SyncCfgDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class CmpCfgDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class CmpCfgDlgGenerated : public wxDialog +class CmpCfgDlgGenerated : public wxDialog { - private: - - protected: - wxRadioButton* m_radioBtnSizeDate; - wxStaticBitmap* m_bitmapByTime; - wxButton* m_buttonTimeSize; - wxRadioButton* m_radioBtnContent; - wxStaticBitmap* m_bitmapByContent; - wxButton* m_buttonContent; - wxChoice* m_choiceHandleSymlinks; - wxBitmapButton* m_bpButtonHelp; - wxButton* m_button10; - wxButton* m_button6; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnTimeSize( wxCommandEvent& event ) { event.Skip(); } - virtual void OnTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void OnContent( wxCommandEvent& event ) { event.Skip(); } - virtual void OnContentDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } - virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~CmpCfgDlgGenerated(); - +private: + +protected: + wxRadioButton* m_radioBtnSizeDate; + wxStaticBitmap* m_bitmapByTime; + wxButton* m_buttonTimeSize; + wxRadioButton* m_radioBtnContent; + wxStaticBitmap* m_bitmapByContent; + wxButton* m_buttonContent; + wxChoice* m_choiceHandleSymlinks; + wxBitmapButton* m_bpButtonHelp; + wxButton* m_button10; + wxButton* m_button6; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnTimeSize( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void OnContent( wxCommandEvent& event ) { event.Skip(); } + virtual void OnContentDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + CmpCfgDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Comparison settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~CmpCfgDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class SyncStatusDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class SyncStatusDlgGenerated : public wxFrame +class SyncStatusDlgGenerated : public wxFrame { - private: - - protected: - wxPanel* m_panelBackground; - wxBoxSizer* bSizerTop; - wxStaticBitmap* m_bitmapStatus; - wxStaticText* m_staticTextStatus; - wxAnimationCtrl* m_animationControl1; - wxBoxSizer* bSizerCurrentOperation; - wxStaticText* m_staticText2511; - wxTextCtrl* m_textCtrlInfo; - wxPanel* m_panelProgress; - wxBoxSizer* bSizer171; - wxStaticBoxSizer* bSizerProgressStat; - wxStaticText* m_staticTextItemsRem; - wxBoxSizer* bSizerItemsRem; - wxStaticText* m_staticTextRemainingObj; - wxStaticText* m_staticText96; - wxStaticText* m_staticTextDataRemaining; - wxStaticText* m_staticText97; - wxStaticText* m_staticTextItemsProc; - wxBoxSizer* bSizerItemsProc; - wxStaticText* m_staticTextProcessedObj; - wxStaticText* m_staticText98; - wxStaticText* m_staticTextDataProcessed; - wxStaticText* m_staticText99; - wxStaticText* m_staticTextSpeedDescr; - wxStaticText* m_staticTextSpeed; - wxStaticText* m_staticText55; - wxStaticText* m_staticTextTimeElapsed; - wxStaticText* m_staticTextRemTimeDescr; - wxStaticText* m_staticTextRemTime; - zen::Graph2D* m_panelGraph; - wxBoxSizer* bSizerFinalStat; - wxListbook* m_listbookResult; - wxBoxSizer* bSizerExecFinished; - wxStaticText* m_staticText87; - ExecFinishedBox* m_comboBoxExecFinished; - wxBoxSizer* bSizer28; - wxButton* m_buttonOK; - wxButton* m_buttonPause; - wxButton* m_buttonAbort; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void OnPause( wxCommandEvent& event ) { event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } - - - public: - wxGauge* m_gauge1; - - SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,350 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - - ~SyncStatusDlgGenerated(); - +private: + +protected: + wxPanel* m_panelBackground; + wxBoxSizer* bSizerTop; + wxStaticBitmap* m_bitmapStatus; + wxStaticText* m_staticTextStatus; + wxAnimationCtrl* m_animationControl1; + wxBoxSizer* bSizerCurrentOperation; + wxStaticText* m_staticText2511; + wxTextCtrl* m_textCtrlInfo; + wxPanel* m_panelProgress; + wxBoxSizer* bSizer171; + wxStaticBoxSizer* bSizerProgressStat; + wxStaticText* m_staticTextItemsRem; + wxBoxSizer* bSizerItemsRem; + wxStaticText* m_staticTextRemainingObj; + wxStaticText* m_staticText96; + wxStaticText* m_staticTextDataRemaining; + wxStaticText* m_staticText97; + wxStaticText* m_staticTextItemsProc; + wxBoxSizer* bSizerItemsProc; + wxStaticText* m_staticTextProcessedObj; + wxStaticText* m_staticText98; + wxStaticText* m_staticTextDataProcessed; + wxStaticText* m_staticText99; + wxStaticText* m_staticTextSpeedDescr; + wxStaticText* m_staticTextSpeed; + wxStaticText* m_staticText55; + wxStaticText* m_staticTextTimeElapsed; + wxStaticText* m_staticTextRemTimeDescr; + wxStaticText* m_staticTextRemTime; + zen::Graph2D* m_panelGraph; + wxBoxSizer* bSizerFinalStat; + wxListbook* m_listbookResult; + wxBoxSizer* bSizerExecFinished; + wxStaticText* m_staticText87; + ExecFinishedBox* m_comboBoxExecFinished; + wxBoxSizer* bSizer28; + wxButton* m_buttonOK; + wxButton* m_buttonPause; + wxButton* m_buttonAbort; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPause( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } + + +public: + wxGauge* m_gauge1; + + SyncStatusDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,350 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + + ~SyncStatusDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class LogControlGenerated /////////////////////////////////////////////////////////////////////////////// -class LogControlGenerated : public wxPanel +class LogControlGenerated : public wxPanel { - private: - - protected: - ToggleButton* m_bpButtonErrors; - ToggleButton* m_bpButtonWarnings; - ToggleButton* m_bpButtonInfo; - wxTextCtrl* m_textCtrlInfo; - - // Virtual event handlers, overide them in your derived class - virtual void OnErrors( wxCommandEvent& event ) { event.Skip(); } - virtual void OnWarnings( wxCommandEvent& event ) { event.Skip(); } - virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); } - - - public: - - LogControlGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~LogControlGenerated(); - +private: + +protected: + ToggleButton* m_bpButtonErrors; + ToggleButton* m_bpButtonWarnings; + ToggleButton* m_bpButtonInfo; + wxTextCtrl* m_textCtrlInfo; + + // Virtual event handlers, overide them in your derived class + virtual void OnErrors( wxCommandEvent& event ) { event.Skip(); } + virtual void OnWarnings( wxCommandEvent& event ) { event.Skip(); } + virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); } + + +public: + + LogControlGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~LogControlGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class AboutDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class AboutDlgGenerated : public wxDialog +class AboutDlgGenerated : public wxDialog { - private: - - protected: - wxPanel* m_panel5; - wxStaticBitmap* m_bitmap11; - wxStaticText* m_build; - wxPanel* m_panel33; - wxBoxSizer* bSizerCodeInfo; - wxStaticText* m_staticText72; - wxHyperlinkCtrl* m_hyperlink9; - wxHyperlinkCtrl* m_hyperlink11; - wxHyperlinkCtrl* m_hyperlink10; - wxHyperlinkCtrl* m_hyperlink13; - wxHyperlinkCtrl* m_hyperlink7; - wxHyperlinkCtrl* m_hyperlink16; - wxHyperlinkCtrl* m_hyperlink8; - wxHyperlinkCtrl* m_hyperlink15; - wxHyperlinkCtrl* m_hyperlink12; - wxHyperlinkCtrl* m_hyperlink18; - wxHyperlinkCtrl* m_hyperlink14; - wxHyperlinkCtrl* m_hyperlink21; - wxScrolledWindow* m_scrolledWindowTranslators; - wxBoxSizer* bSizerTranslators; - wxStaticText* m_staticText54; - wxFlexGridSizer* fgSizerTranslators; - wxStaticLine* m_staticline3; - wxStaticText* m_staticText131; - wxStaticLine* m_staticline12; - wxStaticBitmap* m_bitmap9; - wxHyperlinkCtrl* m_hyperlink1; - wxHyperlinkCtrl* m_hyperlink3; - wxAnimationCtrl* m_animationControl1; - wxStaticBitmap* m_bitmap10; - wxHyperlinkCtrl* m_hyperlink2; - wxHyperlinkCtrl* m_hyperlink6; - wxStaticBitmap* m_bitmapTransl; - wxStaticLine* m_staticline2; - wxStaticBitmap* m_bitmap13; - wxHyperlinkCtrl* m_hyperlink5; - wxButton* m_buttonOkay; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } - - - public: - - AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~AboutDlgGenerated(); - +private: + +protected: + wxPanel* m_panel5; + wxStaticBitmap* m_bitmap11; + wxStaticText* m_build; + wxPanel* m_panel33; + wxBoxSizer* bSizerCodeInfo; + wxStaticText* m_staticText72; + wxHyperlinkCtrl* m_hyperlink9; + wxHyperlinkCtrl* m_hyperlink11; + wxHyperlinkCtrl* m_hyperlink10; + wxHyperlinkCtrl* m_hyperlink13; + wxHyperlinkCtrl* m_hyperlink7; + wxHyperlinkCtrl* m_hyperlink16; + wxHyperlinkCtrl* m_hyperlink8; + wxHyperlinkCtrl* m_hyperlink15; + wxHyperlinkCtrl* m_hyperlink12; + wxHyperlinkCtrl* m_hyperlink18; + wxHyperlinkCtrl* m_hyperlink14; + wxHyperlinkCtrl* m_hyperlink21; + wxHyperlinkCtrl* m_hyperlink1; + wxStaticBitmap* m_bitmap9; + wxHyperlinkCtrl* m_hyperlink2; + wxStaticBitmap* m_bitmap10; + wxScrolledWindow* m_scrolledWindowTranslators; + wxBoxSizer* bSizerTranslators; + wxStaticText* m_staticText54; + wxFlexGridSizer* fgSizerTranslators; + wxHyperlinkCtrl* m_hyperlink3; + wxStaticBitmap* m_bitmapPaypal; + wxStaticBitmap* m_bitmap13; + wxHyperlinkCtrl* m_hyperlink5; + wxButton* m_buttonOkay; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } + + +public: + + AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~AboutDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class ErrorDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class ErrorDlgGenerated : public wxDialog +class ErrorDlgGenerated : public wxDialog { - private: - - protected: - wxStaticBitmap* m_bitmap10; - wxTextCtrl* m_textCtrl8; - wxCheckBox* m_checkBoxIgnoreErrors; - wxButton* m_buttonIgnore; - wxButton* m_buttonRetry; - wxButton* m_buttonAbort; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRetry( wxCommandEvent& event ) { event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } - - - public: - - ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); - ~ErrorDlgGenerated(); - +private: + +protected: + wxStaticBitmap* m_bitmap10; + wxTextCtrl* m_textCtrl8; + wxCheckBox* m_checkBoxIgnoreErrors; + wxButton* m_buttonIgnore; + wxButton* m_buttonRetry; + wxButton* m_buttonAbort; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRetry( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } + + +public: + + ErrorDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Error"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + ~ErrorDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class WarningDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class WarningDlgGenerated : public wxDialog +class WarningDlgGenerated : public wxDialog { - private: - - protected: - wxTextCtrl* m_textCtrl8; - wxCheckBox* m_checkBoxDontShowAgain; - wxButton* m_buttonIgnore; - wxButton* m_buttonSwitch; - wxButton* m_buttonAbort; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSwitch( wxCommandEvent& event ) { event.Skip(); } - virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } - - - public: - wxStaticBitmap* m_bitmap10; - - WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); - ~WarningDlgGenerated(); - +private: + +protected: + wxTextCtrl* m_textCtrl8; + wxCheckBox* m_checkBoxDontShowAgain; + wxButton* m_buttonIgnore; + wxButton* m_buttonSwitch; + wxButton* m_buttonAbort; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnIgnore( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSwitch( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAbort( wxCommandEvent& event ) { event.Skip(); } + + +public: + wxStaticBitmap* m_bitmap10; + + WarningDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Warning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 460,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + ~WarningDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class QuestionDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class QuestionDlgGenerated : public wxDialog +class QuestionDlgGenerated : public wxDialog { - private: - - protected: - wxStaticBitmap* m_bitmap10; - wxTextCtrl* m_textCtrl8; - wxCheckBox* m_checkBoxDontAskAgain; - wxButton* m_buttonYes; - wxButton* m_buttonNo; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnCheckBoxDontShowAgain( wxCommandEvent& event ) { event.Skip(); } - virtual void OnYes( wxCommandEvent& event ) { event.Skip(); } - virtual void OnNo( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); - ~QuestionDlgGenerated(); - +private: + +protected: + wxStaticBitmap* m_bitmap10; + wxTextCtrl* m_textCtrl8; + wxCheckBox* m_checkBoxDontAskAgain; + wxButton* m_buttonYes; + wxButton* m_buttonNo; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnCheckBoxDontShowAgain( wxCommandEvent& event ) { event.Skip(); } + virtual void OnYes( wxCommandEvent& event ) { event.Skip(); } + virtual void OnNo( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + QuestionDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Question"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 420,198 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + ~QuestionDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class DeleteDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class DeleteDlgGenerated : public wxDialog +class DeleteDlgGenerated : public wxDialog { - private: - - protected: - wxStaticBitmap* m_bitmap12; - wxStaticText* m_staticTextHeader; - wxTextCtrl* m_textCtrlMessage; - wxCheckBox* m_checkBoxDeleteBothSides; - wxCheckBox* m_checkBoxUseRecycler; - wxButton* m_buttonOK; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnDelOnBothSides( wxCommandEvent& event ) { event.Skip(); } - virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); - ~DeleteDlgGenerated(); - +private: + +protected: + wxStaticBitmap* m_bitmap12; + wxStaticText* m_staticTextHeader; + wxTextCtrl* m_textCtrlMessage; + wxCheckBox* m_checkBoxDeleteBothSides; + wxCheckBox* m_checkBoxUseRecycler; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnDelOnBothSides( wxCommandEvent& event ) { event.Skip(); } + virtual void OnUseRecycler( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 553,336 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER ); + ~DeleteDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class FilterDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class FilterDlgGenerated : public wxDialog +class FilterDlgGenerated : public wxDialog { - private: - - protected: - wxStaticBitmap* m_bitmap26; - wxPanel* m_panel8; - wxStaticText* m_staticTexHeader; - wxStaticText* m_staticText44; - wxBitmapButton* m_bpButtonHelp; - wxPanel* m_panel13; - wxStaticLine* m_staticline10; - wxStaticText* m_staticText45; - wxStaticText* m_staticText83; - wxStaticText* m_staticText84; - wxStaticText* m_staticText85; - wxStaticText* m_staticText181; - wxStaticText* m_staticText1811; - wxStaticBitmap* m_bitmapInclude; - wxTextCtrl* m_textCtrlInclude; - wxStaticBitmap* m_bitmapExclude; - wxTextCtrl* m_textCtrlExclude; - wxStaticBitmap* m_bitmapFilterDate; - wxStaticText* m_staticText103; - wxChoice* m_choiceUnitTimespan; - wxSpinCtrl* m_spinCtrlTimespan; - wxStaticBitmap* m_bitmapFilterSize; - wxStaticText* m_staticText101; - wxSpinCtrl* m_spinCtrlMinSize; - wxChoice* m_choiceUnitMinSize; - wxStaticText* m_staticText102; - wxSpinCtrl* m_spinCtrlMaxSize; - wxChoice* m_choiceUnitMaxSize; - wxButton* m_button9; - wxButton* m_button10; - wxButton* m_button17; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); } - virtual void OnUpdateNameFilter( wxCommandEvent& event ) { event.Skip(); } - virtual void OnUpdateChoice( wxCommandEvent& event ) { event.Skip(); } - virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } - virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~FilterDlgGenerated(); - +private: + +protected: + wxStaticBitmap* m_bitmap26; + wxPanel* m_panel8; + wxStaticText* m_staticTexHeader; + wxStaticText* m_staticText44; + wxBitmapButton* m_bpButtonHelp; + wxPanel* m_panel13; + wxStaticLine* m_staticline10; + wxStaticText* m_staticText45; + wxStaticText* m_staticText83; + wxStaticText* m_staticText84; + wxStaticText* m_staticText85; + wxStaticText* m_staticText181; + wxStaticText* m_staticText1811; + wxStaticBitmap* m_bitmapInclude; + wxTextCtrl* m_textCtrlInclude; + wxStaticBitmap* m_bitmapExclude; + wxTextCtrl* m_textCtrlExclude; + wxStaticBitmap* m_bitmapFilterDate; + wxStaticText* m_staticText103; + wxChoice* m_choiceUnitTimespan; + wxSpinCtrl* m_spinCtrlTimespan; + wxStaticBitmap* m_bitmapFilterSize; + wxStaticText* m_staticText101; + wxSpinCtrl* m_spinCtrlMinSize; + wxChoice* m_choiceUnitMinSize; + wxStaticText* m_staticText102; + wxSpinCtrl* m_spinCtrlMaxSize; + wxChoice* m_choiceUnitMaxSize; + wxButton* m_button9; + wxButton* m_button10; + wxButton* m_button17; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnUpdateNameFilter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnUpdateChoice( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } + virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + FilterDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~FilterDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class CustomizeColsDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class CustomizeColsDlgGenerated : public wxDialog +class CustomizeColsDlgGenerated : public wxDialog { - private: - - protected: - wxCheckListBox* m_checkListColumns; - wxBitmapButton* m_bpButton29; - wxBitmapButton* m_bpButton30; - wxButton* m_button9; - wxButton* m_button28; - wxButton* m_button29; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnMoveUp( wxCommandEvent& event ) { event.Skip(); } - virtual void OnMoveDown( wxCommandEvent& event ) { event.Skip(); } - virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Customize columns"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~CustomizeColsDlgGenerated(); - +private: + +protected: + wxCheckListBox* m_checkListColumns; + wxBitmapButton* m_bpButton29; + wxBitmapButton* m_bpButton30; + wxButton* m_button9; + wxButton* m_button28; + wxButton* m_button29; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnMoveUp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMoveDown( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + CustomizeColsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Customize columns"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~CustomizeColsDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class GlobalSettingsDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class GlobalSettingsDlgGenerated : public wxDialog +class GlobalSettingsDlgGenerated : public wxDialog { - private: - - protected: - wxStaticBitmap* m_bitmapSettings; - wxPanel* m_panel8; - wxStaticText* m_staticText56; - wxCheckBox* m_checkBoxTransCopy; - wxStaticText* m_staticText82; - wxCheckBox* m_checkBoxCopyLocked; - wxStaticText* m_staticTextCopyLocked; - wxCheckBox* m_checkBoxCopyPermissions; - wxStaticText* m_staticText8211; - wxStaticText* m_staticText100; - zen::BitmapButton* m_buttonResetDialogs; - wxGrid* m_gridCustomCommand; - wxBitmapButton* m_bpButtonAddRow; - wxBitmapButton* m_bpButtonRemoveRow; - wxButton* m_button9; - wxButton* m_buttonOkay; - wxButton* m_button29; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnResetDialogs( wxCommandEvent& event ) { event.Skip(); } - virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); } - virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~GlobalSettingsDlgGenerated(); - +private: + +protected: + wxStaticBitmap* m_bitmapSettings; + wxPanel* m_panel8; + wxStaticText* m_staticText56; + wxCheckBox* m_checkBoxTransCopy; + wxStaticText* m_staticText82; + wxCheckBox* m_checkBoxCopyLocked; + wxStaticText* m_staticTextCopyLocked; + wxCheckBox* m_checkBoxCopyPermissions; + wxStaticText* m_staticText8211; + wxStaticText* m_staticText100; + zen::BitmapButton* m_buttonResetDialogs; + wxGrid* m_gridCustomCommand; + wxBitmapButton* m_bpButtonAddRow; + wxBitmapButton* m_bpButtonRemoveRow; + wxButton* m_button9; + wxButton* m_buttonOkay; + wxButton* m_button29; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnResetDialogs( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddRow( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveRow( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDefault( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + GlobalSettingsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~GlobalSettingsDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class SyncPreviewDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class SyncPreviewDlgGenerated : public wxDialog +class SyncPreviewDlgGenerated : public wxDialog { - private: - - protected: - zen::BitmapButton* m_buttonStartSync; - wxStaticLine* m_staticline16; - wxStaticText* m_staticTextVariant; - wxStaticLine* m_staticline14; - wxStaticText* m_staticText94; - wxStaticBitmap* m_bitmapCreate; - wxTextCtrl* m_textCtrlCreateL; - wxStaticBitmap* m_bitmapUpdate; - wxTextCtrl* m_textCtrlUpdateL; - wxStaticBitmap* m_bitmapDelete; - wxTextCtrl* m_textCtrlDeleteL; - wxStaticText* m_staticText95; - wxTextCtrl* m_textCtrlCreateR; - wxTextCtrl* m_textCtrlUpdateR; - wxTextCtrl* m_textCtrlDeleteR; - wxStaticBitmap* m_bitmapData; - wxTextCtrl* m_textCtrlData; - wxStaticLine* m_staticline12; - wxCheckBox* m_checkBoxDontShowAgain; - wxButton* m_button16; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~SyncPreviewDlgGenerated(); - +private: + +protected: + zen::BitmapButton* m_buttonStartSync; + wxStaticLine* m_staticline16; + wxStaticText* m_staticTextVariant; + wxStaticLine* m_staticline14; + wxStaticText* m_staticText94; + wxStaticBitmap* m_bitmapCreate; + wxTextCtrl* m_textCtrlCreateL; + wxStaticBitmap* m_bitmapUpdate; + wxTextCtrl* m_textCtrlUpdateL; + wxStaticBitmap* m_bitmapDelete; + wxTextCtrl* m_textCtrlDeleteL; + wxStaticText* m_staticText95; + wxTextCtrl* m_textCtrlCreateR; + wxTextCtrl* m_textCtrlUpdateR; + wxTextCtrl* m_textCtrlDeleteR; + wxStaticBitmap* m_bitmapData; + wxTextCtrl* m_textCtrlData; + wxStaticLine* m_staticline12; + wxCheckBox* m_checkBoxDontShowAgain; + wxButton* m_button16; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnStartSync( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + SyncPreviewDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronization Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~SyncPreviewDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class PopupFrameGenerated1 /////////////////////////////////////////////////////////////////////////////// -class PopupFrameGenerated1 : public wxFrame +class PopupFrameGenerated1 : public wxFrame { - private: - - protected: - - public: - wxStaticBitmap* m_bitmapLeft; - wxStaticText* m_staticTextMain; - - PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER ); - - ~PopupFrameGenerated1(); - +private: + +protected: + +public: + wxStaticBitmap* m_bitmapLeft; + wxStaticText* m_staticTextMain; + + PopupFrameGenerated1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP|wxSTATIC_BORDER ); + + ~PopupFrameGenerated1(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class SearchDialogGenerated /////////////////////////////////////////////////////////////////////////////// -class SearchDialogGenerated : public wxDialog +class SearchDialogGenerated : public wxDialog { - private: - - protected: - wxStaticText* m_staticText101; - wxTextCtrl* m_textCtrlSearchTxt; - wxCheckBox* m_checkBoxMatchCase; - wxButton* m_buttonFindNext; - wxButton* m_button29; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnText( wxCommandEvent& event ) { event.Skip(); } - virtual void OnFindNext( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~SearchDialogGenerated(); - +private: + +protected: + wxStaticText* m_staticText101; + wxTextCtrl* m_textCtrlSearchTxt; + wxCheckBox* m_checkBoxMatchCase; + wxButton* m_buttonFindNext; + wxButton* m_button29; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnText( wxCommandEvent& event ) { event.Skip(); } + virtual void OnFindNext( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + SearchDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~SearchDialogGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class SelectTimespanDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class SelectTimespanDlgGenerated : public wxDialog +class SelectTimespanDlgGenerated : public wxDialog { - private: - - protected: - wxCalendarCtrl* m_calendarFrom; - wxCalendarCtrl* m_calendarTo; - wxButton* m_buttonOkay; - wxButton* m_button29; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); } - virtual void OnChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); } - virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - - public: - - SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select time span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~SelectTimespanDlgGenerated(); - +private: + +protected: + wxCalendarCtrl* m_calendarFrom; + wxCalendarCtrl* m_calendarTo; + wxButton* m_buttonOkay; + wxButton* m_button29; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); } + virtual void OnChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); } + virtual void OnOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + + +public: + + SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select time span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + ~SelectTimespanDlgGenerated(); + }; #endif //__GUI_GENERATED_H__ diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp index 3e2662e2..42c50671 100644 --- a/ui/gui_status_handler.cpp +++ b/ui/gui_status_handler.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "gui_status_handler.h" @@ -237,7 +237,7 @@ SyncStatusHandler::~SyncStatusHandler() //finalize error log if (abortIsRequested()) - errorLog.logMsg(_("Synchronization aborted!"), TYPE_ERROR); + errorLog.logMsg(_("Synchronization aborted!"), TYPE_FATAL_ERROR); else if (totalErrors > 0) errorLog.logMsg(_("Synchronization completed with errors!"), TYPE_WARNING); else diff --git a/ui/gui_status_handler.h b/ui/gui_status_handler.h index 2e76d40b..1977e265 100644 --- a/ui/gui_status_handler.h +++ b/ui/gui_status_handler.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef GUISTATUSHANDLER_H_INCLUDED diff --git a/ui/main_dlg.cpp b/ui/main_dlg.cpp index c7eabffc..24f1b06e 100644 --- a/ui/main_dlg.cpp +++ b/ui/main_dlg.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "main_dlg.h" @@ -17,8 +17,8 @@ #include <wx/display.h> #include <wx/app.h> #include <wx/dcmemory.h> +#include <wx+/context_menu.h> #include "folder_history_box.h" -#include "../lib/custom_grid.h" #include <wx+/button.h> #include <wx+/dir_picker.h> #include "../comparison.h" @@ -44,6 +44,7 @@ #include "../lib/ffs_paths.h" #include <wx+/toggle_button.h> #include "folder_pair.h" +#include <wx+/rtl.h> #include "search.h" #include "../lib/help_provider.h" #include "batch_config.h" @@ -70,23 +71,38 @@ struct wxClientDataString : public wxClientData //we need a wxClientData derived }; } - class DirectoryNameMainImpl : public DirectoryName<FolderHistoryBox> { public: DirectoryNameMainImpl(MainDialog& mainDlg, wxWindow& dropWindow1, - wxWindow& dropWindow2, + Grid& dropGrid, + size_t compPos, //accept left or right half only! wxDirPickerCtrl& dirPicker, FolderHistoryBox& dirName, - wxStaticBoxSizer& staticBox) : - DirectoryName(dropWindow1, dirPicker, dirName, &staticBox, &dropWindow2), - mainDlg_(mainDlg) {} + wxStaticText& staticText) : + DirectoryName(dropWindow1, dirPicker, dirName, &staticText, &dropGrid.getMainWin()), + mainDlg_(mainDlg), + dropGrid_(dropGrid), + compPos_(compPos) {} - virtual bool acceptDrop(const std::vector<wxString>& droppedFiles) + virtual bool acceptDrop(const std::vector<wxString>& droppedFiles, const wxPoint& clientPos, const wxWindow& wnd) { if (droppedFiles.empty()) - return true; + return false; + + if (&wnd == &dropGrid_.getMainWin()) + { + const wxPoint absPos = dropGrid_.CalcUnscrolledPosition(clientPos); + + + const Opt<std::pair<ColumnType, size_t>> colInfo = dropGrid_.Grid::getColumnAtPos(absPos.x); + const bool dropOnLeft = colInfo ? colInfo->second != gridview::COMP_RIGHT : true; + + if ((compPos_ == gridview::COMP_LEFT && !dropOnLeft) || //accept left or right half of m_gridMain only! + (compPos_ == gridview::COMP_RIGHT && dropOnLeft)) // + return false; + } switch (xmlAccess::getMergeType(droppedFiles)) //throw () { @@ -101,12 +117,7 @@ public: break; } - //disable the sync button - mainDlg_.syncPreview->enableSynchronization(false); - - //clear grids - mainDlg_.gridDataView->clearAllRows(); - mainDlg_.updateGuiGrid(); + mainDlg_.clearGrid(); return true; } @@ -115,6 +126,8 @@ private: DirectoryNameMainImpl& operator=(const DirectoryNameMainImpl&); MainDialog& mainDlg_; + Grid& dropGrid_; + size_t compPos_; }; //------------------------------------------------------------------ @@ -153,7 +166,7 @@ private: virtual void OnAltCompCfgChange() { - mainDlg.applyCompareConfig(false); //false: not global level + mainDlg.applyCompareConfig(false); //false: do not change preview status } virtual void OnAltSyncCfgChange() @@ -161,28 +174,28 @@ private: mainDlg.applySyncConfig(); } - virtual void OnAltCompCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltCompCfg() { - FolderPairPanelBasic<GuiPanel>::OnAltCompCfgRemoveConfirm(event); - mainDlg.applyCompareConfig(false); //false: not global level + FolderPairPanelBasic<GuiPanel>::removeAltCompCfg(); + mainDlg.applyCompareConfig(false); //false: do not change preview status } - virtual void OnAltSyncCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeAltSyncCfg() { - FolderPairPanelBasic<GuiPanel>::OnAltSyncCfgRemoveConfirm(event); + FolderPairPanelBasic<GuiPanel>::removeAltSyncCfg(); mainDlg.applySyncConfig(); } virtual void OnLocalFilterCfgChange() { - mainDlg.updateFilterConfig(); //re-apply filter + mainDlg.applyFilterConfig(); //re-apply filter } - virtual void OnLocalFilterCfgRemoveConfirm(wxCommandEvent& event) + virtual void removeLocalFilterCfg() { - FolderPairPanelBasic<GuiPanel>::OnLocalFilterCfgRemoveConfirm(event); - mainDlg.updateFilterConfig(); //update filter + FolderPairPanelBasic<GuiPanel>::removeLocalFilterCfg(); + mainDlg.applyFilterConfig(); //update filter } MainDialog& mainDlg; @@ -228,17 +241,19 @@ public: //prepare drag & drop dirNameLeft(mainDialog, - *mainDialog.m_panelLeft, *mainDialog.m_panelTopLeft, + *mainDialog.m_gridMain, + gridview::COMP_LEFT, *mainDialog.m_dirPickerLeft, *mainDialog.m_directoryLeft, - *mainDialog.sbSizerDirLeft), + *mainDialog.m_staticTextFinalPathLeft), dirNameRight(mainDialog, - *mainDialog.m_panelRight, *mainDialog.m_panelTopRight, + *mainDialog.m_gridMain, + gridview::COMP_RIGHT, *mainDialog.m_dirPickerRight, *mainDialog.m_directoryRight, - *mainDialog.sbSizerDirRight) {} + *mainDialog.m_staticTextFinalPathRight) {} void setValues(const wxString& leftDir, const wxString& rightDir, @@ -432,10 +447,6 @@ MainDialog::~MainDialog() //no need for wxEventHandler::Disconnect() here; event sources are components of this window and are destroyed, too - m_gridLeft ->release(); //handle wxGrid-related callback on grid data after MainDialog has died... (Linux only) - m_gridMiddle->release(); - m_gridRight ->release(); - auiMgr.UnInit(); } @@ -452,6 +463,8 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, xmlAccess::XmlGlobalSettings& settings, bool startComparison) { + syncPreviewEnabled = false; + folderHistoryLeft = std::make_shared<FolderHistory>(); //make sure it is always bound folderHistoryRight = std::make_shared<FolderHistory>(); // @@ -461,16 +474,16 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, wxWindowUpdateLocker dummy(this); //avoid display distortion //--------- avoid mirroring this dialog in RTL languages like Hebrew or Arabic -------------------- - m_panelViewFilter ->SetLayoutDirection(wxLayout_LeftToRight); - m_panelStatusBar ->SetLayoutDirection(wxLayout_LeftToRight); - m_panelGrids ->SetLayoutDirection(wxLayout_LeftToRight); - m_panelDirectoryPairs->SetLayoutDirection(wxLayout_LeftToRight); + //m_panelViewFilter ->SetLayoutDirection(wxLayout_LeftToRight); + //m_panelStatusBar ->SetLayoutDirection(wxLayout_LeftToRight); + //m_panelDirectoryPairs->SetLayoutDirection(wxLayout_LeftToRight); //------------------------------------------------------------------------------------------------------ //---------------- support for dockable gui style -------------------------------- bSizerPanelHolder->Detach(m_panelTopButtons); bSizerPanelHolder->Detach(m_panelDirectoryPairs); - bSizerPanelHolder->Detach(m_panelGrids); + bSizerPanelHolder->Detach(m_gridNavi); + bSizerPanelHolder->Detach(m_gridMain); bSizerPanelHolder->Detach(m_panelConfig); bSizerPanelHolder->Detach(m_panelFilter); bSizerPanelHolder->Detach(m_panelViewFilter); @@ -482,36 +495,42 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, //caption required for all panes that can be manipulated by the users => used by context menu auiMgr.AddPane(m_panelTopButtons, - wxAuiPaneInfo().Name(wxT("Panel1")).Top().Caption(_("Main bar")).CaptionVisible(false).PaneBorder(false).Gripper().MinSize(-1, m_panelTopButtons->GetSize().GetHeight() - 5)); + wxAuiPaneInfo().Name(wxT("Panel1")).Layer(4).Top().Caption(_("Main bar")).CaptionVisible(false).PaneBorder(false).Gripper().MinSize(-1, m_panelTopButtons->GetSize().GetHeight() - 5)); //note: min height is calculated incorrectly by wxAuiManager if panes with and without caption are in the same row => use smaller min-size compareStatus.reset(new CompareStatus(*this)); //integrate the compare status panel (in hidden state) auiMgr.AddPane(compareStatus->getAsWindow(), - wxAuiPaneInfo().Name(wxT("Panel9")).Top().Row(1).CaptionVisible(false).PaneBorder(false).Hide()); //name "CmpStatus" used by context menu + wxAuiPaneInfo().Name(wxT("Panel9")).Layer(4).Top().Row(1).CaptionVisible(false).PaneBorder(false).Hide()); //name "CmpStatus" used by context menu auiMgr.AddPane(m_panelDirectoryPairs, - wxAuiPaneInfo().Name(wxT("Panel2")).Top().Row(2).Caption(_("Folder pairs")).CaptionVisible(false).PaneBorder(false).Gripper()); + wxAuiPaneInfo().Name(wxT("Panel2")).Layer(2).Top().Row(2).Caption(_("Folder pairs")).CaptionVisible(false).PaneBorder(false).Gripper()); - auiMgr.AddPane(m_panelGrids, + auiMgr.AddPane(m_gridMain, wxAuiPaneInfo().Name(wxT("Panel3")).CenterPane().PaneBorder(false)); + auiMgr.AddPane(m_gridNavi, + wxAuiPaneInfo().Name(L"Panel10").Left().Layer(3).Caption(_("Compressed view")).MinSize(350, m_gridNavi->GetSize().GetHeight())); //MinSize(): just default size, see comment below + auiMgr.AddPane(m_panelConfig, - wxAuiPaneInfo().Name(wxT("Panel4")).Bottom().Row(1).Position(0).Caption(_("Configuration")).MinSize(m_listBoxHistory->GetSize().GetWidth(), m_panelConfig->GetSize().GetHeight())); + wxAuiPaneInfo().Name(wxT("Panel4")).Layer(4).Bottom().Row(1).Position(0).Caption(_("Configuration")).MinSize(m_listBoxHistory->GetSize().GetWidth(), m_panelConfig->GetSize().GetHeight())); auiMgr.AddPane(m_panelFilter, - wxAuiPaneInfo().Name(wxT("Panel5")).Bottom().Row(1).Position(1).Caption(_("Filter files")).MinSize(m_bpButtonFilter->GetSize().GetWidth(), m_panelFilter->GetSize().GetHeight())); + wxAuiPaneInfo().Name(wxT("Panel5")).Layer(4).Bottom().Row(1).Position(1).Caption(_("Filter files")).MinSize(m_bpButtonFilter->GetSize().GetWidth(), m_panelFilter->GetSize().GetHeight())); auiMgr.AddPane(m_panelViewFilter, - wxAuiPaneInfo().Name(wxT("Panel6")).Bottom().Row(1).Position(2).Caption(_("Select view")).MinSize(m_bpButtonSyncDirNone->GetSize().GetWidth(), m_panelViewFilter->GetSize().GetHeight())); + wxAuiPaneInfo().Name(wxT("Panel6")).Layer(4).Bottom().Row(1).Position(2).Caption(_("Select view")).MinSize(m_bpButtonSyncDirNone->GetSize().GetWidth(), m_panelViewFilter->GetSize().GetHeight())); auiMgr.AddPane(m_panelStatistics, - wxAuiPaneInfo().Name(wxT("Panel7")).Bottom().Row(1).Position(3).Caption(_("Statistics")).MinSize(m_panelStatistics->GetSize().GetWidth() / 2, m_panelStatistics->GetSize().GetHeight())); + wxAuiPaneInfo().Name(wxT("Panel7")).Layer(4).Bottom().Row(1).Position(3).Caption(_("Statistics")).MinSize(m_panelStatistics->GetSize().GetWidth() / 2, m_panelStatistics->GetSize().GetHeight())); auiMgr.AddPane(m_panelStatusBar, - wxAuiPaneInfo().Name(wxT("Panel8")).Bottom().Row(0).Layer(4).CaptionVisible(false).PaneBorder(false).DockFixed()); + wxAuiPaneInfo().Name(wxT("Panel8")).Layer(4).Bottom().Row(0).CaptionVisible(false).PaneBorder(false).DockFixed()); auiMgr.Update(); + auiMgr.GetPane(m_gridNavi).MinSize(-1, -1); //we successfully tricked wxAuiManager into setting an initial Window size :> incomplete API anyone?? + auiMgr.Update(); // + defaultPerspective = auiMgr.SavePerspective(); //---------------------------------------------------------------------------------- //register view layout context menu @@ -524,27 +543,34 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, //---------------------------------------------------------------------------------- //register context: quick variant selection - m_bpButtonCmpConfig ->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSelectCompVariant), NULL, this); - m_bpButtonSyncConfig->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnContextSelectSyncVariant), NULL, this); + m_bpButtonCmpConfig ->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnCompSettingsContext), NULL, this); + m_bpButtonSyncConfig->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MainDialog::OnSyncSettingsContext), NULL, this); + m_bpButtonFilter ->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(MainDialog::OnGlobalFilterContext), NULL, this); + + //sort grids + m_gridMain->Connect(EVENT_GRID_COL_LABEL_MOUSE_LEFT, GridClickEventHandler(MainDialog::onGridLabelLeftClick ), NULL, this ); + m_gridMain->Connect(EVENT_GRID_COL_LABEL_MOUSE_RIGHT, GridClickEventHandler(MainDialog::onGridLabelContext), NULL, this ); + + //grid context menu + m_gridMain->Connect(EVENT_GRID_MOUSE_RIGHT_UP, GridClickEventHandler(MainDialog::onMainGridContext), NULL, this); + m_gridNavi->Connect(EVENT_GRID_MOUSE_RIGHT_UP, GridClickEventHandler(MainDialog::onNaviGridContext), NULL, this); + + m_gridMain->Connect(EVENT_GRID_MOUSE_LEFT_DOUBLE, GridClickEventHandler(MainDialog::onGridDoubleClick), NULL, this ); + + m_gridNavi->Connect(EVENT_GRID_SELECT_RANGE, GridRangeSelectEventHandler(MainDialog::onNaviSelection), NULL, this); globalSettings = &settings; gridDataView.reset(new zen::GridView); - contextMenu.reset(new wxMenu); //initialize right-click context menu; will be dynamically re-created on each R-mouse-click + treeDataView.reset(new zen::TreeView); cleanedUp = false; processingGlobalKeyEvent = false; - lastSortColumn = -1; - lastSortGrid = NULL; - - updateFileIcons.reset(new IconUpdater(m_gridLeft, m_gridRight)); #ifdef FFS_WIN new PanelMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere... //ownership passed to "this" #endif - syncPreview.reset(new SyncPreview(this)); - SetIcon(GlobalResources::instance().programIcon); //set application icon //notify about (logical) application main window => program won't quit, but stay on this dialog @@ -555,18 +581,22 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, initViewFilterButtons(); + //init grid settings + gridview::init(*m_gridMain, gridDataView); + treeview::init(*m_gridNavi, treeDataView); + //initialize and load configuration readGlobalSettings(); setConfig(guiCfg); //set icons for this dialog - m_buttonCompare ->setBitmapFront(GlobalResources::getImage(wxT("compare"))); - m_bpButtonSyncConfig->SetBitmapLabel(GlobalResources::getImage(wxT("syncConfig"))); - m_bpButtonCmpConfig ->SetBitmapLabel(GlobalResources::getImage(wxT("cmpConfig"))); - m_bpButtonSave ->SetBitmapLabel(GlobalResources::getImage(wxT("save"))); - m_bpButtonLoad ->SetBitmapLabel(GlobalResources::getImage(wxT("load"))); - m_bpButtonAddPair ->SetBitmapLabel(GlobalResources::getImage(wxT("addFolderPair"))); - m_bitmap15 ->SetBitmap(GlobalResources::getImage(wxT("statusEdge"))); + m_buttonCompare ->setBitmapFront(GlobalResources::getImage(L"compare")); + m_bpButtonSyncConfig->SetBitmapLabel(GlobalResources::getImage(L"syncConfig")); + m_bpButtonCmpConfig ->SetBitmapLabel(GlobalResources::getImage(L"cmpConfig")); + m_bpButtonSave ->SetBitmapLabel(GlobalResources::getImage(L"save")); + m_bpButtonLoad ->SetBitmapLabel(GlobalResources::getImage(L"load")); + m_bpButtonAddPair ->SetBitmapLabel(GlobalResources::getImage(L"addFolderPair")); + m_bitmapResizeCorner->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"statusEdge"))); { IconBuffer tmp(IconBuffer::SIZE_SMALL); const wxBitmap bmpFile = tmp.genericFileIcon(); @@ -578,10 +608,10 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, m_bitmapSmallFileRight ->SetBitmap(bmpFile); } - m_bitmapCreate->SetBitmap(GlobalResources::getImage(wxT("create"))); - m_bitmapUpdate->SetBitmap(GlobalResources::getImage(wxT("update"))); - m_bitmapDelete->SetBitmap(GlobalResources::getImage(wxT("delete"))); - m_bitmapData ->SetBitmap(GlobalResources::getImage(wxT("data"))); + m_bitmapCreate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"create"))); + m_bitmapUpdate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"update"))); + m_bitmapDelete->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"delete"))); + m_bitmapData ->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"data"))); m_panelTopButtons->Layout(); //wxButtonWithImage size might have changed @@ -606,14 +636,14 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, #endif //create language selection menu - std::for_each(zen::ExistingTranslations::get().begin(), zen::ExistingTranslations::get().end(), - [&](const zen::ExistingTranslations::Entry& entry) + std::for_each(zen::ExistingTranslations::get().begin(), ExistingTranslations::get().end(), + [&](const ExistingTranslations::Entry& entry) { wxMenuItem* newItem = new wxMenuItem(m_menuLanguages, wxID_ANY, entry.languageName, wxEmptyString, wxITEM_NORMAL ); newItem->SetBitmap(GlobalResources::getImage(entry.languageFlag)); //map menu item IDs with language IDs: evaluated when processing event handler - languageMenuItemMap.insert(std::map<MenuItemID, LanguageID>::value_type(newItem->GetId(), entry.languageID)); + languageMenuItemMap.insert(std::make_pair(newItem->GetId(), entry.languageID)); //connect event this->Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnMenuLanguageSwitch)); @@ -621,22 +651,22 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, }); //support for CTRL + C and DEL on grids - m_gridLeft ->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridLeftButtonEvent), NULL, this); - m_gridRight ->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridRightButtonEvent), NULL, this); - m_gridMiddle->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridMiddleButtonEvent), NULL, this); + m_gridMain->getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onGridButtonEvent), NULL, this); + m_gridNavi->getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::onTreeButtonEvent), NULL, this); //register global hotkeys (without explicit menu entry) wxTheApp->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this); wxTheApp->Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this); //capture direction keys + //drag & drop on navi panel + setupFileDrop(*m_gridNavi); + m_gridNavi->Connect(EVENT_DROP_FILE, FileDropEventHandler(MainDialog::onNaviPanelFilesDropped), NULL, this); Connect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleEvent), NULL, this); Connect(wxEVT_SIZE, wxSizeEventHandler(MainDialog::OnResize), NULL, this); Connect(wxEVT_MOVE, wxSizeEventHandler(MainDialog::OnResize), NULL, this); - m_bpButtonFilter->Connect(wxEVT_RIGHT_DOWN, wxCommandEventHandler(MainDialog::OnGlobalFilterOpenContext), NULL, this); - //calculate witdh of folder pair manually (if scrollbars are visible) m_panelTopLeft->Connect(wxEVT_SIZE, wxEventHandler(MainDialog::OnResizeFolderPairs), NULL, this); @@ -650,19 +680,11 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig& guiCfg, OnResizeStatisticsPanel(dummy3); // //event handler for manual (un-)checking of rows and setting of sync direction - m_gridMiddle->Connect(FFS_CHECK_ROWS_EVENT, FFSCheckRowsEventHandler(MainDialog::OnCheckRows), NULL, this); - m_gridMiddle->Connect(FFS_SYNC_DIRECTION_EVENT, FFSSyncDirectionEventHandler(MainDialog::OnSetSyncDirection), NULL, this); - - //init grid settings - m_gridLeft ->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, gridDataView.get()); - m_gridMiddle->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, gridDataView.get()); - m_gridRight ->initSettings(m_gridLeft, m_gridMiddle, m_gridRight, gridDataView.get()); - - //disable sync button as long as "compare" hasn't been triggered. - syncPreview->enableSynchronization(false); + m_gridMain->Connect(EVENT_GRID_CHECK_ROWS, CheckRowsEventHandler (MainDialog::onCheckRows), NULL, this); + m_gridMain->Connect(EVENT_GRID_SYNC_DIRECTION, SyncDirectionEventHandler(MainDialog::onSetSyncDirection), NULL, this); //mainly to update row label sizes... - updateGuiGrid(); + updateGui(); //register regular check for update on next idle event Connect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), NULL, this); @@ -729,10 +751,14 @@ void MainDialog::readGlobalSettings() Maximize(globalSettings->gui.isMaximized); - //set column attributes - m_gridLeft ->setColumnAttributes(globalSettings->gui.columnAttribLeft); - m_gridRight->setColumnAttributes(globalSettings->gui.columnAttribRight); + m_gridMain->setColumnConfig(gridview::convertConfig(globalSettings->gui.columnAttribLeft), gridview::COMP_LEFT); + m_gridMain->setColumnConfig(gridview::convertConfig(globalSettings->gui.columnAttribRight), gridview::COMP_RIGHT); + + m_gridNavi->setColumnConfig(treeview::convertConfig(globalSettings->gui.columnAttribNavi)); + treeview::setShowPercentage(*m_gridNavi, globalSettings->gui.showPercentBar); + + treeDataView->setSortDirection(globalSettings->gui.naviLastSortColumn, globalSettings->gui.naviLastSortAscending); //load list of last used configuration files std::vector<wxString> cfgFileNames = globalSettings->gui.cfgFileHistory; @@ -757,11 +783,7 @@ void MainDialog::readGlobalSettings() } return IconBuffer::SIZE_SMALL; }(); - - std::shared_ptr<IconBuffer> iconBuffer = std::make_shared<IconBuffer>(sz); - m_gridLeft ->setIconManager(iconBuffer); - m_gridMiddle->setIconManager(iconBuffer); - m_gridRight ->setIconManager(iconBuffer); + gridview::setIconSize(*m_gridMain, sz); //------------------------------------------------------------------------------------------------ //wxAuiManager erroneously loads panel captions, we don't want that @@ -786,8 +808,15 @@ void MainDialog::writeGlobalSettings() globalSettings->gui.isMaximized = IsMaximized(); //retrieve column attributes - globalSettings->gui.columnAttribLeft = m_gridLeft->getColumnAttributes(); - globalSettings->gui.columnAttribRight = m_gridRight->getColumnAttributes(); + globalSettings->gui.columnAttribLeft = gridview::convertConfig(m_gridMain->getColumnConfig(gridview::COMP_LEFT)); + globalSettings->gui.columnAttribRight = gridview::convertConfig(m_gridMain->getColumnConfig(gridview::COMP_RIGHT)); + + globalSettings->gui.columnAttribNavi = treeview::convertConfig(m_gridNavi->getColumnConfig()); + globalSettings->gui.showPercentBar = treeview::getShowPercentage(*m_gridNavi); + + const auto sortInfo = treeDataView->getSortDirection(); + globalSettings->gui.naviLastSortColumn = sortInfo.first; + globalSettings->gui.naviLastSortAscending = sortInfo.second; //write list of last used configuration files std::vector<wxString> cfgFileHistory; @@ -806,48 +835,33 @@ void MainDialog::writeGlobalSettings() } -void MainDialog::setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const zen::SyncDirection dir) +void MainDialog::setSyncDirManually(const std::vector<FileSystemObject*>& selection, SyncDirection direction) { - if (rowsToSetOnUiTable.size() > 0) + if (!selection.empty()) { - for (std::set<size_t>::const_iterator i = rowsToSetOnUiTable.begin(); i != rowsToSetOnUiTable.end(); ++i) + std::for_each(selection.begin(), selection.end(), + [&](FileSystemObject* fsObj) { - FileSystemObject* fsObj = gridDataView->getObject(*i); - if (fsObj) - { - setSyncDirectionRec(dir, *fsObj); //set new direction (recursively) - zen::setActiveStatus(true, *fsObj); //works recursively for directories - } - } + setSyncDirectionRec(direction, *fsObj); //set new direction (recursively) + zen::setActiveStatus(true, *fsObj); //works recursively for directories + }); - updateGuiGrid(); + updateGui(); } } -void MainDialog::filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTable, int leadingRow) +void MainDialog::setManualFilter(const std::vector<FileSystemObject*>& selection, bool setIncluded) { - if (!rowsToFilterOnUiTable.empty()) - { - bool newSelection = false; //default: deselect range - - //leadingRow determines de-/selection of all other rows - const FileSystemObject* fsObj = gridDataView->getObject(leadingRow); - if (!fsObj) fsObj = gridDataView->getObject(*rowsToFilterOnUiTable.begin()); //some fallback (usecase: reverse selection, starting with empty rows) - if (fsObj) - newSelection = !fsObj->isActive(); - - //if hidefiltered is active, there should be no filtered elements on screen => current element was filtered out - assert(!currentCfg.hideFilteredElements || !newSelection); + //if hidefiltered is active, there should be no filtered elements on screen => current element was filtered out + assert(!currentCfg.hideFilteredElements || !setIncluded); - //get all lines that need to be filtered - std::vector<FileSystemObject*> compRef; - gridDataView->getAllFileRef(rowsToFilterOnUiTable, compRef); //everything in compRef is bound - - for (std::vector<FileSystemObject*>::iterator i = compRef.begin(); i != compRef.end(); ++i) - zen::setActiveStatus(newSelection, **i); //works recursively for directories + if (!selection.empty()) + { + std::for_each(selection.begin(), selection.end(), + [&](FileSystemObject* fsObj) { zen::setActiveStatus(setIncluded, *fsObj); }); //works recursively for directories - refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts + updateGuiAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts } } @@ -855,7 +869,7 @@ void MainDialog::filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTab void MainDialog::OnIdleEvent(wxEvent& event) { //small routine to restore status information after some time - if (stackObjects.size() > 0 ) //check if there is some work to do + if (!stackObjects.empty()) //check if there is some work to do { wxMilliClock_t currentTime = wxGetLocalTimeMillis(); if (currentTime - lastStatusChange > 2500) //restore stackObject after two seconds @@ -882,57 +896,95 @@ typedef Zbase<wchar_t> zxString; //for use with UI texts } -void MainDialog::copySelectionToClipboard(CustomGrid& selectedGrid) +void MainDialog::copySelectionToClipboard() { - const std::set<size_t> selectedRows = getSelectedRows(&selectedGrid); - if (selectedRows.size() > 0) - { - zxString clipboardString; //perf: wxString doesn't model exponential growth and so is out - - const int colCount = selectedGrid.GetNumberCols(); + zxString clipboardString; //perf: wxString doesn't model exponential growth and so is out - for (std::set<size_t>::const_iterator i = selectedRows.begin(); i != selectedRows.end(); ++i) + auto addSelection = [&](size_t compPos) + { + auto prov = m_gridMain->getDataProvider(compPos); + if (prov) { - for (int k = 0; k < colCount; ++k) + std::vector<Grid::ColumnAttribute> colAttr = m_gridMain->getColumnConfig(compPos); + vector_remove_if(colAttr, [](const Grid::ColumnAttribute& ca) { return !ca.visible_; }); + if (!colAttr.empty()) { - clipboardString += copyStringTo<zxString>(selectedGrid.GetCellValue(static_cast<int>(*i), k)); - if (k != colCount - 1) - clipboardString += wxT('\t'); + const std::vector<int> selection = m_gridMain->getSelectedRows(compPos); + std::for_each(selection.begin(), selection.end(), + [&](int row) + { + std::for_each(colAttr.begin(), colAttr.end() - 1, + [&](const Grid::ColumnAttribute& ca) + { + clipboardString += copyStringTo<zxString>(prov->getValue(row, ca.type_)); + clipboardString += L'\t'; + }); + clipboardString += copyStringTo<zxString>(prov->getValue(row, colAttr.back().type_)); + clipboardString += L'\n'; + }); } - clipboardString += wxT('\n'); } + }; - if (!clipboardString.empty()) - // Write text to the clipboard - if (wxTheClipboard->Open()) - { - // these data objects are held by the clipboard, - // so do not delete them in the app. - wxTheClipboard->SetData(new wxTextDataObject(copyStringTo<wxString>(clipboardString))); - wxTheClipboard->Close(); - } - } + addSelection(gridview::COMP_LEFT); + addSelection(gridview::COMP_RIGHT); + + //finally write to clipboard + if (!clipboardString.empty()) + if (wxTheClipboard->Open()) + { + wxTheClipboard->SetData(new wxTextDataObject(copyStringTo<wxString>(clipboardString))); //ownership passed + wxTheClipboard->Close(); + } } -std::set<size_t> MainDialog::getSelectedRows(const CustomGrid* grid) const +std::vector<FileSystemObject*> MainDialog::getGridSelection(bool fromLeft, bool fromRight) const { - std::set<size_t> output = grid->getAllSelectedRows(); + std::set<size_t> selectedRows; + + auto addSelection = [&](size_t compPos) + { + const std::vector<int>& sel = m_gridMain->getSelectedRows(compPos); + selectedRows.insert(sel.begin(), sel.end()); + }; - //remove invalid rows - output.erase(output.lower_bound(gridDataView->rowsOnView()), output.end()); + if (fromLeft) + addSelection(gridview::COMP_LEFT); - return output; + if (fromRight) + addSelection(gridview::COMP_RIGHT); + + std::vector<FileSystemObject*> selection; + gridDataView->getAllFileRef(selectedRows, selection); + return selection; } -std::set<size_t> MainDialog::getSelectedRows() const +std::vector<FileSystemObject*> MainDialog::getTreeSelection() const { - //merge selections from left and right grid - std::set<size_t> selection = getSelectedRows(m_gridLeft); - std::set<size_t> additional = getSelectedRows(m_gridRight); - selection.insert(additional.begin(), additional.end()); - return selection; + const std::vector<int>& sel = m_gridNavi->getSelectedRows(); + + std::vector<FileSystemObject*> output; + std::for_each(sel.begin(), sel.end(), + [&](int row) + { + if (std::unique_ptr<TreeView::Node> node = treeDataView->getLine(row)) + { + if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get())) + { + //select first level of child elements + std::transform(root->baseMap_.refSubDirs ().begin(), root->baseMap_.refSubDirs ().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; }); + std::transform(root->baseMap_.refSubFiles().begin(), root->baseMap_.refSubFiles().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; }); + std::transform(root->baseMap_.refSubLinks().begin(), root->baseMap_.refSubLinks().end(), std::back_inserter(output), [](FileSystemObject& fsObj) { return &fsObj; }); + //for (auto& fsObj : root->baseMap_.refSubLinks()) output.push_back(&fsObj); -> seriously MSVC, stop this disgrace and implement "range for"! + } + else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get())) + output.push_back(&(dir->dirObj_)); + //else if (dynamic_cast<const TreeView::FilesNode*>(node.get())) -> ignore files/symlinks + } + }); + return output; } @@ -1038,68 +1090,42 @@ private: }; -void MainDialog::deleteSelectedFiles(const std::set<size_t>& viewSelectionLeft, const std::set<size_t>& viewSelectionRight) +void MainDialog::deleteSelectedFiles(const std::vector<FileSystemObject*>& selectionLeft, + const std::vector<FileSystemObject*>& selectionRight) { - if (viewSelectionLeft.size() + viewSelectionRight.size()) + if (!selectionLeft.empty() || !selectionRight.empty()) { - //map lines from GUI view to grid line references - std::vector<FileSystemObject*> compRefLeft; - gridDataView->getAllFileRef(viewSelectionLeft, compRefLeft); - - std::vector<FileSystemObject*> compRefRight; - gridDataView->getAllFileRef(viewSelectionRight, compRefRight); - - wxWindow* oldFocus = wxWindow::FindFocus(); + ZEN_ON_BLOCK_EXIT( if (oldFocus) oldFocus->SetFocus(); ) - if (zen::showDeleteDialog(compRefLeft, - compRefRight, - globalSettings->gui.deleteOnBothSides, - globalSettings->gui.useRecyclerForManualDeletion) == ReturnSmallDlg::BUTTON_OKAY) - { - try + if (zen::showDeleteDialog(selectionLeft, + selectionRight, + globalSettings->gui.deleteOnBothSides, + globalSettings->gui.useRecyclerForManualDeletion) == ReturnSmallDlg::BUTTON_OKAY) { - //handle errors when deleting files/folders - ManualDeletionHandler statusHandler(this); - - zen::deleteFromGridAndHD(compRefLeft, - compRefRight, - gridDataView->getDataTentative(), - extractDirectionCfg(getConfig().mainCfg), - globalSettings->gui.deleteOnBothSides, - globalSettings->gui.useRecyclerForManualDeletion, - statusHandler); - } - catch (AbortDeleteProcess&) {} - - //remove rows that are empty: just a beautification, invalid rows shouldn't cause issues - gridDataView->removeInvalidRows(); - - //redraw grid neccessary to update new dimensions and for UI-Backend data linkage - updateGuiGrid(); //call immediately after deleteFromGridAndHD!!! - - m_gridLeft-> ClearSelection(); - m_gridMiddle->ClearSelection(); - m_gridRight-> ClearSelection(); - } - - if (oldFocus) - oldFocus->SetFocus(); //restore focus before deletion - } -} + try + { + //handle errors when deleting files/folders + ManualDeletionHandler statusHandler(this); + + zen::deleteFromGridAndHD(selectionLeft, + selectionRight, + folderCmp, + extractDirectionCfg(getConfig().mainCfg), + globalSettings->gui.deleteOnBothSides, + globalSettings->gui.useRecyclerForManualDeletion, + statusHandler); + } + catch (AbortDeleteProcess&) {} + //remove rows that are empty: just a beautification, invalid rows shouldn't cause issues + gridDataView->removeInvalidRows(); -void MainDialog::openExternalApplication(const wxString& commandline) -{ - if (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid()) - { - const CustomGrid* leadGrid = m_gridLeft->isLeadGrid() ? - static_cast<CustomGrid*>(m_gridLeft) : - static_cast<CustomGrid*>(m_gridRight); - std::set<size_t> selection = getSelectedRows(leadGrid); + //redraw grid neccessary to update new dimensions and for UI-Backend data linkage + updateGui(); //call immediately after deleteFromGridAndHD!!! - if (selection.size() == 1) - openExternalApplication(*selection.begin(), m_gridLeft->isLeadGrid(), commandline); + gridview::clearSelection(*m_gridMain); + } } } @@ -1116,7 +1142,7 @@ wxString extractLastValidDir(const FileSystemObject& fsObj) } -void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const wxString& commandline) +void MainDialog::openExternalApplication(const FileSystemObject* fsObj, bool leftSide, const wxString& commandline) { if (commandline.empty()) return; @@ -1126,16 +1152,13 @@ void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const wxString dir; wxString dirCo; + if (fsObj) { - const FileSystemObject* fsObj = gridDataView->getObject(rowNumber); - if (fsObj) - { - name = toWx(fsObj->getFullName<LEFT_SIDE>()); //empty if obj not existing - dir = toWx(beforeLast(fsObj->getFullName<LEFT_SIDE>(), FILE_NAME_SEPARATOR)); //small issue: if obj does not exist but parent exists, this one erronously returns empty + name = toWx(fsObj->getFullName<LEFT_SIDE>()); //empty if obj not existing + dir = toWx(beforeLast(fsObj->getFullName<LEFT_SIDE>(), FILE_NAME_SEPARATOR)); //small issue: if obj does not exist but parent exists, this one erronously returns empty - nameCo = toWx(fsObj->getFullName<RIGHT_SIDE>()); - dirCo = toWx(beforeLast(fsObj->getFullName<RIGHT_SIDE>(), FILE_NAME_SEPARATOR)); - } + nameCo = toWx(fsObj->getFullName<RIGHT_SIDE>()); + dirCo = toWx(beforeLast(fsObj->getFullName<RIGHT_SIDE>(), FILE_NAME_SEPARATOR)); } if (!leftSide) @@ -1158,7 +1181,7 @@ void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const }; bool expandSuccess = - /**/ tryReplace(L"%nameCo", nameCo); //attention: replace %nameCo, %dirCo BEFORE %name, %dir to handle dependency + /**/ tryReplace(L"%nameCo", nameCo); //attention: replace %nameCo, %dirCo BEFORE %name, %dir to handle dependency expandSuccess = tryReplace(L"%dirCo", dirCo ) && expandSuccess; // expandSuccess = tryReplace(L"%name", name ) && expandSuccess; //prevent short-cut behavior! expandSuccess = tryReplace(L"%dir", dir ) && expandSuccess; // @@ -1174,7 +1197,6 @@ void MainDialog::openExternalApplication(size_t rowNumber, bool leftSide, const else //support built-in fallback! { wxString fallbackDir; - const FileSystemObject* fsObj = gridDataView->getObject(rowNumber); if (fsObj) fallbackDir = leftSide ? extractLastValidDir<LEFT_SIDE >(*fsObj) : @@ -1233,7 +1255,8 @@ void MainDialog::disableAllElements(bool enableAbort) m_panelConfig ->Disable(); m_bpButtonSyncConfig ->Disable(); m_buttonStartSync ->Disable(); - m_panelGrids ->Disable(); + m_gridMain ->Disable(); + m_gridNavi ->Disable(); m_panelDirectoryPairs->Disable(); m_menubar1->EnableTop(0, false); m_menubar1->EnableTop(1, false); @@ -1266,7 +1289,8 @@ void MainDialog::enableAllElements() m_panelConfig ->Enable(); m_bpButtonSyncConfig ->Enable(); m_buttonStartSync ->Enable(); - m_panelGrids ->Enable(); + m_gridMain ->Enable(); + m_gridNavi ->Enable(); m_panelDirectoryPairs->Enable(); m_menubar1->EnableTop(0, true); m_menubar1->EnableTop(1, true); @@ -1362,199 +1386,109 @@ void MainDialog::OnResizeFolderPairs(wxEvent& event) } -void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event) +void MainDialog::onTreeButtonEvent(wxKeyEvent& event) { - const int keyCode = event.GetKeyCode(); + int keyCode = event.GetKeyCode(); + if (m_gridMain->GetLayoutDirection() == wxLayout_RightToLeft) + { + if (keyCode == WXK_LEFT) + keyCode = WXK_RIGHT; + else if (keyCode == WXK_RIGHT) + keyCode = WXK_LEFT; + else if (keyCode == WXK_NUMPAD_LEFT) + keyCode = WXK_NUMPAD_RIGHT; + else if (keyCode == WXK_NUMPAD_RIGHT) + keyCode = WXK_NUMPAD_LEFT; + } if (event.ControlDown()) - switch (keyCode) - { - case 'C': - case WXK_INSERT: //CTRL + C || CTRL + INS - copySelectionToClipboard(*m_gridLeft); - return; // -> swallow event! don't allow default grid commands! - - case 'A': //CTRL + A - m_gridLeft->SelectAll(); - return; - - case WXK_NUMPAD_ADD: //CTRL + '+' - m_gridLeft->autoSizeColumns(); - return; - } - + ; else if (event.AltDown()) switch (keyCode) { + case WXK_NUMPAD_LEFT: case WXK_LEFT: //ALT + <- - { - wxCommandEvent dummy; - OnContextSyncDirLeft(dummy); - } - return; + setSyncDirManually(getTreeSelection(), SYNC_DIR_LEFT); + return; + case WXK_NUMPAD_RIGHT: case WXK_RIGHT: //ALT + -> - { - wxCommandEvent dummy; - OnContextSyncDirRight(dummy); - } - return; + setSyncDirManually(getTreeSelection(), SYNC_DIR_RIGHT); + return; + case WXK_NUMPAD_UP: + case WXK_NUMPAD_DOWN: case WXK_UP: /* ALT + /|\ */ case WXK_DOWN: /* ALT + \|/ */ - { - wxCommandEvent dummy; - OnContextSyncDirNone(dummy); - } - return; + setSyncDirManually(getTreeSelection(), SYNC_DIR_NONE); + return; } else switch (keyCode) { - case WXK_DELETE: - case WXK_NUMPAD_DELETE: - { - const std::set<size_t> viewSelectionLeft = getSelectedRows(m_gridLeft); - const std::set<size_t> viewSelectionRight = getSelectedRows(m_gridRight); - deleteSelectedFiles(viewSelectionLeft, viewSelectionRight); - } - return; - case WXK_SPACE: case WXK_NUMPAD_SPACE: { - wxCommandEvent dummy; - OnContextFilterTemp(dummy); - } - return; - - case WXK_RETURN: - case WXK_NUMPAD_ENTER: - { - if (!globalSettings->gui.externelApplications.empty()) - openExternalApplication(globalSettings->gui.externelApplications[0].second); //open with first external application - } - return; - } - - event.Skip(); //unknown keypress: propagate -} - - -void MainDialog::onGridMiddleButtonEvent(wxKeyEvent& event) -{ - const int keyCode = event.GetKeyCode(); - - if (event.ControlDown()) - switch (keyCode) - { - case 'C': - case WXK_INSERT: //CTRL + C || CTRL + INS - copySelectionToClipboard(*m_gridMiddle); - return; - - case 'A': //CTRL + A - m_gridMiddle->SelectAll(); - return; - } - - else if (event.AltDown()) - switch (keyCode) - { - case WXK_LEFT: //ALT + <- - { - std::set<size_t> selection = getSelectedRows(m_gridMiddle); - setSyncDirManually(selection, zen::SYNC_DIR_LEFT); - } - return; - - case WXK_RIGHT: //ALT + -> - { - std::set<size_t> selection = getSelectedRows(m_gridMiddle); - setSyncDirManually(selection, zen::SYNC_DIR_RIGHT); - } - return; - - case WXK_UP: /* ALT + /|\ */ - case WXK_DOWN: /* ALT + \|/ */ - { - std::set<size_t> selection = getSelectedRows(m_gridMiddle); - setSyncDirManually(selection, zen::SYNC_DIR_NONE); + const auto& selection = getTreeSelection(); + if (!selection.empty()) + setManualFilter(selection, !selection[0]->isActive()); } return; - } - else - switch (keyCode) - { case WXK_DELETE: case WXK_NUMPAD_DELETE: - { - std::set<size_t> selection = getSelectedRows(m_gridMiddle); - deleteSelectedFiles(selection, selection); - } - - return; - - case WXK_SPACE: - case WXK_NUMPAD_SPACE: - { - std::set<size_t> selection = getSelectedRows(m_gridMiddle); - filterRangeManually(selection, static_cast<int>(*selection.begin())); - } - return; + deleteSelectedFiles(getTreeSelection(), getTreeSelection()); + return; } event.Skip(); //unknown keypress: propagate } -void MainDialog::onGridRightButtonEvent(wxKeyEvent& event) +void MainDialog::onGridButtonEvent(wxKeyEvent& event) { - const int keyCode = event.GetKeyCode(); + int keyCode = event.GetKeyCode(); + if (m_gridMain->GetLayoutDirection() == wxLayout_RightToLeft) + { + if (keyCode == WXK_LEFT) + keyCode = WXK_RIGHT; + else if (keyCode == WXK_RIGHT) + keyCode = WXK_LEFT; + else if (keyCode == WXK_NUMPAD_LEFT) + keyCode = WXK_NUMPAD_RIGHT; + else if (keyCode == WXK_NUMPAD_RIGHT) + keyCode = WXK_NUMPAD_LEFT; + } if (event.ControlDown()) switch (keyCode) { case 'C': case WXK_INSERT: //CTRL + C || CTRL + INS - copySelectionToClipboard(*m_gridRight); - return; - - case 'A': //CTRL + A - m_gridRight->SelectAll(); - return; - - case WXK_NUMPAD_ADD: //CTRL + '+' - m_gridRight->autoSizeColumns(); - return; + copySelectionToClipboard(); + return; // -> swallow event! don't allow default grid commands! } else if (event.AltDown()) switch (keyCode) { + case WXK_NUMPAD_LEFT: case WXK_LEFT: //ALT + <- - { - wxCommandEvent dummy; - OnContextSyncDirLeft(dummy); - } - return; + setSyncDirManually(getGridSelection(), zen::SYNC_DIR_LEFT); + return; + case WXK_NUMPAD_RIGHT: case WXK_RIGHT: //ALT + -> - { - wxCommandEvent dummy; - OnContextSyncDirRight(dummy); - } - return; + setSyncDirManually(getGridSelection(), zen::SYNC_DIR_RIGHT); + return; + case WXK_NUMPAD_UP: + case WXK_NUMPAD_DOWN: case WXK_UP: /* ALT + /|\ */ case WXK_DOWN: /* ALT + \|/ */ - { - wxCommandEvent dummy; - OnContextSyncDirNone(dummy); - } - return; + setSyncDirManually(getGridSelection(), zen::SYNC_DIR_NONE); + return; } else @@ -1562,29 +1496,30 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event) { case WXK_DELETE: case WXK_NUMPAD_DELETE: - { - const std::set<size_t> viewSelectionLeft = getSelectedRows(m_gridLeft); - const std::set<size_t> viewSelectionRight = getSelectedRows(m_gridRight); - deleteSelectedFiles(viewSelectionLeft, viewSelectionRight); - } - - return; + deleteSelectedFiles(getGridSelection(true, false), + getGridSelection(false, true)); + return; case WXK_SPACE: case WXK_NUMPAD_SPACE: { - wxCommandEvent dummy; - OnContextFilterTemp(dummy); + const auto& selection = getGridSelection(); + if (!selection.empty()) + setManualFilter(selection, !selection[0]->isActive()); } return; case WXK_RETURN: case WXK_NUMPAD_ENTER: - { if (!globalSettings->gui.externelApplications.empty()) - openExternalApplication(globalSettings->gui.externelApplications[0].second); //open with first external application - } - return; + { + const wxString commandline = globalSettings->gui.externelApplications[0].second; //open with first external application + auto cursorPos = m_gridMain->getGridCursor(); + const int row = cursorPos.first; + const size_t compPos = cursorPos.second; + openExternalApplication(gridDataView->getObject(row), compPos == gridview::COMP_LEFT, commandline); + } + return; } event.Skip(); //unknown keypress: propagate @@ -1608,7 +1543,7 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou !IsShown() || !IsActive() || !IsEnabled() || //only handle if main window is in use - !m_gridLeft->IsEnabled()) // + !m_gridMain->IsEnabled()) // { event.Skip(); return; @@ -1625,7 +1560,7 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou switch (keyCode) { case 'F': //CTRL + F - zen::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); + zen::startFind(*this, *m_gridMain, gridview::COMP_LEFT, gridview::COMP_RIGHT, globalSettings->gui.textSearchRespectCase); return; //-> swallow event! } @@ -1633,7 +1568,7 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou { case WXK_F3: //F3 case WXK_NUMPAD_F3: // - zen::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); + zen::findNext(*this, *m_gridMain, gridview::COMP_LEFT, gridview::COMP_RIGHT, globalSettings->gui.textSearchRespectCase); return; //-> swallow event! //redirect certain (unhandled) keys directly to grid! @@ -1656,16 +1591,15 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou case WXK_NUMPAD_END: { const wxWindow* focus = wxWindow::FindFocus(); - if (!isPartOf(focus, m_gridLeft) && //don't propagate keyboard commands if grid is already in focus - !isPartOf(focus, m_gridMiddle) && - !isPartOf(focus, m_gridRight) && + if (!isPartOf(focus, m_gridMain ) && //don't propagate keyboard commands if grid is already in focus !isPartOf(focus, m_listBoxHistory) && //don't propagate if selecting config !isPartOf(focus, m_directoryLeft) && //don't propagate if changing directory field !isPartOf(focus, m_directoryRight) && + !isPartOf(focus, m_gridNavi ) && !isPartOf(focus, m_scrolledWindowFolderPairs)) { - m_gridLeft->SetFocus(); - m_gridLeft->GetEventHandler()->ProcessEvent(event); //propagating event catched at wxTheApp to child leads to recursion, but we prevented it... + m_gridMain->SetFocus(); + m_gridMain->GetEventHandler()->ProcessEvent(event); //propagating event catched at wxTheApp to child leads to recursion, but we prevented it... event.Skip(false); //definitively handled now! return; } @@ -1677,617 +1611,392 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou } -//------------------------------------------------------------ -//temporal variables used by exclude via context menu, transport string object to context menu handler -struct CtxtSelectionString : public wxObject +void MainDialog::onNaviSelection(GridRangeSelectEvent& event) { - CtxtSelectionString(const wxString& name) : objName(name) {} - const wxString objName; -}; + //scroll m_gridMain to user's new selection on m_gridNavi + int leadRow = -1; + if (std::unique_ptr<TreeView::Node> node = treeDataView->getLine(event.rowFrom_)) + { + if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get())) + leadRow = gridDataView->findRowFirstChild(&(root->baseMap_)); + else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get())) + { + leadRow = gridDataView->findRowDirect(&(dir->dirObj_)); + if (leadRow < 0) //directory was filtered out! still on tree view (but NOT on grid view) + leadRow = gridDataView->findRowFirstChild(&(dir->dirObj_)); + } + else if (const TreeView::FilesNode* files = dynamic_cast<const TreeView::FilesNode*>(node.get())) + leadRow = gridDataView->findRowDirect(files->firstFile_.getId()); + } -struct SelectedExtension : public wxObject -{ - SelectedExtension(const Zstring& ext) : extension(ext) {} + if (leadRow >= 0) + m_gridMain->scrollTo(std::max(0, leadRow - 1)); //scroll one more row - Zstring extension; -}; + //get selection on navigation tree and set corresponding markers on main grid + std::vector<const HierarchyObject*> markedFiles; //mark files/symlinks directly within a container + std::vector<const HierarchyObject*> markedContainer; //mark full container including child-objects + const std::vector<int>& selection = m_gridNavi->getSelectedRows(); + std::for_each(selection.begin(), selection.end(), + [&](int row) + { + if (std::unique_ptr<TreeView::Node> node = treeDataView->getLine(row)) + { + if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get())) + markedContainer.push_back(&(root->baseMap_)); + else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get())) + markedContainer.push_back(&(dir->dirObj_)); + else if (const TreeView::FilesNode* files = dynamic_cast<const TreeView::FilesNode*>(node.get())) + markedFiles.push_back(&(files->firstFile_.parent())); + } + }); -struct CtxtSelectionIconSize : public wxObject -{ - CtxtSelectionIconSize(xmlAccess::FileIconSize sz) : iconSize(sz) {} - xmlAccess::FileIconSize iconSize; -}; + gridview::setNavigationMarker(*m_gridMain, std::move(markedFiles), std::move(markedContainer)); + event.Skip(); +} -typedef std::vector<std::pair<Zstring, bool> > FilterObjList; //relative name |-> "is directory flag" -struct FilterObjContainer : public wxObject +void MainDialog::onNaviGridContext(GridClickEvent& event) { - FilterObjContainer(const FilterObjList& objList) : selectedObjects(objList) {} - - FilterObjList selectedObjects; -}; -//------------------------------------------------------------ + ContextMenu menu; + const auto& selection = getTreeSelection(); //referenced by lambdas! - -void MainDialog::OnContextRim(wxGridEvent& event) -{ - //usability: select row unter right-click if not already selected - wxGrid* sourceGrid = dynamic_cast<wxGrid*>(event.GetEventObject()); - if (sourceGrid != NULL) + //---------------------------------------------------------------------------------------------------- + if (syncPreviewEnabled && !selection.empty()) + //std::find_if(selection.begin(), selection.end(), [](const FileSystemObject* fsObj){ return fsObj->getSyncOperation() != SO_EQUAL; }) != selection.end()) -> doesn't consider directories { - const int clickedRow = event.GetRow(); - const int clickedCol = event.GetCol(); - if (clickedRow >= 0 && clickedCol >= 0 && !sourceGrid->IsInSelection(clickedRow, 0)) + auto getImage = [&](SyncDirection dir, SyncOperation soDefault) { - sourceGrid->SelectRow(clickedRow); - sourceGrid->SetGridCursor(clickedRow, clickedCol); - - if (sourceGrid == m_gridLeft) - m_gridRight->ClearSelection(); - else if (sourceGrid == m_gridRight) - m_gridLeft->ClearSelection(); - } - } - //------------------------------------------------------------------------------ - - - std::set<size_t> selection; - + return mirrorIfRtl(getSyncOpImage(selection[0]->getSyncOperation() != SO_EQUAL ? + selection[0]->testSyncOperation(dir, true) : soDefault)); + }; + const wxBitmap opRight = getImage(SYNC_DIR_RIGHT, SO_OVERWRITE_RIGHT); + const wxBitmap opNone = getImage(SYNC_DIR_NONE, SO_DO_NOTHING ); + const wxBitmap opLeft = getImage(SYNC_DIR_LEFT, SO_OVERWRITE_LEFT ); + + wxString shortCutLeft = L"\tAlt+Left"; + wxString shortCutRight = L"\tAlt+Right"; + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + std::swap(shortCutLeft, shortCutRight); + + menu.addItem(_("Set direction:") + L" ->" + shortCutRight, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_RIGHT); }, &opRight); + menu.addItem(_("Set direction:") + L" -" L"\tAlt+Up", [this, &selection] { setSyncDirManually(selection, SYNC_DIR_NONE); }, &opNone); + menu.addItem(_("Set direction:") + L" <-" + shortCutLeft, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_LEFT); }, &opLeft); + //Gtk needs a direction, "<-", because it has no context menu icons! + //Gtk requires "no spaces" for shortcut identifiers! + menu.addSeparator(); + } + //---------------------------------------------------------------------------------------------------- + if (!selection.empty()) { - const std::set<size_t> selectionLeft = getSelectedRows(m_gridLeft); - const std::set<size_t> selectionRight = getSelectedRows(m_gridRight); - selection.insert(selectionLeft .begin(), selectionLeft .end()); - selection.insert(selectionRight.begin(), selectionRight.end()); + if (selection[0]->isActive()) + menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, false); }, &GlobalResources::getImage(L"checkboxFalse")); + else + menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, true); }, &GlobalResources::getImage(L"checkboxTrue")); } + else + menu.addItem(_("Exclude temporarily") + L"\tSpace", [] {}, NULL, false); - const size_t selectionBegin = selection.size() == 0 ? 0 : *selection.begin(); + //---------------------------------------------------------------------------------------------------- + //CONTEXT_EXCLUDE_OBJ + if (selection.size() == 1) + menu.addItem(_("Exclude via filter:") + L" " + afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR), + [this, &selection] { excludeItems(selection); }, + &GlobalResources::getImage(L"filterSmall")); + else if (selection.size() > 1) + menu.addItem(_("Exclude via filter:") + L" " + _("<multiple selection>"), + [this, &selection] { excludeItems(selection); }, + &GlobalResources::getImage(L"filterSmall")); + + //---------------------------------------------------------------------------------------------------- + //CONTEXT_DELETE_FILES + menu.addSeparator(); + menu.addItem(_("Delete") + L"\tDel", [&] { deleteSelectedFiles(selection, selection); }, NULL, !selection.empty()); - const FileSystemObject* fsObj = gridDataView->getObject(selectionBegin); + menu.popup(*this); +} - //####################################################### - //re-create context menu - contextMenu.reset(new wxMenu); - if (syncPreview->previewIsEnabled() && - fsObj && fsObj->getSyncOperation() != SO_EQUAL) - { - if (selection.size() > 0) - { - //CONTEXT_SYNC_DIR_LEFT - wxMenuItem* menuItemSyncDirLeft = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Set direction:")) + - wxT(" <-") + wxT("\tAlt - Left")); //Linux needs a direction, "<-", because it has no context menu icons! - menuItemSyncDirLeft->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_LEFT, true))); - contextMenu->Append(menuItemSyncDirLeft); - contextMenu->Connect(menuItemSyncDirLeft->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirLeft), NULL, this); - - //CONTEXT_SYNC_DIR_NONE - wxMenuItem* menuItemSyncDirNone = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Set direction:")) + - wxT(" -") + wxT("\tAlt - Up")); - menuItemSyncDirNone->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_NONE, true))); - contextMenu->Append(menuItemSyncDirNone); - contextMenu->Connect(menuItemSyncDirNone->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirNone), NULL, this); - - //CONTEXT_SYNC_DIR_RIGHT - wxMenuItem* menuItemSyncDirRight = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Set direction:")) + - wxT(" ->") + wxT("\tAlt - Right")); - menuItemSyncDirRight->SetBitmap(getSyncOpImage(fsObj->testSyncOperation(SYNC_DIR_RIGHT, true))); - contextMenu->Append(menuItemSyncDirRight); - contextMenu->Connect(menuItemSyncDirRight->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncDirRight), NULL, this); - - contextMenu->AppendSeparator(); - } - } +void MainDialog::onMainGridContext(GridClickEvent& event) +{ + ContextMenu menu; + + const auto& selection = getGridSelection(); //referenced by lambdas! - //CONTEXT_FILTER_TEMP - if (fsObj && (selection.size() > 0)) + if (event.compPos_ == gridview::COMP_LEFT || + event.compPos_ == gridview::COMP_RIGHT) { - wxMenuItem* menuItemInExcl = NULL; - if (fsObj->isActive()) + //---------------------------------------------------------------------------------------------------- + if (syncPreviewEnabled && !selection.empty()) { - menuItemInExcl = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Exclude temporarily")) + wxT("\tSpace")); - menuItemInExcl->SetBitmap(GlobalResources::getImage(wxT("checkboxFalse"))); + auto getImage = [&](SyncDirection dir, SyncOperation soDefault) + { + return mirrorIfRtl(getSyncOpImage(selection[0]->getSyncOperation() != SO_EQUAL ? + selection[0]->testSyncOperation(dir, true) : soDefault)); + }; + const wxBitmap opRight = getImage(SYNC_DIR_RIGHT, SO_OVERWRITE_RIGHT); + const wxBitmap opNone = getImage(SYNC_DIR_NONE, SO_DO_NOTHING ); + const wxBitmap opLeft = getImage(SYNC_DIR_LEFT, SO_OVERWRITE_LEFT ); + + wxString shortCutLeft = L"\tAlt+Left"; + wxString shortCutRight = L"\tAlt+Right"; + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + std::swap(shortCutLeft, shortCutRight); + + menu.addItem(_("Set direction:") + L" ->" + shortCutRight, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_RIGHT); }, &opRight); + menu.addItem(_("Set direction:") + L" -" L"\tAlt+Up", [this, &selection] { setSyncDirManually(selection, SYNC_DIR_NONE); }, &opNone); + menu.addItem(_("Set direction:") + L" <-" + shortCutLeft, [this, &selection] { setSyncDirManually(selection, SYNC_DIR_LEFT); }, &opLeft); + //Gtk needs a direction, "<-", because it has no context menu icons! + //Gtk requires "no spaces" for shortcut identifiers! + menu.addSeparator(); + } + //---------------------------------------------------------------------------------------------------- + if (!selection.empty()) + { + if (selection[0]->isActive()) + menu.addItem(_("Exclude temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, false); }, &GlobalResources::getImage(L"checkboxFalse")); + else + menu.addItem(_("Include temporarily") + L"\tSpace", [this, &selection] { setManualFilter(selection, true); }, &GlobalResources::getImage(L"checkboxTrue")); } else - { - menuItemInExcl = new wxMenuItem(contextMenu.get(), wxID_ANY, wxString(_("Include temporarily")) + wxT("\tSpace")); - menuItemInExcl->SetBitmap(GlobalResources::getImage(wxT("checkboxTrue"))); - } + menu.addItem(_("Exclude temporarily") + L"\tSpace", [] {}, NULL, false); - contextMenu->Append(menuItemInExcl); - contextMenu->Connect(menuItemInExcl->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextFilterTemp), NULL, this); - } - else - { - wxMenuItem* menuItemExcl = contextMenu->Append(wxID_ANY, wxString(_("Exclude temporarily")) + wxT("\tSpace")); //this element should always be visible - contextMenu->Enable(menuItemExcl->GetId(), false); - } - - //############################################################################################### - //get list of relative file/dir-names for filtering - FilterObjList exFilterCandidateObj; - - { - class AddFilter : public FSObjectVisitor + //---------------------------------------------------------------------------------------------------- + //CONTEXT_EXCLUDE_EXT + if (!selection.empty() && + dynamic_cast<const DirMapping*>(selection[0]) == NULL) //non empty && no directory { - public: - AddFilter(FilterObjList& fl) : filterList_(fl) {} - - virtual void visit(const FileMapping& fileObj) - { - filterList_.push_back(std::make_pair(fileObj.getObjRelativeName(), false)); - } - virtual void visit(const SymLinkMapping& linkObj) + const Zstring filename = afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR); + if (filename.find(Zchar('.')) != Zstring::npos) //be careful: AfterLast would return the whole string if '.' were not found! { - filterList_.push_back(std::make_pair(linkObj.getObjRelativeName(), false)); + const Zstring extension = afterLast(filename, Zchar('.')); + + menu.addItem(_("Exclude via filter:") + L" *." + extension, + [this, extension] { excludeExtension(extension); }, + &GlobalResources::getImage(L"filterSmall")); } - virtual void visit(const DirMapping& dirObj) + } + //---------------------------------------------------------------------------------------------------- + //CONTEXT_EXCLUDE_OBJ + if (selection.size() == 1) + menu.addItem(_("Exclude via filter:") + L" " + afterLast(selection[0]->getObjRelativeName(), FILE_NAME_SEPARATOR), + [this, &selection] { excludeItems(selection); }, + &GlobalResources::getImage(L"filterSmall")); + else if (selection.size() > 1) + menu.addItem(_("Exclude via filter:") + L" " + _("<multiple selection>"), + [this, &selection] { excludeItems(selection); }, + &GlobalResources::getImage(L"filterSmall")); + + //---------------------------------------------------------------------------------------------------- + //CONTEXT_EXTERNAL_APP + if (!globalSettings->gui.externelApplications.empty()) + { + menu.addSeparator(); + + for (auto iter = globalSettings->gui.externelApplications.begin(); + iter != globalSettings->gui.externelApplications.end(); + ++iter) { - filterList_.push_back(std::make_pair(dirObj.getObjRelativeName(), true)); - } + //some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly" + wxString description = zen::implementation::translate(copyStringTo<std::wstring>(iter->first)); + if (description.empty()) + description = L" "; //wxWidgets doesn't like empty items - private: - FilterObjList& filterList_; - } - newFilterEntry(exFilterCandidateObj); + const wxString command = iter->second; - for (std::set<size_t>::const_iterator i = selection.begin(); i != selection.end(); ++i) - { - const FileSystemObject* currObj = gridDataView->getObject(*i); - if (currObj) - currObj->accept(newFilterEntry); + auto openApp = [this, &selection, command, event] { openExternalApplication(selection.empty() ? NULL : selection[0], event.compPos_ == gridview::COMP_LEFT, command); }; + + if (iter == globalSettings->gui.externelApplications.begin()) + menu.addItem(description + L"\tEnter", openApp); + else + menu.addItem(description, openApp, NULL, !selection.empty()); + } } - } - //############################################################################################### + //---------------------------------------------------------------------------------------------------- + //CONTEXT_DELETE_FILES + menu.addSeparator(); - //CONTEXT_EXCLUDE_EXT - if (exFilterCandidateObj.size() > 0 && !exFilterCandidateObj.begin()->second) //non empty && no directory - { - const Zstring filename = afterLast(exFilterCandidateObj.begin()->first, FILE_NAME_SEPARATOR); - if (filename.find(Zchar('.')) != Zstring::npos) //be careful: AfterLast would return the whole string if '.' were not found! + menu.addItem(_("Delete") + L"\tDel", [this] { - const Zstring extension = afterLast(filename, Zchar('.')); - - //add context menu item - wxMenuItem* menuItemExclExt = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude via filter:") + L" *." + extension); - menuItemExclExt->SetBitmap(GlobalResources::getImage(wxT("filterSmall"))); - contextMenu->Append(menuItemExclExt); - - //connect event - contextMenu->Connect(menuItemExclExt->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnContextExcludeExtension), - new SelectedExtension(extension), //ownership passed! - this); - } + deleteSelectedFiles( + getGridSelection(true, false), + getGridSelection(false, true)); + }, NULL, !selection.empty()); } - - //CONTEXT_EXCLUDE_OBJ - wxMenuItem* menuItemExclObj = NULL; - if (exFilterCandidateObj.size() == 1) - menuItemExclObj = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude via filter:") + L" " + afterLast(exFilterCandidateObj.begin()->first, FILE_NAME_SEPARATOR)); - else if (exFilterCandidateObj.size() > 1) - menuItemExclObj = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude via filter:") + L" " + _("<multiple selection>")); - - if (menuItemExclObj != NULL) + else if (event.compPos_ == gridview::COMP_MIDDLE) { - menuItemExclObj->SetBitmap(GlobalResources::getImage(wxT("filterSmall"))); - contextMenu->Append(menuItemExclObj); + menu.addItem(_("Include all"), [&] + { + zen::setActiveStatus(true, folderCmp); + updateGui(); + }, NULL, gridDataView->rowsTotal() > 0); - //connect event - contextMenu->Connect(menuItemExclObj->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnContextExcludeObject), - new FilterObjContainer(exFilterCandidateObj), //ownership passed! - this); + menu.addItem(_("Exclude all"), [&] + { + zen::setActiveStatus(false, folderCmp); + updateGuiAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true + }, NULL, gridDataView->rowsTotal() > 0); } + menu.popup(*this); +} - //CONTEXT_EXTERNAL_APP - if (!globalSettings->gui.externelApplications.empty()) - { - contextMenu->AppendSeparator(); - - const bool externalAppEnabled = (m_gridLeft->isLeadGrid() || m_gridRight->isLeadGrid()) && - selection.size() == 1; +void MainDialog::excludeExtension(const Zstring& extension) +{ + const Zstring newExclude = Zstr("*.") + extension; - for (xmlAccess::ExternalApps::iterator i = globalSettings->gui.externelApplications.begin(); - i != globalSettings->gui.externelApplications.end(); - ++i) - { - //some trick to translate default external apps on the fly: 1. "open in explorer" 2. "start directly" - //wxString description = wxGetTranslation(i->first); - wxString description = zen::implementation::translate(std::wstring(i->first.c_str())); - if (description.empty()) - description = wxT(" "); //wxWidgets doesn't like empty items - - wxMenuItem* itemExtApp = NULL; - if (i == globalSettings->gui.externelApplications.begin()) - itemExtApp = contextMenu->Append(wxID_ANY, description + wxT("\t") + wxString(_("D-Click")) + wxT(" Enter")); - else - itemExtApp = contextMenu->Append(wxID_ANY, description); - contextMenu->Enable(itemExtApp->GetId(), externalAppEnabled); - - contextMenu->Connect(itemExtApp->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnContextOpenWith), - new CtxtSelectionString(i->second), //ownership passed! - this); - } - } + //add to filter config + Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter; + if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr(";"))) + excludeFilter += Zstr("\n"); + excludeFilter += newExclude + Zstr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line - contextMenu->AppendSeparator(); + updateFilterButtons(); - //CONTEXT_DELETE_FILES - wxMenuItem* menuItemDelFiles = contextMenu->Append(wxID_ANY, wxString(_("Delete")) + wxT("\tDel")); - contextMenu->Enable(menuItemDelFiles->GetId(), selection.size() > 0); - contextMenu->Connect(menuItemDelFiles->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextDeleteFiles), NULL, this); + //do not fully apply filter, just exclude new items + std::for_each(begin(folderCmp), end(folderCmp), + [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); }); - //show context menu - PopupMenu(contextMenu.get()); + //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative()); + updateGui(); } -void MainDialog::OnContextFilterTemp(wxCommandEvent& event) +void MainDialog::excludeItems(const std::vector<FileSystemObject*>& selection) { - //merge selections from left and right grid - std::set<size_t> selection = getSelectedRows(); - if (!selection.empty()) - filterRangeManually(selection, static_cast<int>(*selection.begin())); -} + if (!selection.empty()) //check needed to determine if filtering is needed + { + Zstring newExclude; + for (auto iter = selection.begin(); iter != selection.end(); ++iter) + { + FileSystemObject* fsObj = *iter; + const bool isDir = dynamic_cast<const DirMapping*>(fsObj) != NULL; + if (iter != selection.begin()) + newExclude += Zstr("\n"); -void MainDialog::OnContextExcludeExtension(wxCommandEvent& event) -{ - SelectedExtension* selExtension = dynamic_cast<SelectedExtension*>(event.m_callbackUserData); - if (selExtension) - { - const Zstring newExclude = Zstring(Zstr("*.")) + selExtension->extension; + newExclude += FILE_NAME_SEPARATOR + fsObj->getObjRelativeName(); + if (isDir) + newExclude += FILE_NAME_SEPARATOR; + } //add to filter config Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter; - if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr(";"))) + if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr("\n"))) excludeFilter += Zstr("\n"); - excludeFilter += newExclude + Zstr(";"); //';' is appended to 'mark' that next exclude extension entry won't write to new line + excludeFilter += newExclude; updateFilterButtons(); //do not fully apply filter, just exclude new items - std::for_each(begin(gridDataView->getDataTentative()), end(gridDataView->getDataTentative()), + std::for_each(begin(folderCmp), end(folderCmp), [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); }); //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative()); - updateGuiGrid(); - - if (currentCfg.hideFilteredElements) - { - m_gridLeft ->ClearSelection(); - m_gridRight ->ClearSelection(); - m_gridMiddle->ClearSelection(); - } + updateGui(); } } -void MainDialog::OnContextExcludeObject(wxCommandEvent& event) +void MainDialog::onGridLabelContext(GridClickEvent& event) { - FilterObjContainer* objCont = dynamic_cast<FilterObjContainer*>(event.m_callbackUserData); - if (objCont) + ContextMenu menu; + + if (event.compPos_ == gridview::COMP_LEFT || + event.compPos_ == gridview::COMP_RIGHT) { - if (objCont->selectedObjects.size() > 0) //check needed to determine if filtering is needed + auto toggleColumn = [&](const Grid::ColumnAttribute& ca, size_t compPos) { - Zstring newExclude; - for (FilterObjList::const_iterator i = objCont->selectedObjects.begin(); i != objCont->selectedObjects.end(); ++i) - { - if (i != objCont->selectedObjects.begin()) - newExclude += Zstr("\n"); - - newExclude += FILE_NAME_SEPARATOR + i->first; - if (i->second) //is directory - newExclude += FILE_NAME_SEPARATOR; - } - - //add to filter config - Zstring& excludeFilter = currentCfg.mainCfg.globalFilter.excludeFilter; - if (!excludeFilter.empty() && !endsWith(excludeFilter, Zstr("\n"))) - excludeFilter += Zstr("\n"); - excludeFilter += newExclude; - - updateFilterButtons(); + auto colAttr = m_gridMain->getColumnConfig(compPos); - //do not fully apply filter, just exclude new items - std::for_each(begin(gridDataView->getDataTentative()), end(gridDataView->getDataTentative()), - [&](BaseDirMapping& baseMap) { addHardFiltering(baseMap, newExclude); }); - - //applyFiltering(getConfig().mainCfg, gridDataView->getDataTentative()); - updateGuiGrid(); + for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter) + if (iter->type_ == ca.type_) + { + iter->visible_ = !ca.visible_; + m_gridMain->setColumnConfig(colAttr, compPos); + return; + } + }; - if (currentCfg.hideFilteredElements) + if (auto prov = m_gridMain->getDataProvider(event.compPos_)) + { + const auto& colAttr = m_gridMain->getColumnConfig(event.compPos_); + for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter) { - m_gridLeft ->ClearSelection(); - m_gridRight ->ClearSelection(); - m_gridMiddle->ClearSelection(); + const Grid::ColumnAttribute& ca = *iter; + const size_t compPos = event.compPos_; + + menu.addCheckBox(prov->getColumnLabel(ca.type_), [ca, compPos, toggleColumn] { toggleColumn(ca, compPos); }, + ca.visible_, ca.type_ != static_cast<ColumnType>(COL_TYPE_FILENAME)); //do not allow user to hide file name column! } } - } -} - - - -void MainDialog::OnContextOpenWith(wxCommandEvent& event) -{ - CtxtSelectionString* stringObj = dynamic_cast<CtxtSelectionString*>(event.m_callbackUserData); - if (stringObj) - openExternalApplication(stringObj->objName); -} - - - -void MainDialog::OnContextDeleteFiles(wxCommandEvent& event) -{ - const std::set<size_t> viewSelectionLeft = getSelectedRows(m_gridLeft); - const std::set<size_t> viewSelectionRight = getSelectedRows(m_gridRight); - deleteSelectedFiles(viewSelectionLeft, viewSelectionRight); -} - - -void MainDialog::OnContextSyncDirLeft(wxCommandEvent& event) -{ - //merge selections from left and right grid - const std::set<size_t> selection = getSelectedRows(); - setSyncDirManually(selection, zen::SYNC_DIR_LEFT); -} - - -void MainDialog::OnContextSyncDirNone(wxCommandEvent& event) -{ - //merge selections from left and right grid - const std::set<size_t> selection = getSelectedRows(); - setSyncDirManually(selection, zen::SYNC_DIR_NONE); -} + //---------------------------------------------------------------------------------------------- + menu.addSeparator(); - -void MainDialog::OnContextSyncDirRight(wxCommandEvent& event) -{ - //merge selections from left and right grid - const std::set<size_t> selection = getSelectedRows(); - setSyncDirManually(selection, zen::SYNC_DIR_RIGHT); -} - - -void MainDialog::OnContextRimLabelLeft(wxGridEvent& event) -{ - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* menuItemCustomize = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Customize...")); - contextMenu->Append(menuItemCustomize); - contextMenu->Connect(menuItemCustomize->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnLeft), NULL, this); - - if (m_gridLeft->getTypeAtPos(event.GetCol()) == xmlAccess::DATE) - { - wxMenuItem* menuItemSelectTs = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Select time span...")); - contextMenu->Append(menuItemSelectTs); - contextMenu->Connect(menuItemSelectTs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSelectTimeSpan), NULL, this); - } - - contextMenu->AppendSeparator(); - - wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK); - contextMenu->Append(itemAutoAdjust); - itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsLeft); - contextMenu->Connect(itemAutoAdjust->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustLeft), NULL, this); - - //if (m_gridLeft->getTypeAtPos(event.GetCol()) == xmlAccess::FILENAME) - { - contextMenu->AppendSeparator(); - - wxMenuItem* header = contextMenu->Append(wxID_ANY, _("Icon size:")); - header->Enable(false); - - auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz) + auto setDefault = [&] { - wxMenuItem* newItem = contextMenu->Append(wxID_ANY, label, wxEmptyString, wxITEM_RADIO); - contextMenu->Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetIconSize), - new CtxtSelectionIconSize(sz), //ownership passed! - this); - - if (globalSettings->gui.iconSize == sz) - newItem->Check(); + m_gridMain->setColumnConfig(gridview::convertConfig(event.compPos_ == gridview::COMP_LEFT ? + getDefaultColumnAttributesLeft() : + getDefaultColumnAttributesRight()), event.compPos_); }; - addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL); - addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM); - addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE); - } - - PopupMenu(contextMenu.get()); //show context menu -} - - -void MainDialog::OnContextRimLabelRight(wxGridEvent& event) -{ - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* menuItemCustomize = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Customize...")); - contextMenu->Append(menuItemCustomize); - contextMenu->Connect(menuItemCustomize->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextCustColumnRight), NULL, this); - - if (m_gridRight->getTypeAtPos(event.GetCol()) == xmlAccess::DATE) - { - wxMenuItem* menuItemSelectTs = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Select time span...")); - contextMenu->Append(menuItemSelectTs); - contextMenu->Connect(menuItemSelectTs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSelectTimeSpan), NULL, this); - } - - contextMenu->AppendSeparator(); - - wxMenuItem* itemAutoAdjust = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Auto-adjust columns"), wxEmptyString, wxITEM_CHECK); - contextMenu->Append(itemAutoAdjust); - itemAutoAdjust->Check(globalSettings->gui.autoAdjustColumnsRight); - contextMenu->Connect(itemAutoAdjust->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextAutoAdjustRight), NULL, this); - - //if (m_gridRight->getTypeAtPos(event.GetCol()) == xmlAccess::FILENAME) - { - contextMenu->AppendSeparator(); - - wxMenuItem* header = contextMenu->Append(wxID_ANY, _("Icon size:")); - header->Enable(false); - - auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz) + menu.addItem(_("&Default"), setDefault); //'&' -> reuse text from "default" buttons elsewhere + //---------------------------------------------------------------------------------------------- + auto setIconSize = [&](xmlAccess::FileIconSize sz, IconBuffer::IconSize szAlias) { - wxMenuItem* newItem = contextMenu->Append(wxID_ANY, label, wxEmptyString, wxITEM_RADIO); - contextMenu->Connect(newItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetIconSize), - new CtxtSelectionIconSize(sz), //ownership passed! - this); - if (globalSettings->gui.iconSize == sz) - newItem->Check(); + globalSettings->gui.iconSize = sz; + gridview::setIconSize(*m_gridMain, szAlias); }; - addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL); - addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM); - addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE); - } - - PopupMenu(contextMenu.get()); //show context menu -} - - -void MainDialog::OnContextCustColumnLeft(wxCommandEvent& event) -{ - xmlAccess::ColumnAttributes colAttr = m_gridLeft->getColumnAttributes(); - - if (zen::showCustomizeColsDlg(colAttr) == ReturnSmallDlg::BUTTON_OKAY) - { - m_gridLeft->setColumnAttributes(colAttr); - - m_gridLeft ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); //hide sort direction indicator on GUI grids - m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridRight ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - } -} - - -void MainDialog::OnContextCustColumnRight(wxCommandEvent& event) -{ - xmlAccess::ColumnAttributes colAttr = m_gridRight->getColumnAttributes(); - - if (zen::showCustomizeColsDlg(colAttr) == ReturnSmallDlg::BUTTON_OKAY) - { - m_gridRight->setColumnAttributes(colAttr); - - m_gridLeft ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); //hide sort direction indicator on GUI grids - m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridRight ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - } -} + menu.addSeparator(); + menu.addItem(_("Icon size:"), [] {}, NULL, false); + auto addSizeEntry = [&](const wxString& label, xmlAccess::FileIconSize sz, IconBuffer::IconSize szAlias) + { + auto setIconSize2 = setIconSize; //bring into scope + menu.addRadio(label, [sz, szAlias, setIconSize2] { setIconSize2(sz, szAlias); }, globalSettings->gui.iconSize == sz); + }; + addSizeEntry(_("Small" ), xmlAccess::ICON_SIZE_SMALL , IconBuffer::SIZE_SMALL); + addSizeEntry(_("Medium"), xmlAccess::ICON_SIZE_MEDIUM, IconBuffer::SIZE_MEDIUM); + addSizeEntry(_("Large" ), xmlAccess::ICON_SIZE_LARGE , IconBuffer::SIZE_LARGE); + //---------------------------------------------------------------------------------------------- + if (static_cast<ColumnTypeRim>(event.colType_) == COL_TYPE_DATE) + { + menu.addSeparator(); -void MainDialog::OnContextSelectTimeSpan(wxCommandEvent& event) -{ - if (showSelectTimespanDlg(manualTimeSpanFrom, manualTimeSpanTo) == ReturnSmallDlg::BUTTON_OKAY) - { - applyTimeSpanFilter(gridDataView->getDataTentative(), manualTimeSpanFrom, manualTimeSpanTo); //overwrite current active/inactive settings - refreshGridAfterFilterChange(400); + auto selectTimeSpan = [&] + { + if (showSelectTimespanDlg(manualTimeSpanFrom, manualTimeSpanTo) == ReturnSmallDlg::BUTTON_OKAY) + { + applyTimeSpanFilter(folderCmp, manualTimeSpanFrom, manualTimeSpanTo); //overwrite current active/inactive settings + updateGuiAfterFilterChange(400); + } + }; + menu.addItem(_("Select time span..."), selectTimeSpan); + } } -} - - -void MainDialog::OnContextAutoAdjustLeft(wxCommandEvent& event) -{ - globalSettings->gui.autoAdjustColumnsLeft = !globalSettings->gui.autoAdjustColumnsLeft; - updateGuiGrid(); -} - - -void MainDialog::OnContextAutoAdjustRight(wxCommandEvent& event) -{ - globalSettings->gui.autoAdjustColumnsRight = !globalSettings->gui.autoAdjustColumnsRight; - updateGuiGrid(); -} - -void MainDialog::OnContextSetIconSize(wxCommandEvent& event) -{ - CtxtSelectionIconSize* sizeObj = dynamic_cast<CtxtSelectionIconSize*>(event.m_callbackUserData); - if (sizeObj) + else if (event.compPos_ == gridview::COMP_MIDDLE) { - globalSettings->gui.iconSize = sizeObj->iconSize; - - const IconBuffer::IconSize sz = [&]() -> IconBuffer::IconSize - { - switch (globalSettings->gui.iconSize) - { - case xmlAccess::ICON_SIZE_SMALL: - return IconBuffer::SIZE_SMALL; - case xmlAccess::ICON_SIZE_MEDIUM: - return IconBuffer::SIZE_MEDIUM; - case xmlAccess::ICON_SIZE_LARGE: - return IconBuffer::SIZE_LARGE; - } - return IconBuffer::SIZE_SMALL; - }(); - - std::shared_ptr<IconBuffer> iconBuffer = std::make_shared<IconBuffer>(sz); - - m_gridLeft ->setIconManager(iconBuffer); - m_gridMiddle->setIconManager(iconBuffer); - m_gridRight ->setIconManager(iconBuffer); + menu.addItem(_("Synchronization Preview"), [&] { enablePreview(true ); }, syncPreviewEnabled ? &GlobalResources::getImage(L"syncViewSmall") : NULL); + menu.addItem(_("Comparison Result"), [&] { enablePreview(false); }, syncPreviewEnabled ? NULL : &GlobalResources::getImage(L"cmpViewSmall")); } -} - - -void MainDialog::OnContextMiddle(wxGridEvent& event) -{ - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* menuItemInclude = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Include all rows")); - contextMenu->Append(menuItemInclude); - if (gridDataView->rowsTotal() == 0) - menuItemInclude->Enable(false); - contextMenu->Connect(menuItemInclude->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextIncludeAll), NULL, this); - - wxMenuItem* menuItemExclude = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Exclude all rows")); - contextMenu->Append(menuItemExclude); - if (gridDataView->rowsTotal() == 0) - menuItemExclude->Enable(false); - contextMenu->Connect(menuItemExclude->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextExcludeAll), NULL, this); - - PopupMenu(contextMenu.get()); //show context menu -} - - -void MainDialog::OnContextMiddleLabel(wxGridEvent& event) -{ - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemSyncPreview = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Synchronization Preview")); - contextMenu->Connect(itemSyncPreview->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSyncView), NULL, this); - - wxMenuItem* itemCmpResult = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Comparison Result")); - contextMenu->Connect(itemCmpResult->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextComparisonView), NULL, this); - - if (syncPreview->previewIsEnabled()) - itemSyncPreview->SetBitmap(GlobalResources::getImage(wxT("syncViewSmall"))); - else - itemCmpResult->SetBitmap(GlobalResources::getImage(wxT("cmpViewSmall"))); - - contextMenu->Append(itemCmpResult); - contextMenu->Append(itemSyncPreview); - - PopupMenu(contextMenu.get()); //show context menu + menu.popup(*this); } void MainDialog::OnContextSetLayout(wxMouseEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemReset = contextMenu->Append(wxID_ANY, _("Reset view")); - contextMenu->Connect(itemReset->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnContextSetLayoutReset), NULL, this); + ContextMenu menu; - typedef std::vector<std::pair<wxString, wxString> > CaptionNameMapping; - CaptionNameMapping captionNameMap; + menu.addItem(_("Default view"), [&] + { + auiMgr.LoadPerspective(defaultPerspective); + updateGuiForFolderPair(); + }); + //---------------------------------------------------------------------------------------- + std::vector<std::pair<wxString, wxString>> captionNameMap; //(caption, identifier) const wxAuiPaneInfoArray& paneArray = auiMgr.GetAllPanes(); for (size_t i = 0; i < paneArray.size(); ++i) @@ -2295,214 +2004,94 @@ void MainDialog::OnContextSetLayout(wxMouseEvent& event) captionNameMap.push_back(std::make_pair(paneArray[i].caption, paneArray[i].name)); if (!captionNameMap.empty()) - { - contextMenu->AppendSeparator(); - - for (CaptionNameMapping::const_iterator i = captionNameMap.begin(); i != captionNameMap.end(); ++i) - { - wxString entry = _("Show \"%x\""); - entry.Replace(wxT("%x"), i->first); - - wxMenuItem* newItem = contextMenu->Append(wxID_ANY, entry); - contextMenu->Connect(newItem->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnContextSetLayoutShowPanel), - new CtxtSelectionString(i->second), //ownership passed! - this); - } - } - - PopupMenu(contextMenu.get()); //show context menu -} - - -void MainDialog::OnContextSetLayoutReset(wxCommandEvent& event) -{ - auiMgr.LoadPerspective(defaultPerspective); -} - + menu.addSeparator(); -void MainDialog::OnContextSetLayoutShowPanel(wxCommandEvent& event) -{ - CtxtSelectionString* stringObj = dynamic_cast<CtxtSelectionString*>(event.m_callbackUserData); - if (stringObj) + auto showPanel = [&](const wxString& identifier) { - auiMgr.GetPane(stringObj->objName).Show(); + auiMgr.GetPane(identifier).Show(); auiMgr.Update(); - } -} - + }; -void MainDialog::OnContextIncludeAll(wxCommandEvent& event) -{ - zen::setActiveStatus(true, gridDataView->getDataTentative()); - refreshGridAfterFilterChange(0); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts break; -} + for (auto iter = captionNameMap.begin(); iter != captionNameMap.end(); ++iter) + { + const wxString label = replaceCpy(_("Show \"%x\""), L"%x", iter->first); + const wxString identifier = iter->second; + menu.addItem(label, [showPanel, identifier] { showPanel(identifier); }); + } -void MainDialog::OnContextExcludeAll(wxCommandEvent& event) -{ - zen::setActiveStatus(false, gridDataView->getDataTentative()); - refreshGridAfterFilterChange(400); //call this instead of updateGuiGrid() to add some delay if hideFiltered == true and to handle some graphical artifacts + menu.popup(*this); } -void MainDialog::OnContextComparisonView(wxCommandEvent& event) +void MainDialog::OnCompSettingsContext(wxMouseEvent& event) { - syncPreview->enablePreview(false); //change view -} + ContextMenu menu; + auto setVariant = [&](CompareVariant var) + { + currentCfg.mainCfg.cmpConfig.compareVar = var; + applyCompareConfig(); + }; -void MainDialog::OnContextSyncView(wxCommandEvent& event) -{ - syncPreview->enablePreview(true); //change view -} + auto currentVar = getConfig().mainCfg.cmpConfig.compareVar; + menu.addRadio(_("File time and size"), [&] { setVariant(CMP_BY_TIME_SIZE); }, currentVar == CMP_BY_TIME_SIZE); + menu.addRadio(_("File content" ), [&] { setVariant(CMP_BY_CONTENT); }, currentVar == CMP_BY_CONTENT); -struct CtxtSelectionCmpVar : public wxObject -{ - CtxtSelectionCmpVar(CompareVariant var) : compareVar(var) {} - CompareVariant compareVar; -}; + menu.popup(*this); +} -void MainDialog::OnContextSelectCompVariant(wxMouseEvent& event) +void MainDialog::OnSyncSettingsContext(wxMouseEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemSizeDate = new wxMenuItem(contextMenu.get(), wxID_ANY, _("File time and size"), L"", wxITEM_RADIO); - contextMenu->Append(itemSizeDate); - contextMenu->Connect(itemSizeDate->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnSetCompVariant), - new CtxtSelectionCmpVar(CMP_BY_TIME_SIZE), //ownership passed! - this); - - wxMenuItem* itemContent = new wxMenuItem(contextMenu.get(), wxID_ANY, _("File content"), L"", wxITEM_RADIO); - contextMenu->Append(itemContent); - contextMenu->Connect(itemContent->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnSetCompVariant), - new CtxtSelectionCmpVar(CMP_BY_CONTENT), //ownership passed! - this); + ContextMenu menu; - //--------------------------------------------------------------- - xmlAccess::XmlGuiConfig cfg = getConfig(); - - switch (cfg.mainCfg.cmpConfig.compareVar) + auto setVariant = [&](DirectionConfig::Variant var) { - case CMP_BY_TIME_SIZE: - itemSizeDate->Check(); - break; - case CMP_BY_CONTENT: - itemContent->Check(); - break; - } - - PopupMenu(contextMenu.get()); //show context menu -} - - -struct CtxtSelectionSyncVar : public wxObject -{ - CtxtSelectionSyncVar(DirectionConfig::Variant var) : syncVar(var) {} - DirectionConfig::Variant syncVar; -}; + currentCfg.mainCfg.syncCfg.directionCfg.var = var; + applySyncConfig(); + }; + const auto currentVar = getConfig().mainCfg.syncCfg.directionCfg.var; -void MainDialog::OnContextSelectSyncVariant(wxMouseEvent& event) -{ - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemAuto = new wxMenuItem(contextMenu.get(), wxID_ANY, _("<Automatic>"), L"", wxITEM_RADIO); - contextMenu->Append(itemAuto); - contextMenu->Connect(itemAuto->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnSetSyncVariant), - new CtxtSelectionSyncVar(DirectionConfig::AUTOMATIC), //ownership passed! - this); - - wxMenuItem* itemMirror = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Mirror ->>"), L"", wxITEM_RADIO); - contextMenu->Append(itemMirror); - contextMenu->Connect(itemMirror->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnSetSyncVariant), - new CtxtSelectionSyncVar(DirectionConfig::MIRROR), //ownership passed! - this); - - wxMenuItem* itemUpdate = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Update ->"), L"", wxITEM_RADIO); - contextMenu->Append(itemUpdate); - contextMenu->Connect(itemUpdate->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnSetSyncVariant), - new CtxtSelectionSyncVar(DirectionConfig::UPDATE), //ownership passed! - this); - - wxMenuItem* itemCustom = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Custom"), L"", wxITEM_RADIO); - contextMenu->Append(itemCustom); - contextMenu->Connect(itemCustom->GetId(), - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(MainDialog::OnSetSyncVariant), - new CtxtSelectionSyncVar(DirectionConfig::CUSTOM), //ownership passed! - this); - - //--------------------------------------------------------------- - xmlAccess::XmlGuiConfig cfg = getConfig(); - - switch (cfg.mainCfg.syncCfg.directionCfg.var) - { - case DirectionConfig::AUTOMATIC: - itemAuto->Check(); - break; - case DirectionConfig::MIRROR: - itemMirror->Check(); - break; - case DirectionConfig::UPDATE: - itemUpdate->Check(); - break; - case DirectionConfig::CUSTOM: - itemCustom->Check(); - break; - } + menu.addRadio(_("<Automatic>"), [&] { setVariant(DirectionConfig::AUTOMATIC); }, currentVar == DirectionConfig::AUTOMATIC); + menu.addRadio(_("Mirror ->>") , [&] { setVariant(DirectionConfig::MIRROR); }, currentVar == DirectionConfig::MIRROR); + menu.addRadio(_("Update ->") , [&] { setVariant(DirectionConfig::UPDATE); }, currentVar == DirectionConfig::UPDATE); + menu.addRadio(_("Custom") , [&] { setVariant(DirectionConfig::CUSTOM); }, currentVar == DirectionConfig::CUSTOM); - PopupMenu(contextMenu.get()); //show context menu + menu.popup(*this); } -void MainDialog::OnSetCompVariant(wxCommandEvent& event) +void MainDialog::OnDirSelected(wxFileDirPickerEvent& event) { - CtxtSelectionCmpVar* selection = dynamic_cast<CtxtSelectionCmpVar*>(event.m_callbackUserData); - if (selection) - { - currentCfg.mainCfg.cmpConfig.compareVar = selection->compareVar; - applyCompareConfig(); - } -} + //left and right directory text-control and dirpicker are synchronized by MainFolderDragDrop automatically + clearGrid(); //disable the sync button -void MainDialog::OnSetSyncVariant(wxCommandEvent& event) -{ - CtxtSelectionSyncVar* selection = dynamic_cast<CtxtSelectionSyncVar*>(event.m_callbackUserData); - if (selection) - { - currentCfg.mainCfg.syncCfg.directionCfg.var = selection->syncVar; - applySyncConfig(); - } + event.Skip(); } -void MainDialog::OnDirSelected(wxFileDirPickerEvent& event) +void MainDialog::onNaviPanelFilesDropped(FileDropEvent& event) { - //left and right directory text-control and dirpicker are synchronized by MainFolderDragDrop automatically + const auto& droppedFiles = event.getFiles(); - //disable the sync button - syncPreview->enableSynchronization(false); + switch (xmlAccess::getMergeType(droppedFiles)) //throw () + { + case xmlAccess::MERGE_BATCH: + case xmlAccess::MERGE_GUI: + case xmlAccess::MERGE_GUI_BATCH: + loadConfiguration(droppedFiles); + return; - //clear grids - gridDataView->clearAllRows(); - updateGuiGrid(); + case xmlAccess::MERGE_OTHER: + break; + } event.Skip(); + } @@ -2832,38 +2421,42 @@ void MainDialog::OnClose(wxCloseEvent& event) } -void MainDialog::OnCheckRows(FFSCheckRowsEvent& event) +void MainDialog::onCheckRows(CheckRowsEvent& event) { - const int lowerBound = std::max(std::min(event.rowFrom, event.rowTo), 0); - const int upperBound = std::min(std::max(event.rowFrom, event.rowTo), static_cast<int>(gridDataView->rowsOnView()) - 1); + const int rowFirst = std::min(event.rowFrom_, event.rowTo_); // [rowFirst, rowLast) + int rowLast = std::max(event.rowFrom_, event.rowTo_) + 1; // + rowLast = std::min(rowLast, static_cast<int>(gridDataView->rowsOnView())); //consider dummy rows + + if (0 <= rowFirst && rowFirst < rowLast) + { + std::set<size_t> selectedRows; + for (int i = rowFirst; i < rowLast; ++i) + selectedRows.insert(i); - std::set<size_t> selectedRowsOnView; - for (int i = lowerBound; i <= upperBound; ++i) - selectedRowsOnView.insert(i); + std::vector<FileSystemObject*> objects; + gridDataView->getAllFileRef(selectedRows, objects); - if (!selectedRowsOnView.empty()) - filterRangeManually(selectedRowsOnView, event.rowFrom); + setManualFilter(objects, event.setIncluded_); + } } -void MainDialog::OnSetSyncDirection(FFSSyncDirectionEvent& event) +void MainDialog::onSetSyncDirection(SyncDirectionEvent& event) { - const int lowerBound = std::min(event.rowFrom, event.rowTo); - const int upperBound = std::max(event.rowFrom, event.rowTo); + const int rowFirst = std::min(event.rowFrom_, event.rowTo_); // [rowFirst, rowLast) + int rowLast = std::max(event.rowFrom_, event.rowTo_) + 1; // + rowLast = std::min(rowLast, static_cast<int>(gridDataView->rowsOnView())); //consider dummy rows - if (0 <= lowerBound) + if (0 <= rowFirst && rowFirst < rowLast) { - for (int i = lowerBound; i <= std::min(upperBound, int(gridDataView->rowsOnView()) - 1); ++i) - { - FileSystemObject* fsObj = gridDataView->getObject(i); - if (fsObj) - { - setSyncDirectionRec(event.direction, *fsObj); //set new direction (recursively) - zen::setActiveStatus(true, *fsObj); //works recursively for directories - } - } + std::set<size_t> selectedRows; + for (int i = rowFirst; i < rowLast; ++i) + selectedRows.insert(i); + + std::vector<FileSystemObject*> objects; + gridDataView->getAllFileRef(selectedRows, objects); - updateGuiGrid(); + setSyncDirManually(objects, event.direction_); } } @@ -2894,17 +2487,12 @@ void MainDialog::setLastUsedConfig(const std::vector<wxString>& filenames, void MainDialog::setConfig(const xmlAccess::XmlGuiConfig& newGuiCfg) { + clearGrid(); + currentCfg = newGuiCfg; //evaluate new settings... - //disable the sync button - syncPreview->enableSynchronization(false); - - //clear grids - gridDataView->clearAllRows(); - updateGuiGrid(); - //(re-)set view filter buttons initViewFilterButtons(); @@ -2930,7 +2518,7 @@ void MainDialog::setConfig(const xmlAccess::XmlGuiConfig& newGuiCfg) //read GUI layout m_checkBoxHideFilt->SetValue(currentCfg.hideFilteredElements); - syncPreview->enablePreview(currentCfg.syncPreviewEnabled); + enablePreview(currentCfg.syncPreviewEnabled); //########################################################### //update compare variant name @@ -2972,7 +2560,7 @@ xmlAccess::XmlGuiConfig MainDialog::getConfig() const std::back_inserter(guiCfg.mainCfg.additionalPairs), getEnhancedPair); //sync preview - guiCfg.syncPreviewEnabled = syncPreview->previewIsEnabled(); + guiCfg.syncPreviewEnabled = syncPreviewEnabled; return guiCfg; } @@ -2985,27 +2573,18 @@ const wxString& MainDialog::lastRunConfigName() } -void MainDialog::refreshGridAfterFilterChange(int delay) +void MainDialog::updateGuiAfterFilterChange(int delay) { //signal UI that grids need to be refreshed on next Update() - m_gridLeft ->ForceRefresh(); - m_gridMiddle->ForceRefresh(); - m_gridRight ->ForceRefresh(); - - m_gridLeft ->Update(); // - m_gridMiddle->Update(); //show changes resulting from ForceRefresh() - required for last, possibly half-visible, row only - m_gridRight ->Update(); // if (currentCfg.hideFilteredElements) { + m_gridMain->Refresh(); + m_gridMain->Update(); wxMilliSleep(delay); //some delay to show user the rows he has filtered out before they are removed - updateGuiGrid(); //redraw grid to remove excluded elements (keeping sort sequence) - - m_gridLeft->ClearSelection(); - m_gridRight->ClearSelection(); } - else - updateGuiGrid(); + + updateGui(); } @@ -3016,11 +2595,7 @@ void MainDialog::OnHideFilteredButton(wxCommandEvent& event) //make sure, checkbox and "hideFiltered" are in sync m_checkBoxHideFilt->SetValue(currentCfg.hideFilteredElements); - m_gridLeft->ClearSelection(); - m_gridRight->ClearSelection(); - updateGuiGrid(); - - // event.Skip(); + updateGui(); } @@ -3030,132 +2605,125 @@ void MainDialog::OnConfigureFilter(wxCommandEvent& event) currentCfg.mainCfg.globalFilter) == ReturnSmallDlg::BUTTON_OKAY) { updateFilterButtons(); //refresh global filter icon - updateFilterConfig(); //re-apply filter + applyFilterConfig(); //re-apply filter } //event.Skip() } -void MainDialog::OnGlobalFilterOpenContext(wxCommandEvent& event) +void MainDialog::OnGlobalFilterContext(wxCommandEvent& event) { - contextMenu.reset(new wxMenu); //re-create context menu - - wxMenuItem* itemClear = new wxMenuItem(contextMenu.get(), wxID_ANY, _("Clear filter settings")); - contextMenu->Append(itemClear); - contextMenu->Connect(itemClear->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainDialog::OnGlobalFilterRemConfirm), NULL, this); - - if (isNullFilter(currentCfg.mainCfg.globalFilter)) - contextMenu->Enable(itemClear->GetId(), false); //disable menu item, if clicking wouldn't make sense anyway - - PopupMenu(contextMenu.get()); //show context menu -} + ContextMenu menu; + auto clearFilter = [&] + { + currentCfg.mainCfg.globalFilter = FilterConfig(); -void MainDialog::OnGlobalFilterRemConfirm(wxCommandEvent& event) -{ - currentCfg.mainCfg.globalFilter = FilterConfig(); + updateFilterButtons(); //refresh global filter icon + applyFilterConfig(); //re-apply filter + }; + menu.addItem( _("Clear filter settings"), clearFilter, NULL, !isNullFilter(currentCfg.mainCfg.globalFilter)); - updateFilterButtons(); //refresh global filter icon - updateFilterConfig(); //re-apply filter + menu.popup(*this); } void MainDialog::OnLeftOnlyFiles(wxCommandEvent& event) { m_bpButtonLeftOnly->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnLeftNewerFiles(wxCommandEvent& event) { m_bpButtonLeftNewer->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnDifferentFiles(wxCommandEvent& event) { m_bpButtonDifferent->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnRightNewerFiles(wxCommandEvent& event) { m_bpButtonRightNewer->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnRightOnlyFiles(wxCommandEvent& event) { m_bpButtonRightOnly->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnEqualFiles(wxCommandEvent& event) { m_bpButtonEqual->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnConflictFiles(wxCommandEvent& event) { m_bpButtonConflict->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnSyncCreateLeft(wxCommandEvent& event) { m_bpButtonSyncCreateLeft->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnSyncCreateRight(wxCommandEvent& event) { m_bpButtonSyncCreateRight->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnSyncDeleteLeft(wxCommandEvent& event) { m_bpButtonSyncDeleteLeft->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnSyncDeleteRight(wxCommandEvent& event) { m_bpButtonSyncDeleteRight->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnSyncDirLeft(wxCommandEvent& event) { m_bpButtonSyncDirOverwLeft->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnSyncDirRight(wxCommandEvent& event) { m_bpButtonSyncDirOverwRight->toggle(); - updateGuiGrid(); + updateGui(); } void MainDialog::OnSyncDirNone(wxCommandEvent& event) { m_bpButtonSyncDirNone->toggle(); - updateGuiGrid(); + updateGui(); } @@ -3163,7 +2731,9 @@ inline wxBitmap buttonPressed(const std::string& name) { wxBitmap background = GlobalResources::getImage(wxT("buttonPressed")); - return layOver(GlobalResources::getImage(utf8CvrtTo<wxString>(name)), background); + return mirrorIfRtl( + layOver( + GlobalResources::getImage(utf8CvrtTo<wxString>(name)), background)); } @@ -3174,7 +2744,7 @@ wxBitmap buttonReleased(const std::string& name) zen::move(output, 0, -1); //move image right one pixel brighten(output, 80); - return output; + return mirrorIfRtl(output); } @@ -3290,11 +2860,11 @@ void MainDialog::updateFilterButtons() firstFolderPair->refreshButtons(); //update folder pairs - for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + std::for_each(additionalFolderPairs.begin(), additionalFolderPairs.end(), + [&](DirectoryPair* dirPair) { - DirectoryPair* dirPair = *i; dirPair->refreshButtons(); - } + }); } @@ -3305,9 +2875,8 @@ void MainDialog::OnCompare(wxCommandEvent& event) wxBusyCursor dummy; //show hourglass cursor + clearGrid(false); //-> don't resize grid to keep scroll position! //prevent temporary memory peak by clearing old result list - gridDataView->clearAllRows(); - //updateGuiGrid(); -> don't resize grid to keep scroll position! try { @@ -3332,10 +2901,7 @@ void MainDialog::OnCompare(wxCommandEvent& event) statusHandler); //technical representation of comparison data - zen::FolderComparison newCompareData; - compProc.startCompareProcess(cmpConfig, newCompareData); - - gridDataView->setData(newCompareData); //newCompareData is invalidated after this call + compProc.startCompareProcess(cmpConfig, folderCmp); //throw //play (optional) sound notification after sync has completed (GUI and batch mode) const wxString soundFile = toWx(zen::getResourceDir()) + wxT("Compare_Complete.wav"); @@ -3344,76 +2910,60 @@ void MainDialog::OnCompare(wxCommandEvent& event) } catch (GuiAbortProcess&) { - //disable the sync button - syncPreview->enableSynchronization(false); if (m_buttonCompare->IsShownOnScreen()) m_buttonCompare->SetFocus(); - updateGuiGrid(); //refresh grid in ANY case! (also on abort) + updateGui(); //refresh grid in ANY case! (also on abort) return; } - //once compare is finished enable the sync button - syncPreview->enableSynchronization(true); - if (m_buttonStartSync->IsShownOnScreen()) m_buttonStartSync->SetFocus(); - - //hide sort direction indicator on GUI grids - m_gridLeft ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridRight ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); + gridDataView->setData(folderCmp); //update view on data + treeDataView->setData(folderCmp); // + updateGui(); + updateSyncEnabledStatus(); //enable the sync button - //reset last sort selection: used for determining sort direction - lastSortColumn = -1; - lastSortGrid = NULL; + if (m_buttonStartSync->IsShownOnScreen()) + m_buttonStartSync->SetFocus(); - m_gridLeft-> ClearSelection(); - m_gridMiddle->ClearSelection(); - m_gridRight-> ClearSelection(); + gridview::clearSelection(*m_gridMain); + m_gridNavi->clearSelection(); //add to folder history after successful comparison only folderHistoryLeft ->addItem(toZ(m_directoryLeft->GetValue())); folderHistoryRight->addItem(toZ(m_directoryRight->GetValue())); - //refresh grid in ANY case! (also on abort) - updateGuiGrid(); - //prepare status information - if (allElementsEqual(gridDataView->getDataTentative())) + if (allElementsEqual(folderCmp)) pushStatusInformation(_("All directories in sync!")); } -void MainDialog::updateGuiGrid() +void MainDialog::updateGui() { - wxWindowUpdateLocker dummy(m_panelStatusBar); //avoid display distortion - updateGridViewData(); //update gridDataView and write status information - //all three grids retrieve their data directly via gridDataView - //the only thing left to do is notify the grids to updafte their sizes (nr of rows), since this has to be communicated by the grids via messages - m_gridLeft ->updateGridSizes(); - m_gridMiddle->updateGridSizes(); - m_gridRight ->updateGridSizes(); - - //support for column auto adjustment - if (globalSettings->gui.autoAdjustColumnsLeft) - m_gridLeft->autoSizeColumns(); - if (globalSettings->gui.autoAdjustColumnsRight) - m_gridRight->autoSizeColumns(); - //update sync preview statistics updateStatistics(); auiMgr.Update(); //fix small display distortion, if view filter panel is empty +} - m_gridLeft ->Refresh(); - m_gridMiddle->Refresh(); - m_gridRight ->Refresh(); + +void MainDialog::clearGrid(bool refreshGrid) +{ + folderCmp.clear(); + gridDataView->setData(folderCmp); + treeDataView->setData(folderCmp); + + updateSyncEnabledStatus(); + + if (refreshGrid) + updateGui(); } void MainDialog::updateStatistics() { //update preview of bytes to be transferred: - const SyncStatistics st(gridDataView->getDataTentative()); + const SyncStatistics st(folderCmp); const wxString toCreate = zen::toStringSep(st.getCreate()); const wxString toUpdate = zen::toStringSep(st.getUpdate()); const wxString toDelete = zen::toStringSep(st.getDelete()); @@ -3426,10 +2976,10 @@ void MainDialog::updateStatistics() } -void MainDialog::OnSwitchView(wxCommandEvent& event) -{ - syncPreview->enablePreview(!syncPreview->previewIsEnabled()); -} +//void MainDialog::OnSwitchView(wxCommandEvent& event) +//{ +// enablePreview(!syncPreviewEnabled); +//} void MainDialog::OnSyncSettings(wxCommandEvent& event) @@ -3449,33 +2999,29 @@ void MainDialog::OnSyncSettings(wxCommandEvent& event) } -void MainDialog::applyCompareConfig(bool globalLevel) +void MainDialog::applyCompareConfig(bool changePreviewStatus) { //update compare variant name m_staticTextCmpVariant->SetLabel(getConfig().mainCfg.getCompVariantName()); m_panelTopButtons->Layout(); //adapt layout for variant text - if (globalLevel) + if (changePreviewStatus) { - //disable the sync button - syncPreview->enableSynchronization(false); - - //clear grids - gridDataView->clearAllRows(); - updateGuiGrid(); + clearGrid(); //convenience: change sync view switch (currentCfg.mainCfg.cmpConfig.compareVar) { case CMP_BY_TIME_SIZE: - syncPreview->enablePreview(true); + enablePreview(true); break; case CMP_BY_CONTENT: - syncPreview->enablePreview(false); + enablePreview(false); break; } - if (m_buttonCompare->IsShownOnScreen()) m_buttonCompare->SetFocus(); + if (m_buttonCompare->IsShownOnScreen()) + m_buttonCompare->SetFocus(); } } @@ -3501,13 +3047,13 @@ void MainDialog::OnCmpSettings(wxCommandEvent& event) void MainDialog::OnStartSync(wxCommandEvent& event) { - if (!syncPreview->synchronizationIsEnabled()) + if (folderCmp.empty()) { //quick sync: simulate button click on "compare" wxCommandEvent dummy2(wxEVT_COMMAND_BUTTON_CLICKED); m_buttonCompare->GetEventHandler()->ProcessEvent(dummy2); //synchronous call - if (!syncPreview->synchronizationIsEnabled()) //check if user aborted or error occured, ect... + if (folderCmp.empty()) //check if user aborted or error occured, ect... return; //pushStatusInformation(_("Please run a Compare first before synchronizing!")); //return; @@ -3520,7 +3066,7 @@ void MainDialog::OnStartSync(wxCommandEvent& event) if (zen::showSyncPreviewDlg( getConfig().mainCfg.getSyncVariantName(), - zen::SyncStatistics(gridDataView->getDataTentative()), + zen::SyncStatistics(folderCmp), dontShowAgain) != ReturnSmallDlg::BUTTON_OKAY) return; @@ -3545,15 +3091,13 @@ void MainDialog::OnStartSync(wxCommandEvent& event) guiCfg.mainCfg.onCompletion, globalSettings->gui.onCompletionHistory); - FolderComparison& dataToSync = gridDataView->getDataTentative(); - //GUI mode: place directory locks on directories isolated(!) during both comparison and synchronization LockHolder dummy2(true); //allow pw prompt - for (auto i = begin(dataToSync); i != end(dataToSync); ++i) + for (auto iter = begin(folderCmp); iter != end(folderCmp); ++iter) { - dummy2.addDir(i->getBaseDirPf<LEFT_SIDE >(), statusHandler); - dummy2.addDir(i->getBaseDirPf<RIGHT_SIDE>(), statusHandler); + dummy2.addDir(iter->getBaseDirPf<LEFT_SIDE >(), statusHandler); + dummy2.addDir(iter->getBaseDirPf<RIGHT_SIDE>(), statusHandler); } //start synchronization and mark all elements processed @@ -3568,10 +3112,10 @@ void MainDialog::OnStartSync(wxCommandEvent& event) const std::vector<zen::FolderPairSyncCfg> syncProcessCfg = zen::extractSyncCfg(guiCfg.mainCfg); //make sure syncProcessCfg and dataToSync have same size and correspond! - if (syncProcessCfg.size() != dataToSync.size()) + if (syncProcessCfg.size() != folderCmp.size()) throw std::logic_error("Programming Error: Contract violation!"); //should never happen: sync button is deactivated if they are not in sync - syncProc.startSynchronizationProcess(syncProcessCfg, dataToSync); + syncProc.startSynchronizationProcess(syncProcessCfg, folderCmp); //play (optional) sound notification after sync has completed (GUI and batch mode) const wxString soundFile = toWx(zen::getResourceDir()) + wxT("Sync_Complete.wav"); @@ -3586,173 +3130,51 @@ void MainDialog::OnStartSync(wxCommandEvent& event) //remove rows that empty: just a beautification, invalid rows shouldn't cause issues gridDataView->removeInvalidRows(); - updateGuiGrid(); - - m_gridLeft-> ClearSelection(); - m_gridMiddle->ClearSelection(); - m_gridRight-> ClearSelection(); + updateGui(); } -void MainDialog::OnLeftGridDoubleClick(wxGridEvent& event) +void MainDialog::onGridDoubleClick(GridClickEvent& event) { if (!globalSettings->gui.externelApplications.empty()) - openExternalApplication(event.GetRow(), true, globalSettings->gui.externelApplications[0].second); - // event.Skip(); + openExternalApplication(gridDataView->getObject(event.row_), //optional + event.compPos_ == gridview::COMP_LEFT, + globalSettings->gui.externelApplications[0].second); } -void MainDialog::OnRightGridDoubleClick(wxGridEvent& event) +void MainDialog::onGridLabelLeftClick(GridClickEvent& event) { - if (!globalSettings->gui.externelApplications.empty()) - openExternalApplication(event.GetRow(), false, globalSettings->gui.externelApplications[0].second); - // event.Skip(); -} - - -void MainDialog::OnSortLeftGrid(wxGridEvent& event) -{ - //determine direction for std::sort() - const int currentSortColumn = event.GetCol(); - if (0 <= currentSortColumn && currentSortColumn < int(xmlAccess::COLUMN_TYPE_COUNT)) + auto sortSide = [&](bool onLeft) { - static bool sortDefault = true; - if (lastSortColumn != currentSortColumn || lastSortGrid != m_gridLeft) - sortDefault = true; - else - sortDefault = !sortDefault; - - lastSortColumn = currentSortColumn; - lastSortGrid = m_gridLeft; - - GridView::SortType st = GridView::SORT_BY_REL_NAME; - - const xmlAccess::ColumnTypes columnType = m_gridLeft->getTypeAtPos(currentSortColumn); - switch (columnType) - { - case xmlAccess::FULL_PATH: - st = GridView::SORT_BY_REL_NAME; - break; - case xmlAccess::FILENAME: - st = GridView::SORT_BY_FILENAME; - break; - case xmlAccess::REL_PATH: - st = GridView::SORT_BY_REL_NAME; - break; - case xmlAccess::DIRECTORY: - st = GridView::SORT_BY_DIRECTORY; - break; - case xmlAccess::SIZE: - st = GridView::SORT_BY_FILESIZE; - break; - case xmlAccess::DATE: - st = GridView::SORT_BY_DATE; - break; - case xmlAccess::EXTENSION: - st = GridView::SORT_BY_EXTENSION; - break; - } - - const bool sortAscending = sortDefault ? - GridView::getDefaultDirection(st) : - !GridView::getDefaultDirection(st); - - gridDataView->sortView(st, true, sortAscending); + auto sortInfo = gridDataView->getSortInfo(); - //set sort direction indicator on UI - m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridRight ->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridLeft ->setSortMarker(CustomGrid::SortMarker(currentSortColumn, sortAscending ? CustomGrid::ASCENDING : CustomGrid::DESCENDING)); + ColumnTypeRim type = static_cast<ColumnTypeRim>(event.colType_); - updateGuiGrid(); //refresh gridDataView - } -} + bool sortAscending = GridView::getDefaultSortDirection(type); + if (sortInfo && sortInfo->onLeft_ == onLeft && sortInfo->type_ == type) + sortAscending = !sortInfo->ascending_; + gridDataView->sortView(type, onLeft, sortAscending); -void MainDialog::OnSortMiddleGrid(wxGridEvent& event) -{ - //sorting middle grid is more or less useless: therefore let's toggle view instead! - syncPreview->enablePreview(!syncPreview->previewIsEnabled()); //toggle view - - // //determine direction for std::sort() - // static bool sortDefault = true; - // if (lastSortColumn != 0 || lastSortGrid != m_gridMiddle) - // sortDefault = true; - // else - // sortDefault = !sortDefault; - // lastSortColumn = 0; - // lastSortGrid = m_gridMiddle; - // - // //start sort - // if (syncPreview->previewIsEnabled()) - // gridDataView->sortView(GridView::SORT_BY_SYNC_DIRECTION, true, sortDefault); - // else - // gridDataView->sortView(GridView::SORT_BY_CMP_RESULT, true, sortDefault); - // - // updateGuiGrid(); //refresh gridDataView - // - // //set sort direction indicator on UI - // m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - // m_gridRight->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - // m_gridMiddle->setSortMarker(CustomGrid::SortMarker(0, sortDefault ? CustomGrid::ASCENDING : CustomGrid::DESCENDING)); -} - + gridview::clearSelection(*m_gridMain); + updateGui(); //refresh gridDataView + }; -void MainDialog::OnSortRightGrid(wxGridEvent& event) -{ - //determine direction for std::sort() - const int currentSortColumn = event.GetCol(); - if (0 <= currentSortColumn && currentSortColumn < int(xmlAccess::COLUMN_TYPE_COUNT)) + switch (event.compPos_) { - static bool sortDefault = true; - if (lastSortColumn != currentSortColumn || lastSortGrid != m_gridRight) - sortDefault = true; - else - sortDefault = !sortDefault; - - lastSortColumn = currentSortColumn; - lastSortGrid = m_gridRight; - - GridView::SortType st = GridView::SORT_BY_REL_NAME; - - const xmlAccess::ColumnTypes columnType = m_gridRight->getTypeAtPos(currentSortColumn); - switch (columnType) - { - case xmlAccess::FULL_PATH: - st = GridView::SORT_BY_REL_NAME; - break; - case xmlAccess::FILENAME: - st = GridView::SORT_BY_FILENAME; - break; - case xmlAccess::REL_PATH: - st = GridView::SORT_BY_REL_NAME; - break; - case xmlAccess::DIRECTORY: - st = GridView::SORT_BY_DIRECTORY; - break; - case xmlAccess::SIZE: - st = GridView::SORT_BY_FILESIZE; - break; - case xmlAccess::DATE: - st = GridView::SORT_BY_DATE; - break; - case xmlAccess::EXTENSION: - st = GridView::SORT_BY_EXTENSION; - break; - } - - const bool sortAscending = sortDefault ? - GridView::getDefaultDirection(st) : - !GridView::getDefaultDirection(st); - - gridDataView->sortView(st, false, sortAscending); + case gridview::COMP_LEFT: + sortSide(true); + break; - //set sort direction indicator on UI - m_gridLeft->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridMiddle->setSortMarker(CustomGrid::SortMarker(-1, CustomGrid::ASCENDING)); - m_gridRight->setSortMarker(CustomGrid::SortMarker(currentSortColumn, sortAscending ? CustomGrid::ASCENDING : CustomGrid::DESCENDING)); + case gridview::COMP_MIDDLE: + //sorting middle grid is more or less useless: therefore let's toggle view instead! + enablePreview(!syncPreviewEnabled); //toggle view + break; - updateGuiGrid(); //refresh gridDataView + case gridview::COMP_RIGHT: + sortSide(false); + break; } } @@ -3767,9 +3189,9 @@ void MainDialog::OnSwapSides(wxCommandEvent& event) firstFolderPair->getAltFilterConfig()); //additional pairs - for (std::vector<DirectoryPair*>::const_iterator i = additionalFolderPairs.begin(); i != additionalFolderPairs.end(); ++i) + for (auto iter = additionalFolderPairs.begin(); iter != additionalFolderPairs.end(); ++iter) { - DirectoryPair* dirPair = *i; + DirectoryPair* dirPair = *iter; dirPair->setValues(dirPair->getRightDir(), // swap directories dirPair->getLeftDir(), // dirPair->getAltCompConfig(), @@ -3786,7 +3208,6 @@ void MainDialog::OnSwapSides(wxCommandEvent& event) m_bpButtonLeftNewer->setActive(m_bpButtonRightNewer->isActive()); m_bpButtonRightNewer->setActive(tmp); - tmp = m_bpButtonSyncCreateLeft->isActive(); m_bpButtonSyncCreateLeft->setActive(m_bpButtonSyncCreateRight->isActive()); m_bpButtonSyncCreateRight->setActive(tmp); @@ -3800,8 +3221,9 @@ void MainDialog::OnSwapSides(wxCommandEvent& event) m_bpButtonSyncDirOverwRight->setActive(tmp); //swap grid information - zen::swapGrids(getConfig().mainCfg, gridDataView->getDataTentative()); - updateGuiGrid(); + zen::swapGrids(getConfig().mainCfg, folderCmp); + + updateGui(); } @@ -3832,7 +3254,7 @@ void MainDialog::updateGridViewData() m_bpButtonSyncDirNone-> Show(false); - if (syncPreview->previewIsEnabled()) + if (syncPreviewEnabled) { const GridView::StatusSyncPreview result = gridDataView->updateSyncPreview(currentCfg.hideFilteredElements, m_bpButtonSyncCreateLeft-> isActive(), @@ -3844,7 +3266,6 @@ void MainDialog::updateGridViewData() m_bpButtonSyncDirNone-> isActive(), m_bpButtonEqual-> isActive(), m_bpButtonConflict-> isActive()); - filesOnLeftView = result.filesOnLeftView; foldersOnLeftView = result.foldersOnLeftView; filesOnRightView = result.filesOnRightView; @@ -3891,7 +3312,6 @@ void MainDialog::updateGridViewData() m_bpButtonDifferent-> isActive(), m_bpButtonEqual-> isActive(), m_bpButtonConflict-> isActive()); - filesOnLeftView = result.filesOnLeftView; foldersOnLeftView = result.foldersOnLeftView; filesOnRightView = result.filesOnRightView; @@ -3922,43 +3342,73 @@ void MainDialog::updateGridViewData() else m_panelViewFilter->Hide(); } + //all three grids retrieve their data directly via gridDataView + m_gridMain->Refresh(); + + //navigation tree + if (syncPreviewEnabled) + treeDataView->updateSyncPreview(currentCfg.hideFilteredElements, + m_bpButtonSyncCreateLeft-> isActive(), + m_bpButtonSyncCreateRight-> isActive(), + m_bpButtonSyncDeleteLeft-> isActive(), + m_bpButtonSyncDeleteRight-> isActive(), + m_bpButtonSyncDirOverwLeft-> isActive(), + m_bpButtonSyncDirOverwRight->isActive(), + m_bpButtonSyncDirNone-> isActive(), + m_bpButtonEqual-> isActive(), + m_bpButtonConflict-> isActive()); + else + treeDataView->updateCmpResult(currentCfg.hideFilteredElements, + m_bpButtonLeftOnly-> isActive(), + m_bpButtonRightOnly-> isActive(), + m_bpButtonLeftNewer-> isActive(), + m_bpButtonRightNewer->isActive(), + m_bpButtonDifferent-> isActive(), + m_bpButtonEqual-> isActive(), + m_bpButtonConflict-> isActive()); + m_gridNavi->Refresh(); + + + //status bar + wxWindowUpdateLocker dummy(m_panelStatusBar); //avoid display distortion - //clear status information clearStatusBar(); //################################################# - //format numbers to text: - - //show status information on "root" level. + //update status information bSizerStatusLeftDirectories->Show(foldersOnLeftView > 0); bSizerStatusLeftFiles ->Show(filesOnLeftView > 0); - setText(*m_staticTextStatusLeftDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnLeftView), L"%x", zen::toStringSep(foldersOnLeftView), false)); - setText(*m_staticTextStatusLeftFiles, replaceCpy(_P("1 file", "%x files", filesOnLeftView), L"%x", zen::toStringSep(filesOnLeftView), false)); - setText(*m_staticTextStatusLeftBytes, zen::filesizeToShortString(to<Int64>(filesizeLeftView))); + setText(*m_staticTextStatusLeftDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnLeftView), L"%x", toStringSep(foldersOnLeftView), false)); + setText(*m_staticTextStatusLeftFiles, replaceCpy(_P("1 file", "%x files", filesOnLeftView), L"%x", toStringSep(filesOnLeftView), false)); + setText(*m_staticTextStatusLeftBytes, filesizeToShortString(to<Int64>(filesizeLeftView))); { - wxString statusMiddleNew = _P("%x of 1 row in view", "%x of %y rows in view", gridDataView->rowsTotal()); - replace(statusMiddleNew, L"%x", toStringSep(gridDataView->rowsOnView()), false); - replace(statusMiddleNew, L"%y", toStringSep(gridDataView->rowsTotal()), false); + wxString statusMiddleNew; + if (gridDataView->rowsTotal() > 0) + { + statusMiddleNew = _P("%x of 1 row in view", "%x of %y rows in view", gridDataView->rowsTotal()); + replace(statusMiddleNew, L"%x", toStringSep(gridDataView->rowsOnView()), false); + replace(statusMiddleNew, L"%y", toStringSep(gridDataView->rowsTotal ()), false); + } setText(*m_staticTextStatusMiddle, statusMiddleNew); } bSizerStatusRightDirectories->Show(foldersOnRightView > 0); bSizerStatusRightFiles ->Show(filesOnRightView > 0); - setText(*m_staticTextStatusRightDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnRightView), L"%x", zen::toStringSep(foldersOnRightView), false)); - setText(*m_staticTextStatusRightFiles, replaceCpy(_P("1 file", "%x files", filesOnRightView), L"%x", zen::toStringSep(filesOnRightView), false)); - setText(*m_staticTextStatusRightBytes, zen::filesizeToShortString(to<Int64>(filesizeRightView))); + setText(*m_staticTextStatusRightDirs, replaceCpy(_P("1 directory", "%x directories", foldersOnRightView), L"%x", toStringSep(foldersOnRightView), false)); + setText(*m_staticTextStatusRightFiles, replaceCpy(_P("1 file", "%x files", filesOnRightView), L"%x", toStringSep(filesOnRightView), false)); + setText(*m_staticTextStatusRightBytes, filesizeToShortString(to<Int64>(filesizeRightView))); m_panelStatusBar->Layout(); } -void MainDialog::updateFilterConfig() +void MainDialog::applyFilterConfig() { - applyFiltering(gridDataView->getDataTentative(), getConfig().mainCfg); - refreshGridAfterFilterChange(400); + applyFiltering(folderCmp, getConfig().mainCfg); + updateGuiAfterFilterChange(400); } @@ -3968,32 +3418,19 @@ void MainDialog::applySyncConfig() m_staticTextSyncVariant->SetLabel(getConfig().mainCfg.getSyncVariantName()); m_panelTopButtons->Layout(); //adapt layout for variant text - - class RedetermineCallback : public DeterminationProblem + zen::redetermineSyncDirection(getConfig().mainCfg, folderCmp, + [&](const std::wstring& warning) { - public: - RedetermineCallback(bool& warningSyncDatabase, wxWindow* parent) : - warningSyncDatabase_(warningSyncDatabase), - parent_(parent) {} - - virtual void reportWarning(const std::wstring& text) + bool& warningActive = globalSettings->optDialogs.warningSyncDatabase; + if (warningActive) { - if (warningSyncDatabase_) - { - bool dontWarnAgain = false; - if (showWarningDlg(ReturnWarningDlg::BUTTON_IGNORE, - text, - dontWarnAgain) == ReturnWarningDlg::BUTTON_IGNORE) - warningSyncDatabase_ = !dontWarnAgain; - } + bool dontWarnAgain = false; + if (showWarningDlg(ReturnWarningDlg::BUTTON_IGNORE, warning, dontWarnAgain) == ReturnWarningDlg::BUTTON_IGNORE) + warningActive = !dontWarnAgain; } - private: - bool& warningSyncDatabase_; - wxWindow* parent_; - } redetCallback(globalSettings->optDialogs.warningSyncDatabase, this); + }); - zen::redetermineSyncDirection(getConfig().mainCfg, gridDataView->getDataTentative(), &redetCallback); - updateGuiGrid(); + updateGui(); } @@ -4019,7 +3456,7 @@ void MainDialog::OnAddFolderPair(wxCommandEvent& event) void MainDialog::OnRemoveTopFolderPair(wxCommandEvent& event) { - if (additionalFolderPairs.size() > 0) + if (!additionalFolderPairs.empty()) { wxWindowUpdateLocker dummy(this); //avoid display distortion @@ -4054,15 +3491,17 @@ void MainDialog::OnRemoveFolderPair(wxCommandEvent& event) void MainDialog::updateGuiForFolderPair() { + wxWindowUpdateLocker dummy(this); + //adapt delete top folder pair button - if (additionalFolderPairs.size() == 0) + if (additionalFolderPairs.empty()) m_bpButtonRemovePair->Hide(); else m_bpButtonRemovePair->Show(); m_panelTopLeft->Layout(); //adapt local filter and sync cfg for first folder pair - if (additionalFolderPairs.size() == 0 && + if (additionalFolderPairs.empty() && firstFolderPair->getAltCompConfig().get() == NULL && firstFolderPair->getAltSyncConfig().get() == NULL && isNullFilter(firstFolderPair->getAltFilterConfig())) @@ -4071,7 +3510,7 @@ void MainDialog::updateGuiForFolderPair() m_bpButtonAltSyncCfg ->Hide(); m_bpButtonLocalFilter->Hide(); - setImage(*m_bpButtonSwapSides, GlobalResources::getImage(wxT("swap"))); + setImage(*m_bpButtonSwapSides, GlobalResources::getImage(L"swap")); } else { @@ -4079,13 +3518,13 @@ void MainDialog::updateGuiForFolderPair() m_bpButtonAltSyncCfg ->Show(); m_bpButtonLocalFilter->Show(); - setImage(*m_bpButtonSwapSides, GlobalResources::getImage(wxT("swapSlim"))); + setImage(*m_bpButtonSwapSides, GlobalResources::getImage(L"swapSlim")); } m_panelTopMiddle->Layout(); int addPairMinimalHeight = 0; int addPairOptimalHeight = 0; - if (additionalFolderPairs.size() > 0) + if (!additionalFolderPairs.empty()) { int pairHeight = additionalFolderPairs[0]->GetSize().GetHeight(); addPairMinimalHeight = std::min<double>(1.5, additionalFolderPairs.size()) * pairHeight; //have 0.5 * height indicate that more folders are there @@ -4097,7 +3536,9 @@ void MainDialog::updateGuiForFolderPair() //######################################################################################################################## //wxAUI hack: set minimum height to desired value, then call wxAuiPaneInfo::Fixed() to apply it - auiMgr.GetPane(m_panelDirectoryPairs).MinSize(-1, m_panelTopLeft->GetSize().GetHeight() + addPairOptimalHeight); + const int panelNewHeight = m_panelDirectoryPairs->ClientToWindowSize(m_panelTopLeft->GetSize()).GetHeight(); //respect m_panelDirectoryPairs window borders! + + auiMgr.GetPane(m_panelDirectoryPairs).MinSize(-1, panelNewHeight + addPairOptimalHeight); auiMgr.GetPane(m_panelDirectoryPairs).Fixed(); auiMgr.Update(); @@ -4120,7 +3561,9 @@ void MainDialog::updateGuiForFolderPair() void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool addFront) { wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion - wxWindowUpdateLocker dummy2(m_panelGrids); // + //wxWindowUpdateLocker dummy2(m_panelGrids); // + + std::vector<DirectoryPair*> newEntries; std::for_each(newPairs.begin(), newPairs.end(), [&](const FolderPairEnh& enhPair) @@ -4136,45 +3579,43 @@ void MainDialog::addFolderPair(const std::vector<FolderPairEnh>& newPairs, bool const int width = m_panelTopLeft->GetSize().GetWidth(); newPair->m_panelLeft->SetMinSize(wxSize(width, -1)); - if (addFront) { - bSizerAddFolderPairs->Insert(0, newPair, 0, wxEXPAND, 5); + bSizerAddFolderPairs->Insert(0, newPair, 0, wxEXPAND); additionalFolderPairs.insert(additionalFolderPairs.begin(), newPair); } else { - bSizerAddFolderPairs->Add(newPair, 0, wxEXPAND, 5); + bSizerAddFolderPairs->Add(newPair, 0, wxEXPAND); additionalFolderPairs.push_back(newPair); } + newEntries.push_back(newPair); //register events newPair->m_bpButtonRemovePair->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainDialog::OnRemoveFolderPair), NULL, this); - - //set alternate configuration - newPair->setValues(toWx(enhPair.leftDirectory), - toWx(enhPair.rightDirectory), - enhPair.altCmpConfig, - enhPair.altSyncConfig, - enhPair.localFilter); }); + //wxComboBox screws up miserably if width/height is smaller than the magic number 4! Problem occurs when trying to set tooltip + //so we have to update window sizes before setting configuration updateGuiForFolderPair(); - //disable the sync button - syncPreview->enableSynchronization(false); + for (auto iter = newPairs.begin(); iter != newPairs.end(); ++iter)//set alternate configuration + newEntries[iter - newPairs.begin()]->setValues(toWx(iter->leftDirectory), + toWx(iter->rightDirectory), + iter->altCmpConfig, + iter->altSyncConfig, + iter->localFilter); - //clear grids - gridDataView->clearAllRows(); + clearGrid(); applySyncConfig(); //mainly to update sync dir description text - applyCompareConfig(false); //false: not global level + applyCompareConfig(false); //false: do not change preview status } void MainDialog::removeAddFolderPair(size_t pos) { wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion - wxWindowUpdateLocker dummy2(m_panelGrids); // + //wxWindowUpdateLocker dummy2(m_panelGrids); // if (pos < additionalFolderPairs.size()) { @@ -4201,19 +3642,16 @@ void MainDialog::removeAddFolderPair(size_t pos) //------------------------------------------------------------------ //disable the sync button - syncPreview->enableSynchronization(false); - - //clear grids - gridDataView->clearAllRows(); + clearGrid(); applySyncConfig(); //mainly to update sync dir description text - applyCompareConfig(false); //false: not global level + applyCompareConfig(false); //false: do not change preview status } void MainDialog::clearAddFolderPairs() { wxWindowUpdateLocker dummy(m_panelDirectoryPairs); //avoid display distortion - wxWindowUpdateLocker dummy2(m_panelGrids); // + //wxWindowUpdateLocker dummy2(m_panelGrids); // additionalFolderPairs.clear(); bSizerAddFolderPairs->Clear(true); @@ -4229,20 +3667,6 @@ void MainDialog::clearAddFolderPairs() void MainDialog::OnMenuGlobalSettings(wxCommandEvent& event) { zen::showGlobalSettingsDlg(*globalSettings); - - //event.Skip(); -} - -namespace -{ -inline -void addCellValue(zxString& exportString, const wxString& cellVal) -{ - if (cellVal.find(wxT(';')) != wxString::npos) - exportString += wxT('\"') + copyStringTo<zxString>(cellVal) + wxT('\"'); - else - exportString += copyStringTo<zxString>(cellVal); -} } @@ -4265,7 +3689,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) //write legend exportString += copyStringTo<zxString>(_("Legend")) + wxT('\n'); - if (syncPreview->previewIsEnabled()) + if (syncPreviewEnabled) { exportString += wxT("\"") + copyStringTo<zxString>(getSyncOpDescription(SO_EQUAL)) + wxT("\";") + copyStringTo<zxString>(getSymbol(SO_EQUAL)) + wxT('\n'); exportString += wxT("\"") + copyStringTo<zxString>(getSyncOpDescription(SO_CREATE_NEW_LEFT)) + wxT("\";") + copyStringTo<zxString>(getSymbol(SO_CREATE_NEW_LEFT)) + wxT('\n'); @@ -4289,70 +3713,98 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) } exportString += wxT('\n'); - //write header - const int colsLeft = m_gridLeft->GetNumberCols(); - for (int k = 0; k < colsLeft; ++k) + auto addCellValue = [&](const wxString& val) { - addCellValue(exportString, m_gridLeft->GetColLabelValue(k)); - exportString += wxT(';'); - } + if (val.find(wxT(';')) != wxString::npos) + exportString += wxT('\"') + copyStringTo<zxString>(val) + wxT('\"'); + else + exportString += copyStringTo<zxString>(val); + }; - const int colsMiddle = m_gridMiddle->GetNumberCols(); - for (int k = 0; k < colsMiddle; ++k) - { - addCellValue(exportString, m_gridMiddle->GetColLabelValue(k)); - exportString += wxT(';'); - } + //write header + auto provLeft = m_gridMain->getDataProvider(gridview::COMP_LEFT); + auto provMiddle = m_gridMain->getDataProvider(gridview::COMP_MIDDLE); + auto provRight = m_gridMain->getDataProvider(gridview::COMP_RIGHT); - const int colsRight = m_gridRight->GetNumberCols(); - for (int k = 0; k < colsRight; ++k) - { - addCellValue(exportString, m_gridRight->GetColLabelValue(k)); - if (k != m_gridRight->GetNumberCols() - 1) - exportString += wxT(';'); - } - exportString += wxT('\n'); + auto colAttrLeft = m_gridMain->getColumnConfig(gridview::COMP_LEFT); + auto colAttrMiddle = m_gridMain->getColumnConfig(gridview::COMP_MIDDLE); + auto colAttrRight = m_gridMain->getColumnConfig(gridview::COMP_RIGHT); + + vector_remove_if(colAttrLeft , [](const Grid::ColumnAttribute& ca) { return !ca.visible_; }); + vector_remove_if(colAttrMiddle, [](const Grid::ColumnAttribute& ca) { return !ca.visible_; }); + vector_remove_if(colAttrRight , [](const Grid::ColumnAttribute& ca) { return !ca.visible_; }); - //begin work - const int rowsTotal = m_gridLeft->GetNumberRows(); - for (int i = 0; i < rowsTotal; ++i) + if (provLeft && provMiddle && provRight) { - for (int k = 0; k < colsLeft; ++k) + std::for_each(colAttrLeft.begin(), colAttrLeft.end(), + [&](const Grid::ColumnAttribute& ca) { - addCellValue(exportString, m_gridLeft->GetCellValue(i, k)); - exportString += wxT(';'); - } - - for (int k = 0; k < colsMiddle; ++k) + addCellValue(provLeft->getColumnLabel(ca.type_)); + exportString += L';'; + }); + std::for_each(colAttrMiddle.begin(), colAttrMiddle.end(), + [&](const Grid::ColumnAttribute& ca) + { + addCellValue(provMiddle->getColumnLabel(ca.type_)); + exportString += L';'; + }); + if (!colAttrRight.empty()) { - addCellValue(exportString, m_gridMiddle->GetCellValue(i, k)); - exportString += wxT(';'); + std::for_each(colAttrRight.begin(), colAttrRight.end() - 1, + [&](const Grid::ColumnAttribute& ca) + { + addCellValue(provRight->getColumnLabel(ca.type_)); + exportString += L';'; + }); + addCellValue(provRight->getColumnLabel(colAttrRight.back().type_)); } + exportString += L'\n'; - for (int k = 0; k < colsRight; ++k) + //main grid + const size_t rowCount = m_gridMain->getRowCount(); + for (size_t row = 0; row < rowCount; ++row) { - addCellValue(exportString, m_gridRight->GetCellValue(i, k)); - if (k != colsRight - 1) - exportString += wxT(';'); + std::for_each(colAttrLeft.begin(), colAttrLeft.end(), + [&](const Grid::ColumnAttribute& ca) + { + addCellValue(provLeft->getValue(row, ca.type_)); + exportString += L';'; + }); + std::for_each(colAttrMiddle.begin(), colAttrMiddle.end(), + [&](const Grid::ColumnAttribute& ca) + { + addCellValue(provMiddle->getValue(row, ca.type_)); + exportString += L';'; + }); + if (!colAttrRight.empty()) + { + std::for_each(colAttrRight.begin(), colAttrRight.end() - 1, + [&](const Grid::ColumnAttribute& ca) + { + addCellValue(provRight->getValue(row, ca.type_)); + exportString += L';'; + }); + addCellValue(provRight->getValue(row, colAttrRight.back().type_)); + } + exportString += L'\n'; } - exportString += wxT('\n'); - } - //write export file - wxFFile output(newFileName.c_str(), wxT("w")); //don't write in binary mode - if (output.IsOpened()) - { - //generate UTF8 representation - size_t bufferSize = 0; - const wxCharBuffer utf8buffer = wxConvUTF8.cWC2MB(exportString.c_str(), exportString.size(), &bufferSize); + //write export file + wxFFile output(newFileName.c_str(), wxT("w")); //don't write in binary mode + if (output.IsOpened()) + { + //generate UTF8 representation + size_t bufferSize = 0; + const wxCharBuffer utf8buffer = wxConvUTF8.cWC2MB(exportString.c_str(), exportString.size(), &bufferSize); - output.Write(BYTE_ORDER_MARK_UTF8, sizeof(BYTE_ORDER_MARK_UTF8) - 1); - output.Write(utf8buffer, bufferSize); - pushStatusInformation(_("File list exported!")); - } - else - { - wxMessageBox(wxString(_("Error writing file:")) + wxT(" \"") + newFileName + wxT("\""), _("Error"), wxOK | wxICON_ERROR); + output.Write(BYTE_ORDER_MARK_UTF8, sizeof(BYTE_ORDER_MARK_UTF8) - 1); + output.Write(utf8buffer, bufferSize); + pushStatusInformation(_("File list exported!")); + } + else + { + wxMessageBox(wxString(_("Error writing file:")) + wxT(" \"") + newFileName + wxT("\""), _("Error"), wxOK | wxICON_ERROR); + } } } } @@ -4456,49 +3908,28 @@ void MainDialog::OnMenuLanguageSwitch(wxCommandEvent& event) //######################################################################################################### -MainDialog::SyncPreview::SyncPreview(MainDialog* mainDlg) : - mainDlg_(mainDlg), - syncPreviewEnabled(false), - synchronizationEnabled(false) {} - - -bool MainDialog::SyncPreview::previewIsEnabled() const -{ - return syncPreviewEnabled; -} - - -void MainDialog::SyncPreview::enablePreview(bool value) +void MainDialog::enablePreview(bool value) { syncPreviewEnabled = value; //toggle display of sync preview in middle grid - mainDlg_->m_gridMiddle->enableSyncPreview(value); - // mainDlg_->Refresh(); + gridview::setSyncPreviewActive(*m_gridMain, value); - mainDlg_->updateGuiGrid(); + updateGui(); } -void MainDialog::SyncPreview::enableSynchronization(bool value) +void MainDialog::updateSyncEnabledStatus() { - synchronizationEnabled = value; - - if (value) + if (folderCmp.empty()) { - mainDlg_->m_buttonStartSync->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); - mainDlg_->m_buttonStartSync->setBitmapFront(GlobalResources::getImage(wxT("sync"))); + m_buttonStartSync->SetForegroundColour(wxColor(128, 128, 128)); //Some colors seem to have problems with 16Bit color depth, well this one hasn't! + m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"syncDisabled")); } else { - mainDlg_->m_buttonStartSync->SetForegroundColour(wxColor(128, 128, 128)); //Some colors seem to have problems with 16Bit color depth, well this one hasn't! - mainDlg_->m_buttonStartSync->setBitmapFront(GlobalResources::getImage(wxT("syncDisabled"))); + m_buttonStartSync->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); + m_buttonStartSync->setBitmapFront(GlobalResources::getImage(L"sync")); } } - -bool MainDialog::SyncPreview::synchronizationIsEnabled() const -{ - return synchronizationEnabled; -} - diff --git a/ui/main_dlg.h b/ui/main_dlg.h index 0d0239da..c13887ed 100644 --- a/ui/main_dlg.h +++ b/ui/main_dlg.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef MAINDIALOG_H @@ -15,24 +15,14 @@ #include <stack> #include "gui_generated.h" #include "../lib/process_xml.h" +#include "custom_grid.h" +#include "tree_view.h" +#include <wx+/file_drop.h> class FolderHistory; -class CustomGrid; -class FFSCheckRowsEvent; -class FFSSyncDirectionEvent; -class IconUpdater; class DirectoryPair; -class DirectoryPairFirst; class CompareStatus; -class SyncStatusHandler; -class PanelMoveWindow; - - -namespace zen -{ -class CustomLocale; -class GridView; -} +class DirectoryPairFirst; class MainDialog : public MainDialogGenerated @@ -103,19 +93,20 @@ private: void updateGuiForFolderPair(); //helper method: add usability by showing/hiding buttons related to folder pairs //main method for putting gridDataView on UI: updates data respecting current view settings - void updateGuiGrid(); + void updateGui(); void updateGridViewData(); //context menu functions - std::set<size_t> getSelectedRows(const CustomGrid* grid) const; - std::set<size_t> getSelectedRows() const; - void setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const zen::SyncDirection dir); - void filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTable, int leadingRow); - void copySelectionToClipboard(CustomGrid& selectedGrid); - void deleteSelectedFiles(const std::set<size_t>& viewSelectionLeft, const std::set<size_t>& viewSelectionRight); + std::vector<zen::FileSystemObject*> getGridSelection(bool fromLeft = true, bool fromRight = true) const; + std::vector<zen::FileSystemObject*> getTreeSelection() const; - void openExternalApplication(const wxString& commandline); - void openExternalApplication(size_t rowNumber, bool leftSide, const wxString& commandline); + void setSyncDirManually(const std::vector<zen::FileSystemObject*>& selection, zen::SyncDirection direction); + void setManualFilter(const std::vector<zen::FileSystemObject*>& selection, bool setIncluded); + void copySelectionToClipboard(); + void deleteSelectedFiles(const std::vector<zen::FileSystemObject*>& selectionLeft, + const std::vector<zen::FileSystemObject*>& selectionRight); + + void openExternalApplication(const zen::FileSystemObject* fsObj, bool leftSide, const wxString& commandline); //fsObj is optional! //work to be done in idle time void OnIdleEvent(wxEvent& event); @@ -125,57 +116,32 @@ private: void clearStatusBar(); //events - void onGridLeftButtonEvent( wxKeyEvent& event); - void onGridRightButtonEvent( wxKeyEvent& event); - void onGridMiddleButtonEvent( wxKeyEvent& event); - void OnContextRimLabelLeft( wxGridEvent& event); - void OnContextRimLabelRight( wxGridEvent& event); - void OnContextMiddle( wxGridEvent& event); - void OnContextMiddleLabel( wxGridEvent& event); - void OnContextSetLayout( wxMouseEvent& event); - void OnGlobalKeyEvent( wxKeyEvent& event); - - void OnContextSelectCompVariant( wxMouseEvent& event); - void OnContextSelectSyncVariant( wxMouseEvent& event); + void onGridButtonEvent (wxKeyEvent& event); + void onTreeButtonEvent (wxKeyEvent& event); + void OnContextSetLayout (wxMouseEvent& event); + void OnGlobalKeyEvent (wxKeyEvent& event); - void applyCompareConfig(bool globalLevel = true); + void OnCompSettingsContext(wxMouseEvent& event); + void OnSyncSettingsContext(wxMouseEvent& event); + void OnGlobalFilterContext(wxCommandEvent& event); - void OnSetCompVariant(wxCommandEvent& event); - void OnSetSyncVariant(wxCommandEvent& event); + void applyCompareConfig(bool changePreviewStatus = true); //context menu handler methods - void OnContextFilterTemp (wxCommandEvent& event); - void OnContextExcludeExtension (wxCommandEvent& event); - void OnContextExcludeObject (wxCommandEvent& event); - void OnContextOpenWith (wxCommandEvent& event); - void OnContextDeleteFiles (wxCommandEvent& event); - void OnContextSyncDirLeft (wxCommandEvent& event); - void OnContextSyncDirNone (wxCommandEvent& event); - void OnContextSyncDirRight (wxCommandEvent& event); - void OnContextCustColumnLeft (wxCommandEvent& event); - void OnContextCustColumnRight (wxCommandEvent& event); - void OnContextSelectTimeSpan (wxCommandEvent& event); - void OnContextAutoAdjustLeft (wxCommandEvent& event); - void OnContextAutoAdjustRight (wxCommandEvent& event); - void OnContextSetIconSize (wxCommandEvent& event); - void OnContextIncludeAll (wxCommandEvent& event); - void OnContextExcludeAll (wxCommandEvent& event); - void OnContextComparisonView (wxCommandEvent& event); - void OnContextSyncView (wxCommandEvent& event); - void OnContextSetLayoutReset (wxCommandEvent& event); - void OnContextSetLayoutShowPanel(wxCommandEvent& event); - - void OnContextRim(wxGridEvent& event); + void onMainGridContext(zen::GridClickEvent& event); + void onNaviGridContext(zen::GridClickEvent& event); + + void onNaviSelection(zen::GridRangeSelectEvent& event); + + void onNaviPanelFilesDropped(zen::FileDropEvent& event); void OnDirSelected(wxFileDirPickerEvent& event); - void OnCheckRows(FFSCheckRowsEvent& event); - void OnSetSyncDirection(FFSSyncDirectionEvent& event); + void onCheckRows (zen::CheckRowsEvent& event); + void onSetSyncDirection(zen::SyncDirectionEvent& event); - void OnLeftGridDoubleClick( wxGridEvent& event); - void OnRightGridDoubleClick(wxGridEvent& event); - void OnSortLeftGrid( wxGridEvent& event); - void OnSortMiddleGrid( wxGridEvent& event); - void OnSortRightGrid( wxGridEvent& event); + void onGridDoubleClick (zen::GridClickEvent& event); + void onGridLabelLeftClick (zen::GridClickEvent& event); + void onGridLabelContext(zen::GridClickEvent& event); void OnLeftOnlyFiles( wxCommandEvent& event); void OnRightOnlyFiles( wxCommandEvent& event); @@ -202,8 +168,6 @@ private: void OnRegularUpdateCheck( wxIdleEvent& event); void OnLayoutWindowAsync( wxIdleEvent& event); - void refreshGridAfterFilterChange(int delay); - void OnResize( wxSizeEvent& event); void OnResizeFolderPairs( wxEvent& event); void OnResizeConfigPanel( wxEvent& event); @@ -213,22 +177,25 @@ private: void OnConfigureFilter( wxCommandEvent& event); void OnSwapSides( wxCommandEvent& event); void OnCompare( wxCommandEvent& event); - void OnSwitchView( wxCommandEvent& event); void OnSyncSettings( wxCommandEvent& event); void OnCmpSettings( wxCommandEvent& event); void OnStartSync( wxCommandEvent& event); void OnClose( wxCloseEvent& event); - void OnGlobalFilterOpenContext(wxCommandEvent& event); - void OnGlobalFilterRemConfirm(wxCommandEvent& event); + void updateGuiAfterFilterChange(int delay); + + void excludeExtension(const Zstring& extension); + void excludeItems(const std::vector<zen::FileSystemObject*>& selection); void updateStatistics(); + void updateSyncEnabledStatus(); + void OnAddFolderPair( wxCommandEvent& event); void OnRemoveFolderPair( wxCommandEvent& event); void OnRemoveTopFolderPair( wxCommandEvent& event); - void updateFilterConfig(); + void applyFilterConfig(); void applySyncConfig(); //menu events @@ -251,10 +218,16 @@ private: //application variables are stored here: //global settings used by GUI and batch mode - xmlAccess::XmlGlobalSettings* globalSettings; //always bound + xmlAccess::XmlGlobalSettings* globalSettings; //always bound! + + //UI view of FolderComparison structure (partially owns folderCmp) + std::shared_ptr<zen::GridView> gridDataView; //always bound! + std::shared_ptr<zen::TreeView> treeDataView; // - //UI view of FolderComparison structure - std::unique_ptr<zen::GridView> gridDataView; + //the prime data structure of this tool *bling*: + zen::FolderComparison folderCmp; //optional!: sync button not available if empty + + void clearGrid(bool refreshGrid = true); //------------------------------------- //functional configuration @@ -267,8 +240,6 @@ private: //*********************************************** - std::unique_ptr<wxMenu> contextMenu; - //status information wxLongLong lastStatusChange; std::stack<wxString> stackObjects; @@ -278,33 +249,11 @@ private: bool cleanedUp; - //remember last sort executed (for determination of sort order) - int lastSortColumn; - const wxGrid* lastSortGrid; - - //update icons periodically: one updater instance for both left and right grids - std::unique_ptr<IconUpdater> updateFileIcons; - bool processingGlobalKeyEvent; //indicator to notify recursion in OnGlobalKeyEvent() - //encapsulation of handling of sync preview - class SyncPreview //encapsulates MainDialog functionality for synchronization preview (friend class) - { - public: - SyncPreview(MainDialog* mainDlg); - - void enablePreview(bool value); - bool previewIsEnabled() const; - - void enableSynchronization(bool value); - bool synchronizationIsEnabled() const; - - private: - MainDialog* mainDlg_; - bool syncPreviewEnabled; //toggle to display configuration preview instead of comparison result - bool synchronizationEnabled; //determines whether synchronization should be allowed - }; - std::unique_ptr<SyncPreview> syncPreview; //always bound + bool syncPreviewEnabled; //toggle to display configuration preview instead of comparison result + //use this methods when changing values! + void enablePreview(bool value); wxAuiManager auiMgr; //implement dockable GUI design diff --git a/ui/msg_popup.cpp b/ui/msg_popup.cpp index e5540082..e86b6cf2 100644 --- a/ui/msg_popup.cpp +++ b/ui/msg_popup.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "msg_popup.h" diff --git a/ui/msg_popup.h b/ui/msg_popup.h index f9588a0b..29606a41 100644 --- a/ui/msg_popup.h +++ b/ui/msg_popup.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef MESSAGEPOPUP_H_INCLUDED diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp index 03ec9ca0..ee24b28b 100644 --- a/ui/progress_indicator.cpp +++ b/ui/progress_indicator.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "progress_indicator.h" @@ -396,7 +396,7 @@ class LogControl : public LogControlGenerated public: LogControl(wxWindow* parent, const ErrorLogging& log) : LogControlGenerated(parent), log_(log) { - const int errorCount = log_.typeCount(TYPE_ERROR) + log_.typeCount(TYPE_FATAL_ERROR); + const int errorCount = log_.typeCount(TYPE_ERROR | TYPE_FATAL_ERROR); const int warningCount = log_.typeCount(TYPE_WARNING); const int infoCount = log_.typeCount(TYPE_INFO); @@ -812,6 +812,9 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(AbortCallback& abortCb, //Fit() height only: //fitHeight(*this); + + m_staticTextSpeed ->SetLabel(L""); //clear "dummy" values + m_staticTextRemTime->SetLabel(L""); // } @@ -1211,6 +1214,8 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id, //at the LATEST(!) to prevent access to currentStatusHandler //enable okay and close events; may be set in this method ONLY + wxWindowUpdateLocker dummy(this); //badly needed + abortCb_ = NULL; //avoid callback to (maybe) deleted parent process setCurrentStatus(id); @@ -1257,7 +1262,7 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id, updateStatusDialogNow(false); //keep this sequence to avoid display distortion, if e.g. only 1 item is sync'ed - //changed meaning: overall speed: -> make sure to call after "updateStatusDialogNow" + //changed meaning: from current to overall speed: -> make sure to call after "updateStatusDialogNow" const long timeElapMs = timeElapsed.Time(); m_staticTextSpeed->SetLabel(timeElapMs <= 0 ? L"-" : zen::filesizeToShortString(currentData * 1000 / timeElapMs) + _("/sec")); @@ -1275,10 +1280,15 @@ void SyncStatus::SyncStatusImpl::processHasFinished(SyncStatus::SyncStatusID id, m_listbookResult->AddPage(m_panelProgress, _("Statistics"), true); //AddPage() takes ownership! //2. log file + const size_t posLog = 1; LogControl* logControl = new LogControl(m_listbookResult, log); m_listbookResult->AddPage(logControl, _("Logging"), false); //bSizerHoldStretch->Insert(0, logControl, 1, wxEXPAND); + //show log instead of graph if fatal errors occured! (not required for ignored warnings or errors!) + if (log.typeCount(TYPE_FATAL_ERROR) > 0) + m_listbookResult->ChangeSelection(posLog); + m_panelBackground->Layout(); //we use a dummy panel as actual background: replaces simple "Layout()" call //Raise(); -> don't! user may be watching a movie in the meantime ;) @@ -1435,6 +1445,7 @@ SyncStatus::SyncStatus(AbortCallback& abortCb, { pimpl->Show(); pimpl->updateStatusDialogNow(false); //update visual statistics to get rid of "dummy" texts + pimpl->Update(); //don't wait until next idle event (who knows what blocking process comes next?) } else pimpl->minimizeToTray(); diff --git a/ui/progress_indicator.h b/ui/progress_indicator.h index db580936..3fa3f8f9 100644 --- a/ui/progress_indicator.h +++ b/ui/progress_indicator.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef PROGRESSINDICATOR_H_INCLUDED diff --git a/ui/search.cpp b/ui/search.cpp index 2b33bc64..8112db6c 100644 --- a/ui/search.cpp +++ b/ui/search.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "search.h" @@ -11,6 +11,8 @@ #include <utility> #include <wx+/mouse_move_dlg.h> +using namespace zen; + class SearchDlg : public SearchDialogGenerated { @@ -23,8 +25,8 @@ public: }; private: - void OnClose(wxCloseEvent& event); - void OnCancel(wxCommandEvent& event); + void OnClose (wxCloseEvent& event) { EndModal(0); } + void OnCancel(wxCommandEvent& event) { EndModal(0); } void OnFindNext(wxCommandEvent& event); void OnText(wxCommandEvent& event); @@ -50,18 +52,6 @@ SearchDlg::SearchDlg(wxWindow& parentWindow, wxString& searchText, bool& respect } -void SearchDlg::OnClose(wxCloseEvent& event) -{ - EndModal(0); -} - - -void SearchDlg::OnCancel(wxCommandEvent& event) -{ - EndModal(0); -} - - void SearchDlg::OnFindNext(wxCommandEvent& event) { respectCase_ = m_checkBoxMatchCase->GetValue(); @@ -81,13 +71,15 @@ void SearchDlg::OnText(wxCommandEvent& event) } //########################################################################################### +template <bool respectCase> +class FindInText; template <bool respectCase> class FindInText { public: - FindInText(const wxString& textToFind); - bool found(const wxString& phrase) const; + FindInText(const wxString& textToFind) : textToFind_(textToFind) {} + bool found(const wxString& phrase) const { return phrase.Find(textToFind_) != wxNOT_FOUND; } private: wxString textToFind_; @@ -95,104 +87,58 @@ private: template <> -FindInText<true>::FindInText(const wxString& textToFind) : - textToFind_(textToFind) {} - - -template <> -inline -bool FindInText<true>::found(const wxString& phrase) const +class FindInText<false> { - return phrase.Find(textToFind_) != wxNOT_FOUND; -} - - -template <> -FindInText<false>::FindInText(const wxString& textToFind) : - textToFind_(textToFind) -{ - textToFind_.MakeUpper(); -} +public: + FindInText(const wxString& textToFind) : textToFind_(textToFind) { textToFind_.MakeUpper(); } + bool found(wxString&& phrase) const + { + //wxWidgets::MakeUpper() is inefficient! But performance is not THAT important for this high-level search functionality + phrase.MakeUpper(); + return phrase.Find(textToFind_) != wxNOT_FOUND; + } +private: + wxString textToFind_; +}; -template <> -inline -bool FindInText<false>::found(const wxString& phrase) const -{ - wxString phraseTmp = phrase; //wxWidgets::MakeUpper() is inefficient! - phraseTmp.MakeUpper(); //But performance is not THAT important for this high-level search functionality - return phraseTmp.Find(textToFind_) != wxNOT_FOUND; -} //########################################################################################### template <bool respectCase> -std::pair<int, int> searchGrid(const wxGrid& grid, - const wxString& searchString, - bool fromBeginToCursor, //specify area to search - bool afterCursorToEnd) // +int findRow(const Grid& grid, //return -1 if no matching row found + size_t compPos, + const wxString& searchString, + int rowFirst, //specify area to search: + int rowLast) // [rowFirst, rowLast) { - const int rowCount = const_cast<wxGrid&>(grid).GetNumberRows(); - const int columnCount = const_cast<wxGrid&>(grid).GetNumberCols(); - - //consistency checks on ints: wxGrid uses ints, so we have to use them, too - if (rowCount <= 0 || columnCount <= 0) - return std::make_pair(-1, -1); - - int cursorRow = const_cast<wxGrid&>(grid).GetGridCursorRow(); - int cursorColumn = const_cast<wxGrid&>(grid).GetGridCursorCol(); - - if (cursorRow < 0 || - cursorRow >= rowCount || - cursorColumn < 0 || - cursorColumn >= columnCount) + auto prov = grid.getDataProvider(compPos); + std::vector<Grid::ColumnAttribute> colAttr = grid.getColumnConfig(compPos); + vector_remove_if(colAttr, [](const Grid::ColumnAttribute& ca) { return !ca.visible_; }); + if (!colAttr.empty() && prov) { - //cursor not on valid position... - cursorRow = 0; - cursorColumn = 0; - } + const FindInText<respectCase> searchTxt(searchString); - const FindInText<respectCase> searchTxt(searchString); - - if (fromBeginToCursor) - { - for (int row = 0; row < cursorRow; ++row) - for (int col = 0; col < columnCount; ++col) - if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(row, col))) - return std::make_pair(row, col); - - for (int col = 0; col <= cursorColumn; ++col) - if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(cursorRow, col))) - return std::make_pair(cursorRow, col); - } - - if (afterCursorToEnd) - { - //begin search after cursor cell... - for (int col = cursorColumn + 1; col < columnCount; ++col) - if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(cursorRow, col))) - return std::make_pair(cursorRow, col); - - for (int row = cursorRow + 1; row < rowCount; ++row) - for (int col = 0; col < columnCount; ++col) - if (searchTxt.found(const_cast<wxGrid&>(grid).GetCellValue(row, col))) - return std::make_pair(row, col); + for (int row = rowFirst; row < rowLast; ++row) + for (auto iterCol = colAttr.begin(); iterCol != colAttr.end(); ++iterCol) + if (searchTxt.found(prov->getValue(row, iterCol->type_))) + return row; } - - return std::make_pair(-1, -1); + return -1; } //syntactic sugar... -std::pair<int, int> searchGrid(const wxGrid& grid, - bool respectCase, - const wxString& searchString, - bool fromBeginToCursor, //specify area to search - bool afterCursorToEnd) // +int findRow(const Grid& grid, + size_t compPos, + bool respectCase, + const wxString& searchString, + int rowFirst, //specify area to search: + int rowLast) // [rowFirst, rowLast) { return respectCase ? - searchGrid<true>( grid, searchString, fromBeginToCursor, afterCursorToEnd) : - searchGrid<false>(grid, searchString, fromBeginToCursor, afterCursorToEnd); + findRow<true>( grid, compPos, searchString, rowFirst, rowLast) : + findRow<false>(grid, compPos, searchString, rowFirst, rowLast); } @@ -202,8 +148,8 @@ wxString lastSearchString; //this variable really is conceptionally global... void executeSearch(bool forceShowDialog, bool& respectCase, wxWindow& parentWindow, - wxGrid& leftGrid, - wxGrid& rightGrid) + Grid& grid, + size_t compPosLeft, size_t compPosRight) { bool searchDialogWasShown = false; @@ -216,61 +162,57 @@ void executeSearch(bool forceShowDialog, searchDialogWasShown = true; } - wxGrid* targetGrid = NULL; //filled if match is found - std::pair<int, int> targetPos; // + const int rowCount = grid.getRowCount(); + auto cursorPos = grid.getGridCursor(); //(row, component pos) + + int cursorRow = cursorPos.first; + if (cursorRow < 0 || cursorRow >= rowCount) + cursorRow = 0; + + if (cursorPos.second == compPosRight) + std::swap(compPosLeft, compPosRight); //select side to start with + else if (cursorPos.second != compPosLeft) + cursorRow = 0; + { wxBusyCursor showHourGlass; - const bool startLeft = wxWindow::FindFocus() != rightGrid.GetGridWindow(); - wxGrid& firstGrid = startLeft ? leftGrid : rightGrid; - wxGrid& secondGrid = startLeft ? rightGrid : leftGrid; - - //begin with first grid after cursor - targetGrid = &firstGrid; - targetPos = searchGrid(firstGrid, respectCase, lastSearchString, false, true); - if (targetPos.first == -1) + auto finishSearch = [&](size_t compPos, int rowFirst, int rowLast) -> bool { - //scan second grid completely - targetGrid = &secondGrid; - targetPos = searchGrid(secondGrid, respectCase, lastSearchString, true, true); - - //scan first grid up to cursor - if (targetPos.first == -1) + const int targetRow = findRow(grid, compPos, respectCase, lastSearchString, rowFirst, rowLast); + if (targetRow >= 0) { - targetGrid = &firstGrid; - targetPos = searchGrid(firstGrid, respectCase, lastSearchString, true, false); + grid.setGridCursor(targetRow, compPos); + grid.SetFocus(); + return true; } - } - } + return false; + }; - if (targetPos.first != -1 && targetPos.second != -1) //new position found - { - targetGrid->SetFocus(); - targetGrid->SetGridCursor( targetPos.first, targetPos.second); - targetGrid->SelectRow( targetPos.first); - targetGrid->MakeCellVisible(targetPos.first, targetPos.second); + if (finishSearch(compPosLeft , cursorRow + 1, rowCount) || + finishSearch(compPosRight, 0, rowCount) || + finishSearch(compPosLeft , 0, cursorRow + 1)) + return; } - else - { - wxString messageNotFound = _("Cannot find %x"); - messageNotFound.Replace(wxT("%x"), wxString(wxT("\"")) + lastSearchString + wxT("\""), false); - wxMessageBox(messageNotFound, _("Find"), wxOK); - //show search dialog again - if (searchDialogWasShown) - executeSearch(true, respectCase, parentWindow, leftGrid, rightGrid); - } + wxString messageNotFound = _("Cannot find %x"); + messageNotFound.Replace(wxT("%x"), wxString(wxT("\"")) + lastSearchString + wxT("\""), false); + wxMessageBox(messageNotFound, _("Find"), wxOK); + + //show search dialog again + if (searchDialogWasShown) + executeSearch(true, respectCase, parentWindow, grid, compPosLeft, compPosRight); } //########################################################################################### -void zen::startFind(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //Strg + F +void zen::startFind(wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase) //Strg + F { - executeSearch(true, respectCase, parentWindow, leftGrid, rightGrid); + executeSearch(true, respectCase, parentWindow, grid, compPosLeft, compPosRight); } -void zen::findNext(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase) //F3 +void zen::findNext(wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase) //F3 { - executeSearch(false, respectCase, parentWindow, leftGrid, rightGrid); + executeSearch(false, respectCase, parentWindow, grid, compPosLeft, compPosRight); } diff --git a/ui/search.h b/ui/search.h index 93c3159f..1c26ea78 100644 --- a/ui/search.h +++ b/ui/search.h @@ -1,20 +1,18 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef SEARCH_H_INCLUDED #define SEARCH_H_INCLUDED -class wxGrid; -class wxWindow; - +#include <wx+/grid.h> namespace zen { -void startFind(wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase); //Strg + F -void findNext( wxWindow& parentWindow, wxGrid& leftGrid, wxGrid& rightGrid, bool& respectCase); //F3 +void startFind(wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase); //Strg + F +void findNext( wxWindow& parentWindow, Grid& grid, size_t compPosLeft, size_t compPosRight, bool& respectCase); //F3 } #endif // SEARCH_H_INCLUDED diff --git a/ui/small_dlgs.cpp b/ui/small_dlgs.cpp index 62ccb9d7..55a7021a 100644 --- a/ui/small_dlgs.cpp +++ b/ui/small_dlgs.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "gui_generated.h" @@ -13,12 +13,13 @@ #include <wx+/format_unit.h> #include <wx+/choice_enum.h> #include "../synchronization.h" -#include "../lib/custom_grid.h" +#include "custom_grid.h" #include <wx+/button.h> #include <zen/build_info.h> #include <wx/wupdlock.h> #include <wx/msgdlg.h> #include <wx+/mouse_move_dlg.h> +#include <wx+/rtl.h> #include "../lib/help_provider.h" #include <wx+/image_tools.h> #include <zen/stl_tools.h> @@ -40,28 +41,29 @@ private: AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent) { - m_bitmap9->SetBitmap(GlobalResources::getImage(wxT("website"))); - m_bitmap10->SetBitmap(GlobalResources::getImage(wxT("email"))); - m_bitmap11->SetBitmap(GlobalResources::getImage(wxT("logo"))); - m_bitmap13->SetBitmap(GlobalResources::getImage(wxT("gpl"))); - m_bitmapTransl->SetBitmap(GlobalResources::getImage(wxT("translation"))); + m_bitmap9 ->SetBitmap(GlobalResources::getImage(L"website")); + m_bitmap10->SetBitmap(GlobalResources::getImage(L"email")); + m_bitmap11->SetBitmap(GlobalResources::getImage(L"logo")); + m_bitmap13->SetBitmap(GlobalResources::getImage(L"gpl")); + //m_bitmapTransl->SetBitmap(GlobalResources::getImage(wxT("translation"))); + m_bitmapPaypal->SetBitmap(GlobalResources::getImage(L"paypal")); //create language credits - for (std::vector<ExistingTranslations::Entry>::const_iterator i = ExistingTranslations::get().begin(); i != ExistingTranslations::get().end(); ++i) + for (auto iter = ExistingTranslations::get().begin(); iter != ExistingTranslations::get().end(); ++iter) { //flag - wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, GlobalResources::getImage(i->languageFlag), wxDefaultPosition, wxSize(-1, 11), 0 ); - fgSizerTranslators->Add(staticBitmapFlag, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL, 5 ); + wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, GlobalResources::getImage(iter->languageFlag), wxDefaultPosition, wxSize(-1, 11), 0 ); + fgSizerTranslators->Add(staticBitmapFlag, 0, wxALIGN_CENTER); //language name - wxStaticText* staticTextLanguage = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, i->languageName, wxDefaultPosition, wxDefaultSize, 0 ); - staticTextLanguage->Wrap( -1 ); - fgSizerTranslators->Add(staticTextLanguage, 0, wxALIGN_CENTER_VERTICAL, 5); + wxStaticText* staticTextLanguage = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, iter->languageName, wxDefaultPosition, wxDefaultSize, 0 ); + staticTextLanguage->Wrap(-1); + fgSizerTranslators->Add(staticTextLanguage, 0, wxALIGN_CENTER_VERTICAL); //translator name - wxStaticText* staticTextTranslator = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, i->translatorName, wxDefaultPosition, wxDefaultSize, 0 ); - staticTextTranslator->Wrap( -1 ); - fgSizerTranslators->Add(staticTextTranslator, 0, wxALIGN_CENTER_VERTICAL, 5); + wxStaticText* staticTextTranslator = new wxStaticText(m_scrolledWindowTranslators, wxID_ANY, iter->translatorName, wxDefaultPosition, wxDefaultSize, 0 ); + staticTextTranslator->Wrap(-1); + fgSizerTranslators->Add(staticTextTranslator, 0, wxALIGN_CENTER_VERTICAL); } bSizerTranslators->Fit(m_scrolledWindowTranslators); @@ -87,8 +89,8 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent) m_build->SetLabel(buildFormatted); - m_animationControl1->SetAnimation(GlobalResources::instance().animationMoney); - m_animationControl1->Play(); + //m_animationControl1->SetAnimation(GlobalResources::instance().animationMoney); + //m_animationControl1->Play(); m_buttonOkay->SetFocus(); Fit(); @@ -434,140 +436,9 @@ ReturnSmallDlg::ButtonPressed zen::showDeleteDialog(const std::vector<zen::FileS useRecycleBin); return static_cast<ReturnSmallDlg::ButtonPressed>(confirmDeletion.ShowModal()); } -//######################################################################################## - - -class CustomizeColsDlg : public CustomizeColsDlgGenerated -{ -public: - CustomizeColsDlg(wxWindow* parent, xmlAccess::ColumnAttributes& attr); - -private: - void OnOkay(wxCommandEvent& event); - void OnDefault(wxCommandEvent& event); - void OnCancel(wxCommandEvent& event); - void OnClose(wxCloseEvent& event); - - void OnMoveUp(wxCommandEvent& event); - void OnMoveDown(wxCommandEvent& event); - - xmlAccess::ColumnAttributes& output; -}; - - -CustomizeColsDlg::CustomizeColsDlg(wxWindow* parent, xmlAccess::ColumnAttributes& attr) : - CustomizeColsDlgGenerated(parent), - output(attr) -{ -#ifdef FFS_WIN - new zen::MouseMoveWindow(*this); //allow moving main dialog by clicking (nearly) anywhere...; ownership passed to "this" -#endif - - m_bpButton29->SetBitmapLabel(GlobalResources::getImage(wxT("moveUp"))); - m_bpButton30->SetBitmapLabel(GlobalResources::getImage(wxT("moveDown"))); - - xmlAccess::ColumnAttributes columnSettings = attr; - - sort(columnSettings.begin(), columnSettings.end(), xmlAccess::sortByPositionOnly); - - for (xmlAccess::ColumnAttributes::const_iterator i = columnSettings.begin(); i != columnSettings.end(); ++i) //love these iterators! - { - m_checkListColumns->Append(CustomGridRim::getTypeName(i->type)); - m_checkListColumns->Check(i - columnSettings.begin(), i->visible); - } - - m_checkListColumns->SetSelection(0); - Fit(); -} - -void CustomizeColsDlg::OnOkay(wxCommandEvent& event) -{ - for (int i = 0; i < int(m_checkListColumns->GetCount()); ++i) - { - const wxString label = m_checkListColumns->GetString(i); - for (xmlAccess::ColumnAttributes::iterator j = output.begin(); j != output.end(); ++j) - { - if (CustomGridRim::getTypeName(j->type) == label) //not nice but short and no performance issue - { - j->position = i; - j->visible = m_checkListColumns->IsChecked(i);; - break; - } - } - } - - EndModal(ReturnSmallDlg::BUTTON_OKAY); -} - - -void CustomizeColsDlg::OnDefault(wxCommandEvent& event) -{ - xmlAccess::ColumnAttributes defaultColumnAttr = CustomGridRim::getDefaultColumnAttributes(); - - m_checkListColumns->Clear(); - for (xmlAccess::ColumnAttributes::const_iterator i = defaultColumnAttr.begin(); i != defaultColumnAttr.end(); ++i) - { - m_checkListColumns->Append(CustomGridRim::getTypeName(i->type)); - m_checkListColumns->Check(i - defaultColumnAttr.begin(), i->visible); - } -} - - -void CustomizeColsDlg::OnCancel(wxCommandEvent& event) -{ - EndModal(0); -} - - -void CustomizeColsDlg::OnClose(wxCloseEvent& event) -{ - EndModal(0); -} - - -void CustomizeColsDlg::OnMoveUp(wxCommandEvent& event) -{ - const int pos = m_checkListColumns->GetSelection(); - if (1 <= pos && pos < int(m_checkListColumns->GetCount())) - { - const bool checked = m_checkListColumns->IsChecked(pos); - const wxString label = m_checkListColumns->GetString(pos); - - m_checkListColumns->SetString(pos, m_checkListColumns->GetString(pos - 1)); - m_checkListColumns->Check(pos, m_checkListColumns->IsChecked(pos - 1)); - m_checkListColumns->SetString(pos - 1, label); - m_checkListColumns->Check(pos - 1, checked); - m_checkListColumns->Select(pos - 1); - } -} - - -void CustomizeColsDlg::OnMoveDown(wxCommandEvent& event) -{ - const int pos = m_checkListColumns->GetSelection(); - if (0 <= pos && pos < int(m_checkListColumns->GetCount()) - 1) - { - const bool checked = m_checkListColumns->IsChecked(pos); - const wxString label = m_checkListColumns->GetString(pos); - - m_checkListColumns->SetString(pos, m_checkListColumns->GetString(pos + 1)); - m_checkListColumns->Check(pos, m_checkListColumns->IsChecked(pos + 1)); - m_checkListColumns->SetString(pos + 1, label); - m_checkListColumns->Check(pos + 1, checked); - m_checkListColumns->Select(pos + 1); - } -} - - -ReturnSmallDlg::ButtonPressed zen::showCustomizeColsDlg(xmlAccess::ColumnAttributes& attr) -{ - CustomizeColsDlg customizeDlg(NULL, attr); - return static_cast<ReturnSmallDlg::ButtonPressed>(customizeDlg.ShowModal()); -} //######################################################################################## - class SyncPreviewDlg : public SyncPreviewDlgGenerated { public: @@ -599,10 +470,11 @@ SyncPreviewDlg::SyncPreviewDlg(wxWindow* parent, using zen::toStringSep; m_buttonStartSync->setBitmapFront(GlobalResources::getImage(wxT("startSync"))); - m_bitmapCreate->SetBitmap(GlobalResources::getImage(wxT("create"))); - m_bitmapUpdate->SetBitmap(GlobalResources::getImage(wxT("update"))); - m_bitmapDelete->SetBitmap(GlobalResources::getImage(wxT("delete"))); - m_bitmapData->SetBitmap(GlobalResources::getImage(wxT("data"))); + + m_bitmapCreate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"create"))); + m_bitmapUpdate->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"update"))); + m_bitmapDelete->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"delete"))); + m_bitmapData ->SetBitmap(mirrorIfRtl(GlobalResources::getImage(L"data"))); m_staticTextVariant->SetLabel(variantName); m_textCtrlData->SetValue(zen::filesizeToShortString(statistics.getDataToProcess())); diff --git a/ui/small_dlgs.h b/ui/small_dlgs.h index 9abcba6c..b42f56eb 100644 --- a/ui/small_dlgs.h +++ b/ui/small_dlgs.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef SMALLDIALOGS_H_INCLUDED @@ -33,8 +33,6 @@ ReturnSmallDlg::ButtonPressed showDeleteDialog( bool& deleteOnBothSides, bool& useRecycleBin); -ReturnSmallDlg::ButtonPressed showCustomizeColsDlg(xmlAccess::ColumnAttributes& attr); - ReturnSmallDlg::ButtonPressed showSyncPreviewDlg( const wxString& variantName, const SyncStatistics& statistics, diff --git a/ui/sorting.h b/ui/sorting.h index 596dfd53..15e04a62 100644 --- a/ui/sorting.h +++ b/ui/sorting.h @@ -1,15 +1,16 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef SORTING_H_INCLUDED #define SORTING_H_INCLUDED -#include "../file_hierarchy.h" -#include "../synchronization.h" #include <zen/assert_static.h> +#include "../file_hierarchy.h" +#include <zen/type_tools.h> +//#include "../synchronization.h" namespace zen @@ -18,9 +19,9 @@ namespace { struct CompileTimeReminder : public FSObjectVisitor { - virtual void visit(const FileMapping& fileObj) {} + virtual void visit(const FileMapping& fileObj ) {} virtual void visit(const SymLinkMapping& linkObj) {} - virtual void visit(const DirMapping& dirObj) {} + virtual void visit(const DirMapping& dirObj ) {} } checkDymanicCasts; //just a compile-time reminder to check dynamic casts in this file } @@ -31,28 +32,6 @@ bool isDirectoryMapping(const FileSystemObject& fsObj) } -template <bool ascending> -struct Compare -{ - template <class T> - bool isSmallerThan(T a, T b) - { - assert_static(sizeof(T) <= 2 * sizeof(int)); //use for comparing (small) INTEGRAL types only! - return a < b; - } -}; -template <> -struct Compare<false> -{ - template <class T> - bool isSmallerThan(T a, T b) - { - assert_static(sizeof(T) <= 2 * sizeof(int)); //use for comparing (small) INTEGRAL types only! - return a > b; - } -}; - - template <bool ascending, SelectedSide side> inline bool lessShortFileName(const FileSystemObject& a, const FileSystemObject& b) { @@ -75,8 +54,7 @@ bool lessShortFileName(const FileSystemObject& a, const FileSystemObject& b) if (isDirectoryMapping(b)) return true; else - return Compare<ascending>().isSmallerThan( - cmpFileName(a.getShortName<side>(), b.getShortName<side>()), 0); + return makeSortDirection(LessFilename(), Int2Type<ascending>())(a.getShortName<side>(), b.getShortName<side>()); } } @@ -97,7 +75,7 @@ bool lessRelativeName(const FileSystemObject& a, const FileSystemObject& b) //compare relative names without filenames first const int rv = cmpFileName(relDirNameA, relDirNameB); if (rv != 0) - return Compare<ascending>().isSmallerThan(rv, 0); + return makeSortDirection(std::less<int>(), Int2Type<ascending>())(rv, 0); else //compare the filenames { if (isDirectoryB) //directories shall appear before files @@ -138,7 +116,7 @@ bool lessFilesize(const FileSystemObject& a, const FileSystemObject& b) return true; //return list beginning with largest files first - return Compare<ascending>().isSmallerThan(fileObjA->getFileSize<side>(), fileObjB->getFileSize<side>()); + return makeSortDirection(std::less<UInt64>(), Int2Type<ascending>())(fileObjA->getFileSize<side>(), fileObjB->getFileSize<side>()); } @@ -166,7 +144,7 @@ bool lessFiletime(const FileSystemObject& a, const FileSystemObject& b) zen::Int64 dateB = fileObjB ? fileObjB->getLastWriteTime<side>() : linkObjB->getLastWriteTime<side>(); //return list beginning with newest files first - return Compare<ascending>().isSmallerThan(dateA, dateB); + return makeSortDirection(std::less<Int64>(), Int2Type<ascending>())(dateA, dateB); } @@ -187,7 +165,7 @@ bool lessExtension(const FileSystemObject& a, const FileSystemObject& b) else if (fileObjB == NULL) return true; //directories last - return Compare<ascending>().isSmallerThan(cmpFileName(fileObjA->getExtension<side>(), fileObjB->getExtension<side>()), 0); + return makeSortDirection(LessFilename(), Int2Type<ascending>())(fileObjA->getExtension<side>(), fileObjB->getExtension<side>()); } @@ -200,14 +178,14 @@ bool lessCmpResult(const FileSystemObject& a, const FileSystemObject& b) if (b.getCategory() == FILE_EQUAL) return true; - return Compare<ascending>().isSmallerThan(a.getCategory(), b.getCategory()); + return makeSortDirection(std::less<CompareFilesResult>(), Int2Type<ascending>())(a.getCategory(), b.getCategory()); } template <bool ascending> inline bool lessSyncDirection(const FileSystemObject& a, const FileSystemObject& b) { - return Compare<ascending>().isSmallerThan(a.getSyncOperation(), b.getSyncOperation()); + return makeSortDirection(std::less<SyncOperation>(), Int2Type<ascending>())(a.getSyncOperation(), b.getSyncOperation()); } } diff --git a/ui/switch_to_gui.h b/ui/switch_to_gui.h index 70ef90d3..a9a717cb 100644 --- a/ui/switch_to_gui.h +++ b/ui/switch_to_gui.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef SWITCHTOGUI_H_INCLUDED diff --git a/ui/sync_cfg.cpp b/ui/sync_cfg.cpp index e8411244..4da98b8e 100644 --- a/ui/sync_cfg.cpp +++ b/ui/sync_cfg.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "sync_cfg.h" @@ -12,6 +12,7 @@ #include <wx+/mouse_move_dlg.h> #include <wx+/string_conv.h> #include <wx+/dir_picker.h> +#include <wx+/rtl.h> #include "gui_generated.h" #include <wx+/choice_enum.h> #include <wx+/image_tools.h> @@ -97,15 +98,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg, switch (dirCfg.exLeftSideOnly) { case SYNC_DIR_RIGHT: - buttonLeftOnly->SetBitmapLabel(GlobalResources::getImage(wxT("createRight"))); + buttonLeftOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"createRight"))); buttonLeftOnly->SetToolTip(getSyncOpDescription(SO_CREATE_NEW_RIGHT)); break; case SYNC_DIR_LEFT: - buttonLeftOnly->SetBitmapLabel(GlobalResources::getImage(wxT("deleteLeft"))); + buttonLeftOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"deleteLeft"))); buttonLeftOnly->SetToolTip(getSyncOpDescription(SO_DELETE_LEFT)); break; case SYNC_DIR_NONE: - buttonLeftOnly->SetBitmapLabel(GlobalResources::getImage(wxT("none"))); + buttonLeftOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none"))); buttonLeftOnly->SetToolTip(getSyncOpDescription(SO_DO_NOTHING)); break; } @@ -113,15 +114,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg, switch (dirCfg.exRightSideOnly) { case SYNC_DIR_RIGHT: - buttonRightOnly->SetBitmapLabel(GlobalResources::getImage(wxT("deleteRight"))); + buttonRightOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"deleteRight"))); buttonRightOnly->SetToolTip(getSyncOpDescription(SO_DELETE_RIGHT)); break; case SYNC_DIR_LEFT: - buttonRightOnly->SetBitmapLabel(GlobalResources::getImage(wxT("createLeft"))); + buttonRightOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"createLeft"))); buttonRightOnly->SetToolTip(getSyncOpDescription(SO_CREATE_NEW_LEFT)); break; case SYNC_DIR_NONE: - buttonRightOnly->SetBitmapLabel(GlobalResources::getImage(wxT("none"))); + buttonRightOnly->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none"))); buttonRightOnly->SetToolTip(getSyncOpDescription(SO_DO_NOTHING)); break; } @@ -129,15 +130,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg, switch (dirCfg.leftNewer) { case SYNC_DIR_RIGHT: - buttonLeftNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight"))); + buttonLeftNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight"))); buttonLeftNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT)); break; case SYNC_DIR_LEFT: - buttonLeftNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft"))); + buttonLeftNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft"))); buttonLeftNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT)); break; case SYNC_DIR_NONE: - buttonLeftNewer->SetBitmapLabel(GlobalResources::getImage(wxT("none"))); + buttonLeftNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none"))); buttonLeftNewer->SetToolTip(getSyncOpDescription(SO_DO_NOTHING)); break; } @@ -145,15 +146,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg, switch (dirCfg.rightNewer) { case SYNC_DIR_RIGHT: - buttonRightNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight"))); + buttonRightNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight"))); buttonRightNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT)); break; case SYNC_DIR_LEFT: - buttonRightNewer->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft"))); + buttonRightNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft"))); buttonRightNewer->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT)); break; case SYNC_DIR_NONE: - buttonRightNewer->SetBitmapLabel(GlobalResources::getImage(wxT("none"))); + buttonRightNewer->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none"))); buttonRightNewer->SetToolTip(getSyncOpDescription(SO_DO_NOTHING)); break; } @@ -161,15 +162,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg, switch (dirCfg.different) { case SYNC_DIR_RIGHT: - buttonDifferent->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight"))); + buttonDifferent->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight"))); buttonDifferent->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT)); break; case SYNC_DIR_LEFT: - buttonDifferent->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft"))); + buttonDifferent->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft"))); buttonDifferent->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT)); break; case SYNC_DIR_NONE: - buttonDifferent->SetBitmapLabel(GlobalResources::getImage(wxT("none"))); + buttonDifferent->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"none"))); buttonDifferent->SetToolTip(getSyncOpDescription(SO_DO_NOTHING)); break; } @@ -177,15 +178,15 @@ void updateConfigIcons(const DirectionConfig& directionCfg, switch (dirCfg.conflict) { case SYNC_DIR_RIGHT: - buttonConflict->SetBitmapLabel(GlobalResources::getImage(wxT("updateRight"))); + buttonConflict->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateRight"))); buttonConflict->SetToolTip(getSyncOpDescription(SO_OVERWRITE_RIGHT)); break; case SYNC_DIR_LEFT: - buttonConflict->SetBitmapLabel(GlobalResources::getImage(wxT("updateLeft"))); + buttonConflict->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"updateLeft"))); buttonConflict->SetToolTip(getSyncOpDescription(SO_OVERWRITE_LEFT)); break; case SYNC_DIR_NONE: - buttonConflict->SetBitmapLabel(GlobalResources::getImage(wxT("conflict"))); + buttonConflict->SetBitmapLabel(mirrorIfRtl(GlobalResources::getImage(L"conflict"))); buttonConflict->SetToolTip(_("Leave as unresolved conflict")); break; } @@ -249,12 +250,12 @@ SyncCfgDialog::SyncCfgDialog(wxWindow* window, updateGui(); //set icons for this dialog - m_bitmapLeftOnly ->SetBitmap(greyScale(GlobalResources::getImage(L"leftOnly" ))); - m_bitmapRightOnly ->SetBitmap(greyScale(GlobalResources::getImage(L"rightOnly" ))); - m_bitmapLeftNewer ->SetBitmap(greyScale(GlobalResources::getImage(L"leftNewer" ))); - m_bitmapRightNewer->SetBitmap(greyScale(GlobalResources::getImage(L"rightNewer"))); - m_bitmapDifferent ->SetBitmap(greyScale(GlobalResources::getImage(L"different" ))); - m_bitmapConflict ->SetBitmap(greyScale(GlobalResources::getImage(L"conflict" ))); + m_bitmapLeftOnly ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"leftOnly" )))); + m_bitmapRightOnly ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"rightOnly" )))); + m_bitmapLeftNewer ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"leftNewer" )))); + m_bitmapRightNewer->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"rightNewer")))); + m_bitmapDifferent ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"different" )))); + m_bitmapConflict ->SetBitmap(mirrorIfRtl(greyScale(GlobalResources::getImage(L"conflict" )))); m_bitmapDatabase ->SetBitmap(GlobalResources::getImage(wxT("database"))); bSizer201->Layout(); //wxButtonWithImage size might have changed diff --git a/ui/sync_cfg.h b/ui/sync_cfg.h index 1f746709..dae79d1d 100644 --- a/ui/sync_cfg.h +++ b/ui/sync_cfg.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef SYNCCONFIG_H_INCLUDED diff --git a/ui/taskbar.cpp b/ui/taskbar.cpp index caab300c..7219be14 100644 --- a/ui/taskbar.cpp +++ b/ui/taskbar.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** // #include "taskbar.h" diff --git a/ui/taskbar.h b/ui/taskbar.h index d34dae30..bf40adde 100644 --- a/ui/taskbar.h +++ b/ui/taskbar.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef TASKBARPROGRESS_H_INCLUDED diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp index 5e3fa5cb..26556742 100644 --- a/ui/tray_icon.cpp +++ b/ui/tray_icon.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "tray_icon.h" diff --git a/ui/tray_icon.h b/ui/tray_icon.h index 30405465..e9778d1e 100644 --- a/ui/tray_icon.h +++ b/ui/tray_icon.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef TRAYICON_H_INCLUDED diff --git a/ui/tree_view.cpp b/ui/tree_view.cpp new file mode 100644 index 00000000..cd29938e --- /dev/null +++ b/ui/tree_view.cpp @@ -0,0 +1,1176 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * +// ************************************************************************** + +#include <set> +#include "tree_view.h" +#include <wx/settings.h> +#include <wx/menu.h> +#include <zen/i18n.h> +#include <zen/stl_tools.h> +#include <wx+/format_unit.h> +#include <wx+/rtl.h> +#include <wx+/context_menu.h> +#include "../lib/icon_buffer.h" +#include "../lib/resources.h" + +using namespace zen; + + +template <class Function> //(const FileSystemObject&) -> bool +void TreeView::extractVisibleSubtree(HierarchyObject& hierObj, //in + TreeView::Container& cont, //out + Function pred) +{ + auto getBytes = [](const FileMapping& fileObj) -> UInt64 //MSVC screws up miserably if we put this lambda into std::for_each + { + //give accumulated bytes the semantics of a sync preview! + if (fileObj.isActive()) + switch (fileObj.getSyncDir()) + { + case SYNC_DIR_LEFT: + return fileObj.getFileSize<RIGHT_SIDE>(); + case SYNC_DIR_RIGHT: + return fileObj.getFileSize<LEFT_SIDE>(); + case SYNC_DIR_NONE: + break; + } + return std::max(fileObj.getFileSize<LEFT_SIDE>(), fileObj.getFileSize<RIGHT_SIDE>()); + }; + + + cont.firstFile = NULL; + std::for_each(hierObj.refSubFiles().begin(), hierObj.refSubFiles().end(), + [&](FileMapping& fileObj) + { + if (pred(fileObj)) + { + cont.bytesNet += getBytes(fileObj); + + if (!cont.firstFile) + cont.firstFile = fileObj.getId(); + } + }); + cont.bytesGross += cont.bytesNet; + + if (!cont.firstFile) + std::find_if(hierObj.refSubLinks().begin(), hierObj.refSubLinks().end(), + [&](SymLinkMapping& linkObj) -> bool + { + if (pred(linkObj)) + { + cont.firstFile = linkObj.getId(); + return true; + } + return false; + }); + + cont.subDirs.reserve(hierObj.refSubDirs().size()); //avoid expensive reallocations! + + std::for_each(hierObj.refSubDirs().begin(), hierObj.refSubDirs().end(), + [&cont, pred](DirMapping& subDirObj) + { + cont.subDirs.push_back(TreeView::DirNodeImpl()); // + auto& subDirView = cont.subDirs.back(); + TreeView::extractVisibleSubtree(subDirObj, subDirView, pred); + cont.bytesGross += subDirView.bytesGross; + + if (pred(subDirObj) || subDirView.firstFile || !subDirView.subDirs.empty()) + { + subDirView.objId = subDirObj.getId(); + + //------------------- small hack -------------------------------------------- + //remove single-element sub-trees (*after* inclusion check!!!) + if (subDirView.subDirs.empty() || + (subDirView.firstFile == NULL && subDirView.subDirs.size() == 1 && subDirView.subDirs[0].subDirs.empty() && subDirView.subDirs[0].firstFile == NULL)) + { + subDirView.subDirs.clear(); + subDirView.firstFile = NULL; + } + } + else + cont.subDirs.pop_back(); + }); +} + + +namespace +{ +//generate nice percentage numbers which sum up to 100 +void calcPercentage(std::vector<std::pair<UInt64, int*>>& workList) +{ + const UInt64 total = std::accumulate(workList.begin(), workList.end(), UInt64(), + [](UInt64 val, const std::pair<UInt64, int*>& pair) { return val + pair.first; }); + + if (total == 0U) //this case doesn't work with the error minimizing algorithm below + { + std::for_each(workList.begin(), workList.end(), + [&](std::pair<UInt64, int*>& pair) { *pair.second = 0; }); + return; + } + + int remainingPercent = 100; + std::for_each(workList.begin(), workList.end(), + [&](std::pair<UInt64, int*>& pair) + { + *pair.second = to<double>(pair.first) * 100 / to<double>(total); //round down + remainingPercent -= *pair.second; + }); + + //sort descending by absolute error + std::sort(workList.begin(), workList.end(), + [&](const std::pair<UInt64, int*>& lhs, const std::pair<UInt64, int*>& rhs) + { + //return std::abs(*lhs.second - to<double>(lhs.first) * 100 / total) > std::abs(*rhs.second - to<double>(rhs.first) * 100 / total); + return (to<double>(lhs.first) - to<double>(rhs.first)) * 100 / to<double>(total) > *lhs.second - *rhs.second; + }); + + //distribute remaining percent so that overall error is minimized as much as possible + remainingPercent = std::min(std::max(0, remainingPercent), static_cast<int>(workList.size())); + std::for_each(workList.begin(), workList.begin() + remainingPercent, + [&](std::pair<UInt64, int*>& pair) { ++*pair.second; }); +} +} + + +template <bool ascending> +struct TreeView::LessShortName +{ + bool operator()(const TreeLine& lhs, const TreeLine& rhs) + { + //files last (irrespective of sort direction) + if (lhs.type_ == TreeView::TYPE_FILES) + return false; + else if (rhs.type_ == TreeView::TYPE_FILES) + return true; + + if (lhs.type_ != rhs.type_) // + return lhs.type_ < rhs.type_; //shouldn't happen! Root nodes are never sorted + + switch (lhs.type_) + { + case TreeView::TYPE_ROOT: + return false; + + case TreeView::TYPE_DIRECTORY: + { + const auto* dirObjL = dynamic_cast<const DirMapping*>(FileSystemObject::retrieve(static_cast<const TreeView::DirNodeImpl*>(lhs.node_)->objId)); + const auto* dirObjR = dynamic_cast<const DirMapping*>(FileSystemObject::retrieve(static_cast<const TreeView::DirNodeImpl*>(rhs.node_)->objId)); + + if (!dirObjL) //might be pathologic, but it's covered + return false; + else if (!dirObjR) + return true; + + return makeSortDirection(LessFilename(), Int2Type<ascending>())(dirObjL->getObjShortName(), dirObjR->getObjShortName()); + } + + case TreeView::TYPE_FILES: + break; + } + assert(false); + return false; //:= all equal + } +}; + + +template <bool ascending> +void TreeView::sortSingleLevel(std::vector<TreeLine>& items, ColumnTypeNavi columnType) +{ + auto getBytes = [](const TreeLine& line) -> UInt64 + { + switch (line.type_) + { + case TreeView::TYPE_ROOT: + case TreeView::TYPE_DIRECTORY: + return line.node_->bytesGross; + case TreeView::TYPE_FILES: + return line.node_->bytesNet; + } + assert(false); + return 0U; + }; + + const auto lessBytes = [&](const TreeLine& lhs, const TreeLine& rhs) { return getBytes(lhs) < getBytes(rhs); }; + + switch (columnType) + { + case COL_TYPE_NAVI_BYTES: + std::sort(items.begin(), items.end(), makeSortDirection(lessBytes, Int2Type<ascending>())); + break; + + case COL_TYPE_NAVI_DIRECTORY: + std::sort(items.begin(), items.end(), LessShortName<ascending>()); + break; + } +} + + +void TreeView::getChildren(const Container& cont, size_t level, std::vector<TreeLine>& output) +{ + output.clear(); + output.reserve(cont.subDirs.size() + 1); //keep pointers in "workList" valid + std::vector<std::pair<UInt64, int*>> workList; + + std::for_each(cont.subDirs.begin(), cont.subDirs.end(), + [&output, level, &workList](const DirNodeImpl& subDir) + { + output.push_back(TreeView::TreeLine(level, 0, &subDir, TreeView::TYPE_DIRECTORY)); + workList.push_back(std::make_pair(subDir.bytesGross, &output.back().percent_)); + }); + + if (cont.firstFile) + { + output.push_back(TreeLine(level, 0, &cont, TreeView::TYPE_FILES)); + workList.push_back(std::make_pair(cont.bytesNet, &output.back().percent_)); + } + calcPercentage(workList); + + if (sortAscending) + sortSingleLevel<true>(output, sortColumn); + else + sortSingleLevel<false>(output, sortColumn); +} + + +void TreeView::applySubView(std::vector<RootNodeImpl>&& newView) +{ + //preserve current node expansion status + auto getHierAlias = [](const TreeView::TreeLine& tl) -> const HierarchyObject* + { + switch (tl.type_) + { + case TreeView::TYPE_ROOT: + return static_cast<const RootNodeImpl*>(tl.node_)->baseMap.get(); + + case TreeView::TYPE_DIRECTORY: + if (auto dirObj = dynamic_cast<const DirMapping*>(FileSystemObject::retrieve(static_cast<const DirNodeImpl*>(tl.node_)->objId))) + return dirObj; + break; + + case TreeView::TYPE_FILES: + break; //none!!! + } + return NULL; + }; + + zen::hash_set<const HierarchyObject*> expandedNodes; + if (!flatTree.empty()) + { + auto iter = flatTree.begin(); + for (auto iterNext = flatTree.begin() + 1; iterNext != flatTree.end(); ++iterNext, ++iter) + if (iter->level_ < iterNext->level_) + if (auto hierObj = getHierAlias(*iter)) + expandedNodes.insert(hierObj); + } + + //update view on full data + folderCmpView.swap(newView); //newView may be an alias for folderCmpView! see sorting! + + //set default flat tree + flatTree.clear(); + + if (folderCmpView.size() == 1) + getChildren(folderCmpView[0], 0, flatTree); //do not show root + else + { + std::vector<std::pair<UInt64, int*>> workList; + flatTree.reserve(folderCmpView.size()); //keep pointers in "workList" valid + + std::for_each(folderCmpView.begin(), folderCmpView.end(), + [&](const RootNodeImpl& root) + { + flatTree.push_back(TreeView::TreeLine(0, 0, &root, TreeView::TYPE_ROOT)); + workList.push_back(std::make_pair(root.bytesGross, &flatTree.back().percent_)); + }); + + calcPercentage(workList); + } + + //restore node expansion status + for (size_t row = 0; row < flatTree.size(); ++row) //flatTree size changes within loop! + { + const TreeLine& line = flatTree[row]; + + if (auto hierObj = getHierAlias(line)) + if (expandedNodes.find(hierObj) != expandedNodes.end()) + { + std::vector<TreeLine> newLines; + getChildren(*line.node_, line.level_ + 1, newLines); + + flatTree.insert(flatTree.begin() + row + 1, newLines.begin(), newLines.end()); + } + } +} + + +template <class Predicate> +void TreeView::updateView(Predicate pred) +{ + //update view on full data + std::vector<RootNodeImpl> newView; + newView.reserve(folderCmp.size()); //avoid expensive reallocations! + + std::for_each(folderCmp.begin(), folderCmp.end(), + [&](const std::shared_ptr<BaseDirMapping>& baseObj) + { + if (!baseObj->getBaseDirPf<LEFT_SIDE>().empty() || !baseObj->getBaseDirPf<RIGHT_SIDE>().empty()) + { + newView.push_back(TreeView::RootNodeImpl()); + RootNodeImpl& root = newView.back(); + root.baseMap = baseObj; + this->extractVisibleSubtree(*baseObj, root, pred); //"this->" is bogus for a static method, but GCC screws this one up + } + }); + + applySubView(std::move(newView)); +} + + +void TreeView::setSortDirection(ColumnTypeNavi colType, bool ascending) //apply permanently! +{ + sortColumn = colType; + sortAscending = ascending; + + //reapply current view + applySubView(std::move(folderCmpView)); +} + + +bool TreeView::getDefaultSortDirection(ColumnTypeNavi colType) +{ + switch (colType) + { + case COL_TYPE_NAVI_BYTES: + return false; + case COL_TYPE_NAVI_DIRECTORY: + return true; + } + assert(false); + return true; +} + + +TreeView::NodeStatus TreeView::getStatus(size_t row) const +{ + if (row < flatTree.size()) + { + if (row + 1 < flatTree.size() && flatTree[row + 1].level_ > flatTree[row].level_) + return TreeView::STATUS_EXPANDED; + + //it's either reduced or empty + switch (flatTree[row].type_) + { + case TreeView::TYPE_DIRECTORY: + case TreeView::TYPE_ROOT: + return flatTree[row].node_->firstFile || !flatTree[row].node_->subDirs.empty() ? TreeView::STATUS_REDUCED : TreeView::STATUS_EMPTY; + + case TreeView::TYPE_FILES: + return TreeView::STATUS_EMPTY; + } + } + return TreeView::STATUS_EMPTY; +} + + +void TreeView::expandNode(size_t row) +{ + if (row < flatTree.size()) + { + std::vector<TreeLine> newLines; + + switch (flatTree[row].type_) + { + case TreeView::TYPE_ROOT: + case TreeView::TYPE_DIRECTORY: + getChildren(*flatTree[row].node_, flatTree[row].level_ + 1, newLines); + break; + case TreeView::TYPE_FILES: + break; + } + flatTree.insert(flatTree.begin() + row + 1, newLines.begin(), newLines.end()); + } +} + + +void TreeView::reduceNode(size_t row) +{ + if (row < flatTree.size()) + { + const size_t parentLevel = flatTree[row].level_; + + bool done = false; + flatTree.erase(std::remove_if(flatTree.begin() + row + 1, flatTree.end(), + [&](const TreeLine& line) -> bool + { + if (done) + return false; + if (line.level_ > parentLevel) + return true; + else + { + done = true; + return false; + } + }), flatTree.end()); + } +} + + +int TreeView::getParent(size_t row) const +{ + if (row < flatTree.size()) + { + const size_t level = flatTree[row].level_; + + for (; row > 0; --row) + if (flatTree[row - 1].level_ < level) + return row - 1; + } + return -1; +} + + +void TreeView::updateCmpResult(bool hideFiltered, + bool leftOnlyFilesActive, + bool rightOnlyFilesActive, + bool leftNewerFilesActive, + bool rightNewerFilesActive, + bool differentFilesActive, + bool equalFilesActive, + bool conflictFilesActive) +{ + updateView([&](const FileSystemObject& fsObj) -> bool + { + if (hideFiltered && !fsObj.isActive()) + return false; + + switch (fsObj.getCategory()) + { + case FILE_LEFT_SIDE_ONLY: + return leftOnlyFilesActive; + case FILE_RIGHT_SIDE_ONLY: + return rightOnlyFilesActive; + case FILE_LEFT_NEWER: + return leftNewerFilesActive; + case FILE_RIGHT_NEWER: + return rightNewerFilesActive; + case FILE_DIFFERENT: + return differentFilesActive; + case FILE_EQUAL: + return equalFilesActive; + case FILE_CONFLICT: + case FILE_DIFFERENT_METADATA: + return conflictFilesActive; + } + assert(false); + return true; + }); +} + + +void TreeView::updateSyncPreview(bool hideFiltered, + bool syncCreateLeftActive, + bool syncCreateRightActive, + bool syncDeleteLeftActive, + bool syncDeleteRightActive, + bool syncDirOverwLeftActive, + bool syncDirOverwRightActive, + bool syncDirNoneActive, + bool syncEqualActive, + bool conflictFilesActive) +{ + updateView([&](const FileSystemObject& fsObj) -> bool + { + if (hideFiltered && !fsObj.isActive()) + return false; + + switch (fsObj.getSyncOperation()) + { + case SO_CREATE_NEW_LEFT: + case SO_MOVE_LEFT_TARGET: + return syncCreateLeftActive; + case SO_CREATE_NEW_RIGHT: + case SO_MOVE_RIGHT_TARGET: + return syncCreateRightActive; + case SO_DELETE_LEFT: + case SO_MOVE_LEFT_SOURCE: + return syncDeleteLeftActive; + case SO_DELETE_RIGHT: + case SO_MOVE_RIGHT_SOURCE: + return syncDeleteRightActive; + case SO_OVERWRITE_RIGHT: + case SO_COPY_METADATA_TO_RIGHT: + return syncDirOverwRightActive; + case SO_OVERWRITE_LEFT: + case SO_COPY_METADATA_TO_LEFT: + return syncDirOverwLeftActive; + case SO_DO_NOTHING: + return syncDirNoneActive; + case SO_EQUAL: + return syncEqualActive; + case SO_UNRESOLVED_CONFLICT: + return conflictFilesActive; + } + assert(false); + return true; + }); +} + + +void TreeView::setData(FolderComparison& newData) +{ + std::vector<TreeLine >().swap(flatTree); //free mem + std::vector<RootNodeImpl>().swap(folderCmpView); // + folderCmp = newData; +} + + +std::unique_ptr<TreeView::Node> TreeView::getLine(size_t row) const +{ + if (row < flatTree.size()) + { + const auto level = flatTree[row].level_; + + const int percent = flatTree[row].percent_; + switch (flatTree[row].type_) + { + case TreeView::TYPE_ROOT: + { + const auto* root = static_cast<const TreeView::RootNodeImpl*>(flatTree[row].node_); + return make_unique<TreeView::RootNode>(percent, getStatus(row), root->bytesGross, *(root->baseMap)); + } + break; + + case TreeView::TYPE_DIRECTORY: + { + const auto* dir = static_cast<const TreeView::DirNodeImpl*>(flatTree[row].node_); + if (auto dirObj = dynamic_cast<DirMapping*>(FileSystemObject::retrieve(dir->objId))) + return make_unique<TreeView::DirNode>(percent, level, getStatus(row), dir->bytesGross, *dirObj); + } + break; + + case TreeView::TYPE_FILES: + { + const auto* parentDir = flatTree[row].node_; + if (auto firstFile = FileSystemObject::retrieve(parentDir->firstFile)) + return make_unique<TreeView::FilesNode>(percent, level, parentDir->bytesNet, *firstFile); + } + break; + } + } + return NULL; +} + +//########################################################################################################## + +namespace +{ +const wxColour COLOR_LEVEL0(0xcc, 0xcc, 0xff); +const wxColour COLOR_LEVEL1(0xcc, 0xff, 0xcc); +const wxColour COLOR_LEVEL2(0xff, 0xff, 0x99); + +const wxColour COLOR_LEVEL3(0xcc, 0xff, 0xff); +const wxColour COLOR_LEVEL4(0xff, 0xcc, 0xff); +const wxColour COLOR_LEVEL5(0x99, 0xff, 0xcc); + +const wxColour COLOR_LEVEL6(0xcc, 0xcc, 0x99); +const wxColour COLOR_LEVEL7(0xff, 0xcc, 0xcc); +const wxColour COLOR_LEVEL8(0xcc, 0xff, 0x99); + +const wxColour COLOR_LEVEL9 (0xff, 0xff, 0xcc); +const wxColour COLOR_LEVEL10(0xcc, 0xcc, 0xcc); +const wxColour COLOR_LEVEL11(0xff, 0xcc, 0x99); + +const wxColour COLOR_PERCENTAGE_BORDER(198, 198, 198); +const wxColour COLOR_PERCENTAGE_BACKGROUND(0xf8, 0xf8, 0xf8); + +//const wxColor COLOR_TREE_SELECTION_GRADIENT_FROM = wxColor( 89, 255, 99); //green: H:88 S:255 V:172 +//const wxColor COLOR_TREE_SELECTION_GRADIENT_TO = wxColor(225, 255, 227); // H:88 S:255 V:240 +const wxColor COLOR_TREE_SELECTION_GRADIENT_FROM = getColorSelectionGradientFrom(); +const wxColor COLOR_TREE_SELECTION_GRADIENT_TO = getColorSelectionGradientTo (); + + +class GridDataNavi : private wxEvtHandler, public GridData +{ +public: + GridDataNavi(Grid& grid, const std::shared_ptr<TreeView>& treeDataView) : treeDataView_(treeDataView), + fileIcon(IconBuffer(IconBuffer::SIZE_SMALL).genericFileIcon()), + dirIcon (IconBuffer(IconBuffer::SIZE_SMALL).genericDirIcon ()), + rootBmp(GlobalResources::getImage(L"rootFolder").ConvertToImage().Scale(fileIcon.GetWidth(), fileIcon.GetHeight(), wxIMAGE_QUALITY_HIGH)), + widthNodeIcon(fileIcon.GetWidth()), + widthLevelStep(widthNodeIcon), + widthNodeStatus(GlobalResources::getImage(L"nodeExpanded").GetWidth()), + grid_(grid), + showPercentBar(true) + { + grid.getMainWin().Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(GridDataNavi::onKeyDown), NULL, this); + grid.Connect(EVENT_GRID_MOUSE_LEFT_DOWN, GridClickEventHandler(GridDataNavi::onMouseLeft ), NULL, this); + grid.Connect(EVENT_GRID_MOUSE_LEFT_DOUBLE, GridClickEventHandler(GridDataNavi::onMouseLeftDouble ), NULL, this); + grid.Connect(EVENT_GRID_COL_LABEL_MOUSE_RIGHT, GridClickEventHandler(GridDataNavi::onGridLabelContext), NULL, this ); + grid.Connect(EVENT_GRID_COL_LABEL_MOUSE_LEFT, GridClickEventHandler(GridDataNavi::onGridLabelLeftClick ), NULL, this ); + } + + void setShowPercentage(bool value) { showPercentBar = value; grid_.Refresh(); } + bool getShowPercentage() const { return showPercentBar; } + +private: + virtual size_t getRowCount() const { return treeDataView_ ? treeDataView_->linesTotal() : 0; } + + virtual wxString getValue(int row, ColumnType colType) const + { + if (treeDataView_) + { + if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(row)) + switch (static_cast<ColumnTypeNavi>(colType)) + { + case COL_TYPE_NAVI_BYTES: + return filesizeToShortString(to<Int64>(node->bytes_)); + + case COL_TYPE_NAVI_DIRECTORY: + if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get())) + { + const wxString dirLeft = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<LEFT_SIDE >(), FILE_NAME_SEPARATOR)); + const wxString dirRight = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<RIGHT_SIDE>(), FILE_NAME_SEPARATOR)); + + if (dirLeft.empty()) + return dirRight; + else if (dirRight.empty()) + return dirLeft; + else + return utf8CvrtTo<wxString>(dirLeft + L" \x2212 " + dirRight); //\x2212 = unicode minus + } + else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get())) + return utf8CvrtTo<wxString>(dir->dirObj_.getObjShortName()); + else if (dynamic_cast<const TreeView::FilesNode*>(node.get())) + return _("Files"); + break; + } + } + return wxEmptyString; + } + + virtual void renderColumnLabel(Grid& tree, wxDC& dc, const wxRect& rect, ColumnType colType, bool highlighted) + { + wxRect rectInside = drawColumnLabelBorder(dc, rect); + drawColumnLabelBackground(dc, rectInside, highlighted); + + const int COLUMN_BORDER_LEFT = 4; + + rectInside.x += COLUMN_BORDER_LEFT; + rectInside.width -= COLUMN_BORDER_LEFT; + drawColumnLabelText(dc, rectInside, getColumnLabel(colType)); + + if (treeDataView_) //draw sort marker + { + auto sortInfo = treeDataView_->getSortDirection(); + if (colType == static_cast<ColumnType>(sortInfo.first)) + { + const wxBitmap& marker = GlobalResources::getImage(sortInfo.second ? L"sortAscending" : L"sortDescending"); + wxPoint markerBegin = rectInside.GetTopLeft() + wxPoint((rectInside.width - marker.GetWidth()) / 2, 0); + dc.DrawBitmap(marker, markerBegin, true); //respect 2-pixel border + } + } + } + + static const int CELL_BORDER = 2; + + virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, int row, bool enabled, bool selected, bool hasFocus) + { + if (enabled) + { + if (selected) + dc.GradientFillLinear(rect, COLOR_TREE_SELECTION_GRADIENT_FROM, COLOR_TREE_SELECTION_GRADIENT_TO, wxEAST); + //ignore focus + else + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + } + else + clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + } + + virtual void renderCell(Grid& grid, wxDC& dc, const wxRect& rect, int row, ColumnType colType) + { + //wxRect rectTmp= drawCellBorder(dc, rect); + wxRect rectTmp = rect; + + // Partitioning: + // ___________________________________________________________________________________________ + // | space | border | percentage bar | 2 x border | node status | border |icon | border | rest | + // -------------------------------------------------------------------------------------------- + // -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft() + + if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_) + { + if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(row)) + { + ////clear first secion: + //clearArea(dc, wxRect(rect.GetTopLeft(), wxSize( + // node->level_ * widthLevelStep + CELL_BORDER + //width + // (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0) + // + // widthNodeStatus + CELL_BORDER + widthNodeIcon + CELL_BORDER, // + // rect.height)), wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + + //consume space + rectTmp.x += node->level_ * widthLevelStep; + rectTmp.width -= node->level_ * widthLevelStep; + + rectTmp.x += CELL_BORDER; + rectTmp.width -= CELL_BORDER; + + if (rectTmp.width > 0) + { + //percentage bar + if (showPercentBar) + { + const wxColour brushCol = [&]() -> wxColour + { + switch (node->level_ % 12) + { + case 0: + return COLOR_LEVEL0; + case 1: + return COLOR_LEVEL1; + case 2: + return COLOR_LEVEL2; + case 3: + return COLOR_LEVEL3; + case 4: + return COLOR_LEVEL4; + case 5: + return COLOR_LEVEL5; + case 6: + return COLOR_LEVEL6; + case 7: + return COLOR_LEVEL7; + case 8: + return COLOR_LEVEL8; + case 9: + return COLOR_LEVEL9; + case 10: + return COLOR_LEVEL10; + default: + return COLOR_LEVEL11; + } + }(); + + const wxRect areaPerc(rectTmp.x, rectTmp.y + 2, widthPercentBar, rectTmp.height - 4); + { + //background + wxDCPenChanger dummy(dc, *wxTRANSPARENT_PEN); + wxDCBrushChanger dummy2(dc, COLOR_PERCENTAGE_BACKGROUND); + dc.DrawRectangle(areaPerc); + + //inner area + dc.SetBrush(brushCol); + + wxRect areaPercTmp = areaPerc; + areaPercTmp.width -= 2; //do not include left/right border + areaPercTmp.x += 1; // + areaPercTmp.width *= node->percent_ / 100.0; + dc.DrawRectangle(areaPercTmp); + + //outer border + dc.SetPen(COLOR_PERCENTAGE_BORDER); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle(areaPerc); + } + dc.DrawLabel(toString<wxString>(node->percent_) + L"%", areaPerc, wxALIGN_CENTER); + + rectTmp.x += widthPercentBar + 2 * CELL_BORDER; + rectTmp.width -= widthPercentBar + 2 * CELL_BORDER; + } + if (rectTmp.width > 0) + { + //node status + auto drawStatus = [&](const wchar_t* image) + { + const wxBitmap& bmp = GlobalResources::getImage(image); + + wxRect rectStat(rectTmp.GetTopLeft(), wxSize(bmp.GetWidth(), bmp.GetHeight())); + rectStat.y += (rectTmp.height - rectStat.height) / 2; + + clearArea(dc, rectStat, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + drawBitmapRtlMirror(dc, bmp, rectStat, wxALIGN_CENTER, buffer); + }; + + switch (node->status_) + { + case TreeView::STATUS_EXPANDED: + drawStatus(L"nodeExpanded"); + break; + case TreeView::STATUS_REDUCED: + drawStatus(L"nodeReduced"); + break; + case TreeView::STATUS_EMPTY: + break; + } + + rectTmp.x += widthNodeStatus + CELL_BORDER; + rectTmp.width -= widthNodeStatus + CELL_BORDER; + if (rectTmp.width > 0) + { + bool isActive = true; + //icon + if (dynamic_cast<const TreeView::RootNode*>(node.get())) + drawBitmapRtlNoMirror(dc, rootBmp, rectTmp, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, buffer); + else if (auto dir = dynamic_cast<const TreeView::DirNode*>(node.get())) + { + drawIconRtlNoMirror(dc, dirIcon, rectTmp.GetTopLeft() + wxPoint(0, (rectTmp.height - dirIcon.GetHeight()) / 2), buffer); + isActive = dir->dirObj_.isActive(); + } + else if (dynamic_cast<const TreeView::FilesNode*>(node.get())) + drawIconRtlNoMirror(dc, fileIcon, rectTmp.GetTopLeft() + wxPoint(0, (rectTmp.height - fileIcon.GetHeight()) / 2), buffer); + + //convert icon to greyscale if row is not active + if (!isActive) + { + wxBitmap bmp(widthNodeIcon, rectTmp.height); + wxMemoryDC memDc(bmp); + memDc.Blit(0, 0, widthNodeIcon, rectTmp.height, &dc, rectTmp.x, rectTmp.y); //blit in + + bmp = wxBitmap(bmp.ConvertToImage().ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3)); //treat all channels equally! + memDc.SelectObject(bmp); + + dc.Blit(rectTmp.x, rectTmp.y, widthNodeIcon, rectTmp.height, &memDc, 0, 0); //blit out + } + + rectTmp.x += widthNodeIcon + CELL_BORDER; + rectTmp.width -= widthNodeIcon + CELL_BORDER; + + if (rectTmp.width > 0) + drawCellText(dc, rectTmp, getValue(row, colType), grid.IsEnabled(), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); + } + } + } + } + } + else + { + int alignment = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL; + + //have file size right-justified (but don't change for RTL languages) + if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_BYTES && grid.GetLayoutDirection() != wxLayout_RightToLeft) + { + rectTmp.width -= 2 * CELL_BORDER; + alignment = wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL; + } + else //left-justified + { + rectTmp.x += 2 * CELL_BORDER; + rectTmp.width -= 2 * CELL_BORDER; + } + + drawCellText(dc, rectTmp, getValue(row, colType), grid.IsEnabled(), alignment); + } + } + + virtual size_t getBestSize(wxDC& dc, int row, ColumnType colType) + { + // -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft() + + if (static_cast<ColumnTypeNavi>(colType) == COL_TYPE_NAVI_DIRECTORY && treeDataView_) + { + if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(row)) + return node->level_ * widthLevelStep + CELL_BORDER + (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0) + widthNodeStatus + CELL_BORDER + + widthNodeIcon + CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() + + CELL_BORDER; //additional border from right + else + return 0; + } + else + return 2 * CELL_BORDER + dc.GetTextExtent(getValue(row, colType)).GetWidth() + + 2 * CELL_BORDER; //include border from right! + } + + virtual wxString getColumnLabel(ColumnType colType) const + { + switch (static_cast<ColumnTypeNavi>(colType)) + { + case COL_TYPE_NAVI_BYTES: + return _("Size"); + case COL_TYPE_NAVI_DIRECTORY: + return _("Name"); + } + return wxEmptyString; + } + + void onMouseLeft(GridClickEvent& event) + { + if (treeDataView_) + { + bool clickOnNodeStatus = false; + if (static_cast<ColumnTypeNavi>(event.colType_) == COL_TYPE_NAVI_DIRECTORY) + if (std::unique_ptr<TreeView::Node> node = treeDataView_->getLine(event.row_)) + { + const int absX = grid_.CalcUnscrolledPosition(event.GetPosition()).x; + const wxRect cellArea = grid_.getCellArea(event.row_, event.colType_); + if (cellArea.width > 0 && cellArea.height > 0) + { + const int tolerance = 1; + const int xNodeStatusFirst = -tolerance + cellArea.x + node->level_ * widthLevelStep + CELL_BORDER + (showPercentBar ? widthPercentBar + 2 * CELL_BORDER : 0); + const int xNodeStatusLast = xNodeStatusFirst + widthNodeStatus + 2 * tolerance; + // -> synchronize renderCell() <-> getBestSize() <-> onMouseLeft() + + if (xNodeStatusFirst <= absX && absX < xNodeStatusLast) + clickOnNodeStatus = true; + } + } + //-------------------------------------------------------------------------------------------------- + + if (clickOnNodeStatus && event.row_ >= 0) + switch (treeDataView_->getStatus(event.row_)) + { + case TreeView::STATUS_EXPANDED: + return reduceNode(event.row_); + case TreeView::STATUS_REDUCED: + return expandNode(event.row_); + case TreeView::STATUS_EMPTY: + break; + } + } + event.Skip(); + } + + void onMouseLeftDouble(GridClickEvent& event) + { + if (event.row_ >= 0 && treeDataView_) + switch (treeDataView_->getStatus(event.row_)) + { + case TreeView::STATUS_EXPANDED: + return reduceNode(event.row_); + case TreeView::STATUS_REDUCED: + return expandNode(event.row_); + case TreeView::STATUS_EMPTY: + break; + } + event.Skip(); + } + + void onKeyDown(wxKeyEvent& event) + { + int keyCode = event.GetKeyCode(); + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + { + if (keyCode == WXK_LEFT) + keyCode = WXK_RIGHT; + else if (keyCode == WXK_RIGHT) + keyCode = WXK_LEFT; + else if (keyCode == WXK_NUMPAD_LEFT) + keyCode = WXK_NUMPAD_RIGHT; + else if (keyCode == WXK_NUMPAD_RIGHT) + keyCode = WXK_NUMPAD_LEFT; + } + + int row = grid_.getGridCursor().first; + if (row < 0) + { + row = 0; + grid_.setGridCursor(0); + } + else + { + if (event.ShiftDown()) + ; + else if (event.ControlDown()) + ; + else + switch (keyCode) + { + case WXK_LEFT: + case WXK_NUMPAD_LEFT: + if (treeDataView_) + switch (treeDataView_->getStatus(row)) + { + case TreeView::STATUS_EXPANDED: + return reduceNode(row); + case TreeView::STATUS_REDUCED: + case TreeView::STATUS_EMPTY: + + const int parentRow = treeDataView_->getParent(row); + if (parentRow >= 0) + grid_.setGridCursor(parentRow); + break; + } + return; //swallow event + + case WXK_RIGHT: + case WXK_NUMPAD_RIGHT: + if (treeDataView_) + switch (treeDataView_->getStatus(row)) + { + case TreeView::STATUS_EXPANDED: + grid_.setGridCursor(std::min(static_cast<int>(grid_.getRowCount()) - 1, row + 1)); + break; + case TreeView::STATUS_REDUCED: + return expandNode(row); + case TreeView::STATUS_EMPTY: + break; + } + return; //swallow event + } + } + + event.Skip(); + } + + void onGridLabelContext(GridClickEvent& event) + { + ContextMenu menu; + + //-------------------------------------------------------------------------------------------------------- + auto toggleColumn = [&](const Grid::ColumnAttribute& ca) + { + auto colAttr = grid_.getColumnConfig(); + + for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter) + if (iter->type_ == ca.type_) + { + iter->visible_ = !ca.visible_; + grid_.setColumnConfig(colAttr); + return; + } + }; + + const auto& colAttr = grid_.getColumnConfig(); + for (auto iter = colAttr.begin(); iter != colAttr.end(); ++iter) + { + const Grid::ColumnAttribute& ca = *iter; + + menu.addCheckBox(getColumnLabel(ca.type_), [ca, toggleColumn]() { toggleColumn(ca); }, + ca.visible_, ca.type_ != static_cast<ColumnType>(COL_TYPE_NAVI_DIRECTORY)); //do not allow user to hide file name column! + } + //-------------------------------------------------------------------------------------------------------- + menu.addCheckBox(_("Percentage"), [this] { setShowPercentage(!getShowPercentage()); }, getShowPercentage()); + //-------------------------------------------------------------------------------------------------------- + menu.addSeparator(); + + auto setDefaultColumns = [&] + { + setShowPercentage(defaultValueShowPercentage); + grid_.setColumnConfig(treeview::convertConfig(getDefaultColumnAttributesNavi())); + }; + menu.addItem(_("&Default"), setDefaultColumns); //'&' -> reuse text from "default" buttons elsewhere + + menu.popup(grid_); + + event.Skip(); + } + + void onGridLabelLeftClick(GridClickEvent& event) + { + if (treeDataView_) + { + const auto colTypeNavi = static_cast<ColumnTypeNavi>(event.colType_); + bool sortAscending = TreeView::getDefaultSortDirection(colTypeNavi); + + const auto sortInfo = treeDataView_->getSortDirection(); + if (sortInfo.first == colTypeNavi) + sortAscending = !sortInfo.second; + + treeDataView_->setSortDirection(colTypeNavi, sortAscending); + grid_.clearSelection(); + grid_.Refresh(); + } + } + + void expandNode(int row) + { + treeDataView_->expandNode(row); + grid_.Refresh(); //this one clears selection (changed row count) + grid_.setGridCursor(row); + //grid_.autoSizeColumns(); -> doesn't look as good as expected + } + + void reduceNode(int row) + { + treeDataView_->reduceNode(row); + grid_.Refresh(); //this one clears selection (changed row count) + grid_.setGridCursor(row); + //grid_.autoSizeColumns(); -> doesn't look as good as expected + } + + std::shared_ptr<TreeView> treeDataView_; + const wxIcon fileIcon; + const wxIcon dirIcon; + const wxBitmap rootBmp; + std::unique_ptr<wxBitmap> buffer; //avoid costs of recreating this temporal variable + const int widthNodeIcon; + const int widthLevelStep; + const int widthNodeStatus; + static const int widthPercentBar = 60; + Grid& grid_; + bool showPercentBar; +}; +} + + +void treeview::init(Grid& grid, const std::shared_ptr<TreeView>& treeDataView) +{ + grid.setDataProvider(std::make_shared<GridDataNavi>(grid, treeDataView)); + grid.showRowLabel(false); + grid.setRowHeight(IconBuffer(IconBuffer::SIZE_SMALL).getSize() + 2); //add some space +} + + +void treeview::setShowPercentage(Grid& grid, bool value) +{ + if (auto* prov = dynamic_cast<GridDataNavi*>(grid.getDataProvider())) + prov->setShowPercentage(value); + else + assert(false); +} + + +bool treeview::getShowPercentage(const Grid& grid) +{ + if (auto* prov = dynamic_cast<const GridDataNavi*>(grid.getDataProvider())) + return prov->getShowPercentage(); + assert(false); + return true; +} + + +namespace +{ +std::vector<ColumnAttributeNavi> makeConsistent(const std::vector<ColumnAttributeNavi>& attribs) +{ + std::set<ColumnTypeNavi> usedTypes; + + std::vector<ColumnAttributeNavi> output; + //remove duplicates + std::copy_if(attribs.begin(), attribs.end(), std::back_inserter(output), + [&](const ColumnAttributeNavi& a) { return usedTypes.insert(a.type_).second; }); + + //make sure each type is existing! + const auto& defAttr = getDefaultColumnAttributesNavi(); + std::copy_if(defAttr.begin(), defAttr.end(), std::back_inserter(output), + [&](const ColumnAttributeNavi& a) { return usedTypes.insert(a.type_).second; }); + + return output; +} +} + +std::vector<Grid::ColumnAttribute> treeview::convertConfig(const std::vector<ColumnAttributeNavi>& attribs) +{ + const auto& attribClean = makeConsistent(attribs); + + std::vector<Grid::ColumnAttribute> output; + std::transform(attribClean.begin(), attribClean.end(), std::back_inserter(output), + [&](const ColumnAttributeNavi& a) { return Grid::ColumnAttribute(static_cast<ColumnType>(a.type_), a.width_, a.visible_); }); + + return output; +} + + +std::vector<ColumnAttributeNavi> treeview::convertConfig(const std::vector<Grid::ColumnAttribute>& attribs) +{ + std::vector<ColumnAttributeNavi> output; + + std::transform(attribs.begin(), attribs.end(), std::back_inserter(output), + [&](const Grid::ColumnAttribute& ca) { return ColumnAttributeNavi(static_cast<ColumnTypeNavi>(ca.type_), ca.width_, ca.visible_); }); + + return makeConsistent(output); +} diff --git a/ui/tree_view.h b/ui/tree_view.h new file mode 100644 index 00000000..9f8cb526 --- /dev/null +++ b/ui/tree_view.h @@ -0,0 +1,176 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * +// ************************************************************************** + +#ifndef TREE_H_INCLUDED_841703190201835280256673425 +#define TREE_H_INCLUDED_841703190201835280256673425 + +#include <wx+/grid.h> +#include "../file_hierarchy.h" +#include "column_attr.h" +#include <zen/optional.h> + +namespace zen +{ +//tree view of FolderComparison +class TreeView +{ +public: + TreeView() : + sortColumn(defaultValueLastSortColumn), + sortAscending(defaultValueLastSortAscending) {} + + void setData(FolderComparison& newData); //set data, taking (partial) ownership + + //apply view filter: comparison results + void updateCmpResult(bool hideFiltered, + bool leftOnlyFilesActive, + bool rightOnlyFilesActive, + bool leftNewerFilesActive, + bool rightNewerFilesActive, + bool differentFilesActive, + bool equalFilesActive, + bool conflictFilesActive); + + //apply view filter: synchronization preview + void updateSyncPreview(bool hideFiltered, + bool syncCreateLeftActive, + bool syncCreateRightActive, + bool syncDeleteLeftActive, + bool syncDeleteRightActive, + bool syncDirOverwLeftActive, + bool syncDirOverwRightActive, + bool syncDirNoneActive, + bool syncEqualActive, + bool conflictFilesActive); + + enum NodeStatus + { + STATUS_EXPANDED, + STATUS_REDUCED, + STATUS_EMPTY + }; + + //--------------------------------------------------------------------- + struct Node + { + Node(int percent, size_t level, NodeStatus status, UInt64 bytes) : + percent_(percent), level_(level), status_(status), bytes_(bytes) {} + virtual ~Node() {} + + const int percent_; //[0, 100] + const size_t level_; + const NodeStatus status_; + const UInt64 bytes_; + }; + + struct FilesNode : public Node + { + FilesNode(int percent, size_t level, UInt64 bytes, FileSystemObject& firstFile) : Node(percent, level, STATUS_EMPTY, bytes), firstFile_(firstFile) {} + FileSystemObject& firstFile_; //or symlink + }; + + struct DirNode : public Node + { + DirNode(int percent, size_t level, NodeStatus status, UInt64 bytes, DirMapping& dirObj) : Node(percent, level, status, bytes), dirObj_(dirObj) {} + DirMapping& dirObj_; + }; + + struct RootNode : public Node + { + RootNode(int percent, NodeStatus status, UInt64 bytes, BaseDirMapping& baseMap) : Node(percent, 0, status, bytes), baseMap_(baseMap) {} + BaseDirMapping& baseMap_; + }; + + std::unique_ptr<Node> getLine(size_t row) const; //return NULL on error + size_t linesTotal() const { return flatTree.size(); } + + void expandNode(size_t row); + void reduceNode(size_t row); + NodeStatus getStatus(size_t row) const; + int getParent(size_t row) const; //return < 0 if none + + void setSortDirection(ColumnTypeNavi colType, bool ascending); //apply permanently! + std::pair<ColumnTypeNavi, bool> getSortDirection() { return std::make_pair(sortColumn, sortAscending); } + static bool getDefaultSortDirection(ColumnTypeNavi colType); //ascending? + +private: + struct DirNodeImpl; + + struct Container + { + Container() : firstFile(NULL) {} + UInt64 bytesGross; + UInt64 bytesNet; //files in this directory only + std::vector<DirNodeImpl> subDirs; + FileSystemObject::ObjectId firstFile; //weak pointer to first FileMapping or SymLinkMapping + }; + + struct DirNodeImpl : public Container + { + DirNodeImpl() : objId(NULL) {} + FileSystemObject::ObjectId objId; //weak pointer to DirMapping + }; + + struct RootNodeImpl : public Container + { + RootNodeImpl() {} + std::shared_ptr<BaseDirMapping> baseMap; + }; + + enum NodeType + { + TYPE_ROOT, //-> RootNodeImpl + TYPE_DIRECTORY, //-> DirNodeImpl + TYPE_FILES //-> Container + }; + + struct TreeLine + { + TreeLine(unsigned int level, int percent, const Container* node, enum NodeType type) : level_(level), percent_(percent), node_(node), type_(type) {} + + unsigned int level_; + int percent_; //[0, 100] + const Container* node_; // + NodeType type_; //we choose to increase size of "flatTree" rather than "folderCmpView" by not using dynamic polymorphism! + }; + + template <class Function> + static void extractVisibleSubtree(HierarchyObject& hierObj, Container& cont, Function includeObject); + void getChildren(const Container& cont, size_t level, std::vector<TreeLine>& output); + template <class Predicate> void updateView(Predicate pred); + void applySubView(std::vector<RootNodeImpl>&& newView); + + template <bool ascending> static void sortSingleLevel(std::vector<TreeLine>& items, ColumnTypeNavi columnType); + template <bool ascending> struct LessShortName; + + std::vector<TreeLine> flatTree; //collapsable/expandable sub-tree of partial view -> always sorted! + /* /|\ + | (update...) + | */ + std::vector<RootNodeImpl> folderCmpView; //partial view on folderCmp -> unsorted(cannot be, because of files!) + /* /|\ + | (update...) + | */ + std::vector<std::shared_ptr<BaseDirMapping>> folderCmp; //full raw data + + ColumnTypeNavi sortColumn; + bool sortAscending; +}; + + +namespace treeview +{ +void init(Grid& grid, const std::shared_ptr<TreeView>& treeDataView); + +void setShowPercentage(Grid& grid, bool value); +bool getShowPercentage(const Grid& grid); + +std::vector<Grid::ColumnAttribute> convertConfig(const std::vector<ColumnAttributeNavi >& attribs); //+ make consistent +std::vector<ColumnAttributeNavi> convertConfig(const std::vector<Grid::ColumnAttribute>& attribs); // +} +} + +#endif //TREE_H_INCLUDED_841703190201835280256673425 diff --git a/ui/wx_form_build_hide_warnings.h b/ui/wx_form_build_hide_warnings.h index 5988aa12..5b852e0f 100644 --- a/ui/wx_form_build_hide_warnings.h +++ b/ui/wx_form_build_hide_warnings.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef WX_FORM_BUILD_230948324234234 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 <vector> +#include <functional> +#include <wx/menu.h> +#include <wx/app.h> + +/* +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<void()>& 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<void()>& 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<void()>& 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<GenericCommand*>(event.m_callbackUserData)) + (cmd->fun_)(); + } + + struct GenericCommand : public wxObject + { + GenericCommand(const std::function<void()>& fun) : fun_(fun) {} + std::function<void()> 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<wxString>& filesDropped, const wxWindow& dropWindow, wxPoint dropPos) : - wxCommandEvent(FFS_DROP_FILE_EVENT), + FileDropEvent(const std::vector<wxString>& 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<wxString>& getFiles() const { return filesDropped_; } const wxWindow& getDropWindow() const { return dropWindow_; } @@ -72,13 +69,13 @@ public: private: const std::vector<wxString> 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<wxString> 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<std::wstring>(L"%3.2f", fraction * 100.0), false); + //return replaceCpy(_("%x%"), L"%x", printNumber<std::wstring>(L"%3.2f", fraction * 100.0), false); + return printNumber<std::wstring>(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<double>::infinity() : attr.minX; //automatic: ensure values are initialized by first curve double maxWndX = attr.maxXauto ? -std::numeric_limits<double>::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<double>::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<std::pair<std::vector<double>, int>> yValuesList(curves_.size()); double minWndY = attr.minYauto ? std::numeric_limits<double>::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<double>& yValues = yValuesList[j - curves_.begin()].first; //actual y-values + std::vector<double>& yValues = yValuesList[j - curves_.begin()].first; //actual y-values int offset = yValuesList[j - curves_.begin()].second; //x-value offset in pixel std::vector<wxPoint> 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 <cassert> +#include <ctime> +#include <set> +#include <wx/dcbuffer.h> //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER +#include <wx/settings.h> +#include <wx/listbox.h> +#include <wx/tooltip.h> +#include <wx/timer.h> +#include <wx/utils.h> +#include <zen/string_tools.h> +#include <zen/scope_guard.h> +#include "format_unit.h" + +#ifdef FFS_LINUX +#include <gtk/gtk.h> +#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<wxBitmap>& buffer) : wxPaintDC(&wnd) {} }; + +#else +class BufferedPaintDC : public wxMemoryDC +{ +public: + BufferedPaintDC(wxWindow& wnd, std::unique_ptr<wxBitmap>& 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<wxBitmap>& buffer_; + wxPaintDC paintDc; +}; +#endif + + +//another fix for yet another poor wxWidgets implementation (wxDCClipper does *not* stack) +hash_map<wxDC*, wxRect> 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<wxRect> 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 <class T> + 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<wxBitmap> 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<int>(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<int, int> 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<int>(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<int, int> 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<std::vector<VisibleColumn>> 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<ColAction> 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<size_t> 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<ColumnType> 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<ColAction> 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<ColumnType> 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<size_t> colWidth = refParent().getAbsoluteWidth(col, compPos)) + { + const int newWidth = std::max(COLUMN_MIN_WIDTH, activeResizing->getStartWidth() + event.GetPosition().x - activeResizing->getStartPosX()); + if (newWidth != static_cast<int>(*colWidth)) + { + refParent().setColWidth(col, compPos, newWidth); + + const Opt<ColumnType> 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<ColAction> 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<ColAction> action = refParent().clientPosToColumnAction(event.GetPosition()); + if (action) + { + const Opt<ColumnType> 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<ColumnResizing> activeResizing; + std::unique_ptr<ColumnMove> activeMove; + std::pair<int, size_t> 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<double>(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<int, size_t> 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<int>(refParent().getRowCount())); + + wxPoint cellAreaTL(refParent().CalcScrolledPosition(wxPoint(0, 0))); //client coordinates + + std::vector<std::vector<VisibleColumn>> 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<int>(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<double>(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<int>(toScrollX), static_cast<int>(toScrollY)); // + toScrollX -= static_cast<int>(toScrollX); //rounds down for positive numbers, up for negative, + toScrollY -= static_cast<int>(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<int>(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<MouseSelection> activeSelection; //bound while user is selecting with mouse + + std::pair<int, int> 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<double>( getMinAbsoluteWidthTotal()) / pixPerScrollUnitX); + const int scrollUnitsY = std::ceil(static_cast<double>(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<int> Grid::getSelectedRows(size_t compPos) const +{ + return compPos < comp.size() ? comp[compPos].selection.get() : std::vector<int>(); +} + + +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<Grid::ColumnAttribute>& attr, size_t compPos) +{ + if (compPos < comp.size()) + { + //hold ownership of non-visible columns + comp[compPos].oldColAttributes = attr; + + std::vector<VisibleColumn> 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::ColumnAttribute> Grid::getColumnConfig(size_t compPos) const +{ + if (compPos < comp.size()) + { + auto iterVcols = comp[compPos].visibleCols.begin(); + auto iterVcolsend = comp[compPos].visibleCols.end(); + + std::set<ColumnType> 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<ColumnAttribute> 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<ColumnAttribute>(); +} + + +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<std::vector<VisibleColumn>> 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<VisibleColumn>& 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::ColAction> Grid::clientPosToColumnAction(const wxPoint& pos) const +{ + const int absPosX = CalcUnscrolledPosition(pos).x; + if (absPosX >= 0) + { + int accuWidth = 0; + + std::vector<std::vector<VisibleColumn>> 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<std::vector<VisibleColumn>> 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<VisibleColumn>& 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<ColumnType> 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<std::pair<ColumnType, size_t>> Grid::getColumnAtPos(int posX) const +{ + if (posX >= 0) + { + std::vector<std::vector<VisibleColumn>> 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<size_t>(-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<int, size_t> 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<int, int> 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<std::vector<Grid::VisibleColumn>> Grid::getAbsoluteWidths() const //evaluate negative widths as stretched absolute values! structure matches "comp" +{ + std::vector<std::vector<VisibleColumn>> output; + + std::vector<std::pair<int, VisibleColumn*>> 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<VisibleColumn>()); + 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; +} @@ -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 <set> #include <memory> +#include <numeric> #include <vector> #include <wx/scrolwin.h> +#include <zen/basic_math.h> +#include <zen/optional.h> + +//a user-friendly, extensible and high-performance grid control namespace zen { +typedef enum { DUMMY_COLUMN_TYPE = static_cast<size_t>(-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<int>& widths); //set column count + widths - std::vector<int> 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<GridDataView>& dataView) { dataView_ = dataView; } + void setColumnConfig(const std::vector<ColumnAttribute>& attr, size_t compPos = 0); //set column count + widths + std::vector<ColumnAttribute> getColumnConfig(size_t compPos = 0) const; + + void setDataProvider(const std::shared_ptr<GridData>& 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<int> getSelectedRows() const; + void showScrollBars(bool horizontal, bool vertical); -private: - void onSizeEvent(wxEvent& evt) { updateWindowSizes(); } + std::vector<int> 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<std::pair<ColumnType, size_t>> 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<int, size_t> 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<int> get() const + { + std::vector<int> 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<int>(rowSelectionValue.size())); + numeric::restrict(rowLast, 0, static_cast<int>(rowSelectionValue.size())); + + std::fill(rowSelectionValue.begin() + rowFirst, rowSelectionValue.begin() + rowLast, positive); + } + + private: + std::vector<char> rowSelectionValue; //effectively a vector<bool> 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<GridData> dataView_; + Selection selection; + bool allowColumnMove; + bool allowColumnResize; + + std::vector<VisibleColumn> visibleCols; //individual widths, type and total column count + std::vector<ColumnAttribute> oldColAttributes; //visible + nonvisible columns; use for conversion in setColumnConfig()/getColumnConfig() *only*! + }; + + int getMinAbsoluteWidthTotal() const; //assigns minimum width to stretched columns + std::vector<std::vector<VisibleColumn>> getAbsoluteWidths() const; //evaluate negative widths as stretched absolute values! structure matches "comp" + + Opt<size_t> 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<ColAction> 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<ColumnType> 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<GridDataView> dataView_; + bool showScrollbarX; + bool showScrollbarY; - bool showScrollbarX; - bool showScrollbarY; + int colLabelHeight; + bool drawRowLabel; - int colLabelHeight; - int drawRowLabel; + std::vector<Component> 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 @@ -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 <memory> +#include <wx/dcmemory.h> +#include <wx/dcmirror.h> +#include <wx/image.h> +#include <wx/icon.h> +#include <wx/app.h> + +namespace zen +{ +//functions supporting right-to-left GUI layout + +void drawBitmapRtlMirror(wxDC& dc, + const wxBitmap& image, + const wxRect& rect, + int alignment, + std::unique_ptr<wxBitmap>& 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<wxBitmap>& buffer); + +void drawIconRtlNoMirror(wxDC& dc, + const wxIcon& icon, //wxDC::DrawIcon DOES mirror by default + const wxPoint& pt, + std::unique_ptr<wxBitmap>& buffer); + +wxBitmap mirrorIfRtl(const wxBitmap& bmp); + + + + + + + + + + + +//---------------------- implementation ------------------------ +namespace +{ +template <class DrawImageFun> +void drawRtlImpl(wxDC& dc, const wxRect& rect, std::unique_ptr<wxBitmap>& 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<wxBitmap>& 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<wxBitmap>& 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<wxBitmap>& 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 <wx/sizer.h> #include <wx/statbmp.h> #include <wx/settings.h> +#include <wx/app.h> +#include <wx+/image_tools.h> 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 <vssym32.h> +#include <Uxtheme.h> -+ -+#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<OpenThemeDataFun >(::GetProcAddress(lib, "OpenThemeData")); ++ CloseThemeDataFun CloseThemeData = reinterpret_cast<CloseThemeDataFun >(::GetProcAddress(lib, "CloseThemeData")); ++ GetThemeSysFontFun GetThemeSysFont = reinterpret_cast<GetThemeSysFontFun>(::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 <class T> const T& max(const T& a, const T& b, const T& c); template <class T> -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 <class InputIterator> std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, InputIterator last); @@ -131,7 +131,7 @@ const T& max(const T& a, const T& b, const T& c) template <class T> 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<double, double, bool> -{ -public: - LessMinusMedAbs(double median) : median_(median) {} - bool operator()(double lhs, double rhs) const - { - return abs(lhs - median_) < abs(rhs - median_); - } -private: - double median_; -}; - - template <class RandomAccessIterator> 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<S> com_dynamic_cast(const ComPtr<T>& 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 @@ -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<IsWow64ProcessFun> 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<GetVolumeInformationByHandleWFun> 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<CreateSymbolicLinkFunc> 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<GetFileInformationByHandleFunc> getFileInformationByHandle(L"kernel32.dll", "GetFileInformationByHandle"); @@ -335,7 +335,7 @@ struct FilePlusTraverser template <class FindData> 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 NodeT, class U> class ListIterator : public std::iterator<std::forward_iterator_tag, U> @@ -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 @@ -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 <ostream> #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<IsSameType<std::int64_t, long>::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 <class T> + Int64(T rhs, typename EnableIf<IsSignedInt<T>::result && sizeof(T) <= sizeof(std::int64_t)>::Result* = NULL) : value(static_cast<std::int64_t>(rhs)) {} - //unsafe explicit but checked conversion from arbitrary integer type - template <class T> explicit Int64(T rhs) : value(static_cast<std::int64_t>(rhs)) { checkRange<std::int64_t>(rhs); } + //unsafe explicit but checked conversion for all other integer types + template <class T> explicit Int64(T rhs, typename EnableIf<!(IsSignedInt<T>::result && sizeof(T) <= sizeof(std::int64_t))>::Result* = NULL) : value(static_cast<std::int64_t>(rhs)) { checkRange<std::int64_t>(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<IsSameType<std::uint64_t, unsigned long>::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 <class T> + UInt64(T rhs, typename EnableIf<IsUnsignedInt<T>::result && sizeof(T) <= sizeof(std::uint64_t)>::Result* = NULL) : value(static_cast<std::uint64_t>(rhs)) {} - //unsafe explicit but checked conversion from arbitrary integer type - template <class T> explicit UInt64(T rhs) : value(static_cast<std::uint64_t>(rhs)) { checkRange<std::uint64_t>(rhs); } + //unsafe explicit but checked conversion for all other integer types + template <class T> explicit UInt64(T rhs, typename EnableIf<!(IsUnsignedInt<T>::result && sizeof(T) <= sizeof(std::uint64_t))>::Result* = NULL) : value(static_cast<std::uint64_t>(rhs)) { checkRange<std::uint64_t>(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 <size_t max_path> 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<MyEnum> someFunction(); +{ + if (allIsWell) + return enumVal; + else + return NoValue(); +} + + Opt<MyEnum> optValue = someFunction(); + if (optValue) + ... use *optValue ... +*/ + +struct NoValue {}; + +template <class T> +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 @@ -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 <memory> +#if defined _MSC_VER && _MSC_VER <= 1600 +#include <set> +#include <map> +#else +#include <unordered_set> +#include <unordered_map> +#endif + //enhancements for <algorithm> @@ -36,8 +44,12 @@ template <class BidirectionalIterator1, class BidirectionalIterator2> BidirectionalIterator1 search_last(BidirectionalIterator1 first1, BidirectionalIterator1 last1, BidirectionalIterator2 first2, BidirectionalIterator2 last2); +//hash container: proper name + mitigate MSVC performance bug +template <class T> class hash_set; +template <class K, class V> class hash_map; - +template<typename T, typename Arg1> +std::unique_ptr<T> 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 T> class hash_set : public std::set<T> {}; +template <class K, class V> class hash_map : public std::map<K, V> {}; +#else +template <class T> class hash_set : public std::unordered_set<T> {}; +template <class K, class V> class hash_map : public std::unordered_map<K, V> {}; +#endif + +//as long as variadic templates are not available in MSVC +template<class T, class Arg1> inline std::unique_ptr<T> make_unique(Arg1&& arg1) { return std::unique_ptr<T>(new T(std::forward<Arg1>(arg1))); } +template<class T, class Arg1, class Arg2> inline std::unique_ptr<T> make_unique(Arg1&& arg1, Arg2&& arg2) { return std::unique_ptr<T>(new T(std::forward<Arg1>(arg1), std::forward<Arg2>(arg2))); } +template<class T, class Arg1, class Arg2, class Arg3> inline std::unique_ptr<T> make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3) { return std::unique_ptr<T>(new T(std::forward<Arg1>(arg1), std::forward<Arg2>(arg2), std::forward<Arg3>(arg3))); } +template<class T, class Arg1, class Arg2, class Arg3, class Arg4> inline std::unique_ptr<T> make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4) { return std::unique_ptr<T>(new T(std::forward<Arg1>(arg1), std::forward<Arg2>(arg2), std::forward<Arg3>(arg3), std::forward<Arg4>(arg4))); } +template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> inline std::unique_ptr<T> make_unique(Arg1&& arg1, Arg2&& arg2, Arg3&& arg3, Arg4&& arg4, Arg5&& arg5) { return std::unique_ptr<T>(new T(std::forward<Arg1>(arg1), std::forward<Arg2>(arg2), std::forward<Arg3>(arg3), std::forward<Arg4>(arg4), std::forward<Arg5>(arg5))); } + +//template<typename T, typename ...Args> inline +//std::unique_ptr<T> make_unique(Args&& ...args) +//{ +// return std::unique_ptr<T>(new T( std::forward<Args>(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 @@ -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 <class T, int N> struct RemoveArray<T[N]> { typedef T Result; }; + +//########## Sorting ############################## +/* +Generate a descending binary predicate at compile time! + +Usage: + static const bool ascending = ... + makeSortDirection(old binary predicate, Int2Type<ascending>()) -> new binary predicate + +or directly; + makeDescending(old binary predicate) -> new binary predicate +*/ + +template <class Predicate> +struct LessDescending +{ + LessDescending(Predicate lessThan) : lessThan_(lessThan) {} + template <class T> bool operator()(const T& lhs, const T& rhs) const { return lessThan_(rhs, lhs); } +private: + Predicate lessThan_; +}; + +template <class Predicate> inline +/**/ Predicate makeSortDirection(Predicate pred, Int2Type<true>) { return pred; } + +template <class Predicate> inline +LessDescending<Predicate> makeSortDirection(Predicate pred, Int2Type<false>) { return pred; } + +template <class Predicate> inline +LessDescending<Predicate> 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 @@ -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 @@ -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<boost::mutex> 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<boost::mutex> 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<const void*, size_t> VoidPtrSizeMap; - VoidPtrSizeMap activeStrings; + zen::hash_map<const void*, size_t> activeStrings; }; #endif //NDEBUG |