diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:11:09 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:11:09 +0200 |
commit | 9cc790869ed3905c78c7eeeb0bb44f800b3f2af4 (patch) | |
tree | 1c085bbf2302be294866c4fc6e0d225f8abbc346 | |
parent | 3.14 (diff) | |
download | FreeFileSync-9cc790869ed3905c78c7eeeb0bb44f800b3f2af4.tar.gz FreeFileSync-9cc790869ed3905c78c7eeeb0bb44f800b3f2af4.tar.bz2 FreeFileSync-9cc790869ed3905c78c7eeeb0bb44f800b3f2af4.zip |
3.15
95 files changed, 8564 insertions, 7041 deletions
diff --git a/Application.cpp b/Application.cpp index d22a0d8e..e87b4294 100644 --- a/Application.cpp +++ b/Application.cpp @@ -19,7 +19,7 @@ #include "library/resources.h" #include "ui/switch_to_gui.h" #include "shared/standard_paths.h" -#include "shared/localization.h" +#include "shared/i18n.h" #include "shared/app_main.h" #include <wx/sound.h> #include "shared/file_handling.h" @@ -128,7 +128,7 @@ void Application::OnStartApplication(wxIdleEvent&) } //set program language - CustomLocale::getInstance().setLanguage(globalSettings.programLanguage); + ffs3::setLanguage(globalSettings.programLanguage); if (!cfgFilename.empty()) @@ -187,7 +187,7 @@ int Application::OnRun() int Application::OnExit() { //get program language - globalSettings.programLanguage = CustomLocale::getInstance().getLanguage(); + globalSettings.programLanguage = ffs3::getLanguage(); try //save global settings to XML { @@ -209,7 +209,6 @@ void Application::runGuiMode(const wxString& cfgFileName, xmlAccess::XmlGlobalSe frame->Show(); } - void Application::runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSettings& globSettings) { using namespace xmlAccess; diff --git a/Application.h b/Application.h index 7a666223..79b4017d 100644 --- a/Application.h +++ b/Application.h @@ -24,11 +24,6 @@ private: void runGuiMode(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings& settings); void runBatchMode(const wxString& filename, xmlAccess::XmlGlobalSettings& globSettings); - virtual wxLayoutDirection GetLayoutDirection() const //disable RTL languages for now... - { - return wxLayout_LeftToRight; - } - xmlAccess::XmlGlobalSettings globalSettings; //settings used by GUI, batch mode or both int returnValue; }; diff --git a/BUILD/Changelog.txt b/BUILD/Changelog.txt index 3baa6f36..241f7a11 100644 --- a/BUILD/Changelog.txt +++ b/BUILD/Changelog.txt @@ -2,6 +2,26 @@ |FreeFileSync| -------------- +Changelog v3.15 +--------------- +Overwriting a file as fully transactional operation +Optimized synchronization speed (non-cached volumes, e.g. memory sticks in particular) +Volumes can be specified by name: [<volume-name>]\<path> (usecase: variable drive letters, RealtimeSync) +Copy NTFS compressed, encrypted and sparse file attributes +Copy NTFS compressed and encrypted directory attributes +Copy NTFS alternate data stream +Improved performance: CSV export, copy to clipboard, sync log display +Improved color theme support +Fixed crash on certain system text colors settings +Fixed progress numbers for manual deletion +Allow aborting manual deletion via escape key +Use relative name for file tooltip +Automatically redirect arrow keys to main grid +More tolerant directory creation (operation not supported/wrong parameter) +More tolerant file move: ignore existing files (user-defined deletion directory) +Added macro %weekday% + + Changelog v3.14 --------------- New keyboard shortcuts: F5: compare F6: synchronize diff --git a/BUILD/FreeFileSync.chm b/BUILD/FreeFileSync.chm Binary files differindex 700a89ba..c62dc046 100644 --- a/BUILD/FreeFileSync.chm +++ b/BUILD/FreeFileSync.chm diff --git a/BUILD/Help/FreeFileSync.hhp b/BUILD/Help/FreeFileSync.hhp index a20a4acd..d6e98272 100644 --- a/BUILD/Help/FreeFileSync.hhp +++ b/BUILD/Help/FreeFileSync.hhp @@ -24,7 +24,7 @@ html\advanced\BackupStrategy.html html\advanced\VariableDrive.html html\Overview.html html\advanced\DaylightSavingTime.html -html\advanced\EnvironmentVariables.html +html\advanced\Macros.html html\advanced\RealtimeSync.html html\advanced\ShadowCopy.html html\advanced\RunAsService.html diff --git a/BUILD/Help/Table of Contents.hhc b/BUILD/Help/Table of Contents.hhc index 1d5d7237..6e1b0357 100644 --- a/BUILD/Help/Table of Contents.hhc +++ b/BUILD/Help/Table of Contents.hhc @@ -49,10 +49,6 @@ <param name="Local" value="html\advanced\DragDrop.html"> </OBJECT> <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Environment Variables"> - <param name="Local" value="html\advanced\EnvironmentVariables.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> <param name="Name" value="Error notification"> <param name="Local" value="html\advanced\SendMail.html"> </OBJECT> @@ -65,6 +61,10 @@ <param name="Local" value="html\advanced\ExternalApp.html"> </OBJECT> <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Macros"> + <param name="Local" value="html\advanced\Macros.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> <param name="Name" value="RealtimeSync"> <param name="Local" value="html\advanced\RealtimeSync.html"> </OBJECT> diff --git a/BUILD/Help/html/Features.html b/BUILD/Help/html/Features.html index 6182e752..ac65cfc8 100644 --- a/BUILD/Help/html/Features.html +++ b/BUILD/Help/html/Features.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="20110114;15200"> + <META NAME="CHANGED" CONTENT="20110415;17504200"> <STYLE TYPE="text/css"> <!-- @page { margin: 2cm } @@ -31,11 +31,16 @@ support.</FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Network support.</FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Transactional + file copy</FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Built-in support for very long filenames (more than MAX_PATH = 260 characters).</FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Synchronization database for propagation of deleted files and conflict detection</FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Copy + NTFS alternate data stream, compressed, encrypted and sparse file + attributes</FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Support for multiple folder pairs with distinct configuration</FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Full diff --git a/BUILD/Help/html/advanced/BackupStrategy.html b/BUILD/Help/html/advanced/BackupStrategy.html index c3274e2a..25da75c5 100644 --- a/BUILD/Help/html/advanced/BackupStrategy.html +++ b/BUILD/Help/html/advanced/BackupStrategy.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="20100902;19191700"> + <META NAME="CHANGED" CONTENT="20110413;23155400"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -70,24 +70,5 @@ synchronization. In order to further automate this process, you can create a *.ffs_batch file with this configuration and choose "<I>ignore errors</I>" to avoid the warning that target directory is not (yet) existing.</FONT></P> -<P STYLE="margin-bottom: 0cm"><BR> -</P> -<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Macro -overview:</B></FONT></P> -<UL> - <P><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> - <UL> - <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%time% - - </FONT>current time, format [hhmmss], e. g. "<FONT FACE="Courier New, monospace">201340</FONT>"<BR><FONT FACE="Courier New, monospace">%date% - - </FONT>current date, e. g. "<FONT FACE="Courier New, monospace">2010-07-13</FONT>"<BR><FONT FACE="Courier New, monospace">%week% - - </FONT>calendar week, e. g. "<FONT FACE="Courier New, monospace">28</FONT>"<BR><FONT FACE="Courier New, monospace">%month% - - </FONT>current month, e. g. "<FONT FACE="Courier New, monospace">July</FONT>"<BR><FONT FACE="Courier New, monospace">%year% - - </FONT>current year, e. g. "<FONT FACE="Courier New, monospace">2010</FONT>"</FONT></P> - </UL> - </SPAN><BR CLEAR=LEFT> - </P> -</UL> -<P STYLE="margin-bottom: 0cm"><BR> -</P> </BODY> </HTML>
\ No newline at end of file diff --git a/BUILD/Help/html/advanced/Batch Scripting.html b/BUILD/Help/html/advanced/Batch Scripting.html index f7f01a05..7867597d 100644 --- a/BUILD/Help/html/advanced/Batch Scripting.html +++ b/BUILD/Help/html/advanced/Batch Scripting.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="20110203;19261600"> + <META NAME="CHANGED" CONTENT="20110405;14240200"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -31,7 +31,44 @@ order to facilitate using FreeFileSync and RealtimeSync in advanced synchronization scenarios, creating batch files is a good way to provide additional functionality. The following section will give -some general hints for custom *.cmd and *.bat files.</FONT></P> +some general hints and examples for custom *.cmd and *.bat files.</FONT></P> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<UL> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">When + starting a batch file from RealtimeSync make synchronous calls to + FreeFileSync only. This will prevent RealtimeSync continue detecting + changes while synchronization is still in progress.</FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">During + execution of a Batch file a black console window is shown. You can + hide this window by using the Visual Basic script "Invisible.vbs" + located in the FreeFileSync installation directory.</FONT></P> +</UL> +<OL> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Usage:</B></FONT></P> + <P STYLE="margin-right: 0.98cm"><SPAN ID="Rahmen7" 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">wscript C:\Program + files\FreeFileSync\Invisible.vbs C:\MyBatchFile.cmd</FONT></P> + </SPAN><BR CLEAR=LEFT> + </P> +</OL> +<UL> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync + returns with an Errorlevel below zero if unresolved problems remain:</FONT></P> +</UL> +<OL START=3> + <P><SPAN ID="Rahmen1" 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">"C:\Program + Files\FreeFileSync\FreeFileSync.exe" + "H:\Silent_Config.ffs_batch"<BR>if not errorlevel 0 + (<BR> </FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::if + something went wrong, add special treatment here<BR> </B></I></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">echo + Errors occurred during synchronization...</SPAN></SPAN></FONT></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B><BR> </B></I></FONT></FONT><FONT FACE="Courier New, monospace">pause<BR>)</FONT></P> + </SPAN><BR CLEAR=LEFT> + </P> +</OL> <P STYLE="margin-bottom: 0cm"><BR> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B> @@ -53,7 +90,7 @@ Shutdown PC after synchronization</FONT></P> A simple locking facility – (<SPAN STYLE="font-style: normal"><B>Note:</B></SPAN> <I>FreeFileSync already has a more powerful directory locking mechanism implemented that allows multiple writers in parallel</I>)</FONT></P> -<OL> +<OL START=0> <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><SPAN ID="Rahmen5" 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">:tryAgain<BR>if not exist @@ -68,38 +105,6 @@ mechanism implemented that allows multiple writers in parallel</I>)</FONT></P> /C:AB /T:5 /D:A > NUL<BR> goto tryAgain<BR>)</FONT></P> </SPAN><BR CLEAR=LEFT><FONT COLOR="#808080"> </FONT> </P> - <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">When - starting a batch file from RealtimeSync be sure to make synchronous - calls to FreeFileSync only. This will prevent RealtimeSync from - detecting changes while synchronization is still in progress.</FONT></P> - <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"></P> - <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">During - execution of a Batch file a black console window is shown. You can - hide this window by using the Visual Basic script "Invisible.vbs" - located in the FreeFileSync installation directory.</FONT></P> - <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Usage:</B></FONT></P> - <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><SPAN ID="Rahmen7" 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">wscript C:\Program - files\FreeFileSync\Invisible.vbs C:\MyBatchFile.cmd</FONT></P> - </SPAN><BR CLEAR=LEFT> - </P> -</OL> -<OL START=3> - <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">FreeFileSync - returns with an Errorlevel below zero if unresolved problems remain:</FONT></P> - <P><SPAN ID="Rahmen1" 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">"C:\Program - Files\FreeFileSync\FreeFileSync.exe" - "H:\Silent_Config.ffs_batch"<BR>if not errorlevel 0 - (<BR> </FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::if - something went wrong, add special treatment here<BR> </B></I></FONT></FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">echo - Errors occurred during synchronization...</SPAN></SPAN></FONT></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B><BR> </B></I></FONT></FONT><FONT FACE="Courier New, monospace">pause<BR>)</FONT></P> - </SPAN><BR CLEAR=LEFT> - </P> </OL> -<P STYLE="margin-bottom: 0cm"><BR> -</P> </BODY> </HTML>
\ No newline at end of file diff --git a/BUILD/Help/html/advanced/ExternalApp.html b/BUILD/Help/html/advanced/ExternalApp.html index 1dd05d4e..68f186c4 100644 --- a/BUILD/Help/html/advanced/ExternalApp.html +++ b/BUILD/Help/html/advanced/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="20101229;20324200"> + <META NAME="CHANGED" CONTENT="20110414;19310800"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -52,17 +52,21 @@ available:</FONT></P> </UL> <P STYLE="margin-bottom: 0cm"><BR> </P> -<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT></P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Examples:</B></FONT></P> <UL> <UL> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Start - associated application: <FONT FACE="Courier New, monospace">cmd /c - start "" "%name"</FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Start - visual difference tool: <FONT FACE="Courier New, monospace">C:\Program + visual difference tool:<BR><FONT FACE="Courier New, monospace">C:\Program Files\WinMerge\WinMergeU.exe "%name" "%nameCo"</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Show + file in Windows Explorer:<BR><FONT FACE="Courier New, monospace">explorer + /select, "%name"</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Open + file in associated application:<BR><FONT FACE="Courier New, monospace">cmd + /c start "" "%name"</FONT></FONT></P> <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Open - Console: <FONT FACE="Courier New, monospace">cmd /k cd /D "%dir"</FONT></FONT></P> + console dialog:<BR><FONT FACE="Courier New, monospace">cmd /k cd /D + "%dir"</FONT></FONT></P> </UL> </UL> <P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff"> diff --git a/BUILD/Help/html/advanced/EnvironmentVariables.html b/BUILD/Help/html/advanced/Macros.html index 26cffd7f..b8126555 100644 --- a/BUILD/Help/html/advanced/EnvironmentVariables.html +++ b/BUILD/Help/html/advanced/Macros.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="20100825;18572300"> + <META NAME="CHANGED" CONTENT="20110417;18595700"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -23,27 +23,28 @@ </STYLE> </HEAD> <BODY LANG="de-DE" DIR="LTR"> -<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif">Environment -Variables</FONT></H3> +<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif">Macros</FONT></H3> <P STYLE="margin-bottom: 0cm"><BR> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">All directory names may contain macros that are expanded during synchronization. Begin and end of each macro is marked by a '%' -character. Besides special macros handling time and date (see "Backup -Strategies"), the operating system's environment variables can -also be used.</FONT></P> -<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT></P> +character. Besides special macros handling time and date, the +<U>operating system's environment variables</U> can also be used.</FONT></P> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Internal +macros:</B></FONT></P> <UL> - <P><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> + <P><SPAN ID="Rahmen4" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> <UL> - <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"> - <FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">C:\Backup\%USERNAME%_Config </FONT>expands - to<FONT FACE="Courier New, monospace"><BR>C:\Backup\ZenJu_Config</FONT></FONT></P> - <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"> - <FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%APPDATA%\FreeFileSync </FONT>expands - to<FONT FACE="Courier New, monospace"><BR>C:\Documents and - Settings\ZenJu\Application Data\FreeFileSync</FONT></FONT></P> + <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%time% - + </FONT>current time, format [hhmmss], e. g. "<FONT FACE="Courier New, monospace">201340</FONT>"<BR><FONT FACE="Courier New, monospace">%weekday% - + </FONT>day of the week, e. g. "<FONT FACE="Courier New, monospace">Monday</FONT>"<BR><FONT FACE="Courier New, monospace">%date% - + </FONT>current date, e. g. "<FONT FACE="Courier New, monospace">2010-07-13</FONT>"<BR><FONT FACE="Courier New, monospace">%week% - + </FONT>calendar week, e. g. "<FONT FACE="Courier New, monospace">28</FONT>"<BR><FONT FACE="Courier New, monospace">%month% - + </FONT>current month, e. g. "<FONT FACE="Courier New, monospace">July</FONT>"<BR><FONT FACE="Courier New, monospace">%year% - + </FONT>current year, e. g. "<FONT FACE="Courier New, monospace">2010</FONT>"</FONT></P> </UL> </SPAN><BR CLEAR=LEFT> </P> @@ -58,6 +59,24 @@ add a great amount of flexibility to Batch Synchronization <P STYLE="margin-bottom: 0cm"><BR> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT></P> +<UL> + <P><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6"> + <UL> + <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"> + <FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">C:\Backup\%username%_Config </FONT>expands + to<FONT FACE="Courier New, monospace"><BR>C:\Backup\ZenJu_Config</FONT></FONT></P> + <P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"></P> + <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"> + <FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%appdata%\FreeFileSync </FONT>expands + to<FONT FACE="Courier New, monospace"><BR>C:\Documents and + Settings\ZenJu\Application Data\FreeFileSync</FONT></FONT></P> + </UL> + </SPAN><BR CLEAR=LEFT> + </P> +</UL> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT></P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The batch configuration file <FONT FACE="Courier New, monospace">C:\SyncJob.ffs_batch </FONT>contains macro <FONT FACE="Courier New, monospace">%MyVar% diff --git a/BUILD/Help/html/advanced/RealtimeSync.html b/BUILD/Help/html/advanced/RealtimeSync.html index 6acea5d5..7fb599e8 100644 --- a/BUILD/Help/html/advanced/RealtimeSync.html +++ b/BUILD/Help/html/advanced/RealtimeSync.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="20110221;19263900"> + <META NAME="CHANGED" CONTENT="20110405;14185900"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -70,13 +70,17 @@ to begin monitoring.</FONT></P> <FONT FACE="Tahoma, sans-serif">The settings dialog can be skipped by passing a RealtimeSync configuration file (<FONT FACE="Courier New, monospace">*.ffs_real</FONT>) OR a FreeFileSync batch file (<FONT FACE="Courier New, monospace">*.ffs_batch</FONT>) - as first command-line argument. This allows for integration with - the operating system's auto start facility.</FONT></P> + as first command-line argument to RealtimeSync.exe. This allows + for integration with the operating system's auto start facility.</FONT></P> <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"> <FONT FACE="Tahoma, sans-serif">Using RealtimeSync is not restricted to starting FreeFileSync. It can also be used in other scenarios, like sending an email whenever a certain directory is modified.</FONT></P> + <LI><P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"> + <FONT FACE="Tahoma, sans-serif">If you schedule a Windows batch + file (.bat, .cmd), see notes in <A HREF="Batch%20Scripting.html">Batch + Scripting</A>.</FONT></P> </UL> </SPAN><BR CLEAR=LEFT> </P> @@ -147,7 +151,5 @@ batch file similar to this one:</FONT></P> </SPAN><BR CLEAR=LEFT> </P> </UL> -<P STYLE="margin-bottom: 0cm"><BR> -</P> </BODY> </HTML>
\ No newline at end of file diff --git a/BUILD/Help/html/advanced/VariableDrive.html b/BUILD/Help/html/advanced/VariableDrive.html index 10e26e57..136b727f 100644 --- a/BUILD/Help/html/advanced/VariableDrive.html +++ b/BUILD/Help/html/advanced/VariableDrive.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="20100228;21090900"> + <META NAME="CHANGED" CONTENT="20110417;19142800"> <STYLE TYPE="text/css"> <!-- @page { margin: 2cm } @@ -13,6 +13,7 @@ H3 { margin-bottom: 0.21cm } H3.western { font-family: "Arial", sans-serif } H3.cjk { font-family: "MS Mincho" } + H3.ctl { font-family: "Mangal" } A:link { so-language: zxx } --> </STYLE> @@ -23,32 +24,39 @@ sticks with variable drive letters</FONT></H3> <P STYLE="margin-bottom: 0cm"><BR> </P> <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">USB -sticks often have different volume names assigned to them when -plugged into two distinct computers. In order to handle this -flexibility FreeFileSync is able to process directory names relative -to the current working directory.</FONT></P> +sticks often get different volume names assigned when plugged into +distinct computers. FreeFileSync offers two solutions to handle this +issue:</FONT></P> <P STYLE="margin-bottom: 0cm"><BR> </P> -<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Thus -the following workflow is possible:</FONT></P> +<OL> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Specify + a directory via volume name: Syntax: [<volume name>]\<path></FONT></P> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Example: + Use "</FONT><FONT FACE="Courier New, monospace">[ZenJu-USB]\directory</FONT><FONT FACE="Tahoma, sans-serif">" + instead of "</FONT><FONT FACE="Courier New, monospace">E:\directory</FONT><FONT FACE="Tahoma, sans-serif">" + where "</FONT><FONT FACE="Courier New, monospace">ZenJu-USB</FONT><FONT FACE="Tahoma, sans-serif">" + is the name of the USB stick.</FONT></P> +</OL> +<P STYLE="margin-bottom: 0cm"><BR> +</P> +<OL START=2> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Use + a relative directory name:</FONT></P> +</OL> <UL> - <OL> - <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Replace - the absolute USB directory name in your configuration by a relative - one:<BR>E.g. "<FONT FACE="Courier New, monospace">E:\SyncDir</FONT>" - -> "<FONT FACE="Courier New, monospace">\SyncDir</FONT>"</FONT></P> - <P STYLE="margin-bottom: 0cm"></P> - <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Save - and copy synchronization settings to the USB stick: - "</FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>E:\settings.ffs_gui"</FONT></FONT></FONT></P> - <P STYLE="margin-bottom: 0cm"></P> - <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">"Start - FreeFileSync by double-clicking on "</FONT><FONT FACE="Courier New, monospace">E:\settings.ffs_gui</FONT><FONT FACE="Tahoma, sans-serif">"<BR>=> - Working directory automatically is set to "</FONT><FONT FACE="Courier New, monospace">E:\</FONT><FONT FACE="Tahoma, sans-serif">" - by the operating system so that "</FONT><FONT FACE="Courier New, monospace">\SyncDir</FONT><FONT FACE="Tahoma, sans-serif">" - is interpreted as "</FONT><FONT FACE="Courier New, monospace">E:\SyncDir</FONT><FONT FACE="Tahoma, sans-serif">" - during synchronization.</FONT></P> - </OL> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Example: + Use "</FONT><FONT FACE="Courier New, monospace">\directory</FONT><FONT FACE="Tahoma, sans-serif">" + instead of "</FONT><FONT FACE="Courier New, monospace">E:\directory</FONT><FONT FACE="Tahoma, sans-serif">"</FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Save + and copy synchronization settings to the USB stick: + "</FONT><FONT COLOR="#000000"><FONT FACE="Courier New, monospace"><FONT SIZE=3>E:\settings.ffs_gui"</FONT></FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Start + FreeFileSync by double-clicking on "</FONT><FONT FACE="Courier New, monospace">E:\settings.ffs_gui</FONT><FONT FACE="Tahoma, sans-serif">"<BR>=> + Working directory is automatically set to "</FONT><FONT FACE="Courier New, monospace">E:\</FONT><FONT FACE="Tahoma, sans-serif">" + by the operating system so that "</FONT><FONT FACE="Courier New, monospace">\directory</FONT><FONT FACE="Tahoma, sans-serif">" + is resolved as "</FONT><FONT FACE="Courier New, monospace">E:\directory</FONT><FONT FACE="Tahoma, sans-serif">" + during synchronization.</FONT></P> </UL> </BODY> </HTML>
\ No newline at end of file diff --git a/BUILD/Languages/dutch.lng b/BUILD/Languages/dutch.lng index 82e21fb4..153b9469 100644 --- a/BUILD/Languages/dutch.lng +++ b/BUILD/Languages/dutch.lng @@ -15,7 +15,7 @@ %x day(s) %x dag(en) %x directories -%x paden +%x mappen %x files %x bestanden %x hour(s) @@ -25,9 +25,9 @@ %x min %x min %x of %y rows in view -%x van de %y rijen in zicht +%x van de %y zichtbare rijen %x of 1 row in view -%x van 1 rij in zicht +%x van 1 zichtbare rij %x sec %x sec %x% @@ -43,9 +43,9 @@ &Check for new version &Controleer op nieuwe versie &Content -&Help artikelen +&Inhoud &Create batch job... -&Creëer batchjob... +&Creëer taaklijst... &Default &Standaard &Exit @@ -67,7 +67,7 @@ &Load &Laden &Load configuration... -&Laad de configuratie... +&Laad configuratie... &New &Nieuw &No @@ -75,7 +75,7 @@ &OK &OK &Pause -&Pause +&Pauze &Program &Programma &Quit @@ -93,11 +93,11 @@ (Build: %x) (Build: %x) (Requires an Internet connection!) -(Vereist een internetverbinding) +(Vereist een internetverbinding!) - Other side's counterpart to %dir -- Tegenhander andere kant naar %dir +- Tegenhanger andere zijde naar %dir - Other side's counterpart to %name -- Tegenhanger andere kant naar %naam +- Tegenhanger andere zijde naar %naam - conflict - conflict - conflict (same date, different size) @@ -113,7 +113,7 @@ - exists right only - bestaat alleen rechts - full file or directory name -- volledige map of bestandsnaam +- volledig bestand of mapnaam - left - links - left newer @@ -125,13 +125,13 @@ /sec /sec 1 directory -1 pad +1 map 1 file 1 bestand 1. &Compare 1. &Vergelijk 1. Enter relative file or directory names separated by ';' or a new line. -1. Vul de relatieve bestandsnaam of map in, gescheiden bij ';' of een nieuwe regel. +1. Vul de relatieve bestands- of mapnaam in, gescheiden door ';' of een nieuwe regel. 1. Select directories to monitor. 1. Selecteer mappen om te observeren. 2. &Synchronize... @@ -139,21 +139,21 @@ 2. Enter a command line. 2. Geef een opdrachtregel in. 2. Use wildcard characters '*' and '?'. -2. U kunt gebruik maken van wildcard karakters zoals '*' en '?'. +2. Gebruik wildcard karakters zoals '*' en '?'. 3. Exclude files directly on main grid via context menu. -3. Sluit bestanden direct uit in het hoofscherm via een contextmenu +3. Sluit bestanden in het hoofdscherm direct uit via het contextmenu 3. Press 'Start'. 3. Klik op 'Start'. <Automatic> <Automatisch> <Directory> -<Pad> +<Map> <Last session> <Laatste sessie> <Symlink> <Symlink> <multiple selection> -<veelvoudige selectie> +<meervoudige selectie> A directory input field is empty. Een tekstveld over de map is leeg. A directory will be modified which is part of multiple folder pairs! Please review synchronization settings! @@ -161,9 +161,9 @@ Een map wordt bewerkt die deel is van meerdere mappen! Controleer de synchronisa A newer version of FreeFileSync is available: Een nieuwe versie van FreeFileSync is beschikbaar: Abort requested: Waiting for current operation to finish... -Bezig met afbreken: wachten op beëindigen huidige handeling... +Bezig met afbreken: Wacht op beëindiging huidige bewerking... Abort synchronization immediately -Stop synchronistatie onmiddelijk +Stop synchronisatie onmiddelijk Aborted Afgebroken About @@ -173,43 +173,45 @@ Actie Add folder Map toevoegen Add folder pair -Voeg 1 paar gekoppelde mappen toe +Voeg gekoppelde mappen toe All directories in sync! -Alle paden zijn gesynchroniseerd! +Alle mappen zijn gesynchroniseerd! An exception occurred! Er heeft een uitzondering plaatsgevonden! As a result the files are separated into the following categories: -Hierdoor worden de bestanden gescheiden in de volgende categorieën: +Als resultaat worden de bestanden in de volgende categorieën gescheiden: As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller: -Zoals de naam suggereert, worden twee bestanden met dezelfde naam alleen gemarkeerd als gelijk, als ze precies dezelfde inhoud hebben. Deze optie is handig voor een consistentiecontrole in plaats van back-up handelingen. Daarom worden de tijdstempels niet bekeken.\n\n Met deze optie aan is de beslissingsboom korter: +Zoals de naam suggereert worden twee bestanden met dezelfde naam alleen als gelijk bestempeld als ze precies dezelfde inhoud hebben. Deze optie is handig voor een consistentiecontrole in plaats van back-up handelingen. Daarom worden de tijdstempels niet bekeken.\n\n Met deze optie geselecteerd is de beslissingsboom korter: Assemble a batch file for automated synchronization. To start in batch mode simply pass the name of the file to the FreeFileSync executable: FreeFileSync.exe <batchfile>. This can also be scheduled in your operating system's task planner. -Assembleer een batchbestand voor automatische synchronisatie. Om te starten in batchmodus is het voldoende om de bestandsnaam achter de FreeFileSync toepassing te zetten: FreeFileSync.exe <batchbestand>. Het is mogelijk dit in te plannen in de systeemplanner. +Creëer een taakbestand voor automatische synchronisatie. Om in taakmodus te starten is het voldoende om de bestandsnaam achter de FreeFileSync toepassing te zetten: FreeFileSync.exe <taakbestand>. Het is ook mogelijk dit in de systeemtaakplanner in te plannen. At least one directory input field is empty. -Er is minimaal één locatie-veld leeg. +Er is minimaal één map invoer-veld leeg. Auto-adjust columns Kolommen automatisch aanpassen Batch execution -Batch taak uitvoeren +Taak uitvoeren Batch file created successfully! -Batchbestand is succesvol aangemaakt! +Taakbestand is succesvol aangemaakt! Batch job -Batch taak +Taaklijst Big thanks for localizing FreeFileSync goes out to: Extra dank voor het vertalen van FreeFileSync gaat naar: Both sides have changed since last synchronization! -Beide zijden zijn veranderd sinds de laatste synchronisatie! +Beide zijdes zijn veranderd sinds de laatste synchronisatie! Browse -Map opzoeken +Verkennen Browse directory -Doorzoek map +Verken map Cannot determine sync-direction: Kan de synchronisatie-richting niet bepalen: Cannot find %x Kan %x niet vinden +Cannot write to empty directory path! + Category Categorie Clear filter settings -Leeg filter instellingen +Verwijder filter instellingen Comma separated list Komma gescheiden lijst Command line @@ -219,7 +221,7 @@ Opdrachtregel is leeg! Compare Vergelijk Compare both sides -Beide zijden vergelijken +Vergelijk beide zijdes Compare by \"File content\" Vergelijk met \"bestandsinhoud\" Compare by \"File size and date\" @@ -231,7 +233,7 @@ De inhoud van %x bestanden wordt vergeleken Comparing content... Inhoud vergelijken... Comparing files by content failed. -Vergelijken van bestanden met de inhoud is mislukt. +Bestand-inhoudvergelijking mislukt. Comparison Result Resultaat vergelijken Comparison settings @@ -247,7 +249,7 @@ Configuratie overzicht: Configuration saved! Configuratie opgeslagen! Configure filter -Configuratie filter +Filter configuratie Configure your own synchronization rules. Configureer uw eigen synchronisatieregels. Confirm @@ -259,13 +261,13 @@ Conflicten/bestanden die niet kunnen worden gecategoriseerd Continue Doorgaan Conversion error: -Fout bij het converteren: +Converteer fout: Copy attributes only from left to right Kopieer attributen alleen van links naar rechts Copy attributes only from right to left Kopieer attributen alleen van rechts naar links Copy filesystem permissions -Kopieer bestandsmachtigingen +Kopieer bestandssysteem toegangsrechten Copy from left to right Kopieer van links naar rechts Copy from left to right overwriting @@ -275,31 +277,31 @@ Kopieer van rechts naar links Copy from right to left overwriting Kopieer en overschrijf van rechts naar links Copy locked files -Kopieer 'alleen lezen' bestanden +Kopieer vergrendelde bestanden Copy new or updated files to right folder. Kopieer nieuwe of geupdate bestanden naar de rechter map. Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights) -Kopieer gedeelde of beveiligde bestanden met Volume Shadow Copy Service\n(Heeft administrator rechten nodig) +Kopieer gedeelde of vergrendelde bestanden met Volume Shadow Copy Service\n(Vereist Administrator rechten) Copy to clipboard\tCTRL+C Kopieer naar het klembord\tCTRL+C Copying new Symbolic Link %x to %y -Kopieer nieuw symbolische link van %x naar %y +Kopieer nieuwe Symbolische Link van %x naar %y Copying new file %x to %y -Kopieer nieuw bestand van %x naar %y +Kopieert nieuw bestand van %x naar %y Could not determine volume name for file: Kon de schijfnaam niet vaststellen van bestand: Could not initialize directory monitoring: -Initaliseren van locatie-observatie niet mogelijk: +Initaliseren van map-observatie niet mogelijk: Could not load a required DLL: Kon een benodigde DLL niet laden: Could not read values for the following XML nodes: Kon geen waarden inlezen voor de volgende XML punten: Create a batch job -Creëer batchjob +Creëer een taaklijst Creating folder %x Map %x wordt aangemaakt Custom -Eigen regels +Aangepast Customize columns Aanpassen kolommen Customize... @@ -313,49 +315,49 @@ Dataverificatie-fout: Bron en doelbestand hebben verschillende inhoud! Date Datum Delete files/folders existing on left side only -Verwijder bestanden/folders die alleen links bestaan +Verwijder bestanden/mappen die alleen aan de linkerzijde voorkomen Delete files/folders existing on right side only -Verwijder bestanden/folders die alleen rechts bestaan +Verwijder bestanden/mappen die alleen aan de rechterzijde voorkomen Delete files\tDEL Verwijder bestanden\tDEL Delete on both sides -Verwijder aan beide kanten +Verwijder aan beide zijdes Delete on both sides even if the file is selected on one side only -Verwijder aan beide kanten ookal is het bestand maar aan één kant geselecteerd +Verwijder aan beide zijdes ook al is het bestand maar aan één zijde geselecteerd Delete or overwrite files permanently Verwijder of overschrijf bestanden onomkeerbaar Delete permanently Verwijder onomkeerbaar Deleting Symbolic Link %x -Verwijderen symbolische link %x +Verwijderen van Symbolische Link %x Deleting file %x -Bestand %x wordt verwijderd +Verwijderen van bestand %x Deleting folder %x -Map %x wordt verwijderd +Verwijderen van map %x Deletion handling Verwijder-afhandeling Description -Beschrijving +Omschrijving Direct Direct Directories are dependent! Be careful when setting up synchronization rules: Mappen zijn afhankelijk van elkaar! Wees voorzichtig met het maken van synchronisatieregels: Directories to watch -Paden om te controleren +Mappen om te bekijken Directory -Pad +Map Directory does not exist: -Pad bestaat niet: +Map bestaat niet: Do not show this dialog again -Deze melding niet meer weergeven +Toon deze melding niet meer Do nothing Geen actie ondernemen Do you really want to delete the following object(s)? -Weet u zeker dat u de volgende bestanden wilt verwijderen? +Weet u zeker dat u het/de volgende bestand(en) wilt verwijderen? Do you really want to move the following object(s) to the Recycle Bin? -Weet u zeker dat u de/het volgende bestand(en) wilt verplaatsen naar de prullenbak? +Weet u zeker dat u het/de volgende bestand(en) naar de prullenbak wilt verplaatsen? Do you want FreeFileSync to automatically check for updates every week? -Wilt u FreeFileSync automatisch elke week laten controleren of er een nieuwe versie is? +Wilt u FreeFileSync elke week automatisch laten controleren of er een nieuwe versie is? Donate with PayPal Doneer met PayPal Download now? @@ -363,89 +365,89 @@ Nu downloaden? Drag && drop Drag en drop Elements found: -Elementen gevonden: +Onderdelen gevonden: Elements processed: -Elementen verwerkt: +Onderdelen verwerkt: Elements remaining: -Elementen te gaaan: +Onderdelen te gaan: Email E-mail Encoding extended time information: %x Coderen uitgebreide tijd informatie: %x Endless loop when traversing directory: -Oneindige lus bij het nalopen van locatie: +Oneindige lus bij het doorlopen van map: Equal files/folders that differ in attributes only Alleen gelijke bestanden/mappen die verschillen van attributen Error Fout Error changing modification time: -Er is een fout opgetreden bij het aanpassen van de bestandstijd: +Fout tijdens aanpassing van de wijzigingstijd: Error copying file permissions: -Error kopieren van bestandspremissies: +Fout tijdens kopiëren van bestandspermissies: Error copying file: -Er is een fout opgetreden bij het kopiëren van bestand: +Fout tijdens kopiëren van bestand: Error copying locked file %x! -Er is een fout opgetreden bij het kopiëren van %x omdat het bestand in gebruik is! +Fout tijdens kopiëren van vergrendeld bestand %x! Error copying symbolic link: -Error kopieren symbolische link: +Fout tijdens kopiëren van symbolische koppeling: Error creating directory: -Er is een fout opgetreden bij het aanmaken van pad: +Fout tijdens het aanmaken van map: Error deleting directory: -Er is een fout opgetreden bij het verwijderen van pad: +Fout tijdens het verwijderen van map: Error deleting file: -Er is een fout opgetreden bij het verwijderen van bestand: +Fout tijdens verwijderen van bestand: Error handling Fout afhandeling Error loading library function: -Er is een fout opgetreden bij het laden van de 'library function': +Fout tijdens laden van bibliotheek functie: Error moving directory: -Er is een fout opgetreden bij het verplaatsen van locatie: +Fout tijdens verplaatsen van map: Error moving file: -Er is een fout opgetreden bij het verplaatsen van bestand: +Fout tijdens verplaatsen van bestand: Error moving to Recycle Bin: -Er is een fout opgetreden bij het verplaatsen naar de prullenbak: +Fout tijdens verplaatsen naar prullenbak: Error opening file: -Er is een fout opgetreden bij het openen van het bestand: +Fout tijdens openen van bestand: Error parsing configuration file: -Er is een fout opgetreden bij het aanmaken van configuratiebestand: +Fout tijdens verwerking configuratiebestand: Error reading file attributes: -Er is een fout opgetreden bij het lezen van de bestands-eigenschappen +Fout tijdens lezen van bestandsattributen Error reading file: -Er is een fout opgetreden bij het lezen van het bestand: +Fout tijdens lezen van bestand: Error reading from synchronization database: -Er is een fout opgetreden bij het lezen van de synchronisatie-database: +Fout tijdens uitlezen van synchronisatie-database: Error reading security context: -Error bij lezen van de beveiliging: +Fout tijdens lezen van beveiligingscontext: Error resolving symbolic link: -Er is een fout opgetreden bij het ophalen van een symbolische koppeling: +Fout tijdens opzoeken van symbolische koppeling: Error setting directory lock: -Error instelling van map slot: +Fout tijdens mapvergrendeling: Error setting privilege: -Error instelling van premissies: +Fout tijdens instellen van privileges: Error starting Volume Shadow Copy Service! -Er is een fout opgetreden bij het starten van de Volume Schadow Copy Service! +Fout tijdens het opstarten van de Volume Shadow Copy Service! Error traversing directory: -Er is een fout opgetreden bij het doorzoeken van map: +Fout tijdens doorzoeken van map: Error when monitoring directories. -Er is een fout opgetreden bij het observeren van locaties. +Fout tijdens observeren van mappen. Error writing file: -Er is een fout opgetreden bij het schrijven naar bestand: +Fout tijdens schrijven van bestand: Error writing security context: -Error met het schrijven van de beveiliging: +Fout tijdens schrijven van beveiligingscontext: Error writing to synchronization database: -Er is een fout opgetreden bij het schrijven naar de synchronisatie-database: +Fout tijdens schrijven naar synchronisatie-database: Example Voorbeeld Exclude Uitsluiten Exclude all rows -Alle rijen uitsluiten +Sluit alle rijen uit Exclude temporarily -Tijdelijk uitsluiten +Sluit tijdelijk uit Exclude via filter: -Uitsluiten door filter: +Sluit via filter uit: Exit instantly -Sluit gelijk af +Sluit meteen af Extension Extensie External applications @@ -457,11 +459,11 @@ Tips en suggesties zijn welkom op: File %x has an invalid date! Bestand %x heeft een ongeldige datum! File already exists. Overwrite? -Het bestand bestaat al. Overschrijven? +Bestand bestaat al. Overschrijven? File content Bestandsinhoud File does not exist: -Het bestand bestaat niet: +Bestand bestaat niet: File list exported! Bestandslijst geëxporteerd! File size and date @@ -469,29 +471,29 @@ Bestandsgrootte en -datum Filename Bestandsnaam Files %x have the same date but a different size! -De bestanden %x hebben dezelfde data maar een afwijkende grootte! +Bestanden %x hebben dezelfde datums maar een afwijkende grootte! Files are found equal if\n - file content\nis the same -Bestanden worden gelijk beschouwd als,\n - de inhoud\novereenkomt +Bestanden worden als gelijk beschouwd indien,\n - de bestandsinhoud\novereenkomt Files are found equal if\n - filesize\n - last write time and date\nare the same -Bestanden worden gelijk beschouwd als,\n - de grootte\n - datum en tijdstip van de laatste wijziging\novereenkomt +Bestanden worden als gelijk beschouwd indien,\n - de bestandsgrootte\n - laatste wijzigingstijd en datum\novereenkomt Files that are equal on both sides -Bestanden die aan beide kanten gelijk zijn +Bestanden die aan beide zijdes gelijk zijn Files that exist on both sides, left one is newer -Bestanden die aan beide kanten bestaan, maar waarvan de linkerkant nieuwer is +Bestanden die aan beide zijdes bestaan, maar waarvan de linkerzijde nieuwer is Files that exist on both sides, right one is newer -Bestanden die aan beide kanten bestaan, maar waarvan de rechterkant nieuwer is +Bestanden die aan beide zijdes bestaan, maar waarvan de rechterzijde nieuwer is Files that have different content -Bestanden dat andere inhoud hebben +Bestanden die andere inhoud hebben Files/folders that exist on left side only -Bestanden/mappen die alleen aan de linkerkant bestaan +Bestanden/mappen die alleen aan de linkerzijde bestaan Files/folders that exist on right side only -Bestanden/mappen die alleen aan de rechterkant bestaan +Bestanden/mappen die alleen aan de rechterzijde bestaan Filter files Filter bestanden Filter is active -Filer is actief +Filter is actief Filter settings have changed! -Filter instellingen opgeslagen! +Filter instellingen zijn veranderd! Filter: All pairs Filter: Alle paren Filter: Single pair @@ -503,7 +505,7 @@ Vind wat: Folder Comparison and Synchronization Mappen vergelijken en synchroniseren Folder pairs -Paren mappen +Map paren Follow Volg Free disk space available: @@ -511,21 +513,21 @@ Beschikbare vrije schijfruimte : Free disk space required: Vrije ruimte op harde schrijf nodig: FreeFileSync Batch Job -FreeFileSync batchjob +FreeFileSync Taaklijst FreeFileSync at Sourceforge FreeFileSync op Sourceforge FreeFileSync batch file -FreeFileSync batchbestand +FreeFileSync taakbestand FreeFileSync configuration FreeFileSync configuratie FreeFileSync is up to date! U gebruikt de nieuwste versie van FreeFileSync! Full path -Volledige bestandslocatie +Volledig pad Generating database... -Database genereren... +Genereren van database... Generating file list... -Bestandslijst genereren... +Genereren van bestandslijst... Global settings Algemene instellingen Help @@ -533,65 +535,65 @@ Help Hidden dialogs: Verborgen dialogen: Hide all error and warning messages -Verberg alle foutmeldingen en waarschuwingen +Verberg alle fout- en waarschuwingsberichten Hide conflicts Verberg conflicten Hide excluded items Verberg uitgesloten items Hide files that are different -Verberg bestanden die verschillend zijn +Verberg bestanden die verschillen Hide files that are equal Verberg bestanden die gelijk zijn Hide files that are newer on left -Verberg bestanden die aan de linkerkant nieuwer zijn +Verberg bestanden die aan de linkerzijde nieuwer zijn Hide files that are newer on right -Verberg bestanden die aan de rechterkant nieuwer zijn +Verberg bestanden die aan de rechterzijde nieuwer zijn Hide files that exist on left side only -Verberg bestanden die alleen aan de linkerkant bestaan +Verberg bestanden die alleen aan de linkerzijde bestaan Hide files that exist on right side only -Verberg bestanden die alleen aan de rechterkant bestaan +Verberg bestanden die alleen aan de rechterzijde bestaan Hide files that will be created on the left side -Verberg bestanden die zullen worden aangemaakt aan de linkerkant +Verberg bestanden die aan de linkerzijde zullen worden aangemaakt Hide files that will be created on the right side -Verberg bestanden die zullen worden aangemaakt aan de rechterkant +Verberg bestanden die aan de rechterzijde zullen worden aangemaakt Hide files that will be deleted on the left side -Verberg bestanden die zullen worden verwijderd aan de linkerkant +Verberg bestanden die aan de linkerzijde zullen worden verwijderd Hide files that will be deleted on the right side -Verberg bestanden die zullen worden verwijderd aan de rechterkant +Verberg bestanden die aan de rechterzijde zullen worden verwijderd Hide files that will be overwritten on left side -Verberg bestanden die zullen worden overschreven aan de linkerkant +Verberg bestanden die aan de linkerzijde zullen worden overschreven Hide files that will be overwritten on right side -Verberg bestanden die zullen worden overschreven aan de rechterkant +Verberg bestanden die aan de rechterzijde zullen worden overschreven Hide files that won't be copied Verberg bestanden die niet zullen worden gekopieerd Hide filtered or temporarily excluded files Verberg gefilterde of tijdelijk uitgesloten bestanden Hide further error messages during the current process -Volgende foutmeldingen niet meer weergeven tijdens de huidige handeling +Verberg eventuele foutmeldingen gedurende de huidige bewerking Hints: Tips: Homepage Homepage Identify and propagate changes on both sides using a database. Deletions and conflicts are detected automatically. -Identificeer en verwerk verandereringen aan beide kanten dmv een database. Verschillen en conflicten worden automatisch gedecteerd. +Identificeer en verwerk veranderingen aan beide zijdes dmv een database. Verwijderingen en conflicten worden automatisch gedetecteerd. Idle time between detection of last change and execution of command line in seconds -Inactieve tijd tussen de detectie van de laatste verandering en het uitvoeren van een command in seconden +Aantal inactieve seconden tussen detectie van de laatste verandering en uitvoering van een commando If you like FFS -Als het FreeFileSync u bevalt +Indien FreeFileSync u bevalt Ignore Negeer Ignore errors Negeer foutmeldingen Ignore subsequent errors -Negeer verdere foutmeldingen +Negeer erop volgende foutmeldingen Include -Gebruiken +Opnemen Include all rows -Alle rijen gebruiken +Alle rijen opnemen Include temporarily -Tijdelijk bijsluiten +Tijdelijk opnemen Include: *.doc;*.zip;*.exe\nExclude: \\stuff\\temp\\* -Bijsluiten: *.doc;*.zip;*.exe\nUitsluiten: \\stuff\\temp\\* +Opnemen: *.doc;*.zip;*.exe\nUitsluiten: \\stuff\\temp\\* Incompatible synchronization database format: Opmaak van synchronisatie-database komt niet overeen: Info @@ -603,11 +605,11 @@ Initiële synchronisatie: Integrate external applications into context menu. The following macros are available: Integreer externe applicaties in het context menu. De volgende macros zijn beschikbaar: Invalid FreeFileSync config file! -FreeFileSync config bestand klopt niet! +Foutief FreeFileSync configuratiebestand! Last used configurations (press DEL to remove from list) Laatst gebruikte instellingen (druk op DEL om iets te verwijderen) Leave as unresolved conflict -Beschouwen als onopgelost conflict +Beschouw als onopgelost conflict Left Links Legend @@ -621,7 +623,7 @@ Loggen Main bar Hoofdbalk Making shadow copies on WOW64 is not supported. Please use FreeFileSync 64-bit version. -Schaduw kopieen op WOW64 worden niet ondersteund. Gebruik alstublieft de 64-bit versie van FreeFileSync. +Het aanmaken van schaduwkopieën op WOW64 wordt niet ondersteund. Gebruik alstublieft de 64-bit versie van FreeFileSync. Match case Hoofdlettergevoelig Maximum number of logfiles: @@ -637,21 +639,21 @@ Spiegel backup van linker map. Rechter map is bewerk om precies hetzelfde te heb Monitoring active... Observeren actief... More than 50% of the total number of files will be copied or deleted! -Meer dan 50% van alle bestanden zal worden gekopieerd of verwijderd! +Meer dan 50% van alle bestanden zal gekopieerd of verwijderd worden! Move column down Verplaats kolom naar beneden Move column up Verplaats kolom naar boven Move files into a time-stamped subdirectory -Verplaats de bestanden in een tijd-gemarkeerde sublocatie +Verplaats de bestanden naar een tijd-gemarkeerde submap Moving %x to Recycle Bin -%x aan het verplaatsen naar de Prullenbak +Verplaatst %x naar de Prullenbak Moving Symbolic Link %x to user-defined directory %y -Verplaatsen symbolische link %x naar map %y +Verplaatst Symbolische Koppeling %x naar een door de gebruiker gedefinieerde map %y Moving file %x to user-defined directory %y -Verplaatsen bestand %x naar een door de gebruiker gedefinieerde locatie %y +Verplaatst bestand %x naar een door de gebruiker gedefinieerde map %y Moving folder %x to user-defined directory %y -Verplaatsen map %x naar een door de gebruiker gedefinieerde locatie %y +Verplaatst map %x naar een door de gebruiker gedefinieerde map %y Multiple... Meerdere... No change since last synchronization! @@ -659,87 +661,87 @@ Geen veranderingen sinds de laatste synchronisatie! No filter selected Geen filter geselecteerd Not enough free disk space available in: -Niet genoeg schijfruimte beschikbaar op: +Niet genoeg vrije schijfruimte beschikbaar op: Nothing to synchronize according to configuration! -Volgens de gebruikte configuratie hoeft er niks gesynchroniseerd te worden! +Volgens de configuratie hoeft er niets gesynchroniseerd te worden! Number of files and directories that will be created -Aantal mappen en bestanden die zullen worden aangemaakt +Aantal bestanden en mappen die aangemaakt zullen worden Number of files and directories that will be deleted -Aantal mappen en bestanden die zullen worden verwijderd +Aantal bestanden en mappen die verwijderd zullen worden Number of files that will be overwritten -Aantal bestanden dat zal worden overschreven +Aantal bestanden die overschreven zullen worden One of the FreeFileSync database entries within the following file is not yet existing: -Een van de FreeFileSync databasegegevens met dit bestand bestaat nog niet: +Eén van de FreeFileSync database ingangen van het volgende bestand bestaat nog niet: One of the FreeFileSync database files is not yet existing: -Een van de FreeFileSync database bestanden bestaat nog niet: +Eén van de FreeFileSync database bestanden bestaat nog niet: Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories. -Alleen bestanden /locatie die niet worden gefilterd zullen worden gesynchroniseerd. Het filter word toegepast op de relatieve(!) naam van de basislocatie van de synchronisatie. +Alleen bestanden/mappen die het filter doorlaat zullen voor synchronisatie geselecteerd worden. Het filter wordt op de naam relatief(!) aan de basis synchronisatiemappen toegepast. Open with Explorer -Openen met Explorer +Open met Explorer Open with default application Open met standaardapplicatie Operation aborted! -Operatie afgebroken! +Bewerking afgebroken! Operation: -Voortgang: +Bewerking: Overview Overzicht Overwriting Symbolic Link %x in %y -Overschrijven van symbolische link %x over %y +Overschrijft Symbolische Koppeling %x over %y Overwriting file %x in %y -Overschrijven bestand %x over %y -Pause +Overschrijft bestand %x over %y Pause +Pauze Paused -Gepauseerd +Gepauzeerd Planned directory deletion is in conflict with its subdirectories and -files! -Geplande map verwijdering heeft een conflict veroorzaakt met de bestanden en submappen +Geplande map verwijdering veroorzaakt een conflict met onderliggende submappen en bestanden! Please run a Compare first before synchronizing! -Voer eerst een Vergelijking uit voordat u synchroniseerd. +Voer alstublieft eerst een Vergelijking uit voordat u synchroniseert. Press \"Switch\" to open FreeFileSync GUI mode. -Druk op \"Switch\" om FreeFilySync GUI mode te gebruiken. +Toets \"Switch\" om FreeFileSync GUI mode te openen. Processing folder pair: -Verwerken van gekoppelde folder: +Verwerking van gekoppelde mappen: Published under the GNU General Public License: Gepubliceerd onder de GNU General Public License: Question Vraag RealtimeSync - Automated Synchronization -RealtimeSync - Automatische Synchronisatie +RealtimeSync - Geautomatiseerde Synchronisatie RealtimeSync configuration RealtimeSync configuratie Recycle Bin not yet supported for this system! -Prullenbak werkt (nog) niet op dit systeem! +Prullenbak is op dit systeem nog niet ondersteund! Relative path -Relatieve pad +Relatief pad Remove alternate settings Verwijder alternatieve instellingen Remove folder Verwijder map Remove folder pair -Verwijder 1 paar gekoppelde mappen +Verwijder gekoppelde mappen Report translation error -Rapporteer een fout in de vertaling -Reset +Rapporteer een vertaalfout Reset +Opnieuw instellen Reset view -Scherm resetten +Stel weergave opnieuw in Restore all hidden dialogs? Alle verborgen dialogen herstellen? Right Rechts S&ave configuration... -S&la de instellingen op... +S&la configuratie op... S&witch view &Wijzig weergave Save changes to current configuration? -Sla veranderingen op in de huidige configuratie? +Veranderingen opslaan in de huidige configuratie? Save current configuration to file -Sla de huidige instellingen op in een bestand +Sla de huidige configuratie op in een bestand Scanning... -Data wordt doorlopen... +Doorzoekt... Scanning: -Scannen: +Doorzoekt: Select a folder Selecteer een map Select alternate synchronization settings @@ -751,45 +753,45 @@ Selecteer een variant: Select view Kies kijk Set direction: -Selecteer map: +Stel richting in: Setting default synchronization directions: Old files will be overwritten with newer files. -Instellingen worden veranderd naar standaard instellingen: Oude bestanden worden overschreven naar nieuwere bestanden. +Stel standaard synchronisatie richtingen in: Oude bestanden worden door nieuwere bestanden overschreven. Show \"%x\" -Laat \"%x\" zien +Toon \"%x\" Show conflicts -Geef conflicten weer +Toon conflicten Show files that are different -Geef bestanden die verschillend zijn weer +Toon bestanden die verschillend zijn Show files that are equal -Geef bestanden die gelijk zijn weer +Toon bestanden die gelijk zijn Show files that are newer on left -Geef bestanden weer die nieuwer zijn aan de linkerkant +Toon bestanden die aan de linkerzijde nieuwer zijn Show files that are newer on right -Geef bestanden weer die nieuwer zijn aan de rechterkant +Toon bestanden die aan de rechterzijde nieuwer zijn Show files that exist on left side only -Geef bestanden weer die alleen bestaan aan de linkerkant +Toon bestanden die alleen aan de linkerzijde bestaan Show files that exist on right side only -Geef bestanden weer die alleen bestaan aan de rechterkant +Toon bestanden die alleen aan de rechterzijde bestaan Show files that will be created on the left side -Geef bestanden weer die zullen worden aangemaakt aan de linkerkant +Toon bestanden die aan de linkerzijde aangemaakt zullen worden Show files that will be created on the right side -Geef bestanden weer die zullen worden aangemaakt aan de rechterkant +Toon bestanden die aan de rechterzijde aangemaakt zullen worden Show files that will be deleted on the left side -Geef bestanden weer die zullen worden verwijderd aan de linkerkant +Toon bestanden die van de linkerzijde verwijderd zullen worden Show files that will be deleted on the right side -Geef bestanden weer die zullen worden verwijderd aan de rechterkant +Toon bestanden die van de rechterzijde verwijderd zullen worden Show files that will be overwritten on left side -Geef bestanden weer die zullen worden overschreven aan de linkerkant +Toon bestanden die aan de linkerzijde overschreven zullen worden Show files that will be overwritten on right side -Geef bestanden weer die zullen worden overschreven aan de rechterkant +Toon bestanden die aan de rechterzijde overschreven zullen worden Show files that won't be copied -Geef bestanden weer die niet zullen worden gekopieerd +Toon bestanden die niet gekopieerd zullen worden Show hidden dialogs -Geef verborgen dialogen weer +Toon verborgen dialogen Show popup -Pop-up weergeven +Toon opspringvenster Show popup on errors or warnings -Pop-up weergeven bij foutmeldingen of waarschuwingen +Toon opspringvenster bij fouten of waarschuwingen Significant difference detected: Significant verschil gedetecteerd: Silent mode @@ -799,29 +801,29 @@ Grootte Source code written completely in C++ utilizing: Broncode compleet geschreven in C++ met behulp van: Source directory does not exist anymore: -De oorspronkelijke map bestaat niet meer: +Bronmap bestaat niet meer: Speed: Snelheid: Start Start Start minimized and write status information to a logfile -Start geminimaliseerd en schrijf status informatie in een logbestand +Start geminimaliseerd en schrijf status informatie naar een logbestand Start synchronization -Start synchroniseren +Start synchronisatie Statistics Statistieken Status feedback -Status feedback +Status terugkoppeling Stop Stop Swap sides Wissel zijdes Switching to FreeFileSync GUI mode... -Veranderen naar FreeFileSync GUI mode... +Schakelt over naar FreeFileSync GUI mode... Symbolic Link handling -Symbolische Link handeling +Symbolische Koppeling afhandeling Symlinks %x have the same date but a different target! -Symbolische links %x heeft dezelfde datum maar een ander doel! +Symbolische koppeling %x heeft dezelfde datum maar een ander doel! Synchronization Preview Synchronisatie voorbeeldweergave Synchronization aborted! @@ -829,27 +831,27 @@ Synchronisatie afgebroken! Synchronization completed successfully! Synchronisatie succesvol afgerond! Synchronization completed with errors! -Synchronisatie afgerond. Er zijn fouten opgetreden. +Synchronisatie is met fouten afgerond! Synchronization settings Synchronisatie instellingen Synchronize all .doc, .zip and .exe files except everything in subfolder \"temp\". -Synchroniseer alle .doc, .zip en .exe bestanden uitgezonderd alles in submap \"temp\" +Synchroniseer alle .doc, .zip en .exe bestanden behalve wat in submap \"temp\" staat. Synchronize... Synchroniseer... Synchronizing... -Aan het synchroniseren... +Synchroniseert... Target directory already existing! -Doellocatie bestaal al! +Doelmap bestaat al! Target file already existing! Doelbestand bestaat al! 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 -De command lijn is uitgevoerd elke tijd:\n- alle mappen worden beschikbaar (bijvoorbeeld via een USB stick)\n- bestanden binnen deze mappen of submappen zijn bewerkt. +De opdrachtregel wordt telkens uitgevoerd indien:\n- alle mappen beschikbaar worden (bijv. invoegen van USB stick)\n- bestanden binnen deze mappen of submappen veranderd zijn The file does not contain a valid configuration: Het bestand bevat geen geldige configuratie: The file was not processed by last synchronization! -Het bestand werd niet verwerkt door de laatste synchronisatie! +Het bestand werd niet verwerkt tijdens de laatste synchronisatie! This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time. -Deze variant ziet twee gelijknamige bestanden als gelijk wanneer ze dezelfde bestandsgrootte EN tijdstempel hebben. +Deze variant beschouwt twee gelijknamige bestanden als gelijk wanneer ze dezelfde bestandsgrootte EN dezelfde datum en tijdstempel hebben. Time Tijd Time elapsed: @@ -857,21 +859,21 @@ Verstreken tijd: Time remaining: Benodigde tijd: Total amount of data that will be transferred -Hoeveelheid data die verplaatst word +Totale hoeveelheid data die verplaatst wordt Total time: Totale tijd: Transfer file and directory permissions\n(Requires Administrator rights) -Overdracht van bestanden en mappen permissies\n (Vereist Administrator rechten) +Zet bestand en map permissies over\n(Vereist Administrator rechten) Unable to connect to sourceforge.net! Niet in staat verbinding te maken met sourceforge.net! Unable to create logfile! -Niet mogelijk om een logbestand aan te maken! +Niet in staat om een logbestand aan te maken! Unresolved conflicts existing! Er bestaan onopgeloste conflicten! Update -> -Overschrijven -> +Bijwerken -> Updating attributes of %x -Attributen updaten van %x +Attributen bijwerken van %x Usage: Gebruik: Use Recycle Bin @@ -879,32 +881,32 @@ Gebruik de prullenbak Use Recycle Bin when deleting or overwriting files Gebruik de prullenbak bij verwijderen of overschrijven van bestanden User-defined directory for deletion was not specified! -Door de gebruiker te definiëren locatie voor verwijderen was niet opgegeven! +De door de gebruiker gedefinieerde map ter verwijdering was niet opgegeven! Variant Variant Verifying file %x -Verifiëren bestand %x +Verifieert bestand %x Versioning Versieën Volume name %x not part of filename %y! -Volume naam %x maakt niet deel uit van bestandsnaam %y! +Schijfnaam %x maakt geen deel uit van bestandsnaam %y! Waiting for missing directories... -Wachten op de missende mappen... +Wacht op missende mappen... Waiting while directory is locked (%x)... -Wachten totdat map is beveiligd (%x)... +Wacht totdat map is vergrendeld (%x)... Warning -Attentie +Waarschuwing When the comparison is started with this option set the following decision tree is processed: -Wanneer met deze optie aan de vergelijking wordt gestart zal de volgende vergelijkingsboom worden gebruikt: +Wanneer de vergelijking met deze optie aan gestart wordt zal de volgende besluitboom gehanteerd worden: You can ignore conflicts and continue synchronization. -U kunt de conflicten negeren en doorgaan met synchroniseren. +U kunt de conflicten negeren en doorgaan met synchronisatie. You can ignore this error to consider the directory as empty. Je kan deze error negeren als de map leeg is. You may try to synchronize remaining items again (WITHOUT having to re-compare)! -U kunt proberen om de resterende bestanden opnieuw te synchroniseren (ZONDER opnieuw te hoeven vergelijken)! +U kunt proberen om de resterende items opnieuw te synchroniseren (ZONDER opnieuw te hoeven vergelijken)! different verschillend file exists on both sides -Bestand bestaat aan beide zijde +bestand bestaat aan beide zijdes on one side only -alleen aan één kant +alleen aan één zijde diff --git a/BUILD/Languages/german.lng b/BUILD/Languages/german.lng index 6620c893..889211cd 100644 --- a/BUILD/Languages/german.lng +++ b/BUILD/Languages/german.lng @@ -206,6 +206,8 @@ Cannot determine sync-direction: Die Synchronisationsrichtung konnte nicht bestimmt werden: Cannot find %x %x wurde nicht gefunden. +Cannot write to empty directory path! + Category Kategorie Clear filter settings @@ -850,8 +852,6 @@ The file was not processed by last synchronization! Die Datei wurde in der letzten Synchronisation nicht verarbeitet! This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time. Diese Variante identifiziert zwei gleichnamige Dateien als gleich, wenn sie die gleiche Dateigröße haben UND der Zeitpunkt der letzten Änderung derselbe ist. -Time -Uhrzeit Time elapsed: Vergangene Zeit: Time remaining: diff --git a/BUILD/Resources.dat b/BUILD/Resources.dat Binary files differindex 163a6572..9382ac74 100644 --- a/BUILD/Resources.dat +++ b/BUILD/Resources.dat diff --git a/Cleanup.cmd b/Cleanup.cmd index 8c0c5550..40b62e27 100644 --- a/Cleanup.cmd +++ b/Cleanup.cmd @@ -9,6 +9,8 @@ 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 diff --git a/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj b/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj index 3ccf78f5..9bf322e1 100644 --- a/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj +++ b/FreeFileSync - wxWidgets v2.9.1 Beta.vcxproj @@ -100,14 +100,14 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderFile>$(ProjectDir)shared\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4996;4100;</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)library/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)shared/pch.h</ForcedIncludeFiles> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -135,14 +135,14 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderFile>$(ProjectDir)shared\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4996;4100;</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)library/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)shared/pch.h</ForcedIncludeFiles> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <SuppressStartupBanner>true</SuppressStartupBanner> </ClCompile> @@ -172,7 +172,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-2.9.1\include;C:\Programme\C++\wxWidgets-2.9.1\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4996;4100;</DisableSpecificWarnings> @@ -206,7 +206,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4996;4100;</DisableSpecificWarnings> @@ -269,11 +269,12 @@ <ClCompile Include="shared\global_func.cpp" /> <ClCompile Include="shared\guid.cpp" /> <ClCompile Include="shared\help_provider.cpp" /> - <ClCompile Include="shared\localization.cpp" /> + <ClCompile Include="shared\i18n.cpp" /> <ClCompile Include="shared\long_path_prefix.cpp" /> <ClCompile Include="shared\mouse_move_dlg.cpp" /> <ClCompile Include="shared\privilege.cpp" /> <ClCompile Include="shared\recycler.cpp" /> + <ClCompile Include="shared\resolve_path.cpp" /> <ClCompile Include="shared\serialize.cpp" /> <ClCompile Include="shared\shadow.cpp" /> <ClCompile Include="shared\standard_paths.cpp" /> diff --git a/FreeFileSync.cbp b/FreeFileSync.cbp index 39e2a15c..11935a91 100644 --- a/FreeFileSync.cbp +++ b/FreeFileSync.cbp @@ -4,13 +4,12 @@ <Project> <Option title="FreeFileSync" /> <Option makefile="makefile" /> - <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> <Target title="Release"> <Option output="BUILD\FreeFileSync_Win32" prefix_auto="1" extension_auto="1" /> <Option working_dir="BUILD\" /> - <Option object_output="OBJ\Release_FFS_GCC\" /> + <Option object_output="OBJ\FFS_Release_32_MinGW\" /> <Option type="0" /> <Option compiler="gcc" /> <Option projectLinkerOptionsRelation="2" /> @@ -34,16 +33,16 @@ </Linker> </Target> <Target title="Unit Test"> - <Option output="OBJ\Unit Test\Unit Test" prefix_auto="1" extension_auto="1" /> - <Option working_dir="OBJ\Unit Test\" /> - <Option object_output="OBJ\Unit Test\" /> + <Option output="OBJ\Unit_Test_MinGW\Unit Test" prefix_auto="1" extension_auto="1" /> + <Option working_dir="OBJ\Unit_Test_MinGW\" /> + <Option object_output="OBJ\Unit_Test_MinGW\" /> <Option type="1" /> <Option compiler="gcc" /> <Option projectLinkerOptionsRelation="2" /> <Compiler> <Add option="-g" /> <Add option="-Winvalid-pch" /> - <Add option='-include "library/pch.h"' /> + <Add option='-include "shared/pch.h"' /> <Add option="-D__WXDEBUG__" /> <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll\mswud" /> <Add directory="library\gtest" /> @@ -62,14 +61,14 @@ <Target title="Debug-DLL"> <Option output="BUILD\FreeFileSync_Debug" prefix_auto="1" extension_auto="1" /> <Option working_dir="BUILD" /> - <Option object_output="OBJ\Debug_FFS_GCC\" /> + <Option object_output="OBJ\FFS_Debug_32_MinGW\" /> <Option type="0" /> <Option compiler="gcc" /> <Option projectLinkerOptionsRelation="2" /> <Compiler> <Add option="-g" /> <Add option="-Winvalid-pch" /> - <Add option='-include "library/pch.h"' /> + <Add option='-include "shared/pch.h"' /> <Add option="-D__WXDEBUG__" /> <Add directory="C:\Programme\C++\wxWidgets\lib\gcc_dll\mswud" /> </Compiler> @@ -101,6 +100,7 @@ <Add option="-DTIXML_USE_STL" /> <Add option="-DwxUSE_UNICODE" /> <Add option="-DBOOST_THREAD_USE_LIB" /> + <Add option="-DWXINTL_NO_GETTEXT_MACRO" /> <Add directory="C:\Programme\C++\wxWidgets\include" /> <Add directory="C:\Program Files\C++\Boost" /> </Compiler> @@ -200,12 +200,6 @@ <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="library\pch.h"> - <Option compile="1" /> - <Option weight="0" /> - <Option target="Unit Test" /> - <Option target="Debug-DLL" /> - </Unit> <Unit filename="library\process_xml.cpp" /> <Unit filename="library\process_xml.h"> <Option target="<{~None~}>" /> @@ -265,6 +259,7 @@ </Unit> <Unit filename="shared\dir_name.cpp" /> <Unit filename="shared\dir_name.h" /> + <Unit filename="shared\dir_picker_i18n.h" /> <Unit filename="shared\disable_standby.h" /> <Unit filename="shared\dll_loader.cpp" /> <Unit filename="shared\dll_loader.h" /> @@ -291,18 +286,26 @@ <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> - <Unit filename="shared\localization.cpp" /> - <Unit filename="shared\localization.h" /> + <Unit filename="shared\i18n.cpp" /> + <Unit filename="shared\i18n.h" /> <Unit filename="shared\long_path_prefix.cpp" /> <Unit filename="shared\long_path_prefix.h" /> <Unit filename="shared\mouse_move_dlg.cpp"> <Option target="Release" /> <Option target="Debug-DLL" /> </Unit> + <Unit filename="shared\pch.h"> + <Option compile="1" /> + <Option weight="0" /> + <Option target="Unit Test" /> + <Option target="Debug-DLL" /> + </Unit> <Unit filename="shared\privilege.cpp" /> <Unit filename="shared\privilege.h" /> <Unit filename="shared\recycler.cpp" /> <Unit filename="shared\recycler.h" /> + <Unit filename="shared\resolve_path.cpp" /> + <Unit filename="shared\resolve_path.h" /> <Unit filename="shared\serialize.cpp" /> <Unit filename="shared\serialize.h" /> <Unit filename="shared\shadow.cpp" /> diff --git a/FreeFileSync.vcxproj b/FreeFileSync.vcxproj index d0fcb00e..3524b5ee 100644 --- a/FreeFileSync.vcxproj +++ b/FreeFileSync.vcxproj @@ -100,14 +100,14 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderFile>$(ProjectDir)shared\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)library/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)shared/pch.h</ForcedIncludeFiles> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </ClCompile> @@ -135,14 +135,14 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)library\pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderFile>$(ProjectDir)shared\pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)library/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)shared/pch.h</ForcedIncludeFiles> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <SuppressStartupBanner>true</SuppressStartupBanner> </ClCompile> @@ -172,7 +172,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> @@ -207,7 +207,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> @@ -271,11 +271,12 @@ <ClCompile Include="shared\global_func.cpp" /> <ClCompile Include="shared\guid.cpp" /> <ClCompile Include="shared\help_provider.cpp" /> - <ClCompile Include="shared\localization.cpp" /> + <ClCompile Include="shared\i18n.cpp" /> <ClCompile Include="shared\long_path_prefix.cpp" /> <ClCompile Include="shared\mouse_move_dlg.cpp" /> <ClCompile Include="shared\privilege.cpp" /> <ClCompile Include="shared\recycler.cpp" /> + <ClCompile Include="shared\resolve_path.cpp" /> <ClCompile Include="shared\serialize.cpp" /> <ClCompile Include="shared\shadow.cpp" /> <ClCompile Include="shared\standard_paths.cpp" /> @@ -314,7 +315,7 @@ </None> </ItemGroup> <ItemGroup> - <ClInclude Include="library\pch.h" /> + <ClInclude Include="shared\pch.h" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> @@ -4,14 +4,17 @@ BINDIR = $(DESTDIR)$(prefix)/bin SHAREDIR = $(DESTDIR)$(prefix)/share APPSHAREDIR = $(SHAREDIR)/$(APPNAME) +COMMON_COMPILE_FLAGS = -Wall -pipe `pkg-config --cflags gtk+-2.0` -O3 -pthread -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DTIXML_USE_STL -DWXINTL_NO_GETTEXT_MACRO +COMMON_LINK_FLAGS = -O3 -pthread + #default build -FFS_CPPFLAGS = -Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -O3 -pthread -LINKFLAGS = `wx-config --libs --debug=no --unicode=yes` -lboost_thread -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 ifeq ($(BUILD),release) -FFS_CPPFLAGS = -Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes --static=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -O3 -pthread -LINKFLAGS = `wx-config --libs --debug=no --unicode=yes --static=yes` /usr/local/lib/libboost_thread.a -O3 -pthread +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 ##################################################################################################### @@ -59,7 +62,7 @@ FILE_LIST+=library/filter.cpp FILE_LIST+=library/binary.cpp FILE_LIST+=library/db_file.cpp FILE_LIST+=library/dir_lock.cpp -FILE_LIST+=shared/localization_no_BOM.cpp +FILE_LIST+=shared/i18n_no_BOM.cpp FILE_LIST+=shared/file_io.cpp FILE_LIST+=shared/dir_name.cpp FILE_LIST+=shared/guid.cpp @@ -71,6 +74,7 @@ FILE_LIST+=shared/global_func.cpp FILE_LIST+=shared/system_func.cpp FILE_LIST+=shared/custom_tooltip.cpp FILE_LIST+=shared/file_handling.cpp +FILE_LIST+=shared/resolve_path.cpp FILE_LIST+=shared/file_traverser.cpp FILE_LIST+=shared/standard_paths.cpp FILE_LIST+=shared/zstring.cpp @@ -85,7 +89,7 @@ FILE_LIST+=shared/recycler.cpp FILE_LIST+=shared/help_provider.cpp #list of all *.o files -OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/$(subst .cpp,.o,$(notdir $(file)))) +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))) @@ -95,26 +99,27 @@ 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 #remove byte ordering mark: needed by Visual C++ but an error with GCC - g++ -o OBJ/removeBOM tools/remove_BOM.cpp - ./OBJ/removeBOM shared/localization.cpp shared/localization_no_BOM.cpp + g++ -o OBJ/FFS_Release_GCC_Make/removeBOM tools/remove_BOM.cpp + ./OBJ/FFS_Release_GCC_Make/removeBOM shared/i18n.cpp shared/i18n_no_BOM.cpp %.dep : %.cpp #strip path information - g++ $(FFS_CPPFLAGS) -c $< -o OBJ/$(subst .cpp,.o,$(notdir $<)) + g++ $(FFS_CPPFLAGS) -c $< -o OBJ/FFS_Release_GCC_Make/$(subst .cpp,.o,$(notdir $<)) FreeFileSync: init $(DEP_LIST) #respect linker order: wxWidgets libraries last g++ -o ./BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS) clean: - rm -rf OBJ + rm -rf OBJ/FFS_Release_GCC_Make rm -f BUILD/$(APPNAME) - rm -f shared/localization_no_BOM.cpp + rm -f shared/i18n_no_BOM.cpp install: - if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR); fi - if [ ! -d $(APPSHAREDIR) ] ; then mkdir -p $(APPSHAREDIR); fi + if [ ! -d $(BINDIR) ]; then mkdir -p $(BINDIR); fi + if [ ! -d $(APPSHAREDIR) ]; then mkdir -p $(APPSHAREDIR); fi cp BUILD/$(APPNAME) $(BINDIR) cp -R BUILD/Languages/ \ diff --git a/RealtimeSync/RealtimeSync.cbp b/RealtimeSync/RealtimeSync.cbp index cfbdc19e..66fc5452 100644 --- a/RealtimeSync/RealtimeSync.cbp +++ b/RealtimeSync/RealtimeSync.cbp @@ -4,13 +4,12 @@ <Project> <Option title="RealtimeSync" /> <Option makefile="makefile" /> - <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> <Target title="Release"> <Option output="..\BUILD\RealtimeSync_Win32" prefix_auto="1" extension_auto="1" /> <Option working_dir="..\BUILD" /> - <Option object_output="..\OBJ\Release_RTS_GCC" /> + <Option object_output="..\OBJ\RTS_Release_32_MinGW" /> <Option type="0" /> <Option compiler="gcc" /> <Option projectLinkerOptionsRelation="2" /> @@ -34,14 +33,14 @@ <Target title="Debug-DLL"> <Option output="..\BUILD\RealtimeSync_Debug" prefix_auto="1" extension_auto="1" /> <Option working_dir="..\BUILD" /> - <Option object_output="..\OBJ\Debug_RTS_GCC" /> + <Option object_output="..\OBJ\RTS_Debug_32_MinGW" /> <Option type="0" /> <Option compiler="gcc" /> <Option projectLinkerOptionsRelation="2" /> <Compiler> <Add option="-g" /> <Add option="-Winvalid-pch" /> - <Add option='-include "pch.h"' /> + <Add option='-include "../shared/pch.h"' /> <Add option="-D__WXDEBUG__" /> <Add directory="C:\Program Files\C++\wxWidgets\lib\gcc_dll\mswud" /> </Compiler> @@ -71,6 +70,7 @@ <Add option="-DTIXML_USE_STL" /> <Add option="-DBOOST_THREAD_NO_LIB" /> <Add option="-DBOOST_THREAD_USE_LIB" /> + <Add option="-DWXINTL_NO_GETTEXT_MACRO" /> <Add directory="C:\Programme\C++\wxWidgets\include" /> <Add directory="C:\Program Files\C++\Boost" /> </Compiler> @@ -94,18 +94,12 @@ <Unit filename="WxWizDialog.fbp" /> <Unit filename="application.cpp" /> <Unit filename="application.h" /> - <Unit filename="functions.h" /> <Unit filename="gui_generated.cpp" /> <Unit filename="gui_generated.h" /> <Unit filename="main_dlg.cpp" /> <Unit filename="main_dlg.h" /> <Unit filename="notify.cpp" /> <Unit filename="notify.h" /> - <Unit filename="pch.h"> - <Option compile="1" /> - <Option weight="0" /> - <Option target="Debug-DLL" /> - </Unit> <Unit filename="resource.rc"> <Option compilerVar="WINDRES" /> </Unit> @@ -140,13 +134,19 @@ <Unit filename="..\shared\global_func.cpp" /> <Unit filename="..\shared\global_func.h" /> <Unit filename="..\shared\help_provider.cpp" /> - <Unit filename="..\shared\localization.cpp" /> - <Unit filename="..\shared\localization.h" /> + <Unit filename="..\shared\i18n.cpp" /> + <Unit filename="..\shared\i18n.h" /> <Unit filename="..\shared\long_path_prefix.cpp" /> <Unit filename="..\shared\long_path_prefix.h" /> <Unit filename="..\shared\mouse_move_dlg.cpp" /> + <Unit filename="..\shared\pch.h"> + <Option compile="1" /> + <Option weight="0" /> + <Option target="Debug-DLL" /> + </Unit> <Unit filename="..\shared\privilege.cpp" /> - <Unit filename="..\shared\shadow.cpp" /> + <Unit filename="..\shared\resolve_path.cpp" /> + <Unit filename="..\shared\resolve_path.h" /> <Unit filename="..\shared\standard_paths.cpp" /> <Unit filename="..\shared\standard_paths.h" /> <Unit filename="..\shared\system_func.cpp" /> diff --git a/RealtimeSync/RealtimeSync.vcxproj b/RealtimeSync/RealtimeSync.vcxproj index c250a421..fa69ffdf 100644 --- a/RealtimeSync/RealtimeSync.vcxproj +++ b/RealtimeSync/RealtimeSync.vcxproj @@ -69,28 +69,28 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <LinkIncremental>true</LinkIncremental> <OutDir>..\BUILD\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <IntDir>..\OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> <TargetName>$(ProjectName)_$(PlatformName)</TargetName> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <LinkIncremental>true</LinkIncremental> <OutDir>..\BUILD\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <IntDir>..\OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> <TargetName>$(ProjectName)_$(PlatformName)</TargetName> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>..\BUILD\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <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\</OutDir> - <IntDir>OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> + <IntDir>..\OBJ\$(ProjectName)_$(Configuration)_$(PlatformName)_VCPP\</IntDir> <GenerateManifest>false</GenerateManifest> <TargetName>$(ProjectName)_$(PlatformName)</TargetName> </PropertyGroup> @@ -99,14 +99,14 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;TIXML_USE_STL</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)/pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderFile>$(ProjectDir)/../shared/pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)/../shared/pch.h</ForcedIncludeFiles> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> @@ -129,14 +129,14 @@ <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;__WXDEBUG__;TIXML_USE_STL</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;__WXDEBUG__;TIXML_USE_STL</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswud;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> - <PrecompiledHeaderFile>$(ProjectDir)/pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderFile>$(ProjectDir)/../shared/pch.h</PrecompiledHeaderFile> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> <MultiProcessorCompilation>false</MultiProcessorCompilation> <DisableLanguageExtensions>false</DisableLanguageExtensions> <PrecompiledHeaderOutputFile>$(IntDir)pch.obj</PrecompiledHeaderOutputFile> - <ForcedIncludeFiles>$(ProjectDir)/pch.h</ForcedIncludeFiles> + <ForcedIncludeFiles>$(ProjectDir)/../shared/pch.h</ForcedIncludeFiles> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <SuppressStartupBanner>true</SuppressStartupBanner> </ClCompile> @@ -162,7 +162,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;TIXML_USE_STL</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets\include;C:\Programme\C++\wxWidgets\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> @@ -196,7 +196,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;NDEBUG;TIXML_USE_STL</PreprocessorDefinitions> + <PreprocessorDefinitions>wxUSE_UNICODE;__WXMSW__;FFS_WIN;WXINTL_NO_GETTEXT_MACRO;NDEBUG;TIXML_USE_STL</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Programme\C++\wxWidgets-x64\include;C:\Programme\C++\wxWidgets-x64\lib\vc_lib\mswu;C:\Program Files\C++\Boost</AdditionalIncludeDirectories> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <DisableSpecificWarnings>4100;4996</DisableSpecificWarnings> @@ -236,11 +236,11 @@ <ClCompile Include="..\shared\file_traverser.cpp" /> <ClCompile Include="..\shared\global_func.cpp" /> <ClCompile Include="..\shared\help_provider.cpp" /> - <ClCompile Include="..\shared\localization.cpp" /> + <ClCompile Include="..\shared\i18n.cpp" /> <ClCompile Include="..\shared\long_path_prefix.cpp" /> <ClCompile Include="..\shared\mouse_move_dlg.cpp" /> <ClCompile Include="..\shared\privilege.cpp" /> - <ClCompile Include="..\shared\shadow.cpp" /> + <ClCompile Include="..\shared\resolve_path.cpp" /> <ClCompile Include="..\shared\standard_paths.cpp" /> <ClCompile Include="..\shared\system_func.cpp" /> <ClCompile Include="..\shared\tinyxml\tinyxml.cpp" /> @@ -253,7 +253,7 @@ <ClCompile Include="application.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> - <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)/pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)/../shared/pch.h</PrecompiledHeaderFile> </ClCompile> <ClCompile Include="gui_generated.cpp" /> <ClCompile Include="main_dlg.cpp" /> @@ -271,7 +271,7 @@ <None Include="WxWizDialog.fbp" /> </ItemGroup> <ItemGroup> - <ClInclude Include="pch.h" /> + <ClInclude Include="../shared/pch.h" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp index dffd8970..37f5c192 100644 --- a/RealtimeSync/application.cpp +++ b/RealtimeSync/application.cpp @@ -9,7 +9,7 @@ #include <wx/event.h> #include "resources.h" #include <wx/msgdlg.h> -#include "../shared/localization.h" +#include "../shared/i18n.h" #include "xml_ffs.h" #include "../shared/standard_paths.h" #include <wx/file.h> @@ -46,7 +46,7 @@ void Application::OnStartApplication(wxIdleEvent& event) #endif //set program language - ffs3::CustomLocale::getInstance().setLanguage(rts::getProgramLanguage()); + ffs3::setLanguage(rts::getProgramLanguage()); //try to set config/batch-filename set by %1 parameter wxString cfgFilename; diff --git a/RealtimeSync/gui_generated.cpp b/RealtimeSync/gui_generated.cpp index d87b536c..5a4f7f13 100644 --- a/RealtimeSync/gui_generated.cpp +++ b/RealtimeSync/gui_generated.cpp @@ -1,11 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 17 2010) +// C++ code generated with wxFormBuilder (version Mar 22 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "../shared/custom_button.h" +#include "../shared/dir_picker_i18n.h" #include "gui_generated.h" @@ -13,235 +14,228 @@ MainDlgGenerated::MainDlgGenerated( 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( 420,440 ), wxDefaultSize ); - - 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_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_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_menuFile->Append( m_menuItem4 ); - - m_menubar1->Append( m_menuFile, _("&File") ); - - m_menuHelp = new wxMenu(); - wxMenuItem* m_menuItemContent; - m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemContent ); - - 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_menuHelp->Append( m_menuItemAbout ); - - m_menubar1->Append( m_menuHelp, _("&Help") ); - - this->SetMenuBar( m_menubar1 ); - - bSizerMain = new wxBoxSizer( wxVERTICAL ); - - m_panelMain = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1; - bSizer1 = new wxBoxSizer( wxVERTICAL ); - - - bSizer1->Add( 0, 10, 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 ); - - m_staticText3 = new wxStaticText( m_panelMain, wxID_ANY, _("1. Select directories to monitor."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText3->Wrap( -1 ); - sbSizer41->Add( m_staticText3, 0, wxLEFT, 10 ); - - m_staticText4 = new wxStaticText( m_panelMain, wxID_ANY, _("2. Enter a command line."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText4->Wrap( -1 ); - sbSizer41->Add( m_staticText4, 0, wxLEFT, 10 ); - - m_staticText5 = new wxStaticText( m_panelMain, wxID_ANY, _("3. Press 'Start'."), wxDefaultPosition, wxDefaultSize, 0 ); - 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 ); - - 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, 40 ); - - m_staticline2 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer1->Add( m_staticline2, 0, wxTOP|wxBOTTOM|wxEXPAND, 10 ); - - wxBoxSizer* bSizer8; - bSizer8 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizer5; - sbSizer5 = 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* bSizer781; - bSizer781 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonAddFolder->SetToolTip( _("Add folder") ); - - m_bpButtonAddFolder->SetToolTip( _("Add folder") ); - - bSizer781->Add( m_bpButtonAddFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") ); - - m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") ); - - 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, wxDefaultSize, 0 ); - bSizer114->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerMain = new wxDirPickerCtrl( 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 ); - - m_panelMainFolder->SetSizer( bSizer114 ); - m_panelMainFolder->Layout(); - bSizer114->Fit( m_panelMainFolder ); - sbSizer5->Add( m_panelMainFolder, 0, wxEXPAND, 5 ); - - m_scrolledWinFolders = new wxScrolledWindow( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_scrolledWinFolders->SetScrollRate( 5, 5 ); - bSizerFolders = new wxBoxSizer( wxVERTICAL ); - - m_scrolledWinFolders->SetSizer( bSizerFolders ); - m_scrolledWinFolders->Layout(); - bSizerFolders->Fit( m_scrolledWinFolders ); - sbSizer5->Add( m_scrolledWinFolders, 0, wxEXPAND, 5 ); - - bSizer8->Add( sbSizer5, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer1->Add( bSizer8, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer3; - sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Command line") ), wxVERTICAL ); - - m_textCtrlCommand = new wxTextCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer3->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM, 5 ); - - bSizer1->Add( sbSizer3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - wxStaticBoxSizer* sbSizer4; - sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Minimum Idle Time [seconds]") ), wxVERTICAL ); - - m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - m_spinCtrlDelay->SetToolTip( _("Idle time between detection of last change and execution of command line in seconds") ); - - sbSizer4->Add( m_spinCtrlDelay, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer1->Add( sbSizer4, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticline1 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); - - m_buttonStart = new wxButtonWithImage( 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 ); - - m_buttonCancel = new wxButton( m_panelMain, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); - bSizer1->Add( m_buttonCancel, 0, 0, 5 ); - - m_panelMain->SetSizer( bSizer1 ); - m_panelMain->Layout(); - bSizer1->Fit( m_panelMain ); - bSizerMain->Add( m_panelMain, 1, wxEXPAND, 5 ); - - this->SetSizer( bSizerMain ); - this->Layout(); - bSizerMain->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) ); - this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) ); - this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) ); - this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) ); - this->Connect( m_menuItemContent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); - this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) ); - m_bpButtonAddFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this ); - m_bpButtonRemoveTopFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this ); - m_buttonStart->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this ); + this->SetSizeHints( wxSize( 420,440 ), wxDefaultSize ); + + 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_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_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_menuFile->Append( m_menuItem4 ); + + m_menubar1->Append( m_menuFile, _("&File") ); + + m_menuHelp = new wxMenu(); + wxMenuItem* m_menuItemContent; + m_menuItemContent = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Content") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemContent ); + + 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_menuHelp->Append( m_menuItemAbout ); + + m_menubar1->Append( m_menuHelp, _("&Help") ); + + this->SetMenuBar( m_menubar1 ); + + bSizerMain = new wxBoxSizer( wxVERTICAL ); + + m_panelMain = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + + bSizer1->Add( 0, 10, 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 ); + + m_staticText3 = new wxStaticText( m_panelMain, wxID_ANY, _("1. Select directories to monitor."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + sbSizer41->Add( m_staticText3, 0, wxLEFT, 10 ); + + m_staticText4 = new wxStaticText( m_panelMain, wxID_ANY, _("2. Enter a command line."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + sbSizer41->Add( m_staticText4, 0, wxLEFT, 10 ); + + m_staticText5 = new wxStaticText( m_panelMain, wxID_ANY, _("3. Press 'Start'."), wxDefaultPosition, wxDefaultSize, 0 ); + 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 ); + + 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, 40 ); + + m_staticline2 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline2, 0, wxTOP|wxBOTTOM|wxEXPAND, 10 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxVERTICAL ); + + sbSizerDirToWatch = 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* bSizer781; + bSizer781 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonAddFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonAddFolder->SetToolTip( _("Add folder") ); + + bSizer781->Add( m_bpButtonAddFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonRemoveTopFolder = new wxBitmapButton( m_panelMainFolder, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemoveTopFolder->SetToolTip( _("Remove folder") ); + + 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, wxDefaultSize, 0 ); + bSizer114->Add( m_txtCtrlDirectoryMain, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerMain = new FfsDirPickerCtrl( 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 ); + + m_panelMainFolder->SetSizer( bSizer114 ); + m_panelMainFolder->Layout(); + bSizer114->Fit( m_panelMainFolder ); + sbSizerDirToWatch->Add( m_panelMainFolder, 0, wxEXPAND, 5 ); + + m_scrolledWinFolders = new wxScrolledWindow( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWinFolders->SetScrollRate( 5, 5 ); + bSizerFolders = new wxBoxSizer( wxVERTICAL ); + + m_scrolledWinFolders->SetSizer( bSizerFolders ); + m_scrolledWinFolders->Layout(); + bSizerFolders->Fit( m_scrolledWinFolders ); + sbSizerDirToWatch->Add( m_scrolledWinFolders, 0, wxEXPAND, 5 ); + + bSizer8->Add( sbSizerDirToWatch, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer1->Add( bSizer8, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer3; + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Command line") ), wxVERTICAL ); + + m_textCtrlCommand = new wxTextCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer3->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM, 5 ); + + bSizer1->Add( sbSizer3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer4; + sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_panelMain, wxID_ANY, _("Minimum Idle Time [seconds]") ), wxVERTICAL ); + + m_spinCtrlDelay = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + m_spinCtrlDelay->SetToolTip( _("Idle time between detection of last change and execution of command line in seconds") ); + + sbSizer4->Add( m_spinCtrlDelay, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer1->Add( sbSizer4, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticline1 = new wxStaticLine( m_panelMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); + + m_buttonStart = new wxButtonWithImage( 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 ); + + m_buttonCancel = new wxButton( m_panelMain, wxID_CANCEL, _("dummy"), wxDefaultPosition, wxSize( 0,0 ), 0 ); + bSizer1->Add( m_buttonCancel, 0, 0, 5 ); + + m_panelMain->SetSizer( bSizer1 ); + m_panelMain->Layout(); + bSizer1->Fit( m_panelMain ); + bSizerMain->Add( m_panelMain, 1, wxEXPAND, 5 ); + + this->SetSizer( bSizerMain ); + this->Layout(); + bSizerMain->Fit( this ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) ); + this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) ); + this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) ); + this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) ); + this->Connect( m_menuItemContent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); + this->Connect( m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) ); + m_bpButtonAddFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this ); + m_bpButtonRemoveTopFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this ); + m_buttonStart->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this ); } MainDlgGenerated::~MainDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) ); - this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); - this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) ); - m_bpButtonAddFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this ); - m_bpButtonRemoveTopFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this ); - m_buttonStart->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDlgGenerated::OnClose ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnSaveConfig ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnLoadConfig ) ); + this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnQuit ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnShowHelp ) ); + this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDlgGenerated::OnMenuAbout ) ); + m_bpButtonAddFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnAddFolder ), NULL, this ); + m_bpButtonRemoveTopFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnRemoveTopFolder ), NULL, this ); + m_buttonStart->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnStart ), NULL, this ); + m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDlgGenerated::OnQuit ), NULL, this ); + } FolderGenerated::FolderGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { - wxBoxSizer* bSizer114; - bSizer114 = new wxBoxSizer( wxHORIZONTAL ); - - m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") ); - - m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") ); - - bSizer114->Add( m_bpButtonRemoveFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer20; - bSizer20 = new wxBoxSizer( wxHORIZONTAL ); - - m_txtCtrlDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer20->Add( m_txtCtrlDirectory, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPicker = new wxDirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPicker->SetToolTip( _("Select a folder") ); - - bSizer20->Add( m_dirPicker, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer114->Add( bSizer20, 1, 0, 5 ); - - this->SetSizer( bSizer114 ); - this->Layout(); - bSizer114->Fit( this ); + wxBoxSizer* bSizer114; + bSizer114 = new wxBoxSizer( wxHORIZONTAL ); + + m_bpButtonRemoveFolder = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemoveFolder->SetToolTip( _("Remove folder") ); + + bSizer114->Add( m_bpButtonRemoveFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxHORIZONTAL ); + + m_txtCtrlDirectory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer20->Add( m_txtCtrlDirectory, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPicker = new FfsDirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPicker->SetToolTip( _("Select a folder") ); + + bSizer20->Add( m_dirPicker, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer114->Add( bSizer20, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer114 ); + this->Layout(); + bSizer114->Fit( this ); } FolderGenerated::~FolderGenerated() diff --git a/RealtimeSync/gui_generated.h b/RealtimeSync/gui_generated.h index a0760448..75457f31 100644 --- a/RealtimeSync/gui_generated.h +++ b/RealtimeSync/gui_generated.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 17 2010) +// C++ code generated with wxFormBuilder (version Mar 22 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -10,6 +10,7 @@ #include <wx/intl.h> +class FfsDirPickerCtrl; class wxButtonWithImage; #include <wx/string.h> @@ -34,107 +35,83 @@ class wxButtonWithImage; #include <wx/spinctrl.h> #include <wx/frame.h> +#include "../shared/i18n.h" + /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /// Class MainDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class MainDlgGenerated : public wxFrame +class MainDlgGenerated : public wxFrame { -private: - -protected: - wxMenuBar* m_menubar1; - wxMenu* m_menuFile; - wxMenu* m_menuHelp; - 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; - wxPanel* m_panelMainFolder; - wxBitmapButton* m_bpButtonAddFolder; - wxBitmapButton* m_bpButtonRemoveTopFolder; - wxTextCtrl* m_txtCtrlDirectoryMain; - wxScrolledWindow* m_scrolledWinFolders; - wxBoxSizer* bSizerFolders; - wxTextCtrl* m_textCtrlCommand; - wxSpinCtrl* m_spinCtrlDelay; - wxStaticLine* m_staticline1; - wxButtonWithImage* m_buttonStart; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) - { - event.Skip(); - } - virtual void OnSaveConfig( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnLoadConfig( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnQuit( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnShowHelp( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnMenuAbout( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnAddFolder( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnRemoveTopFolder( wxCommandEvent& event ) - { - event.Skip(); - } - virtual void OnStart( wxCommandEvent& event ) - { - event.Skip(); - } - - -public: - wxDirPickerCtrl* m_dirPickerMain; - - MainDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("RealtimeSync - Automated Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - - ~MainDlgGenerated(); - + private: + + protected: + wxMenuBar* m_menubar1; + wxMenu* m_menuFile; + wxMenu* m_menuHelp; + 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; + wxPanel* m_panelMainFolder; + wxBitmapButton* m_bpButtonAddFolder; + wxBitmapButton* m_bpButtonRemoveTopFolder; + wxTextCtrl* m_txtCtrlDirectoryMain; + wxScrolledWindow* m_scrolledWinFolders; + wxBoxSizer* bSizerFolders; + wxTextCtrl* m_textCtrlCommand; + wxSpinCtrl* m_spinCtrlDelay; + wxStaticLine* m_staticline1; + wxButtonWithImage* m_buttonStart; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnSaveConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLoadConfig( wxCommandEvent& event ) { event.Skip(); } + virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddFolder( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveTopFolder( wxCommandEvent& event ) { event.Skip(); } + virtual void OnStart( wxCommandEvent& event ) { event.Skip(); } + + + public: + FfsDirPickerCtrl* m_dirPickerMain; + + MainDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("RealtimeSync - Automated Synchronization"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + + ~MainDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class FolderGenerated /////////////////////////////////////////////////////////////////////////////// -class FolderGenerated : public wxPanel +class FolderGenerated : public wxPanel { -private: - -protected: - -public: - wxBitmapButton* m_bpButtonRemoveFolder; - wxTextCtrl* m_txtCtrlDirectory; - wxDirPickerCtrl* m_dirPicker; - - FolderGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); - ~FolderGenerated(); - + private: + + protected: + + public: + wxBitmapButton* m_bpButtonRemoveFolder; + wxTextCtrl* m_txtCtrlDirectory; + FfsDirPickerCtrl* m_dirPicker; + + FolderGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + ~FolderGenerated(); + }; #endif //__gui_generated__ diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp index a1db4b74..05f0bc9b 100644 --- a/RealtimeSync/main_dlg.cpp +++ b/RealtimeSync/main_dlg.cpp @@ -43,7 +43,7 @@ MainDialog::MainDialog(wxDialog* dlg, const wxString& cfgFileName) Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnKeyPressed), NULL, this); //prepare drag & drop - dirNameFirst.reset(new ffs3::DirectoryName(m_panelMainFolder, m_dirPickerMain, m_txtCtrlDirectoryMain)); + dirNameFirst.reset(new ffs3::DirectoryName(*m_panelMainFolder, *m_dirPickerMain, *m_txtCtrlDirectoryMain, sbSizerDirToWatch)); #ifdef FFS_WIN diff --git a/RealtimeSync/main_dlg.h b/RealtimeSync/main_dlg.h index a6d2c935..8b06bec4 100644 --- a/RealtimeSync/main_dlg.h +++ b/RealtimeSync/main_dlg.h @@ -11,6 +11,7 @@ #include <vector> #include <memory> #include "../shared/dir_name.h" +#include "../shared/dir_picker_i18n.h" namespace xmlAccess { @@ -23,7 +24,7 @@ class DirectoryPanel : public FolderGenerated public: DirectoryPanel(wxWindow* parent) : FolderGenerated(parent), - dirName(this, m_dirPicker, m_txtCtrlDirectory) {} + dirName(*this, *m_dirPicker, *m_txtCtrlDirectory) {} void setName(const Zstring& dirname) { diff --git a/RealtimeSync/makefile b/RealtimeSync/makefile index a445b922..5f797cce 100644 --- a/RealtimeSync/makefile +++ b/RealtimeSync/makefile @@ -2,14 +2,17 @@ APPNAME = RealtimeSync prefix = /usr BINDIR = $(DESTDIR)$(prefix)/bin +COMMON_COMPILE_FLAGS = -Wall -pipe `pkg-config --cflags gtk+-2.0` -O3 -pthread -DNDEBUG -DwxUSE_UNICODE -DFFS_LINUX -DTIXML_USE_STL -DWXINTL_NO_GETTEXT_MACRO +COMMON_LINK_FLAGS = -O3 -pthread + #default build -FFS_CPPFLAGS = -Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -O3 -pthread -LINKFLAGS = `wx-config --libs --debug=no --unicode=yes` -lboost_thread -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 ifeq ($(BUILD),release) -FFS_CPPFLAGS = -Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes --static=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -O3 -pthread -LINKFLAGS = `wx-config --libs --debug=no --unicode=yes --static=yes` /usr/local/lib/libboost_thread.a -O3 -pthread +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 @@ -25,7 +28,7 @@ FILE_LIST+=../library/process_xml.cpp FILE_LIST+=../structures.cpp FILE_LIST+=../shared/util.cpp FILE_LIST+=../shared/check_exist.cpp -FILE_LIST+=../shared/localization_no_BOM.cpp +FILE_LIST+=../shared/i18n_no_BOM.cpp FILE_LIST+=../shared/inotify/inotify-cxx.cpp FILE_LIST+=../shared/tinyxml/tinyxml.cpp FILE_LIST+=../shared/tinyxml/tinyxmlerror.cpp @@ -37,13 +40,14 @@ FILE_LIST+=../shared/zstring.cpp FILE_LIST+=../shared/xml_base.cpp FILE_LIST+=../shared/custom_button.cpp FILE_LIST+=../shared/file_handling.cpp +FILE_LIST+=../shared/resolve_path.cpp FILE_LIST+=../shared/file_traverser.cpp FILE_LIST+=../shared/standard_paths.cpp FILE_LIST+=../shared/help_provider.cpp FILE_LIST+=../shared/file_io.cpp #list of all *.o files -OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/$(subst .cpp,.o,$(notdir $(file)))) +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))) @@ -52,23 +56,24 @@ DEP_LIST=$(foreach file, $(FILE_LIST), $(subst .cpp,.dep,$(file))) all: RealtimeSync init: - if [ ! -d OBJ ]; then mkdir OBJ; fi + if [ ! -d ../OBJ ]; then mkdir ../OBJ; fi + if [ ! -d ../OBJ/RTS_Release_GCC_Make ]; then mkdir ../OBJ/RTS_Release_GCC_Make; fi #remove byte ordering mark: needed by Visual C++ but an error with GCC - g++ -o OBJ/removeBOM ../tools/remove_BOM.cpp - ./OBJ/removeBOM ../shared/localization.cpp ../shared/localization_no_BOM.cpp + g++ -o ../OBJ/RTS_Release_GCC_Make/removeBOM ../tools/remove_BOM.cpp + ../OBJ/RTS_Release_GCC_Make/removeBOM ../shared/i18n.cpp ../shared/i18n_no_BOM.cpp %.dep : %.cpp #strip path information - g++ $(FFS_CPPFLAGS) -c $< -o OBJ/$(subst .cpp,.o,$(notdir $<)) + g++ $(FFS_CPPFLAGS) -c $< -o ../OBJ/RTS_Release_GCC_Make/$(subst .cpp,.o,$(notdir $<)) RealtimeSync: init $(DEP_LIST) #respect linker order: wxWidgets libraries last g++ -o ../BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS) clean: - rm -rf OBJ + rm -rf ../OBJ/RTS_Release_GCC_Make rm -f ../BUILD/$(APPNAME) - rm -f ../shared/localization_no_BOM.cpp + rm -f ../shared/i18n_no_BOM.cpp install: if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR); fi diff --git a/RealtimeSync/notify.cpp b/RealtimeSync/notify.cpp index 8029da6f..9f1398ed 100644 --- a/RealtimeSync/notify.cpp +++ b/RealtimeSync/notify.cpp @@ -199,7 +199,8 @@ public: { const DWORD lastError = ::GetLastError(); if (lastError != ERROR_CALL_NOT_IMPLEMENTED && //fail on SAMBA share: this shouldn't be a showstopper! - lastError != ERROR_SERVICE_SPECIFIC_ERROR) //neither should be fail for "Pogoplug" mapped network drives + lastError != ERROR_SERVICE_SPECIFIC_ERROR && //neither should be fail for "Pogoplug" mapped network drives + lastError != ERROR_INVALID_DATA) //this seems to happen for a NetDrive-mapped FTP server throw ffs3::FileError(wxString(wxT("Could not register device removal notifications:")) + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError)); } else diff --git a/RealtimeSync/pch.h b/RealtimeSync/pch.h deleted file mode 100644 index b3412782..00000000 --- a/RealtimeSync/pch.h +++ /dev/null @@ -1,103 +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 RTS_PRECOMPILED_HEADER -#define RTS_PRECOMPILED_HEADER - -//pay attention when using this file: might cause issues! -#ifndef __WXDEBUG__ -do NOT use in release build! -#endif - - //##################################################### - // basic wxWidgets headers -#ifndef WX_PRECOMP -#define WX_PRECOMP -#endif - -#include <wx/wxprec.h> - - //##################################################### - // #include other rarely changing headers here - - //STL headers -#include <string> -#include <algorithm> -#include <vector> -#include <queue> -#include <stack> -#include <set> -#include <map> -#include <memory> -#include <fstream> - -#ifdef FFS_LINUX -#include <utime.h> -#endif //FFS_LINUX - - //other wxWidgets headers -#include <wx/grid.h> -#include <wx/animate.h> -#include <wx/app.h> -#include <wx/arrstr.h> -#include <wx/bitmap.h> -#include <wx/bmpbuttn.h> -#include <wx/button.h> -#include <wx/checkbox.h> -#include <wx/choice.h> -#include <wx/clipbrd.h> -#include <wx/cmdline.h> -#include <wx/colour.h> -#include <wx/config.h> -#include <wx/dc.h> -#include <wx/dialog.h> -#include <wx/dir.h> -#include <wx/dnd.h> -#include <wx/file.h> -#include <wx/filename.h> -#include <wx/filepicker.h> -#include <wx/font.h> -#include <wx/frame.h> -#include <wx/gauge.h> -#include <wx/gdicmn.h> -#include <wx/grid.h> -#include <wx/hyperlink.h> -#include <wx/icon.h> -#include <wx/image.h> -#include <wx/intl.h> -#include <wx/log.h> -#include <wx/menu.h> -#include <wx/msgdlg.h> -#include <wx/panel.h> -#include <wx/radiobut.h> -#include <wx/settings.h> -#include <wx/sizer.h> -#include <wx/statbmp.h> -#include <wx/statbox.h> -#include <wx/statline.h> -#include <wx/stattext.h> -#include <wx/stdpaths.h> -#include <wx/stopwatch.h> -#include <wx/stream.h> -#include <wx/string.h> -#include <wx/textctrl.h> -#include <wx/thread.h> -#include <wx/utils.h> -#include <wx/wfstream.h> -#include <wx/zipstrm.h> -#include <wx/scrolwin.h> -#include <wx/notebook.h> - - //other -#include "../shared/tinyxml/tinyxml.h" -#include <sys/stat.h> - -#ifdef FFS_WIN -#include <wx/msw/wrapwin.h> //includes "windows.h" -#endif //FFS_WIN - //##################################################### - -#endif //RTS_PRECOMPILED_HEADER
\ No newline at end of file diff --git a/RealtimeSync/tray_menu.cpp b/RealtimeSync/tray_menu.cpp index 4123664c..fbfc3167 100644 --- a/RealtimeSync/tray_menu.cpp +++ b/RealtimeSync/tray_menu.cpp @@ -5,23 +5,24 @@ // ************************************************************************** // #include "tray_menu.h" +#include <algorithm> +#include <iterator> +#include <limits> #include <wx/msgdlg.h> #include <wx/taskbar.h> #include <wx/app.h> -#include "resources.h" -#include <algorithm> -#include <iterator> -#include "../shared/string_conv.h" #include <wx/utils.h> #include <wx/menu.h> #include "watcher.h" #include <wx/utils.h> #include <wx/log.h> -#include "../shared/assert_static.h" -#include "../shared/build_info.h" #include <wx/icon.h> //Linux needs this #include <wx/timer.h> -#include <limits> +#include "resources.h" +#include "../shared/string_conv.h" +#include "../shared/i18n.h" +#include "../shared/assert_static.h" +#include "../shared/build_info.h" using namespace rts; diff --git a/RealtimeSync/watcher.cpp b/RealtimeSync/watcher.cpp index d28c4488..ef43d8d9 100644 --- a/RealtimeSync/watcher.cpp +++ b/RealtimeSync/watcher.cpp @@ -6,13 +6,14 @@ // #include "watcher.h" #include "../shared/system_func.h" -#include <wx/intl.h> #include "../shared/string_conv.h" #include "../shared/file_handling.h" +#include "../shared/i18n.h" #include <stdexcept> #include <set> #include <wx/timer.h> #include <algorithm> +#include "../shared/resolve_path.h" #ifdef FFS_WIN #include "notify.h" @@ -94,10 +95,10 @@ public: { const int UPDATE_INTERVAL = 1000; //1 second interval - const wxLongLong newExec = wxGetLocalTimeMillis(); - if (newExec - lastExec >= UPDATE_INTERVAL) + const wxLongLong current = wxGetLocalTimeMillis(); + if (current - lastCheck >= UPDATE_INTERVAL) { - lastExec = newExec; + lastCheck = current; allExisting_ = std::find_if(dirList.begin(), dirList.end(), std::not1(std::ptr_fun(&ffs3::dirExists))) == dirList.end(); } @@ -105,7 +106,7 @@ public: } private: - mutable wxLongLong lastExec; + mutable wxLongLong lastCheck; mutable bool allExisting_; std::set<Zstring, LessFilename> dirList; //save avail. directories, avoid double-entries @@ -387,22 +388,35 @@ rts::WaitResult rts::waitForChanges(const std::vector<Zstring>& dirNames, WaitCa void rts::waitForMissingDirs(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler) //throw(FileError) { //new: support for monitoring newly connected directories volumes (e.g.: USB-sticks) - WatchDirectories dirWatcher; - for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i) + wxLongLong lastCheck; + + while (true) { - const Zstring formattedDir = ffs3::getFormattedDirectoryName(*i); + const int UPDATE_INTERVAL = 1000; //1 second interval + const wxLongLong current = wxGetLocalTimeMillis(); + if (current - lastCheck >= UPDATE_INTERVAL) + { + lastCheck = current; - if (formattedDir.empty()) - throw ffs3::FileError(_("At least one directory input field is empty.")); + bool allExisting = true; + for (std::vector<Zstring>::const_iterator i = dirNames.begin(); i != dirNames.end(); ++i) + { + //support specifying volume by name => call getFormattedDirectoryName() repeatedly + const Zstring formattedDir = ffs3::getFormattedDirectoryName(*i); - dirWatcher.addForMonitoring(formattedDir); - } + if (formattedDir.empty()) + throw ffs3::FileError(_("At least one directory input field is empty.")); - while (true) - { - if (dirWatcher.allExisting()) //check for newly arrived devices: - return; + if (!ffs3::dirExists(formattedDir)) + { + allExisting = false; + break; + } + } + if (allExisting) //check for newly arrived devices: + return; + } wxMilliSleep(rts::UI_UPDATE_INTERVAL); statusHandler->requestUiRefresh(); diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h index 7208e7fb..46dfc50e 100644 --- a/RealtimeSync/watcher.h +++ b/RealtimeSync/watcher.h @@ -33,7 +33,7 @@ enum WaitResult CHANGE_DETECTED, CHANGE_DIR_MISSING }; -WaitResult waitForChanges(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler); //throw(FileError) +WaitResult waitForChanges(const std::vector<Zstring>& dirNames444, WaitCallback* statusHandler); //throw(FileError) //wait until all directories become available (again) void waitForMissingDirs(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler); //throw(FileError) diff --git a/RealtimeSync/xml_proc.cpp b/RealtimeSync/xml_proc.cpp index ca217b44..4d7f88e0 100644 --- a/RealtimeSync/xml_proc.cpp +++ b/RealtimeSync/xml_proc.cpp @@ -6,7 +6,7 @@ // #include "xml_proc.h" #include <wx/filefn.h> -#include <wx/intl.h> +#include "../shared/i18n.h" class RtsXmlParser : public xmlAccess::XmlParser diff --git a/algorithm.cpp b/algorithm.cpp index 85c557b3..3248f726 100644 --- a/algorithm.cpp +++ b/algorithm.cpp @@ -5,7 +5,7 @@ // ************************************************************************** // #include "algorithm.h" -#include <wx/intl.h> +#include <iterator> #include <stdexcept> #include <wx/log.h> #include "library/resources.h" @@ -16,10 +16,10 @@ #include <boost/bind.hpp> #include "shared/string_conv.h" #include "shared/global_func.h" +#include "shared/i18n.h" #include "shared/loki/TypeManip.h" #include "library/db_file.h" #include "library/cmp_filetime.h" -//#include "shared/loki/NullType.h" using namespace ffs3; @@ -1055,7 +1055,7 @@ void ffs3::setActiveStatus(bool newStatus, ffs3::FolderComparison& folderCmp) void ffs3::setActiveStatus(bool newStatus, ffs3::FileSystemObject& fsObj) { fsObj.setActive(newStatus); - /* + //process subdirectories also! struct Recurse: public FSObjectVisitor { @@ -1073,7 +1073,6 @@ void ffs3::setActiveStatus(bool newStatus, ffs3::FileSystemObject& fsObj) const bool newStatus_; } recurse(newStatus); fsObj.accept(recurse); - */ } namespace @@ -1257,7 +1256,7 @@ std::pair<wxString, int> ffs3::deleteFromGridAndHDPreview( //assemble message co namespace { -struct RemoveCallbackImpl : public ffs3::RemoveDirCallback +struct RemoveCallbackImpl : public ffs3::CallbackRemoveDir { RemoveCallbackImpl(DeleteFilesHandler& deleteCallback) : deleteCallback_(deleteCallback) {} @@ -1272,19 +1271,19 @@ private: } -template <SelectedSide side> -void deleteFromGridAndHDOneSide(std::vector<FileSystemObject*>& rowsToDeleteOneSide, +template <SelectedSide side, class InputIterator> +void deleteFromGridAndHDOneSide(InputIterator first, InputIterator last, const bool useRecycleBin, DeleteFilesHandler& statusHandler) { - for (std::vector<FileSystemObject*>::const_iterator i = rowsToDeleteOneSide.begin(); i != rowsToDeleteOneSide.end(); ++i) + for (InputIterator i = first; i != last; ++i) { while (true) { try { FileSystemObject* const fsObj = *i; //all pointers are required(!) to be bound - if (!fsObj->isEmpty<side>()) + if (!fsObj->isEmpty<side>()) //element may become implicitly delted, e.g. if parent folder was deleted first { if (useRecycleBin) ffs3::moveToRecycleBin(fsObj->getFullName<side>()); //throw (FileError) @@ -1334,8 +1333,9 @@ void deleteFromGridAndHDOneSide(std::vector<FileSystemObject*>& rowsToDeleteOneS else setSyncDirectionRec(SYNC_DIR_LEFT, *fsObj); } - statusHandler.deletionSuccessful(1); //notify successful file/folder deletion + //notify successful file/folder deletion: make sure [first, last) contains to be deleted entries only, to avoid miscalculation + statusHandler.deletionSuccessful(1); break; } catch (const FileError& error) @@ -1381,33 +1381,37 @@ void ffs3::deleteFromGridAndHD(FolderComparison& folderCmp, { FinalizeDeletion dummy(folderCmp); //ensure cleanup: redetermination of sync-directions and removal of invalid rows + std::set<FileSystemObject*> deleteLeft; + std::set<FileSystemObject*> deleteRight; if (deleteOnBothSides) { //mix selected rows from left and right (and remove duplicates) - std::set<FileSystemObject*> temp(rowsToDeleteOnLeft.begin(), rowsToDeleteOnLeft.end()); - temp.insert(rowsToDeleteOnRight.begin(), rowsToDeleteOnRight.end()); + std::set<FileSystemObject*> tmp(rowsToDeleteOnLeft.begin(), rowsToDeleteOnLeft.end()); + tmp.insert(rowsToDeleteOnRight.begin(), rowsToDeleteOnRight.end()); - std::vector<FileSystemObject*> rowsToDeleteBothSides(temp.begin(), temp.end()); + std::remove_copy_if(tmp.begin(), tmp.end(), + std::inserter(deleteLeft, deleteLeft.begin()), std::mem_fun(&FileSystemObject::isEmpty<LEFT_SIDE>)); //remove empty rows to ensure correct statistics - deleteFromGridAndHDOneSide<LEFT_SIDE>(rowsToDeleteBothSides, - useRecycleBin, - statusHandler); - - deleteFromGridAndHDOneSide<RIGHT_SIDE>(rowsToDeleteBothSides, - useRecycleBin, - statusHandler); + std::remove_copy_if(tmp.begin(), tmp.end(), + std::inserter(deleteRight, deleteRight.begin()), std::mem_fun(&FileSystemObject::isEmpty<RIGHT_SIDE>)); } else { - deleteFromGridAndHDOneSide<LEFT_SIDE>(rowsToDeleteOnLeft, - useRecycleBin, - statusHandler); + std::remove_copy_if(rowsToDeleteOnLeft.begin(), rowsToDeleteOnLeft.end(), + std::inserter(deleteLeft, deleteLeft.begin()), std::mem_fun(&FileSystemObject::isEmpty<LEFT_SIDE>)); //remove empty rows to ensure correct statistics - deleteFromGridAndHDOneSide<RIGHT_SIDE>(rowsToDeleteOnRight, - useRecycleBin, - statusHandler); + std::remove_copy_if(rowsToDeleteOnRight.begin(), rowsToDeleteOnRight.end(), + std::inserter(deleteRight, deleteRight.begin()), std::mem_fun(&FileSystemObject::isEmpty<RIGHT_SIDE>)); } + + deleteFromGridAndHDOneSide<LEFT_SIDE>(deleteLeft.begin(), deleteLeft.end(), + useRecycleBin, + statusHandler); + + deleteFromGridAndHDOneSide<RIGHT_SIDE>(deleteRight.begin(), deleteRight.end(), + useRecycleBin, + statusHandler); } diff --git a/comparison.cpp b/comparison.cpp index 80ecacc0..b1e60eae 100644 --- a/comparison.cpp +++ b/comparison.cpp @@ -7,8 +7,7 @@ #include "comparison.h" #include <stdexcept> #include "shared/global_func.h" -#include <wx/intl.h> -//#include <wx/timer.h> +#include "shared/i18n.h" #include <wx/msgdlg.h> #include <wx/log.h> #include "algorithm.h" @@ -16,6 +15,7 @@ #include <memory> #include "shared/string_conv.h" #include "shared/file_handling.h" +#include "shared/resolve_path.h" #include "shared/system_func.h" #include "shared/file_traverser.h" #include "library/filter.h" @@ -639,9 +639,7 @@ void CompareProcess::startCompareProcess(const std::vector<FolderPairCfg>& direc wxLogNull noWxLogs; //hide wxWidgets log messages in release build #endif - // #ifdef FFS_WIN //PERF_START; - // #endif //init process: keep at beginning so that all gui elements are initialized properly diff --git a/library/binary.cpp b/library/binary.cpp index 1b722702..72fc220a 100644 --- a/library/binary.cpp +++ b/library/binary.cpp @@ -68,8 +68,8 @@ private: bool ffs3::filesHaveSameContent(const Zstring& filename1, const Zstring& filename2, CompareCallback& callback) { - FileInput file1(filename1); //throw FileError() - FileInput file2(filename2); //throw FileError() + FileInput file1(filename1); //throw (FileError) + FileInput file2(filename2); //throw (FileError) BufferSize bufferSize; diff --git a/library/custom_grid.cpp b/library/custom_grid.cpp index 7b853138..d8ced2a3 100644 --- a/library/custom_grid.cpp +++ b/library/custom_grid.cpp @@ -15,10 +15,12 @@ #include "../ui/grid_view.h" #include "../synchronization.h" #include "../shared/custom_tooltip.h" +#include "../shared/i18n.h" #include <wx/dcclient.h> #include "icon_buffer.h" #include <wx/icon.h> #include <wx/tooltip.h> +#include <wx/settings.h> #ifdef FFS_WIN #include <wx/timer.h> @@ -155,13 +157,14 @@ public: virtual wxGridCellAttr* GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) { - const wxColour color = getRowColor(row); + const std::pair<wxColour, wxColour> color = getRowColor(row); //add color to some rows wxGridCellAttr* result = wxGridTableBase::GetAttr(row, col, kind); if (result) { - if (result->GetBackgroundColour() == color) + if (result->GetTextColour() == color.first && + result->GetBackgroundColour() == color.second) { return result; } @@ -175,7 +178,8 @@ public: else result = new wxGridCellAttr; //created with ref-count 1 - result->SetBackgroundColour(color); + result->SetTextColour (color.first); + result->SetBackgroundColour(color.second); return result; } @@ -206,7 +210,7 @@ protected: const GridView* gridDataView; //(very fast) access to underlying grid data :) private: - virtual const wxColour getRowColor(int row) = 0; //rows that are filtered out are shown in different color + 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; @@ -406,37 +410,48 @@ protected: private: - virtual const wxColour getRowColor(int row) //rows that are filtered out are shown in different color + 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()) - return COLOR_BLUE; - - //mark directories and symlinks - struct GetRowColor : public FSObjectVisitor { - virtual void visit(const FileMapping& fileObj) - { - rowColor = *wxWHITE; - } - virtual void visit(const SymLinkMapping& linkObj) - { - rowColor = COLOR_ORANGE; - } - virtual void visit(const DirMapping& dirObj) + result.first = *wxBLACK; + result.second = COLOR_BLUE; + } + else + { + //mark directories and symlinks + struct GetRowColor : public FSObjectVisitor { - rowColor = COLOR_GREY; - } + 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; + } - wxColour rowColor; - } getCol; - fsObj->accept(getCol); - return getCol.rowColor; + private: + wxColour& foreground_; + wxColour& background_; + } getCol(result.first, result.second); + fsObj->accept(getCol); + } } - return *wxWHITE; + + return result; } std::vector<xmlAccess::ColumnTypes> columnPositions; @@ -516,62 +531,89 @@ public: } private: - virtual const wxColour getRowColor(int row) //rows that are filtered out are shown in different color + 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()) - return COLOR_BLUE; - - if (syncPreviewActive) //synchronization preview { - switch (fsObj->getSyncOperation()) //evaluate comparison result and sync direction - { - case SO_CREATE_NEW_LEFT: - case SO_DELETE_LEFT: - case SO_OVERWRITE_LEFT: - return COLOR_SYNC_BLUE; - case SO_COPY_METADATA_TO_LEFT: - return COLOR_SYNC_BLUE_LIGHT; - case SO_CREATE_NEW_RIGHT: - case SO_DELETE_RIGHT: - case SO_OVERWRITE_RIGHT: - return COLOR_SYNC_GREEN; - case SO_COPY_METADATA_TO_RIGHT: - return COLOR_SYNC_GREEN_LIGHT; - case SO_UNRESOLVED_CONFLICT: - return COLOR_YELLOW; - case SO_DO_NOTHING: - case SO_EQUAL: - return *wxWHITE; - } + result.first = *wxBLACK;; + result.second = COLOR_BLUE; } - else //comparison results view + else { - switch (fsObj->getCategory()) + if (syncPreviewActive) //synchronization preview { - case FILE_LEFT_SIDE_ONLY: - case FILE_RIGHT_SIDE_ONLY: - return COLOR_CMP_GREEN; - case FILE_LEFT_NEWER: - case FILE_RIGHT_NEWER: - return COLOR_CMP_BLUE; - case FILE_DIFFERENT: - return COLOR_CMP_RED; - case FILE_EQUAL: - return *wxWHITE; - case FILE_CONFLICT: - return COLOR_YELLOW; - case FILE_DIFFERENT_METADATA: - return COLOR_YELLOW_LIGHT; + 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: + result.first = *wxBLACK; + result.second = COLOR_SYNC_BLUE; + break; + case SO_COPY_METADATA_TO_LEFT: + result.first = *wxBLACK; + result.second = COLOR_SYNC_BLUE_LIGHT; + break; + case SO_CREATE_NEW_RIGHT: + case SO_OVERWRITE_RIGHT: + case SO_DELETE_RIGHT: + result.first = *wxBLACK; + result.second = COLOR_SYNC_GREEN; + break; + case SO_COPY_METADATA_TO_RIGHT: + result.first = *wxBLACK; + result.second = COLOR_SYNC_GREEN_LIGHT; + break; + 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_RIGHT_SIDE_ONLY: + result.first = *wxBLACK; + result.second = COLOR_CMP_GREEN; + break; + case FILE_LEFT_NEWER: + case FILE_RIGHT_NEWER: + result.first = *wxBLACK; + result.second = COLOR_CMP_BLUE; + 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; + } } } } - //fallback - return *wxWHITE; + return result; } bool syncPreviewActive; //determines wheter grid shall show compare result or sync preview @@ -1309,20 +1351,20 @@ void CustomGridRim::setTooltip(const wxMouseEvent& event) virtual void visit(const FileMapping& fileObj) { - tipMsg_ = zToWx(fileObj.getShortName<side>()) + wxT("\n") + + tipMsg_ = zToWx(fileObj.getRelativeName<side>()) + wxT("\n") + _("Size") + wxT(": ") + ffs3::formatFilesizeToShortString(fileObj.getFileSize<side>()) + wxT("\n") + _("Date") + wxT(": ") + ffs3::utcTimeToLocalString(fileObj.getLastWriteTime<side>()); } virtual void visit(const SymLinkMapping& linkObj) { - tipMsg_ = zToWx(linkObj.getShortName<side>()) + wxT("\n") + + tipMsg_ = zToWx(linkObj.getRelativeName<side>()) + wxT("\n") + _("Date") + wxT(": ") + ffs3::utcTimeToLocalString(linkObj.getLastWriteTime<side>()); } virtual void visit(const DirMapping& dirObj) { - tipMsg_ = zToWx(dirObj.getShortName<side>()); + tipMsg_ = zToWx(dirObj.getRelativeName<side>()); } wxString& tipMsg_; @@ -1857,7 +1899,6 @@ CustomGridMiddle::CustomGridMiddle(wxWindow* parent, 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); @@ -2048,37 +2089,48 @@ void CustomGridMiddle::OnLeftMouseDown(wxMouseEvent& event) void CustomGridMiddle::OnLeftMouseUp(wxMouseEvent& event) { - const int rowEndFiltering = mousePosToCell(event.GetPosition()).first; + //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 <= rowEndFiltering) + if (0 <= selectionRowBegin && 0 <= selRowEnd) { switch (selectionPos) { case BLOCKPOS_CHECK_BOX: { //create a custom event - FFSCheckRowsEvent evt(selectionRowBegin, rowEndFiltering); + FFSCheckRowsEvent evt(selectionRowBegin, selRowEnd); AddPendingEvent(evt); } break; case BLOCKPOS_LEFT: { //create a custom event - FFSSyncDirectionEvent evt(selectionRowBegin, rowEndFiltering, SYNC_DIR_LEFT); + FFSSyncDirectionEvent evt(selectionRowBegin, selRowEnd, SYNC_DIR_LEFT); AddPendingEvent(evt); } break; case BLOCKPOS_MIDDLE: { //create a custom event - FFSSyncDirectionEvent evt(selectionRowBegin, rowEndFiltering, SYNC_DIR_NONE); + FFSSyncDirectionEvent evt(selectionRowBegin, selRowEnd, SYNC_DIR_NONE); AddPendingEvent(evt); } break; case BLOCKPOS_RIGHT: { //create a custom event - FFSSyncDirectionEvent evt(selectionRowBegin, rowEndFiltering, SYNC_DIR_RIGHT); + FFSSyncDirectionEvent evt(selectionRowBegin, selRowEnd, SYNC_DIR_RIGHT); AddPendingEvent(evt); } break; diff --git a/library/db_file.cpp b/library/db_file.cpp index 180ab0a4..43ebf283 100644 --- a/library/db_file.cpp +++ b/library/db_file.cpp @@ -9,13 +9,13 @@ #include <wx/zstream.h> #include "../shared/global_func.h" #include "../shared/file_error.h" -#include <wx/intl.h> #include "../shared/string_conv.h" #include "../shared/file_handling.h" #include <wx/mstream.h> #include "../shared/serialize.h" #include "../shared/file_io.h" #include "../shared/loki/ScopeGuard.h" +#include "../shared/i18n.h" #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" @@ -36,7 +36,7 @@ const int FILE_FORMAT_VER = 5; class FileInputStreamDB : public FileInputStream { public: - FileInputStreamDB(const Zstring& filename) : //throw FileError() + FileInputStreamDB(const Zstring& filename) : //throw (FileError) FileInputStream(filename) { //read FreeFileSync file identifier @@ -54,7 +54,7 @@ private: class FileOutputStreamDB : public FileOutputStream { public: - FileOutputStreamDB(const Zstring& filename) : //throw FileError() + FileOutputStreamDB(const Zstring& filename) : //throw (FileError) FileOutputStream(filename) { //write FreeFileSync file identifier @@ -466,24 +466,11 @@ void ffs3::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileError) dbEntriesLeft.second[dbEntriesRight.first] = dbEntryLeft; dbEntriesRight.second[dbEntriesLeft.first] = dbEntryRight; - - struct TryCleanUp //ensure cleanup if working with temporary failed! - { - static void tryDeleteFile(const Zstring& filename) //throw () - { - try - { - removeFile(filename); - } - catch (...) {} - } - }; - //write (temp-) files... - Loki::ScopeGuard guardTempFileLeft = Loki::MakeGuard(&TryCleanUp::tryDeleteFile, fileNameLeftTmp); + Loki::ScopeGuard guardTempFileLeft = Loki::MakeGuard(&ffs3::removeFile, fileNameLeftTmp); saveFile(dbEntriesLeft, fileNameLeftTmp); //throw (FileError) - Loki::ScopeGuard guardTempFileRight = Loki::MakeGuard(&TryCleanUp::tryDeleteFile, fileNameRightTmp); + Loki::ScopeGuard guardTempFileRight = Loki::MakeGuard(&ffs3::removeFile, fileNameRightTmp); saveFile(dbEntriesRight, fileNameRightTmp); //throw (FileError) //operation finished: rename temp files -> this should work transactionally: diff --git a/library/dir_lock.cpp b/library/dir_lock.cpp index ba515a31..521f1c6f 100644 --- a/library/dir_lock.cpp +++ b/library/dir_lock.cpp @@ -1,23 +1,23 @@ #include "dir_lock.h" -#include <wx/intl.h> -#include "../shared/string_conv.h" -#include "../shared/system_func.h" +#include <utility> #include <wx/utils.h> #include <wx/timer.h> +#include <wx/log.h> +#include <wx/msgdlg.h> +#include <boost/cstdint.hpp> #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> +#include "../shared/string_conv.h" +#include "../shared/i18n.h" +#include "../shared/system_func.h" #include "../shared/boost_thread_wrap.h" //include <boost/thread.hpp> #include "../shared/loki/ScopeGuard.h" -#include <wx/msgdlg.h> #include "../shared/system_constants.h" #include "../shared/guid.h" #include "../shared/file_io.h" #include "../shared/assert_static.h" -#include <utility> #include "../shared/serialize.h" -#include <boost/cstdint.hpp> #include "../shared/build_info.h" -#include <wx/log.h> #ifdef FFS_WIN #include <tlhelp32.h> @@ -109,12 +109,11 @@ public: return; DWORD bytesWritten = 0; - ::WriteFile( - fileHandle, //__in HANDLE hFile, - buffer, //__out LPVOID lpBuffer, - 1, //__in DWORD nNumberOfBytesToRead, - &bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten, - NULL); //__inout_opt LPOVERLAPPED lpOverlapped + ::WriteFile(fileHandle, //__in HANDLE hFile, + buffer, //__out LPVOID lpBuffer, + 1, //__in DWORD nNumberOfBytesToRead, + &bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten, + NULL); //__inout_opt LPOVERLAPPED lpOverlapped #elif defined FFS_LINUX const int fileHandle = ::open(lockfilename_.c_str(), O_WRONLY | O_APPEND); //O_EXCL contains a race condition on NFS file systems: http://linux.die.net/man/2/open @@ -346,7 +345,7 @@ ProcessStatus getProcessStatus(const LockInformation::ProcessDescription& procDe void writeLockInfo(const Zstring& lockfilename) //throw (FileError) { //write GUID at the beginning of the file: this ID is a universal identifier for this lock (no matter what the path is, considering symlinks, distributed network, etc.) - FileOutputStream lockFile(lockfilename); //throw FileError() + FileOutputStream lockFile(lockfilename); //throw (FileError) LockInformation().toStream(lockFile); } diff --git a/library/error_log.cpp b/library/error_log.cpp index 1549c6b5..483d670b 100644 --- a/library/error_log.cpp +++ b/library/error_log.cpp @@ -6,7 +6,7 @@ // #include "error_log.h" #include <wx/datetime.h> -#include <wx/intl.h> +#include "../shared/i18n.h" using ffs3::ErrorLogging; diff --git a/library/icon_buffer.cpp b/library/icon_buffer.cpp index e346e4be..14883deb 100644 --- a/library/icon_buffer.cpp +++ b/library/icon_buffer.cpp @@ -10,6 +10,7 @@ #include <queue> #include <set> #include <wx/log.h> +#include "../shared/i18n.h" #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" diff --git a/library/process_xml.cpp b/library/process_xml.cpp index 79d233fc..9f95f5a3 100644 --- a/library/process_xml.cpp +++ b/library/process_xml.cpp @@ -6,11 +6,11 @@ // #include "process_xml.h" #include "../shared/xml_base.h" -#include <wx/intl.h> -#include <wx/filefn.h> +#include "../shared/i18n.h" #include "../shared/global_func.h" #include "../shared/standard_paths.h" #include "../shared/string_conv.h" +#include "../shared/file_handling.h" using namespace ffs3; using namespace xmlAccess; //functionally needed!!! @@ -52,7 +52,7 @@ bool writeXmlMainConfig(const MainConfiguration& mainCfg, TiXmlDocument& doc); void xmlAccess::readConfig(const wxString& filename, xmlAccess::XmlGuiConfig& config) { //load XML - if (!wxFileExists(filename)) + if (!fileExists(wxToZ(filename))) throw XmlError(wxString(_("File does not exist:")) + wxT("\n\"") + filename + wxT("\"")); TiXmlDocument doc; @@ -70,7 +70,7 @@ void xmlAccess::readConfig(const wxString& filename, xmlAccess::XmlGuiConfig& co void xmlAccess::readConfig(const wxString& filename, xmlAccess::XmlBatchConfig& config) { //load XML - if (!wxFileExists(filename)) + if (!fileExists(wxToZ(filename))) throw XmlError(wxString(_("File does not exist:")) + wxT("\n\"") + filename + wxT("\"")); TiXmlDocument doc; @@ -88,7 +88,7 @@ void xmlAccess::readConfig(const wxString& filename, xmlAccess::XmlBatchConfig& void xmlAccess::readConfig(xmlAccess::XmlGlobalSettings& config) { //load XML - if (!wxFileExists(getGlobalConfigFile())) + if (!fileExists(wxToZ(getGlobalConfigFile()))) throw XmlError(wxString(_("File does not exist:")) + wxT("\n\"") + getGlobalConfigFile() + wxT("\"")); TiXmlDocument doc; @@ -981,12 +981,6 @@ bool writeXmlGlobalSettings(const xmlAccess::XmlGlobalSettings& inputCfg, TiXmlD } -int xmlAccess::retrieveSystemLanguage() -{ - return wxLocale::GetSystemLanguage(); -} - - wxString xmlAccess::getGlobalConfigFile() { return ffs3::getConfigDir() + wxT("GlobalSettings.xml"); diff --git a/library/process_xml.h b/library/process_xml.h index dcd80327..589865a2 100644 --- a/library/process_xml.h +++ b/library/process_xml.h @@ -9,6 +9,7 @@ #include "../structures.h" #include "../shared/xml_error.h" +#include "../shared/i18n.h" namespace xmlAccess @@ -91,9 +92,6 @@ struct XmlBatchConfig }; -int retrieveSystemLanguage(); - - struct OptionalDialogs { OptionalDialogs() @@ -121,7 +119,7 @@ struct XmlGlobalSettings //--------------------------------------------------------------------- //Shared (GUI/BATCH) settings XmlGlobalSettings() : - programLanguage(retrieveSystemLanguage()), + programLanguage(ffs3::retrieveSystemLanguage()), copyLockedFiles(true), copyFilePermissions(false), fileTimeTolerance(2), //default 2s: FAT vs NTFS diff --git a/library/statistics.cpp b/library/statistics.cpp index c0bb2b25..cb68d1de 100644 --- a/library/statistics.cpp +++ b/library/statistics.cpp @@ -10,7 +10,7 @@ #include "../shared/global_func.h" #include "status_handler.h" #include "../shared/util.h" -#include <wx/intl.h> +#include "../shared/i18n.h" #include <limits> #include <wx/stopwatch.h> #include "../shared/assert_static.h" diff --git a/shared/ShadowCopy/LockFile.cpp b/shared/ShadowCopy/LockFile.cpp new file mode 100644 index 00000000..0761a3e3 --- /dev/null +++ b/shared/ShadowCopy/LockFile.cpp @@ -0,0 +1,44 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. 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 <string> +#include <iostream> +#define WIN32_LEAN_AND_MEAN +#include "windows.h" + +int wmain(int argc, wchar_t* argv[]) +{ + if (argc <= 1) + { + std::wcout << "Please enter the filename to be locked as %1 parameter!" << "\n\n"; + system("pause"); + return -1; + } + std::wstring filename = argv[1]; + + //obtain exclusive lock on test file + HANDLE hFile = ::CreateFile(filename.c_str(), + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + NULL); + if (hFile == INVALID_HANDLE_VALUE) + { + std::wcout << "Error obtaining exclusive lock on test file: " << filename << "\n\n"; + system("pause"); + return -1; + } + + std::wcout << "File " << filename << " is locked! Press a key to unlock." << "\n\n"; + system("pause"); + + ::CloseHandle(hFile); + return 0; +} + diff --git a/shared/custom_button.cpp b/shared/custom_button.cpp index de057dc5..df65a401 100644 --- a/shared/custom_button.cpp +++ b/shared/custom_button.cpp @@ -8,6 +8,8 @@ #include <wx/dcmemory.h> #include <wx/image.h> #include <algorithm> +#include <limits> +#include <cmath> wxButtonWithImage::wxButtonWithImage(wxWindow* parent, @@ -50,23 +52,29 @@ void wxButtonWithImage::setBitmapBack(const wxBitmap& bitmap, unsigned spaceBefo } -void makeWhiteTransparent(const wxColor exceptColor, wxImage& image) +void makeWhiteTransparent(wxImage& image) //assume black text on white background { - unsigned char* alphaData = image.GetAlpha(); - if (alphaData) + unsigned char* alphaFirst = image.GetAlpha(); + if (alphaFirst) { - assert(exceptColor.Red() != 255); + unsigned char* alphaLast = alphaFirst + image.GetWidth() * image.GetHeight(); - unsigned char exCol = exceptColor.Red(); //alpha value can be extracted from any one of (red/green/blue) - unsigned char* imageStart = image.GetData(); + //dist(black, white) + double distBlackWhite = std::sqrt(3.0 * 255 * 255); - unsigned char* j = alphaData; - const unsigned char* const rowEnd = j + image.GetWidth() * image.GetHeight(); - while (j != rowEnd) + const unsigned char* bytePos = image.GetData(); + + for (unsigned char* j = alphaFirst; j != alphaLast; ++j) { - const unsigned char* imagePixel = imageStart + (j - alphaData) * 3; //each pixel consists of three chars - //exceptColor(red,green,blue) becomes fully opaque(255), while white(255,255,255) becomes transparent(0) - *(j++) = ((255 - imagePixel[0]) * wxIMAGE_ALPHA_OPAQUE) / (255 - exCol); + unsigned char r = *bytePos++; // + unsigned char g = *bytePos++; //each pixel consists of three chars + unsigned char b = *bytePos++; // + + //dist((r,g,b), white) + double distColWhite = std::sqrt((255.0 - r) * (255.0 - r) + (255.0 - g) * (255.0 - g) + (255.0 - b) * (255.0 - b)); + + //black(0,0,0) becomes fully opaque(255), while white(255,255,255) becomes transparent(0) + *j = distColWhite / distBlackWhite * wxIMAGE_ALPHA_OPAQUE; } } } @@ -132,8 +140,11 @@ void linearInterpolation(wxImage& img) } */ + wxBitmap wxButtonWithImage::createBitmapFromText(const wxString& text) { + //wxDC::DrawLabel() doesn't respect alpha channel at all => apply workaround to calculate alpha values manually: + if (text.empty()) return wxBitmap(); @@ -143,29 +154,32 @@ wxBitmap wxButtonWithImage::createBitmapFromText(const wxString& text) wxSize sizeNeeded = getSizeNeeded(text, currentFont); wxBitmap newBitmap(sizeNeeded.GetWidth(), sizeNeeded.GetHeight()); - wxMemoryDC dc; - dc.SelectObject(newBitmap); - - //set up white background - dc.SetBackground(*wxWHITE_BRUSH); - dc.Clear(); - - //find position of accelerator - int indexAccel = -1; - size_t accelPos; - wxString textLabelFormatted = text; - if ((accelPos = text.find(wxT("&"))) != wxString::npos) { - textLabelFormatted.Replace(wxT("&"), wxT(""), false); //remove accelerator - indexAccel = static_cast<int>(accelPos); - } + wxMemoryDC dc; + dc.SelectObject(newBitmap); + + //set up white background + dc.SetBackground(*wxWHITE_BRUSH); + dc.Clear(); + + //find position of accelerator + int indexAccel = -1; + size_t accelPos; + wxString textLabelFormatted = text; + if ((accelPos = text.find(wxT("&"))) != wxString::npos) + { + textLabelFormatted.Replace(wxT("&"), wxT(""), false); //remove accelerator + indexAccel = static_cast<int>(accelPos); + } + + dc.SetTextForeground(*wxBLACK); //for use in makeWhiteTransparent + dc.SetTextBackground(*wxWHITE); // + dc.SetFont(currentFont); - dc.SetTextForeground(textColor); - dc.SetTextBackground(*wxWHITE); - dc.SetFont(currentFont); - dc.DrawLabel(textLabelFormatted, wxNullBitmap, wxRect(0, 0, newBitmap.GetWidth(), newBitmap.GetHeight()), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, indexAccel); + dc.DrawLabel(textLabelFormatted, wxNullBitmap, wxRect(0, 0, newBitmap.GetWidth(), newBitmap.GetHeight()), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, indexAccel); - dc.SelectObject(wxNullBitmap); + dc.SelectObject(wxNullBitmap); + } //add alpha channel to image wxImage finalImage(newBitmap.ConvertToImage()); @@ -173,8 +187,18 @@ wxBitmap wxButtonWithImage::createBitmapFromText(const wxString& text) //linearInterpolation(finalImage); - //make white background transparent - makeWhiteTransparent(textColor, finalImage); + //calculate values for alpha channel + makeWhiteTransparent(finalImage); + + //now apply real text color + unsigned char* bytePos = finalImage.GetData(); + const int pixelCount = finalImage.GetWidth() * finalImage.GetHeight(); + for (int i = 0; i < pixelCount; ++ i) + { + *bytePos++ = textColor.Red(); + *bytePos++ = textColor.Green(); + *bytePos++ = textColor.Blue(); + } return wxBitmap(finalImage); } diff --git a/shared/dir_name.cpp b/shared/dir_name.cpp index 5fd4eab2..3b0c3e82 100644 --- a/shared/dir_name.cpp +++ b/shared/dir_name.cpp @@ -8,13 +8,14 @@ #include <wx/dnd.h> #include <wx/window.h> #include <wx/textctrl.h> -#include <wx/filename.h> +#include <wx/statbox.h> #include "file_handling.h" +#include "resolve_path.h" #include "string_conv.h" #include "check_exist.h" #include "util.h" +#include "i18n.h" #include "system_constants.h" -#include <wx/statbox.h> //define new event type @@ -25,10 +26,9 @@ typedef void (wxEvtHandler::*FFSFileDropEventFunction)(FFSFileDropEvent&); #define FFSFileDropEventHandler(func) \ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(FFSFileDropEventFunction, &func) -class FFSFileDropEvent : public wxCommandEvent +struct FFSFileDropEvent : public wxCommandEvent { -public: - FFSFileDropEvent(const std::vector<wxString>& filesDropped, const wxWindow* dropWindow) : + FFSFileDropEvent(const std::vector<wxString>& filesDropped, const wxWindow& dropWindow) : wxCommandEvent(FFS_DROP_FILE_EVENT), filesDropped_(filesDropped), dropWindow_(dropWindow) {} @@ -39,7 +39,7 @@ public: } const std::vector<wxString> filesDropped_; - const wxWindow* dropWindow_; + const wxWindow& dropWindow_; }; @@ -78,11 +78,12 @@ void setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker, wxWindow& tooltipWnd, + wxStaticBoxSizer* staticBox, size_t timeout = 200) //pointers are optional { if (txtCtrl) txtCtrl->ChangeValue(dirname); - setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, NULL, timeout); + setDirectoryNameImpl(dirname, dirPicker, tooltipWnd, staticBox, timeout); } @@ -107,8 +108,7 @@ void setDirectoryName(const wxString& dirname, class WindowDropTarget : public wxFileDropTarget { public: - WindowDropTarget(wxWindow* dropWindow) : - dropWindow_(dropWindow) {} + WindowDropTarget(wxWindow& dropWindow) : dropWindow_(dropWindow) {} virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& fileArray) { @@ -120,25 +120,24 @@ public: { //create a custom event on drop window: execute event after file dropping is completed! (e.g. after mouse is released) FFSFileDropEvent evt(filenames, dropWindow_); - dropWindow_->GetEventHandler()->AddPendingEvent(evt); + dropWindow_.GetEventHandler()->AddPendingEvent(evt); } return false; } private: - wxWindow* dropWindow_; + wxWindow& dropWindow_; }; //############################################################################################################## using ffs3::DirectoryNameMainDlg; -DirectoryNameMainDlg::DirectoryNameMainDlg( - wxWindow* dropWindow1, - wxWindow* dropWindow2, - wxDirPickerCtrl* dirPicker, - wxComboBox* dirName, - wxStaticBoxSizer* staticBox) : +DirectoryNameMainDlg::DirectoryNameMainDlg(wxWindow& dropWindow1, + wxWindow& dropWindow2, + wxDirPickerCtrl& dirPicker, + wxComboBox& dirName, + wxStaticBoxSizer& staticBox) : dropWindow1_(dropWindow1), dropWindow2_(dropWindow2), dirPicker_(dirPicker), @@ -146,16 +145,16 @@ DirectoryNameMainDlg::DirectoryNameMainDlg( staticBox_(staticBox) { //prepare drag & drop - dropWindow1->SetDropTarget(new WindowDropTarget(dropWindow1)); //takes ownership - dropWindow2->SetDropTarget(new WindowDropTarget(dropWindow2)); //takes ownership + dropWindow1.SetDropTarget(new WindowDropTarget(dropWindow1)); //takes ownership + dropWindow2.SetDropTarget(new WindowDropTarget(dropWindow2)); //takes ownership //redirect drag & drop event back to this class - dropWindow1->Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryNameMainDlg::OnFilesDropped), NULL, this); - dropWindow2->Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryNameMainDlg::OnFilesDropped), NULL, this); + dropWindow1.Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryNameMainDlg::OnFilesDropped), NULL, this); + dropWindow2.Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryNameMainDlg::OnFilesDropped), NULL, this); //keep dirPicker and dirName synchronous - dirName-> Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DirectoryNameMainDlg::OnWriteDirManually), NULL, this ); - dirPicker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(DirectoryNameMainDlg::OnDirSelected), NULL, this ); + dirName .Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DirectoryNameMainDlg::OnWriteDirManually), NULL, this ); + dirPicker.Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(DirectoryNameMainDlg::OnDirSelected), NULL, this ); } @@ -164,19 +163,19 @@ void DirectoryNameMainDlg::OnFilesDropped(FFSFileDropEvent& event) if (event.filesDropped_.empty()) return; - if (this->dropWindow1_ == event.dropWindow_ || //file may be dropped on window 1 or 2 - this->dropWindow2_ == event.dropWindow_) + if (&dropWindow1_ == &event.dropWindow_ || //file may be dropped on window 1 or 2 + &dropWindow2_ == &event.dropWindow_) { if (AcceptDrop(event.filesDropped_)) { - wxString fileName = event.filesDropped_[0]; - if (wxDirExists(fileName)) - setDirectoryName(fileName, dirName_, dirPicker_, *dirName_, *staticBox_); + Zstring fileName = wxToZ(event.filesDropped_[0]); + if (dirExists(fileName)) + setDirectoryName(zToWx(fileName), &dirName_, &dirPicker_, dirName_, staticBox_); else { - fileName = wxFileName(fileName).GetPath(); - if (wxDirExists(fileName)) - setDirectoryName(fileName, dirName_, dirPicker_, *dirName_, *staticBox_); + fileName = fileName.BeforeLast(common::FILE_NAME_SEPARATOR); + if (dirExists(fileName)) + setDirectoryName(zToWx(fileName), &dirName_, &dirPicker_, dirName_, staticBox_); } } } @@ -185,7 +184,7 @@ void DirectoryNameMainDlg::OnFilesDropped(FFSFileDropEvent& event) void DirectoryNameMainDlg::OnWriteDirManually(wxCommandEvent& event) { - setDirectoryName(event.GetString(), NULL, dirPicker_, *dirName_, *staticBox_, 100); //potentially slow network access: wait 100 ms at most + setDirectoryName(event.GetString(), NULL, &dirPicker_, dirName_, staticBox_, 100); //potentially slow network access: wait 100 ms at most event.Skip(); } @@ -193,7 +192,7 @@ void DirectoryNameMainDlg::OnWriteDirManually(wxCommandEvent& event) void DirectoryNameMainDlg::OnDirSelected(wxFileDirPickerEvent& event) { const wxString newPath = event.GetPath(); - setDirectoryName(newPath, dirName_, NULL, *dirName_, *staticBox_); + setDirectoryName(newPath, &dirName_, NULL, dirName_, staticBox_); event.Skip(); } @@ -201,35 +200,37 @@ void DirectoryNameMainDlg::OnDirSelected(wxFileDirPickerEvent& event) Zstring DirectoryNameMainDlg::getName() const { - return wxToZ(dirName_->GetValue()); + return wxToZ(dirName_.GetValue()); } void DirectoryNameMainDlg::setName(const Zstring& dirname) { - setDirectoryName(zToWx(dirname), dirName_, dirPicker_, *dirName_, *staticBox_); + setDirectoryName(zToWx(dirname), &dirName_, &dirPicker_, dirName_, staticBox_); } //############################################################################################################## using ffs3::DirectoryName; -DirectoryName::DirectoryName(wxWindow* dropWindow, - wxDirPickerCtrl* dirPicker, - wxTextCtrl* dirName) : +DirectoryName::DirectoryName(wxWindow& dropWindow, + wxDirPickerCtrl& dirPicker, + wxTextCtrl& dirName, + wxStaticBoxSizer* staticBox) : dropWindow_(dropWindow), dirPicker_(dirPicker), - dirName_(dirName) + dirName_(dirName), + staticBox_(staticBox) { //prepare drag & drop - dropWindow->SetDropTarget(new WindowDropTarget(dropWindow)); //takes ownership + dropWindow.SetDropTarget(new WindowDropTarget(dropWindow)); //takes ownership //redirect drag & drop event back to this class - dropWindow->Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this); + dropWindow.Connect(FFS_DROP_FILE_EVENT, FFSFileDropEventHandler(DirectoryName::OnFilesDropped), NULL, this); //keep dirPicker and dirName synchronous - dirName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DirectoryName::OnWriteDirManually ), NULL, this ); - dirPicker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DirectoryName::OnDirSelected ), NULL, this ); + dirName.Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DirectoryName::OnWriteDirManually ), NULL, this ); + dirPicker.Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DirectoryName::OnDirSelected ), NULL, this ); } @@ -238,16 +239,16 @@ void DirectoryName::OnFilesDropped(FFSFileDropEvent& event) if (event.filesDropped_.empty()) return; - if (this->dropWindow_ == event.dropWindow_) + if (&dropWindow_ == &event.dropWindow_) { - wxString fileName = event.filesDropped_[0]; - if (wxDirExists(fileName)) - setDirectoryName(fileName, dirName_, dirPicker_, *dirName_); + Zstring fileName = wxToZ(event.filesDropped_[0]); + if (dirExists(fileName)) + setDirectoryName(zToWx(fileName), &dirName_, &dirPicker_, dirName_, staticBox_); else { - fileName = wxFileName(fileName).GetPath(); - if (wxDirExists(fileName)) - setDirectoryName(fileName, dirName_, dirPicker_, *dirName_); + fileName = fileName.BeforeLast(common::FILE_NAME_SEPARATOR); + if (dirExists(fileName)) + setDirectoryName(zToWx(fileName), &dirName_, &dirPicker_, dirName_, staticBox_); } } } @@ -255,7 +256,7 @@ void DirectoryName::OnFilesDropped(FFSFileDropEvent& event) void DirectoryName::OnWriteDirManually(wxCommandEvent& event) { - setDirectoryName(event.GetString(), NULL, dirPicker_, *dirName_, 100); //potentially slow network access: wait 100 ms at most + setDirectoryName(event.GetString(), NULL, &dirPicker_, dirName_, staticBox_, 100); //potentially slow network access: wait 100 ms at most event.Skip(); } @@ -263,7 +264,7 @@ void DirectoryName::OnWriteDirManually(wxCommandEvent& event) void DirectoryName::OnDirSelected(wxFileDirPickerEvent& event) { const wxString newPath = event.GetPath(); - setDirectoryName(newPath, dirName_, NULL, *dirName_); + setDirectoryName(newPath, &dirName_, NULL, dirName_, staticBox_); event.Skip(); } @@ -271,11 +272,11 @@ void DirectoryName::OnDirSelected(wxFileDirPickerEvent& event) Zstring DirectoryName::getName() const { - return wxToZ(dirName_->GetValue()); + return wxToZ(dirName_.GetValue()); } void DirectoryName::setName(const Zstring& dirname) { - setDirectoryName(zToWx(dirname), dirName_, dirPicker_, *dirName_); + setDirectoryName(zToWx(dirname), &dirName_, &dirPicker_, dirName_, staticBox_); } diff --git a/shared/dir_name.h b/shared/dir_name.h index ad0f2a52..387f5668 100644 --- a/shared/dir_name.h +++ b/shared/dir_name.h @@ -15,7 +15,7 @@ #include "zstring.h" -class FFSFileDropEvent; +struct FFSFileDropEvent; class wxCommandEvent; class wxFileDirPickerEvent; @@ -26,11 +26,11 @@ namespace ffs3 class DirectoryNameMainDlg : private wxEvtHandler { public: - DirectoryNameMainDlg(wxWindow* dropWindow1, - wxWindow* dropWindow2, - wxDirPickerCtrl* dirPicker, - wxComboBox* dirName, - wxStaticBoxSizer* staticBox); + DirectoryNameMainDlg(wxWindow& dropWindow1, + wxWindow& dropWindow2, + wxDirPickerCtrl& dirPicker, + wxComboBox& dirName, + wxStaticBoxSizer& staticBox); virtual ~DirectoryNameMainDlg() {} @@ -44,20 +44,21 @@ private: void OnWriteDirManually(wxCommandEvent& event); void OnDirSelected(wxFileDirPickerEvent& event); - const wxWindow* dropWindow1_; - const wxWindow* dropWindow2_; - wxDirPickerCtrl* dirPicker_; - wxComboBox* dirName_; - wxStaticBoxSizer* staticBox_; + const wxWindow& dropWindow1_; + const wxWindow& dropWindow2_; + wxDirPickerCtrl& dirPicker_; + wxComboBox& dirName_; + wxStaticBoxSizer& staticBox_; }; class DirectoryName: private wxEvtHandler { public: - DirectoryName(wxWindow* dropWindow, - wxDirPickerCtrl* dirPicker, - wxTextCtrl* dirName); + DirectoryName(wxWindow& dropWindow, + wxDirPickerCtrl& dirPicker, + wxTextCtrl& dirName, + wxStaticBoxSizer* staticBox = NULL); //optional Zstring getName() const; void setName(const Zstring& dirname); @@ -67,9 +68,10 @@ private: void OnWriteDirManually(wxCommandEvent& event); void OnDirSelected(wxFileDirPickerEvent& event); - const wxWindow* dropWindow_; - wxDirPickerCtrl* dirPicker_; - wxTextCtrl* dirName_; + const wxWindow& dropWindow_; + wxDirPickerCtrl& dirPicker_; + wxTextCtrl& dirName_; + wxStaticBoxSizer* staticBox_; //optional }; } diff --git a/shared/dir_picker_i18n.h b/shared/dir_picker_i18n.h new file mode 100644 index 00000000..89b54bf4 --- /dev/null +++ b/shared/dir_picker_i18n.h @@ -0,0 +1,30 @@ +#ifndef DIR_PICKER_I18N_H_INCLUDED +#define DIR_PICKER_I18N_H_INCLUDED + +#include <wx/filepicker.h> +#include "i18n.h" + + +class FfsDirPickerCtrl : public wxDirPickerCtrl +{ +public: + FfsDirPickerCtrl(wxWindow* parent, wxWindowID id, + const wxString& path = wxEmptyString, + const wxString& message = wxDirSelectorPromptStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDirPickerCtrlNameStr) : + wxDirPickerCtrl(parent, id, path, message, pos, size, style, validator, name) + { +#ifdef FFS_WIN + //fix wxWidgets localization gap: + wxButton* button = dynamic_cast<wxButton*>(m_pickerIface); + if (button) button->SetLabel(_("Browse")); +#endif + } +}; + + +#endif // DIR_PICKER_I18N_H_INCLUDED diff --git a/shared/dst_hack.cpp b/shared/dst_hack.cpp index a2841ce0..5ec58e06 100644 --- a/shared/dst_hack.cpp +++ b/shared/dst_hack.cpp @@ -1,6 +1,6 @@ #include "dst_hack.h" #include "system_constants.h" -#include <wx/intl.h> +#include "i18n.h" #include "long_path_prefix.h" #include "string_conv.h" #include "system_func.h" @@ -10,51 +10,63 @@ #include "global_func.h" #include <limits> +using namespace ffs3; -bool dst::isFatDrive(const Zstring& fileName) //throw() -{ - using namespace ffs3; - - const size_t BUFFER_SIZE = MAX_PATH + 1; - wchar_t buffer[BUFFER_SIZE]; +namespace +{ +//fast ::GetVolumePathName() clone: let's hope it's not too simple (doesn't honor mount points) +Zstring getVolumeName(const Zstring& filename) +{ //this call is expensive: ~1.5 ms! - // if (!::GetVolumePathName(applyLongPathPrefix(fileName).c_str(), //__in LPCTSTR lpszFileName, - // buffer, //__out LPTSTR lpszVolumePathName, + // if (!::GetVolumePathName(applyLongPathPrefix(filename).c_str(), //__in LPCTSTR lpszFileName, + // fsName, //__out LPTSTR lpszVolumePathName, // BUFFER_SIZE)) //__in DWORD cchBufferLength // ... - // Zstring volumePath = buffer; + // Zstring volumePath = fsName; // if (!volumePath.EndsWith(common::FILE_NAME_SEPARATOR)) //a trailing backslash is required // volumePath += common::FILE_NAME_SEPARATOR; - //fast ::GetVolumePathName() clone: let's hope it's not too simple (doesn't honor mount points) - Zstring volumePath; - { - Zstring nameFmt = removeLongPathPrefix(fileName); //throw() - if (!nameFmt.EndsWith(Zstr("\\"))) - nameFmt += Zstr("\\"); //GetVolumeInformation expects trailing backslash + Zstring nameFmt = removeLongPathPrefix(filename); //throw() + if (!nameFmt.EndsWith(Zstr("\\"))) + nameFmt += Zstr("\\"); //GetVolumeInformation expects trailing backslash - if (nameFmt.StartsWith(Zstr("\\\\"))) //UNC path: "\\ComputerName\SharedFolder\" - { - size_t nameSize = nameFmt.size(); - const size_t posFirstSlash = nameFmt.find(Zstr("\\"), 2); - if (posFirstSlash != Zstring::npos) - { - nameSize = posFirstSlash + 1; - const size_t posSecondSlash = nameFmt.find(Zstr("\\"), posFirstSlash + 1); - if (posSecondSlash != Zstring::npos) - nameSize = posSecondSlash + 1; - } - volumePath = Zstring(nameFmt.c_str(), nameSize); //include trailing backslash! - } - else //local path: "C:\Folder\" + if (nameFmt.StartsWith(Zstr("\\\\"))) //UNC path: "\\ComputerName\SharedFolder\" + { + size_t nameSize = nameFmt.size(); + const size_t posFirstSlash = nameFmt.find(Zstr("\\"), 2); + if (posFirstSlash != Zstring::npos) { - const size_t pos = nameFmt.find(Zstr(":\\")); - if (pos != 1) //expect single letter volume - return false; - volumePath = Zstring(nameFmt.c_str(), 3); + nameSize = posFirstSlash + 1; + const size_t posSecondSlash = nameFmt.find(Zstr("\\"), posFirstSlash + 1); + if (posSecondSlash != Zstring::npos) + nameSize = posSecondSlash + 1; } + return Zstring(nameFmt.c_str(), nameSize); //include trailing backslash! + } + else //local path: "C:\Folder\" + { + const size_t pos = nameFmt.find(Zstr(":\\")); + if (pos == 1) //expect single letter volume + return Zstring(nameFmt.c_str(), 3); } + + return Zstring(); +} +} + + +bool dst::isFatDrive(const Zstring& fileName) //throw() +{ + using namespace ffs3; + + const size_t BUFFER_SIZE = MAX_PATH + 1; + wchar_t fsName[BUFFER_SIZE]; + + const Zstring volumePath = getVolumeName(fileName); + if (volumePath.empty()) + return false; + //suprisingly fast: ca. 0.03 ms per call! if (!::GetVolumeInformation(volumePath.c_str(), //__in_opt LPCTSTR lpRootPathName, NULL, //__out LPTSTR lpVolumeNameBuffer, @@ -62,13 +74,13 @@ bool dst::isFatDrive(const Zstring& fileName) //throw() NULL, //__out_opt LPDWORD lpVolumeSerialNumber, NULL, //__out_opt LPDWORD lpMaximumComponentLength, NULL, //__out_opt LPDWORD lpFileSystemFlags, - buffer, //__out LPTSTR lpFileSystemNameBuffer, + fsName, //__out LPTSTR lpFileSystemNameBuffer, BUFFER_SIZE)) //__in DWORD nFileSystemNameSize { assert(false); //shouldn't happen return false; } - const Zstring fileSystem = buffer; + const Zstring fileSystem = fsName; //DST hack seems to be working equally well for FAT and FAT32 (in particular creation time has 10^-2 s precision as advertised) return fileSystem == Zstr("FAT") || diff --git a/shared/file_error.h b/shared/file_error.h index 152062af..e8497a92 100644 --- a/shared/file_error.h +++ b/shared/file_error.h @@ -15,9 +15,7 @@ namespace ffs3 class FileError //Exception base class used to notify file/directory copy/delete errors { public: - FileError(const wxString& message) : - errorMessage(message) {} - + FileError(const wxString& message) : errorMessage(message) {} virtual ~FileError() {} const wxString& msg() const @@ -29,12 +27,12 @@ private: const wxString errorMessage; }; +#define DEFINE_NEW_FILE_ERROR(X) struct X : public FileError { X(const wxString& message) : FileError(message) {} }; -class ErrorNotExisting : public FileError -{ -public: - ErrorNotExisting(const wxString& message) : FileError(message) {} -}; +DEFINE_NEW_FILE_ERROR(ErrorNotExisting); +DEFINE_NEW_FILE_ERROR(ErrorTargetExisting); +DEFINE_NEW_FILE_ERROR(ErrorTargetPathMissing); +DEFINE_NEW_FILE_ERROR(ErrorFileLocked); } #endif // FILEERROR_H_INCLUDED diff --git a/shared/file_handling.cpp b/shared/file_handling.cpp index 14a4b84c..97c4d077 100644 --- a/shared/file_handling.cpp +++ b/shared/file_handling.cpp @@ -5,22 +5,21 @@ // ************************************************************************** // #include "file_handling.h" -#include <wx/intl.h> +#include <map> +#include <algorithm> +#include <boost/scoped_array.hpp> +#include <boost/bind.hpp> +#include <stdexcept> #include "system_func.h" #include "global_func.h" #include "system_constants.h" #include "file_traverser.h" -#include <boost/bind.hpp> -#include <algorithm> -#include <wx/datetime.h> #include "string_conv.h" -#include <wx/utils.h> -#include <boost/scoped_array.hpp> -#include <stdexcept> #include "loki/TypeManip.h" #include "loki/ScopeGuard.h" -#include <map> #include "symlink_target.h" +#include "file_io.h" +#include "i18n.h" #ifdef FFS_WIN #include "privilege.h" @@ -32,7 +31,6 @@ #elif defined FFS_LINUX #include <sys/stat.h> -#include "file_io.h" #include <time.h> #include <utime.h> #include <cerrno> @@ -44,162 +42,7 @@ #endif using ffs3::FileError; - - -namespace -{ -#ifdef FFS_WIN -Zstring resolveRelativePath(const Zstring& relativeName, DWORD proposedBufferSize = 1000) -{ - boost::scoped_array<Zchar> fullPath(new Zchar[proposedBufferSize]); - const DWORD rv = ::GetFullPathName( - relativeName.c_str(), //__in LPCTSTR lpFileName, - proposedBufferSize, //__in DWORD nBufferLength, - fullPath.get(), //__out LPTSTR lpBuffer, - NULL); //__out LPTSTR *lpFilePart - if (rv == 0 || rv == proposedBufferSize) - //ERROR! Don't do anything - return relativeName; - if (rv > proposedBufferSize) - return resolveRelativePath(relativeName, rv); - - return fullPath.get(); -} - -#elif defined FFS_LINUX -Zstring resolveRelativePath(const Zstring& relativeName) //additional: resolves symbolic links!!! -{ - char absolutePath[PATH_MAX + 1]; - if (::realpath(relativeName.c_str(), absolutePath) == NULL) - //ERROR! Don't do anything - return relativeName; - - return Zstring(absolutePath); -} -#endif - - -bool replaceMacro(wxString& macro) //macro without %-characters, return true if replaced successfully -{ - if (macro.IsEmpty()) - return false; - - //there are equally named environment variables %TIME%, %DATE% existing, so replace these first! - if (macro.CmpNoCase(wxT("time")) == 0) - { - macro = wxDateTime::Now().FormatISOTime(); - macro.Replace(wxT(":"), wxT("")); - return true; - } - - if (macro.CmpNoCase(wxT("date")) == 0) - { - macro = wxDateTime::Now().FormatISODate(); - return true; - } - - if (macro.CmpNoCase(wxT("month")) == 0) - { - macro = wxDateTime::Now().Format(wxT("%B")); - return true; - } - - if (macro.CmpNoCase(wxT("week")) == 0) - { - macro = wxDateTime::Now().Format(wxT("%U")); - return true; - } - - if (macro.CmpNoCase(wxT("year")) == 0) - { - macro = wxDateTime::Now().Format(wxT("%Y")); - return true; - } - - //try to apply environment variables - wxString envValue; - if (wxGetEnv(macro, &envValue)) - { - macro = envValue; - - //some postprocessing: - macro.Trim(true); //remove leading, trailing blanks - macro.Trim(false); // - - //remove leading, trailing double-quotes - if (macro.StartsWith(wxT("\"")) && - macro.EndsWith(wxT("\"")) && - macro.length() >= 2) - macro = wxString(macro.c_str() + 1, macro.length() - 2); - return true; - } - - return false; -} - - -void expandMacros(wxString& text) -{ - const wxChar SEPARATOR = '%'; - - if (text.Find(SEPARATOR) != wxNOT_FOUND) - { - wxString prefix = text.BeforeFirst(SEPARATOR); - wxString postfix = text.AfterFirst(SEPARATOR); - if (postfix.Find(SEPARATOR) != wxNOT_FOUND) - { - wxString potentialMacro = postfix.BeforeFirst(SEPARATOR); - wxString rest = postfix.AfterFirst(SEPARATOR); //text == prefix + SEPARATOR + potentialMacro + SEPARATOR + rest - - if (replaceMacro(potentialMacro)) - { - expandMacros(rest); - text = prefix + potentialMacro + rest; - } - else - { - rest = SEPARATOR + rest; - expandMacros(rest); - text = prefix + SEPARATOR + potentialMacro + rest; - } - } - } -} -} - - -Zstring ffs3::getFormattedDirectoryName(const Zstring& dirname) -{ - //Formatting is needed since functions expect the directory to end with '\' to be able to split the relative names. - //note: don't combine directory formatting with wxFileName, as it doesn't respect //?/ - prefix! - - wxString dirnameTmp = zToWx(dirname); - expandMacros(dirnameTmp); - - Zstring output = wxToZ(dirnameTmp); - - output.Trim(); - - if (output.empty()) //an empty string will later be returned as "\"; this is not desired - return Zstring(); - - /* - resolve relative names; required by: - WINDOWS: - - \\?\-prefix which needs absolute names - - Volume Shadow Copy: volume name needs to be part of each filename - - file icon buffer (at least for extensions that are actually read from disk, e.g. "exe") - - ::SHFileOperation(): Using relative path names is not thread safe - WINDOWS/LINUX: - - detection of dependent directories, e.g. "\" and "C:\test" - */ - output = resolveRelativePath(output); - - if (!output.EndsWith(common::FILE_NAME_SEPARATOR)) - output += common::FILE_NAME_SEPARATOR; - - return output; -} +using namespace ffs3; bool ffs3::fileExists(const Zstring& filename) @@ -275,18 +118,22 @@ wxULongLong getFileSizeSymlink(const Zstring& linkName) //throw (FileError) OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); - if (hFile != INVALID_HANDLE_VALUE) + if (hFile == INVALID_HANDLE_VALUE) { - Loki::ScopeGuard dummy = Loki::MakeGuard(::CloseHandle, hFile); - (void)dummy; //silence warning "unused variable" + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + ffs3::zToWx(linkName) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } + Loki::ScopeGuard dummy = Loki::MakeGuard(::CloseHandle, hFile); + (void)dummy; //silence warning "unused variable" - BY_HANDLE_FILE_INFORMATION fileInfoByHandle; - if (::GetFileInformationByHandle(hFile, &fileInfoByHandle)) - return wxULongLong(fileInfoByHandle.nFileSizeHigh, fileInfoByHandle.nFileSizeLow); + BY_HANDLE_FILE_INFORMATION fileInfoByHandle = {}; + if (!::GetFileInformationByHandle(hFile, &fileInfoByHandle)) + { + const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + ffs3::zToWx(linkName) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } - const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + ffs3::zToWx(linkName) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + return wxULongLong(fileInfoByHandle.nFileSizeHigh, fileInfoByHandle.nFileSizeLow); } } #endif @@ -331,7 +178,7 @@ DWORD retrieveVolumeSerial(const Zstring& pathName) //return 0 on error! const size_t bufferSize = std::max(pathName.size(), static_cast<size_t>(10000)); boost::scoped_array<wchar_t> buffer(new wchar_t[bufferSize]); - //pathName need not exist! + //full pathName need not yet exist! if (!::GetVolumePathName(pathName.c_str(), //__in LPCTSTR lpszFileName, buffer.get(), //__out LPTSTR lpszVolumePathName, static_cast<DWORD>(bufferSize))) //__in DWORD cchBufferLength @@ -364,8 +211,8 @@ dev_t retrieveVolumeSerial(const Zstring& pathName) //return 0 on error! if (volumePathName.size() > 1 && volumePathName.EndsWith(common::FILE_NAME_SEPARATOR)) //exception: allow '/' volumePathName = volumePathName.BeforeLast(common::FILE_NAME_SEPARATOR); - struct stat fileInfo; - while (::lstat(volumePathName.c_str(), &fileInfo) != 0) + struct stat fileInfo = {}; + while (::lstat(volumePathName.c_str(), &fileInfo) != 0) //go up in folder hierarchy until existing folder is found { volumePathName = volumePathName.BeforeLast(common::FILE_NAME_SEPARATOR); //returns empty string if ch not found if (volumePathName.empty()) @@ -396,48 +243,43 @@ ffs3::ResponseSameVol ffs3::onSameVolume(const Zstring& folderLeft, const Zstrin void ffs3::removeFile(const Zstring& filename) //throw (FileError); { - //no error situation if file is not existing! manual deletion relies on it! - if (!somethingExists(filename)) - return; //neither file nor any other object (e.g. broken symlink) with that name existing - #ifdef FFS_WIN - const Zstring filenameFmt = applyLongPathPrefix(filename); - //remove file, support for \\?\-prefix + const Zstring filenameFmt = applyLongPathPrefix(filename); if (!::DeleteFile(filenameFmt.c_str())) +#elif defined FFS_LINUX + if (::unlink(filename.c_str()) != 0) +#endif { - //optimization: change file attributes ONLY when necessary! +#ifdef FFS_WIN + //perf: apply ONLY when necessary! if (::GetLastError() == ERROR_ACCESS_DENIED) //function fails if file is read-only { - //initialize file attributes - if (::SetFileAttributes(filenameFmt.c_str(), //address of filename - FILE_ATTRIBUTE_NORMAL)) //attributes to set - { - //now try again... - if (::DeleteFile(filenameFmt.c_str())) - return; - } + //(try to) normalize file attributes + ::SetFileAttributes(filenameFmt.c_str(), FILE_ATTRIBUTE_NORMAL); + + //now try again... + if (::DeleteFile(filenameFmt.c_str())) + return; } +#endif + //eval error code before next call + const wxString errorMessage = wxString(_("Error deleting file:")) + wxT("\n\"") + zToWx(filename) + wxT("\"") + wxT("\n\n") + ffs3::getLastErrorFormatted(); - wxString errorMessage = wxString(_("Error deleting file:")) + wxT("\n\"") + zToWx(filename) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); - } -#elif defined FFS_LINUX - if (::unlink(filename.c_str()) != 0) - { - wxString errorMessage = wxString(_("Error deleting file:")) + wxT("\n\"") + zToWx(filename) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + //no error situation if file is not existing! manual deletion relies on it! + //perf: place check in error handling block + //warning: this call changes error code!! + if (!somethingExists(filename)) + return; //neither file nor any other object (e.g. broken symlink) with that name existing + + throw FileError(errorMessage); } -#endif } namespace { -struct ErrorDifferentVolume : public ffs3::FileError -{ - ErrorDifferentVolume(const wxString& message) : FileError(message) {} -}; +DEFINE_NEW_FILE_ERROR(ErrorDifferentVolume); /* Usage overview: @@ -448,7 +290,7 @@ struct ErrorDifferentVolume : public ffs3::FileError */ //wrapper for file system rename function: //throw (FileError); ErrorDifferentVolume if it is due to moving file to another volume -void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw (FileError, ErrorDifferentVolume) +void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw (FileError: ErrorDifferentVolume, ErrorTargetExisting) { using namespace ffs3; //for zToWx() @@ -465,8 +307,7 @@ void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw const DWORD oldNameAttrib = ::GetFileAttributes(oldNameFmt.c_str()); if (oldNameAttrib != INVALID_FILE_ATTRIBUTES) { - if (::SetFileAttributes(oldNameFmt.c_str(), //address of filename - FILE_ATTRIBUTE_NORMAL)) //remove readonly-attribute + if (::SetFileAttributes(oldNameFmt.c_str(), FILE_ATTRIBUTE_NORMAL)) //remove readonly-attribute { //try again... if (::MoveFileEx(oldNameFmt.c_str(), //__in LPCTSTR lpExistingFileName, @@ -474,8 +315,7 @@ void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw 0)) //__in DWORD dwFlags { //(try to) restore file attributes - ::SetFileAttributes(newNameFmt.c_str(), //don't handle error - oldNameAttrib); + ::SetFileAttributes(newNameFmt.c_str(), oldNameAttrib); //don't handle error return; } else @@ -491,22 +331,27 @@ void renameFileInternal(const Zstring& oldName, const Zstring& newName) //throw } } + const DWORD lastError = ::GetLastError(); const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(oldName) + wxT("\" ->\n\"") + zToWx(newName) + wxT("\"") + - wxT("\n\n") + ffs3::getLastErrorFormatted(); - if (::GetLastError() == ERROR_NOT_SAME_DEVICE) + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + if (lastError == ERROR_NOT_SAME_DEVICE) throw ErrorDifferentVolume(errorMessage); + else if (lastError == ERROR_FILE_EXISTS) + throw ErrorTargetExisting(errorMessage); else throw FileError(errorMessage); } #elif defined FFS_LINUX - //rename temporary file if (::rename(oldName.c_str(), newName.c_str()) != 0) { + const int lastError = errno; const wxString errorMessage = wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(oldName) + wxT("\" ->\n\"") + zToWx(newName) + wxT("\"") + - wxT("\n\n") + ffs3::getLastErrorFormatted(); - if (errno == EXDEV) + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + if (lastError == EXDEV) throw ErrorDifferentVolume(errorMessage); + else if (lastError == EEXIST) + throw ErrorTargetExisting(errorMessage); else throw FileError(errorMessage); } @@ -572,11 +417,11 @@ bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw { const Zstring fileNameOrig = newName.AfterLast(common::FILE_NAME_SEPARATOR); //returns the whole string if ch not found const Zstring fileNameShort = getFilenameFmt(newName, ::GetShortPathName).AfterLast(common::FILE_NAME_SEPARATOR); //throw() returns empty string on error - const Zstring fileNameLong = getFilenameFmt(newName, ::GetLongPathName).AfterLast(common::FILE_NAME_SEPARATOR); //throw() returns empty string on error + const Zstring fileNameLong = getFilenameFmt(newName, ::GetLongPathName) .AfterLast(common::FILE_NAME_SEPARATOR); //throw() returns empty string on error if (!fileNameShort.empty() && !fileNameLong.empty() && - EqualFilename()(fileNameOrig, fileNameShort) && + EqualFilename() (fileNameOrig, fileNameShort) && !EqualFilename()(fileNameShort, fileNameLong)) { //we detected an event where newName is in shortname format (although it is intended to be a long name) and @@ -589,7 +434,7 @@ bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw const Zstring parkedTarget = createTemp8Dot3Name(newName); //move already existing short name out of the way for now - renameFileInternal(unrelatedPathLong, parkedTarget); //throw (FileError, ErrorDifferentVolume); + renameFileInternal(unrelatedPathLong, parkedTarget); //throw (FileError: ErrorDifferentVolume); //DON'T call ffs3::renameFile() to avoid reentrance! //schedule cleanup; the file system should assign this unrelated file a new (unique) short name @@ -607,11 +452,11 @@ bool fix8Dot3NameClash(const Zstring& oldName, const Zstring& newName) //throw //rename file: no copying!!! -void ffs3::renameFile(const Zstring& oldName, const Zstring& newName) //throw (FileError, ErrorDifferentVolume); +void ffs3::renameFile(const Zstring& oldName, const Zstring& newName) //throw (FileError: ErrorDifferentVolume, ErrorTargetExisting); { try { - renameFileInternal(oldName, newName); //throw (FileError, ErrorDifferentVolume) + renameFileInternal(oldName, newName); //throw (FileError: ErrorDifferentVolume, ErrorTargetExisting) } catch (const FileError&) { @@ -624,80 +469,77 @@ void ffs3::renameFile(const Zstring& oldName, const Zstring& newName) //throw (F } -using ffs3::MoveFileCallback; +using ffs3::CallbackMoveFile; -class CopyCallbackImpl : public ffs3::CopyFileCallback //callback functionality +class CopyCallbackImpl : public ffs3::CallbackCopyFile //callback functionality { public: - CopyCallbackImpl(const Zstring& sourceFile, MoveFileCallback& callback) : sourceFile_(sourceFile), moveCallback(callback) {} + CopyCallbackImpl(const Zstring& sourceFile, CallbackMoveFile& callback) : sourceFile_(sourceFile), moveCallback(callback) {} + + virtual void deleteTargetFile(const Zstring& targetFile) { assert(!fileExists(targetFile)); } virtual Response updateCopyStatus(const wxULongLong& totalBytesTransferred) { switch (moveCallback.requestUiRefresh(sourceFile_)) { - case MoveFileCallback::CONTINUE: - return CopyFileCallback::CONTINUE; + case CallbackMoveFile::CONTINUE: + return CallbackCopyFile::CONTINUE; - case MoveFileCallback::CANCEL: - return CopyFileCallback::CANCEL; + case CallbackMoveFile::CANCEL: + return CallbackCopyFile::CANCEL; } - return CopyFileCallback::CONTINUE; //dummy return value + return CallbackCopyFile::CONTINUE; //dummy return value } private: const Zstring sourceFile_; - MoveFileCallback& moveCallback; + CallbackMoveFile& moveCallback; }; -void ffs3::moveFile(const Zstring& sourceFile, const Zstring& targetFile, MoveFileCallback* callback) //throw (FileError); +void ffs3::moveFile(const Zstring& sourceFile, const Zstring& targetFile, bool ignoreExisting, CallbackMoveFile* callback) //throw (FileError); { //call back once per file (moveFile() is called by moveDirectory()) if (callback) switch (callback->requestUiRefresh(sourceFile)) { - case MoveFileCallback::CONTINUE: + case CallbackMoveFile::CONTINUE: break; - case MoveFileCallback::CANCEL: //a user aborted operation IS an error condition! + case CallbackMoveFile::CANCEL: //a user aborted operation IS an error condition! throw FileError(wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"") + wxT("\n\n") + _("Operation aborted!")); } - //support case-sensitive renaming - if (EqualFilename()(sourceFile, targetFile)) //difference in case only - return renameFile(sourceFile, targetFile); //throw (FileError, ErrorDifferentVolume); + const bool targetExisting = fileExists(targetFile); - if (somethingExists(targetFile)) //test file existence: e.g. Linux might silently overwrite existing symlinks + if (targetExisting && !ignoreExisting) //test file existence: e.g. Linux might silently overwrite existing symlinks throw FileError(wxString(_("Error moving file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"") + wxT("\n\n") + _("Target file already existing!")); - //moving of symbolic links should work correctly: - - //first try to move the file directly without copying - try + if (!targetExisting) { - renameFile(sourceFile, targetFile); //throw (FileError, ErrorDifferentVolume); - return; - } - //if moving failed treat as error (except when it tried to move to a different volume: in this case we will copy the file) - catch (const ErrorDifferentVolume&) {} - + //try to move the file directly without copying + try + { + renameFile(sourceFile, targetFile); //throw (FileError: ErrorDifferentVolume); + return; //great, we get away cheaply! + } + //if moving failed treat as error (except when it tried to move to a different volume: in this case we will copy the file) + catch (const ErrorDifferentVolume&) {} - //file is on a different volume: let's copy it - std::auto_ptr<CopyCallbackImpl> copyCallback(callback != NULL ? new CopyCallbackImpl(sourceFile, *callback) : NULL); + //file is on a different volume: let's copy it + std::auto_ptr<CopyCallbackImpl> copyCallback(callback != NULL ? new CopyCallbackImpl(sourceFile, *callback) : NULL); - copyFile(sourceFile, - targetFile, - true, //copy symbolic links - false, //dont copy filesystem permissions -#ifdef FFS_WIN - NULL, //supply handler for making shadow copies -#endif - copyCallback.get()); //throw (FileError); + if (symlinkExists(sourceFile)) + copySymlink(sourceFile, targetFile, SYMLINK_TYPE_FILE, false); //throw (FileError) dont copy filesystem permissions + else + copyFile(sourceFile, targetFile, false, copyCallback.get()); //throw (FileError); - //attention: if copy-operation was cancelled an exception is thrown => sourcefile is not deleted, as we wish! + //attention: if copy-operation was cancelled an exception is thrown => sourcefile is not deleted, as we wish! + } - removeFile(sourceFile); + removeFile(sourceFile); //throw (FileError) + //note: copying file is NOT undone in case of exception: currently this function is called in context of user-defined deletion dir, where this behavior is fine } namespace @@ -705,45 +547,48 @@ namespace class TraverseOneLevel : public ffs3::TraverseCallback { public: - typedef std::vector<std::pair<Zstring, Zstring> > NamePair; + typedef std::pair<Zstring, Zstring> NamePair; + typedef std::vector<NamePair> NameList; - TraverseOneLevel(NamePair& filesShort, NamePair& dirsShort) : - m_files(filesShort), - m_dirs(dirsShort) {} + TraverseOneLevel(NameList& files, NameList& dirs) : + files_(files), + dirs_(dirs) {} virtual void onFile(const Zchar* shortName, const Zstring& fullName, const FileInfo& details) { - m_files.push_back(std::make_pair(Zstring(shortName), fullName)); + files_.push_back(NamePair(shortName, fullName)); } + virtual void onSymlink(const Zchar* shortName, const Zstring& fullName, const SymlinkInfo& details) { if (details.dirLink) - m_dirs.push_back(std::make_pair(Zstring(shortName), fullName)); + dirs_.push_back(NamePair(shortName, fullName)); else - m_files.push_back(std::make_pair(Zstring(shortName), fullName)); + files_.push_back(NamePair(shortName, fullName)); } virtual ReturnValDir onDir(const Zchar* shortName, const Zstring& fullName) { - m_dirs.push_back(std::make_pair(Zstring(shortName), fullName)); + dirs_.push_back(NamePair(shortName, fullName)); return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>(); //DON'T traverse into subdirs; moveDirectory works recursively! } + virtual void onError(const wxString& errorText) { throw FileError(errorText); } private: - NamePair& m_files; - NamePair& m_dirs; + NameList& files_; + NameList& dirs_; }; -struct RemoveCallbackImpl : public ffs3::RemoveDirCallback +struct RemoveCallbackImpl : public ffs3::CallbackRemoveDir { RemoveCallbackImpl(const Zstring& sourceDir, const Zstring& targetDir, - MoveFileCallback& moveCallback) : + CallbackMoveFile& moveCallback) : sourceDir_(sourceDir), targetDir_(targetDir), moveCallback_(moveCallback) {} @@ -752,9 +597,9 @@ struct RemoveCallbackImpl : public ffs3::RemoveDirCallback { switch (moveCallback_.requestUiRefresh(sourceDir_)) { - case MoveFileCallback::CONTINUE: + case CallbackMoveFile::CONTINUE: break; - case MoveFileCallback::CANCEL: //a user aborted operation IS an error condition! + case CallbackMoveFile::CANCEL: //a user aborted operation IS an error condition! throw ffs3::FileError(wxString(_("Error moving directory:")) + wxT("\n\"") + ffs3::zToWx(sourceDir_) + wxT("\" ->\n\"") + ffs3::zToWx(targetDir_) + wxT("\"") + wxT("\n\n") + _("Operation aborted!")); } @@ -763,12 +608,12 @@ struct RemoveCallbackImpl : public ffs3::RemoveDirCallback private: const Zstring sourceDir_; const Zstring targetDir_; - MoveFileCallback& moveCallback_; + CallbackMoveFile& moveCallback_; }; } -void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExistingDirs, MoveFileCallback* callback) //throw (FileError); +void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExisting, CallbackMoveFile* callback) //throw (FileError); { using namespace ffs3; @@ -776,63 +621,63 @@ void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool if (callback) switch (callback->requestUiRefresh(sourceDir)) { - case MoveFileCallback::CONTINUE: + case CallbackMoveFile::CONTINUE: break; - case MoveFileCallback::CANCEL: //a user aborted operation IS an error condition! + case CallbackMoveFile::CANCEL: //a user aborted operation IS an error condition! throw FileError(wxString(_("Error moving directory:")) + wxT("\n\"") + zToWx(sourceDir) + wxT("\" ->\n\"") + zToWx(targetDir) + wxT("\"") + wxT("\n\n") + _("Operation aborted!")); } - //handle symbolic links - if (symlinkExists(sourceDir)) - { - createDirectory(targetDir, sourceDir, true, false); //copy symbolic link, don't copy permissions - removeDirectory(sourceDir, NULL); //if target is already another symlink or directory, sourceDir-symlink is silently deleted - return; - } + const bool targetExisting = dirExists(targetDir); - if (somethingExists(targetDir)) - { - if (!ignoreExistingDirs) //directory or symlink exists (or even a file... this error will be caught later) - throw FileError(wxString(_("Error moving directory:")) + wxT("\n\"") + zToWx(sourceDir) + wxT("\" ->\n\"") + zToWx(targetDir) + wxT("\"") + - wxT("\n\n") + _("Target directory already existing!")); - } - else + if (targetExisting && !ignoreExisting) //directory or symlink exists (or even a file... this error will be caught later) + throw FileError(wxString(_("Error moving directory:")) + wxT("\n\"") + zToWx(sourceDir) + wxT("\" ->\n\"") + zToWx(targetDir) + wxT("\"") + + wxT("\n\n") + _("Target directory already existing!")); + + const bool isSymlink = symlinkExists(sourceDir); + + if (!targetExisting) { //first try to move the directory directly without copying try { - renameFile(sourceDir, targetDir); //throw (FileError, ErrorDifferentVolume); - return; + renameFile(sourceDir, targetDir); //throw (FileError: ErrorDifferentVolume, ErrorTargetExisting); + return; //great, we get away cheaply! } //if moving failed treat as error (except when it tried to move to a different volume: in this case we will copy the directory) catch (const ErrorDifferentVolume&) {} //create target - createDirectory(targetDir, sourceDir, false, false); //throw (FileError); don't copy permissions + if (isSymlink) + copySymlink(sourceDir, targetDir, SYMLINK_TYPE_DIR, false); //throw (FileError) -> don't copy permissions + else + createDirectory(targetDir, sourceDir, false); //throw (FileError) } - //move files/folders recursively - TraverseOneLevel::NamePair fileList; //list of names: 1. short 2.long - TraverseOneLevel::NamePair dirList; // + if (!isSymlink) //handle symbolic links + { + //move files/folders recursively + TraverseOneLevel::NameList fileList; //list of names: 1. short 2.long + TraverseOneLevel::NameList dirList; // - //traverse source directory one level - TraverseOneLevel traverseCallback(fileList, dirList); - traverseFolder(sourceDir, false, traverseCallback); //traverse one level, don't follow symlinks + //traverse source directory one level + TraverseOneLevel traverseCallback(fileList, dirList); + traverseFolder(sourceDir, false, traverseCallback); //traverse one level, don't follow symlinks - const Zstring targetDirFormatted = targetDir.EndsWith(common::FILE_NAME_SEPARATOR) ? //ends with path separator - targetDir : - targetDir + common::FILE_NAME_SEPARATOR; + const Zstring targetDirFormatted = targetDir.EndsWith(common::FILE_NAME_SEPARATOR) ? //ends with path separator + targetDir : + targetDir + common::FILE_NAME_SEPARATOR; - //move files - for (TraverseOneLevel::NamePair::const_iterator i = fileList.begin(); i != fileList.end(); ++i) - ffs3::moveFile(i->second, targetDirFormatted + i->first, callback); + //move files + for (TraverseOneLevel::NameList::const_iterator i = fileList.begin(); i != fileList.end(); ++i) + ffs3::moveFile(i->second, targetDirFormatted + i->first, ignoreExisting, callback); //throw (FileError: ErrorTargetExisting); - //move directories - for (TraverseOneLevel::NamePair::const_iterator i = dirList.begin(); i != dirList.end(); ++i) - ::moveDirectoryImpl(i->second, targetDirFormatted + i->first, true, callback); + //move directories + for (TraverseOneLevel::NameList::const_iterator i = dirList.begin(); i != dirList.end(); ++i) + ::moveDirectoryImpl(i->second, targetDirFormatted + i->first, ignoreExisting, callback); - //attention: if move-operation was cancelled an exception is thrown => sourceDir is not deleted, as we wish! + //attention: if move-operation was cancelled an exception is thrown => sourceDir is not deleted, as we wish! + } //delete source std::auto_ptr<RemoveCallbackImpl> removeCallback(callback != NULL ? new RemoveCallbackImpl(sourceDir, targetDir, *callback) : NULL); @@ -840,7 +685,7 @@ void moveDirectoryImpl(const Zstring& sourceDir, const Zstring& targetDir, bool } -void ffs3::moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExistingDirs, MoveFileCallback* callback) //throw (FileError); +void ffs3::moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExisting, CallbackMoveFile* callback) //throw (FileError); { #ifdef FFS_WIN const Zstring& sourceDirFormatted = sourceDir; @@ -857,7 +702,7 @@ void ffs3::moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, boo targetDir; #endif - ::moveDirectoryImpl(sourceDirFormatted, targetDirFormatted, ignoreExistingDirs, callback); + ::moveDirectoryImpl(sourceDirFormatted, targetDirFormatted, ignoreExisting, callback); } @@ -895,7 +740,7 @@ private: }; -void ffs3::removeDirectory(const Zstring& directory, RemoveDirCallback* callback) +void ffs3::removeDirectory(const Zstring& directory, CallbackRemoveDir* callback) { //no error situation if directory is not existing! manual deletion relies on it! if (!somethingExists(directory)) @@ -904,17 +749,10 @@ void ffs3::removeDirectory(const Zstring& directory, RemoveDirCallback* callback #ifdef FFS_WIN const Zstring directoryFmt = applyLongPathPrefix(directory); //support for \\?\-prefix - //initialize file attributes - if (!::SetFileAttributes( // initialize file attributes: actually NEEDED for symbolic links also! - directoryFmt.c_str(), // address of directory name - FILE_ATTRIBUTE_NORMAL)) // attributes to set - { - wxString errorMessage = wxString(_("Error deleting directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); - } + //(try to) normalize file attributes: actually NEEDED for symbolic links also! + ::SetFileAttributes(directoryFmt.c_str(), FILE_ATTRIBUTE_NORMAL); #endif - //attention: check if directory is a symlink! Do NOT traverse into it deleting contained files!!! if (symlinkExists(directory)) //remove symlink directly { @@ -970,7 +808,6 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo { #ifdef FFS_WIN FILETIME creationTime = {}; - FILETIME lastAccessTime = {}; FILETIME lastWriteTime = {}; { @@ -1006,7 +843,7 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo if (!::GetFileTime(hSource, //__in HANDLE hFile, &creationTime, //__out_opt LPFILETIME lpCreationTime, - &lastAccessTime, //__out_opt LPFILETIME lpLastAccessTime, + NULL, //__out_opt LPFILETIME lpLastAccessTime, &lastWriteTime)) //__out_opt LPFILETIME lpLastWriteTime { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\""); @@ -1016,7 +853,6 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo else { creationTime = sourceAttr.ftCreationTime; - lastAccessTime = sourceAttr.ftLastAccessTime; lastWriteTime = sourceAttr.ftLastWriteTime; } @@ -1065,7 +901,7 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo if (!::SetFileTime(hTarget, &creationTime, - &lastAccessTime, + NULL, &lastWriteTime)) { wxString errorMessage = wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetObj) + wxT("\""); @@ -1088,14 +924,14 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo #elif defined FFS_LINUX if (deRefSymlinks) { - struct stat objInfo; + struct stat objInfo = {}; if (::stat(sourceObj.c_str(), &objInfo) != 0) //read file attributes from source directory { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\""); throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } - struct utimbuf newTimes; + struct utimbuf newTimes = {}; newTimes.actime = objInfo.st_atime; newTimes.modtime = objInfo.st_mtime; @@ -1108,14 +944,14 @@ void ffs3::copyFileTimes(const Zstring& sourceObj, const Zstring& targetObj, boo } else { - struct stat objInfo; + struct stat objInfo = {}; if (::lstat(sourceObj.c_str(), &objInfo) != 0) //read file attributes from source directory { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceObj) + wxT("\""); throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } - struct timeval newTimes[2]; + struct timeval newTimes[2] = {}; newTimes[0].tv_sec = objInfo.st_atime; /* seconds */ newTimes[0].tv_usec = 0; /* microseconds */ @@ -1207,75 +1043,10 @@ Zstring resolveDirectorySymlink(const Zstring& dirLinkName) //get full target pa } #endif -enum SymlinkType -{ - SYMLINK_TYPE_FILE, - SYMLINK_TYPE_DIR -}; -void copySymlinkInternal(const Zstring& sourceLink, const Zstring& targetLink, SymlinkType type, bool copyFilePermissions) //throw (FileError) -{ - using namespace ffs3; - -#ifdef FFS_WIN - const Zstring linkPath = getSymlinkRawTargetString(sourceLink); //accept broken symlinks; throw (FileError) - - //dynamically load windows API function - typedef BOOLEAN (WINAPI *CreateSymbolicLinkFunc)( - LPCTSTR lpSymlinkFileName, - LPCTSTR lpTargetFileName, - DWORD dwFlags); - static const CreateSymbolicLinkFunc createSymbolicLink = util::getDllFun<CreateSymbolicLinkFunc>(L"kernel32.dll", "CreateSymbolicLinkW"); - if (createSymbolicLink == NULL) - throw FileError(wxString(_("Error loading library function:")) + wxT("\n\"") + wxT("CreateSymbolicLinkW") + wxT("\"")); - - if (!createSymbolicLink( //seems no long path prefix is required... - targetLink.c_str(), //__in LPTSTR lpSymlinkFileName, - linkPath.c_str(), //__in LPTSTR lpTargetFileName, - (type == SYMLINK_TYPE_DIR ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0))) //__in DWORD dwFlags - { - const wxString errorMessage = wxString(_("Error copying symbolic link:")) + wxT("\n\"") + zToWx(sourceLink) + wxT("\" ->\n\"") + zToWx(targetLink) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); - } - -#elif defined FFS_LINUX - //copy symbolic link - const int BUFFER_SIZE = 10000; - char buffer[BUFFER_SIZE]; - const int bytesWritten = ::readlink(sourceLink.c_str(), buffer, BUFFER_SIZE); - if (bytesWritten < 0 || bytesWritten == BUFFER_SIZE) - { - wxString errorMessage = wxString(_("Error resolving symbolic link:")) + wxT("\n\"") + zToWx(sourceLink) + wxT("\""); - if (bytesWritten < 0) errorMessage += wxString(wxT("\n\n")) + ffs3::getLastErrorFormatted(); - throw FileError(errorMessage); - } - //set null-terminating char - buffer[bytesWritten] = 0; - - if (::symlink(buffer, targetLink.c_str()) != 0) - { - const wxString errorMessage = wxString(_("Error copying symbolic link:")) + wxT("\n\"") + zToWx(sourceLink) + wxT("\" ->\n\"") + zToWx(targetLink) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); - } -#endif - - //allow only consistent objects to be created -> don't place before ::symlink, targetLink may already exist - Loki::ScopeGuard guardNewDir = type == SYMLINK_TYPE_DIR ? - Loki::MakeGuard(&TryCleanUp::tryDeleteDir, targetLink) : - Loki::MakeGuard(&TryCleanUp::tryDeleteFile, targetLink); - - copyFileTimes(sourceLink, targetLink, false); //throw (FileError) - - if (copyFilePermissions) - copyObjectPermissions(sourceLink, targetLink, false); //throw FileError() - - guardNewDir.Dismiss(); //target has been created successfully! -} -} - #ifdef HAVE_SELINUX //copy SELinux security context -void copySecurityContext(const Zstring& source, const Zstring& target, bool derefSymlinks) //throw FileError() +void copySecurityContext(const Zstring& source, const Zstring& target, bool derefSymlinks) //throw (FileError) { using ffs3::zToWx; @@ -1329,7 +1100,7 @@ void copySecurityContext(const Zstring& source, const Zstring& target, bool dere //copy permissions for files, directories or symbolic links: requires admin rights -void ffs3::copyObjectPermissions(const Zstring& source, const Zstring& target, bool derefSymlinks) //throw FileError(); +void copyObjectPermissions(const Zstring& source, const Zstring& target, bool derefSymlinks) //throw (FileError); { #ifdef FFS_WIN //setting privileges requires admin rights! @@ -1431,13 +1202,13 @@ void ffs3::copyObjectPermissions(const Zstring& source, const Zstring& target, b #elif defined FFS_LINUX #ifdef HAVE_SELINUX //copy SELinux security context - copySecurityContext(source, target, derefSymlinks); //throw FileError() + copySecurityContext(source, target, derefSymlinks); //throw (FileError) #endif if (derefSymlinks) { struct stat fileInfo; - if (::stat(source.c_str(), &fileInfo) != 0 || + if (::stat (source.c_str(), &fileInfo) != 0 || ::chown(target.c_str(), fileInfo.st_uid, fileInfo.st_gid) != 0 || // may require admin rights! ::chmod(target.c_str(), fileInfo.st_mode) != 0) { @@ -1448,7 +1219,7 @@ void ffs3::copyObjectPermissions(const Zstring& source, const Zstring& target, b else { struct stat fileInfo; - if (::lstat(source.c_str(), &fileInfo) != 0 || + if (::lstat (source.c_str(), &fileInfo) != 0 || ::lchown(target.c_str(), fileInfo.st_uid, fileInfo.st_gid) != 0 || // may require admin rights! (!symlinkExists(target) && ::chmod(target.c_str(), fileInfo.st_mode) != 0)) //setting access permissions doesn't make sense for symlinks on Linux: there is no lchmod() { @@ -1460,7 +1231,7 @@ void ffs3::copyObjectPermissions(const Zstring& source, const Zstring& target, b } -void createDirectoryRecursively(const Zstring& directory, const Zstring& templateDir, bool copyDirectorySymLinks, bool copyFilePermissions, int level) +void createDirectoryRecursively(const Zstring& directory, const Zstring& templateDir, bool copyFilePermissions, int level) { using namespace ffs3; @@ -1476,108 +1247,110 @@ void createDirectoryRecursively(const Zstring& directory, const Zstring& templat { //call function recursively const Zstring templateParent = templateDir.BeforeLast(common::FILE_NAME_SEPARATOR); - createDirectoryRecursively(dirParent, templateParent, false, copyFilePermissions, level + 1); //don't create symbolic links in recursion! + createDirectoryRecursively(dirParent, templateParent, copyFilePermissions, level + 1); } //now creation should be possible - if (templateDir.empty() || !somethingExists(templateDir)) - { - //default directory creation + //default directory creation #ifdef FFS_WIN - if (!::CreateDirectory(applyLongPathPrefixCreateDir(directory).c_str(), NULL))// pointer to a directory path string + //don't use ::CreateDirectoryEx: + //- it may fail with "wrong parameter (error code 87)" when source is on mapped online storage + //- automatically copies symbolic links if encountered: unfortunately it doesn't copy symlinks over network shares but silently creates empty folders instead (on XP)! + //- it isn't able to copy most junctions because of missing permissions (although target path can be retrieved alternatively!) + if (!::CreateDirectory(applyLongPathPrefixCreateDir(directory).c_str(), NULL)) #elif defined FFS_LINUX - if (::mkdir(directory.c_str(), 0755) != 0) + if (::mkdir(directory.c_str(), 0755) != 0) #endif - { - if (level != 0) return; - wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); - } + { + if (level != 0) return; + wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } - else + + if (!templateDir.empty()) { #ifdef FFS_WIN - //symbolic link handling - if (symlinkExists(templateDir)) + //try to copy file attributes + Zstring sourcePath; + + if (symlinkExists(templateDir)) //dereference symlink! { - if (copyDirectorySymLinks) - return copySymlinkInternal(templateDir, directory, SYMLINK_TYPE_DIR, copyFilePermissions); //throw (FileError) - else //create directory based on target of symbolic link + try { //get target directory of symbolic link - Zstring linkPath; - try - { - linkPath = resolveDirectorySymlink(templateDir); //throw (FileError) - } - catch (FileError&) - { - //dereferencing a symbolic link usually fails if it is located on network drive or client is XP: NOT really an error... - if (!::CreateDirectory(applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string - NULL)) - { - if (level != 0) return; - const wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); - } - return; - } - - if (!::CreateDirectoryEx( // this function automatically copies symbolic links if encountered - applyLongPathPrefix(linkPath).c_str(), // pointer to path string of template directory - applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string - NULL)) - { - if (level != 0) return; - const wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); - } + sourcePath = resolveDirectorySymlink(templateDir); //throw (FileError) } + catch (FileError&) {} //dereferencing a symbolic link usually fails if it is located on network drive or client is XP: NOT really an error... } else //no symbolic link + sourcePath = templateDir; + + //try to copy file attributes + if (!sourcePath.empty()) { - //automatically copies symbolic links if encountered: unfortunately it doesn't copy symlinks over network shares but silently creates empty folders instead (on XP)! - //also it isn't able to copy most junctions because of missing permissions (although target path can be retrieved!) - if (!::CreateDirectoryEx( - applyLongPathPrefix(templateDir).c_str(), // pointer to path string of template directory - applyLongPathPrefixCreateDir(directory).c_str(), // pointer to a directory path string - NULL)) + const DWORD sourceAttr = ::GetFileAttributes(applyLongPathPrefix(sourcePath).c_str()); + if (sourceAttr != INVALID_FILE_ATTRIBUTES) { - if (level != 0) return; - const wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + directory.c_str() + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + const bool isCompressed = (sourceAttr & FILE_ATTRIBUTE_COMPRESSED) != 0; + const bool isEncrypted = (sourceAttr & FILE_ATTRIBUTE_ENCRYPTED) != 0; + + ::SetFileAttributes(applyLongPathPrefix(directory), sourceAttr); + + if (isEncrypted) + ::EncryptFile(directory.c_str()); //seems no long path is required (check passed!) + + if (isCompressed) + { + HANDLE hDir = ::CreateFile(applyLongPathPrefix(directory).c_str(), + GENERIC_READ | GENERIC_WRITE, //read access required for FSCTL_SET_COMPRESSION + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + NULL); + if (hDir != INVALID_HANDLE_VALUE) + { + Loki::ScopeGuard dummy = Loki::MakeGuard(::CloseHandle, hDir); + (void)dummy; //silence warning "unused variable" + + USHORT cmpState = COMPRESSION_FORMAT_DEFAULT; + + DWORD bytesReturned = 0; + ::DeviceIoControl(hDir, //handle to file or directory + FSCTL_SET_COMPRESSION, //dwIoControlCode + &cmpState, //input buffer + sizeof(cmpState), //size of input buffer + NULL, //lpOutBuffer + 0, //OutBufferSize + &bytesReturned, //number of bytes returned + NULL); //OVERLAPPED structure + } + } } } +#endif -#elif defined FFS_LINUX - //symbolic link handling - if (copyDirectorySymLinks && - symlinkExists(templateDir)) - //there is no directory-type symlink in Linux! => just copy as file - return copySymlinkInternal(templateDir, directory, SYMLINK_TYPE_DIR, copyFilePermissions); //throw (FileError) - - //default directory creation - if (::mkdir(directory.c_str(), 0755) != 0) + //try to copy file times: NOT mission critical for a directory + try { - if (level != 0) return; - wxString errorMessage = wxString(_("Error creating directory:")) + wxT("\n\"") + zToWx(directory) + wxT("\""); - throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + copyFileTimes(templateDir, directory, true); //throw (FileError) } -#endif - Loki::ScopeGuard guardNewDir = Loki::MakeGuard(&TryCleanUp::tryDeleteDir, directory); //ensure cleanup: + catch (FileError&) {} - copyFileTimes(templateDir, directory, !copyDirectorySymLinks); //throw (FileError) + Loki::ScopeGuard guardNewDir = Loki::MakeGuard(&TryCleanUp::tryDeleteDir, directory); //ensure cleanup: + //enforce copying file permissions: it's advertized on GUI... if (copyFilePermissions) - copyObjectPermissions(templateDir, directory, !copyDirectorySymLinks); //throw FileError() + copyObjectPermissions(templateDir, directory, true); //throw (FileError) guardNewDir.Dismiss(); //target has been created successfully! } } +} -void ffs3::createDirectory(const Zstring& directory, const Zstring& templateDir, bool copyDirectorySymLinks, bool copyFilePermissions) +void ffs3::createDirectory(const Zstring& directory, const Zstring& templateDir, bool copyFilePermissions) { //remove trailing separator const Zstring dirFormatted = directory.EndsWith(common::FILE_NAME_SEPARATOR) ? @@ -1588,13 +1361,56 @@ void ffs3::createDirectory(const Zstring& directory, const Zstring& templateDir, templateDir.BeforeLast(common::FILE_NAME_SEPARATOR) : templateDir; - createDirectoryRecursively(dirFormatted, templateFormatted, copyDirectorySymLinks, copyFilePermissions, 0); + createDirectoryRecursively(dirFormatted, templateFormatted, copyFilePermissions, 0); } void ffs3::createDirectory(const Zstring& directory) { - ffs3::createDirectory(directory, Zstring(), false, false); + ffs3::createDirectory(directory, Zstring(), false); +} + + +void ffs3::copySymlink(const Zstring& sourceLink, const Zstring& targetLink, ffs3::SymlinkType type, bool copyFilePermissions) //throw (FileError) +{ + const Zstring linkPath = getSymlinkRawTargetString(sourceLink); //accept broken symlinks; throw (FileError) + +#ifdef FFS_WIN + //dynamically load windows API function + typedef BOOLEAN (WINAPI *CreateSymbolicLinkFunc)(LPCTSTR lpSymlinkFileName, LPCTSTR lpTargetFileName, DWORD dwFlags); + static const CreateSymbolicLinkFunc createSymbolicLink = util::getDllFun<CreateSymbolicLinkFunc>(L"kernel32.dll", "CreateSymbolicLinkW"); + if (createSymbolicLink == NULL) + throw FileError(wxString(_("Error loading library function:")) + wxT("\n\"") + wxT("CreateSymbolicLinkW") + wxT("\"")); + + if (!createSymbolicLink( //seems no long path prefix is required... + targetLink.c_str(), //__in LPTSTR lpSymlinkFileName, + linkPath.c_str(), //__in LPTSTR lpTargetFileName, + (type == SYMLINK_TYPE_DIR ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0))) //__in DWORD dwFlags + { + const wxString errorMessage = wxString(_("Error copying symbolic link:")) + wxT("\n\"") + zToWx(sourceLink) + wxT("\" ->\n\"") + zToWx(targetLink) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } + +#elif defined FFS_LINUX + if (::symlink(linkPath.c_str(), targetLink.c_str()) != 0) + { + const wxString errorMessage = wxString(_("Error copying symbolic link:")) + wxT("\n\"") + zToWx(sourceLink) + wxT("\" ->\n\"") + zToWx(targetLink) + wxT("\""); + throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } +#endif + + //allow only consistent objects to be created -> don't place before ::symlink, targetLink may already exist + Loki::ScopeGuard guardNewDir = type == SYMLINK_TYPE_DIR ? + Loki::MakeGuard(&TryCleanUp::tryDeleteDir, targetLink) : + Loki::MakeGuard(&TryCleanUp::tryDeleteFile, targetLink); + + //file times: essential for a symlink: enforce this! (don't just try!) + copyFileTimes(sourceLink, targetLink, false); //throw (FileError) + + if (copyFilePermissions) + copyObjectPermissions(sourceLink, targetLink, false); //throw (FileError) + + guardNewDir.Dismiss(); //target has been created successfully! } @@ -1610,15 +1426,8 @@ Zstring createTempName(const Zstring& filename) return output; } -} #ifdef FFS_WIN -namespace -{ -#ifndef COPY_FILE_COPY_SYMLINK -#define COPY_FILE_COPY_SYMLINK 0x00000800 -#endif - DWORD CALLBACK copyCallbackInternal( LARGE_INTEGER totalFileSize, LARGE_INTEGER totalBytesTransferred, @@ -1630,11 +1439,11 @@ DWORD CALLBACK copyCallbackInternal( HANDLE hDestinationFile, LPVOID lpData) { - using ffs3::CopyFileCallback; + using ffs3::CallbackCopyFile; //small performance optimization: it seems this callback function is called for every 64 kB (depending on cluster size). static size_t callNr = 0; - if (++callNr % 4 == 0) //executing callback for each 256 kB should suffice + if (++callNr % 4 == 0) //executing callback every 256 kB should suffice { if (lpData != NULL) { @@ -1646,14 +1455,14 @@ DWORD CALLBACK copyCallbackInternal( This will then be handled in future versions of FreeFileSync.\n\nThanks -ZenJu"), NULL, 0); - CopyFileCallback* callback = static_cast<CopyFileCallback*>(lpData); + CallbackCopyFile* callback = static_cast<CallbackCopyFile*>(lpData); try { switch (callback->updateCopyStatus(wxULongLong(totalBytesTransferred.HighPart, totalBytesTransferred.LowPart))) { - case CopyFileCallback::CONTINUE: + case CallbackCopyFile::CONTINUE: break; - case CopyFileCallback::CANCEL: + case CallbackCopyFile::CANCEL: return PROGRESS_CANCEL; } } @@ -1668,6 +1477,10 @@ DWORD CALLBACK copyCallbackInternal( } +#ifndef COPY_FILE_COPY_SYMLINK +#define COPY_FILE_COPY_SYMLINK 0x00000800 +#endif + bool supportForSymbolicLinks() { OSVERSIONINFO osvi = {}; @@ -1685,11 +1498,9 @@ bool supportForSymbolicLinks() #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008 #endif - bool supportForNonEncryptedDestination() { - OSVERSIONINFO osvi; - ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); + OSVERSIONINFO osvi = {}; osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); //encrypted destination is not supported with Windows 2000 @@ -1699,39 +1510,28 @@ bool supportForNonEncryptedDestination() //overview: http://msdn.microsoft.com/en-us/library/ms724834(VS.85).aspx return false; } -} -void ffs3::copyFile(const Zstring& sourceFile, - const Zstring& targetFile, - bool copyFileSymLinks, - bool copyFilePermissions, - shadow::ShadowCopy* shadowCopyHandler, - ffs3::CopyFileCallback* callback) +void rawCopyWinApi(const Zstring& sourceFile, + const Zstring& targetFile, + CallbackCopyFile* callback) //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting, ErrorFileLocked) { - //ffs3::fileExists(targetFile) -> avoid this call, performance; - //if target exists (very unlikely, because sync-algorithm deletes it) renaming below will fail! + Loki::ScopeGuard guardTarget = Loki::MakeGuard(&removeFile, targetFile); //transactional behavior: guard just before starting copy! DWORD copyFlags = COPY_FILE_FAIL_IF_EXISTS; - //copy symbolic links instead of the files pointed at - static const bool symlinksSupported = supportForSymbolicLinks(); //only set "true" if supported by OS: else copying in Windows XP fails - if (copyFileSymLinks && symlinksSupported) - copyFlags |= COPY_FILE_COPY_SYMLINK; + // static const bool symlinksSupported = supportForSymbolicLinks(); //only set "true" if supported by OS: else copying in Windows XP fails + // if (copyFileSymLinks && symlinksSupported) + // copyFlags |= COPY_FILE_COPY_SYMLINK; //allow copying from encrypted to non-encrytped location static const bool nonEncSupported = supportForNonEncryptedDestination(); if (nonEncSupported) copyFlags |= COPY_FILE_ALLOW_DECRYPTED_DESTINATION; - const Zstring temporary = createTempName(targetFile); //use temporary file until a correct date has been set - - Loki::ScopeGuard guardTempFile = Loki::MakeGuard(&ffs3::removeFile, temporary); - - - if (!::CopyFileEx( //same performance as CopyFile() + if (!::CopyFileEx( //same performance like CopyFile() applyLongPathPrefix(sourceFile).c_str(), - applyLongPathPrefix(temporary).c_str(), + applyLongPathPrefix(targetFile).c_str(), callback != NULL ? copyCallbackInternal : NULL, callback, NULL, @@ -1741,44 +1541,30 @@ void ffs3::copyFile(const Zstring& sourceFile, //don't suppress "lastError == ERROR_REQUEST_ABORTED": a user aborted operation IS an error condition! - //if file is locked (try to) use Windows Volume Shadow Copy Service - if (shadowCopyHandler != NULL && - (lastError == ERROR_SHARING_VIOLATION || - lastError == ERROR_LOCK_VIOLATION)) - { - //shadowFilename already contains prefix: E.g. "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Program Files\FFS\sample.dat" + //assemble error message... + wxString errorMessage = wxString(_("Error copying file:")) + wxT("\n\"") + sourceFile.c_str() + wxT("\" ->\n\"") + targetFile.c_str() + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); - Zstring shadowFilename; - try - { - shadowFilename = shadowCopyHandler->makeShadowCopy(sourceFile); //throw (FileError) - } - catch (const FileError& e) - { - wxString errorMsg = _("Error copying locked file %x!"); - errorMsg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(sourceFile) + wxT("\"")); - errorMsg += wxT("\n\n") + e.msg(); - throw FileError(errorMsg); - } + //if file is locked (try to) use Windows Volume Shadow Copy Service + if (lastError == ERROR_SHARING_VIOLATION || + lastError == ERROR_LOCK_VIOLATION) + throw ErrorFileLocked(errorMessage); - return copyFile(shadowFilename, //transferred bytes is automatically reset when new file is copied - targetFile, - copyFileSymLinks, - copyFilePermissions, - NULL, - callback); + if (lastError == ERROR_FILE_EXISTS) //if target is existing this functions is expected to throw ErrorTargetExisting!!! + { + guardTarget.Dismiss(); //don't delete file that existed previously! + throw ErrorTargetExisting(errorMessage); } - //assemble error message... - wxString errorMessage = wxString(_("Error copying file:")) + wxT("\n\"") + sourceFile.c_str() + wxT("\" ->\n\"") + targetFile.c_str() + wxT("\"") + - wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + if (lastError == ERROR_PATH_NOT_FOUND) + throw ErrorTargetPathMissing(errorMessage); try //add more meaningful message { //trying to copy > 4GB file to FAT/FAT32 volume gives obscure ERROR_INVALID_PARAMETER (FAT can indeed handle files up to 4 Gig, tested!) if (lastError == ERROR_INVALID_PARAMETER && dst::isFatDrive(targetFile) && - getFilesize(sourceFile) >= (wxULongLong(1024 * 1024 * 1024)*=4)) //throw (FileError) + getFilesize(sourceFile) >= wxULongLong(1024 * 1024 * 1024) * 4) //throw (FileError) errorMessage += wxT("\nFAT volume cannot store file larger than 4 gigabyte!"); } catch(...) {} @@ -1786,69 +1572,283 @@ void ffs3::copyFile(const Zstring& sourceFile, throw FileError(errorMessage); } - //rename temporary file: do not add anything else here (note specific error handing) - ffs3::renameFile(temporary, targetFile); - - guardTempFile.Dismiss(); //no need to delete temp file anymore - - Loki::ScopeGuard guardTargetFile = Loki::MakeGuard(&ffs3::removeFile, targetFile); - - //copy creation date (last modification date is REDUNDANTLY written, too, even for symlinks) - copyFileTimes(sourceFile, targetFile, !copyFileSymLinks); //throw (FileError) - - if (copyFilePermissions) - copyObjectPermissions(sourceFile, targetFile, !copyFileSymLinks); //throw FileError() + //adapt file modification time: + copyFileTimes(sourceFile, targetFile, true); //throw (FileError) - guardTargetFile.Dismiss(); + guardTarget.Dismiss(); //target has been created successfully! } -#elif defined FFS_LINUX -void ffs3::copyFile(const Zstring& sourceFile, - const Zstring& targetFile, - bool copyFileSymLinks, - bool copyFilePermissions, - CopyFileCallback* callback) +void rawCopyWinOptimized(const Zstring& sourceFile, + const Zstring& targetFile, + CallbackCopyFile* callback) //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting, ErrorFileLocked) { - using ffs3::CopyFileCallback; + /* + BackupRead() FileRead() CopyFileEx() + -------------------------------------------- + Attributes NO NO YES + create time NO NO NO + ADS YES NO YES + Encrypted NO(silent fail) NO YES + Compressed NO NO NO + Sparse YES NO NO + PERF 6% faster - + + Mark stream as compressed: FSCTL_SET_COMPRESSION + compatible with: BackupRead() FileRead() + */ - //symbolic link handling - if (copyFileSymLinks && - symlinkExists(sourceFile)) + //open sourceFile for reading + HANDLE hFileIn = ::CreateFile(ffs3::applyLongPathPrefix(sourceFile).c_str(), + GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, //all shared modes are required to read files that are open in other applications + NULL, + OPEN_EXISTING, + FILE_FLAG_SEQUENTIAL_SCAN, + NULL); + if (hFileIn == INVALID_HANDLE_VALUE) { - return copySymlinkInternal(sourceFile, targetFile, SYMLINK_TYPE_FILE, copyFilePermissions); //throw (FileError) + const DWORD lastError = ::GetLastError(); + const wxString& errorMessage = wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"") + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + + //if file is locked (try to) use Windows Volume Shadow Copy Service + if (lastError == ERROR_SHARING_VIOLATION || + lastError == ERROR_LOCK_VIOLATION) + throw ErrorFileLocked(errorMessage); + + throw FileError(errorMessage); } + Loki::ScopeGuard dummy1 = Loki::MakeGuard(::CloseHandle, hFileIn); + (void)dummy1; //silence warning "unused variable" - //begin of regular file copy - struct stat fileInfo; - if (::stat(sourceFile.c_str(), &fileInfo) != 0) //read file attributes from source file (resolving symlinks) + + BY_HANDLE_FILE_INFORMATION infoFileIn = {}; + if (!::GetFileInformationByHandle(hFileIn, &infoFileIn)) { const wxString errorMessage = wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\""); throw FileError(errorMessage + wxT("\n\n") + ffs3::getLastErrorFormatted()); } - //open sourceFile for reading - FileInput fileIn(sourceFile); //throw FileError() + const bool sourceIsCompressed = (infoFileIn.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED) != 0; + const bool sourceIsSparse = (infoFileIn.dwFileAttributes & FILE_ATTRIBUTE_SPARSE_FILE) != 0; + const bool sourceIsEncrypted = (infoFileIn.dwFileAttributes & FILE_ATTRIBUTE_ENCRYPTED) != 0; + + bool targetSupportSparse = false; + bool targetSupportCompressed = false; + bool targetSupportEncryption = false; + + if (sourceIsCompressed || sourceIsSparse || sourceIsEncrypted) + { + DWORD fsFlags = 0; + + { + const size_t bufferSize = std::max(targetFile.size(), static_cast<size_t>(10000)); + boost::scoped_array<wchar_t> buffer(new wchar_t[bufferSize]); + + //suprisingly slow: ca. 1.5 ms per call! + if (!::GetVolumePathName(targetFile.c_str(), //__in LPCTSTR lpszFileName, -> seems to be no need for path prefix (check passed) + buffer.get(), //__out LPTSTR lpszVolumePathName, + static_cast<DWORD>(bufferSize))) //__in DWORD cchBufferLength + throw FileError(wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted() + + wxT("\nFailed to determine volume name!")); + + Zstring volumePath = buffer.get(); + if (!volumePath.EndsWith(common::FILE_NAME_SEPARATOR)) + volumePath += common::FILE_NAME_SEPARATOR; + + //suprisingly fast: ca. 0.03 ms per call! + if (!::GetVolumeInformation(volumePath.c_str(), //__in_opt LPCTSTR lpRootPathName, + NULL, //__out LPTSTR lpVolumeNameBuffer, + 0, //__in DWORD nVolumeNameSize, + NULL, //__out_opt LPDWORD lpVolumeSerialNumber, + NULL, //__out_opt LPDWORD lpMaximumComponentLength, + &fsFlags, //__out_opt LPDWORD lpFileSystemFlags, + NULL, //__out LPTSTR lpFileSystemNameBuffer, + 0)) //__in DWORD nFileSystemNameSize + throw FileError(wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(volumePath) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted() + + wxT("\nFailed to determine volume information!")); + } + + targetSupportSparse = (fsFlags & FILE_SUPPORTS_SPARSE_FILES) != 0; + targetSupportCompressed = (fsFlags & FILE_FILE_COMPRESSION ) != 0; + targetSupportEncryption = (fsFlags & FILE_SUPPORTS_ENCRYPTION ) != 0; + } + + //####################################### DST hack ########################################### + if (dst::isFatDrive(sourceFile)) //throw() + { + const dst::RawTime rawTime(infoFileIn.ftCreationTime, infoFileIn.ftLastWriteTime); + if (dst::fatHasUtcEncoded(rawTime)) //throw (std::runtime_error) + { + infoFileIn.ftLastWriteTime = dst::fatDecodeUtcTime(rawTime); //return last write time in real UTC, throw (std::runtime_error) + ::GetSystemTimeAsFileTime(&infoFileIn.ftCreationTime); //real creation time information is not available... + } + } + + if (dst::isFatDrive(targetFile)) //throw() + { + const dst::RawTime encodedTime = dst::fatEncodeUtcTime(infoFileIn.ftLastWriteTime); //throw (std::runtime_error) + infoFileIn.ftCreationTime = encodedTime.createTimeRaw; + infoFileIn.ftLastWriteTime = encodedTime.writeTimeRaw; + } + //####################################### DST hack ########################################### + + const DWORD validAttribs = FILE_ATTRIBUTE_READONLY | + FILE_ATTRIBUTE_HIDDEN | + FILE_ATTRIBUTE_SYSTEM | + FILE_ATTRIBUTE_ARCHIVE | //those two are not set properly (not worse than ::CopyFileEx()) + FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | // + (targetSupportEncryption ? FILE_ATTRIBUTE_ENCRYPTED : 0); //create targetFile and open it for writing - const Zstring temporary = createTempName(targetFile); //use temporary file until a correct date has been set + HANDLE hFileOut = ::CreateFile(ffs3::applyLongPathPrefix(targetFile).c_str(), + GENERIC_READ | GENERIC_WRITE, //read access required for FSCTL_SET_COMPRESSION + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + CREATE_NEW, + (infoFileIn.dwFileAttributes & validAttribs) | FILE_FLAG_SEQUENTIAL_SCAN, + NULL); + if (hFileOut == INVALID_HANDLE_VALUE) + { + const DWORD lastError = ::GetLastError(); + const wxString& errorMessage = wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + + if (lastError == ERROR_FILE_EXISTS) + throw ErrorTargetExisting(errorMessage); + + if (lastError == ERROR_PATH_NOT_FOUND) + throw ErrorTargetPathMissing(errorMessage); + + throw FileError(errorMessage); + } + Loki::ScopeGuard guardTarget = Loki::MakeGuard(&removeFile, targetFile); //transactional behavior: guard just after opening target and before managing hFileOut + + Loki::ScopeGuard dummy = Loki::MakeGuard(::CloseHandle, hFileOut); + (void)dummy; //silence warning "unused variable" + + + const bool useBackupFun = !sourceIsEncrypted; //http://msdn.microsoft.com/en-us/library/aa362509(v=VS.85).aspx + + if (sourceIsCompressed && targetSupportCompressed) + { + USHORT cmpState = COMPRESSION_FORMAT_DEFAULT; + + DWORD bytesReturned = 0; + if (!DeviceIoControl(hFileOut, //handle to file or directory + FSCTL_SET_COMPRESSION, //dwIoControlCode + &cmpState, //input buffer + sizeof(cmpState), //size of input buffer + NULL, //lpOutBuffer + 0, //OutBufferSize + &bytesReturned, //number of bytes returned + NULL)) //OVERLAPPED structure + throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted() + + wxT("\nFailed to write NTFS compressed attribute!")); + } + + //although it seems the sparse attribute is set automatically by BackupWrite, we are required to do this manually: http://support.microsoft.com/kb/271398/en-us + if (sourceIsSparse && targetSupportSparse) + { + if (useBackupFun) + { + DWORD bytesReturned = 0; + if (!DeviceIoControl(hFileOut, //handle to file + FSCTL_SET_SPARSE, //dwIoControlCode + NULL, //input buffer + 0, //size of input buffer + NULL, //lpOutBuffer + 0, //OutBufferSize + &bytesReturned, //number of bytes returned + NULL)) //OVERLAPPED structure + throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted() + + wxT("\nFailed to write NTFS sparse attribute!")); + } + } - //ensure cleanup (e.g. network drop): call BEFORE creating fileOut object! - Loki::ScopeGuard guardTempFile = Loki::MakeGuard(&ffs3::removeFile, temporary); + const DWORD BUFFER_SIZE = 512 * 1024; //512 kb seems to be a reasonable buffer size + static const boost::scoped_array<BYTE> memory(new BYTE[BUFFER_SIZE]); - FileOutput fileOut(temporary); //throw FileError() + struct ManageCtxt //manage context for BackupRead()/BackupWrite() + { + ManageCtxt() : read(NULL), write(NULL) {} + ~ManageCtxt() + { + if (read != NULL) + ::BackupRead (0, NULL, 0, NULL, true, false, &read); + if (write != NULL) + ::BackupWrite(0, NULL, 0, NULL, true, false, &write); + } - const size_t BUFFER_SIZE = 512 * 1024; //512 kb seems to be a reasonable buffer size - static const boost::scoped_array<char> memory(new char[BUFFER_SIZE]); + LPVOID read; + LPVOID write; + } context; //copy contents of sourceFile to targetFile wxULongLong totalBytesTransferred; + + bool eof = false; do { - const size_t bytesRead = fileIn.read(memory.get(), BUFFER_SIZE); //throw FileError() + DWORD bytesRead = 0; - fileOut.write(memory.get(), bytesRead); //throw FileError() + if (useBackupFun) + { + if (!::BackupRead(hFileIn, //__in HANDLE hFile, + memory.get(), //__out LPBYTE lpBuffer, + BUFFER_SIZE, //__in DWORD nNumberOfBytesToRead, + &bytesRead, //__out LPDWORD lpNumberOfBytesRead, + false, //__in BOOL bAbort, + false, //__in BOOL bProcessSecurity, + &context.read)) //__out LPVOID *lpContext + throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted()); + } + else if (!::ReadFile(hFileIn, //__in HANDLE hFile, + memory.get(), //__out LPVOID lpBuffer, + BUFFER_SIZE, //__in DWORD nNumberOfBytesToRead, + &bytesRead, //__out_opt LPDWORD lpNumberOfBytesRead, + NULL)) //__inout_opt LPOVERLAPPED lpOverlapped + throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted()); + + if (bytesRead > BUFFER_SIZE) + throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"") + + wxT("\n\n") + wxT("buffer overflow")); + + if (bytesRead < BUFFER_SIZE) + eof = true; + + DWORD bytesWritten = 0; + + if (useBackupFun) + { + if (!::BackupWrite(hFileOut, //__in HANDLE hFile, + memory.get(), //__in LPBYTE lpBuffer, + bytesRead, //__in DWORD nNumberOfBytesToWrite, + &bytesWritten, //__out LPDWORD lpNumberOfBytesWritten, + false, //__in BOOL bAbort, + false, //__in BOOL bProcessSecurity, + &context.write)) //__out LPVOID *lpContext + throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted() + wxT(" (w)")); //w -> distinguish from fopen error message! + } + else if (!::WriteFile(hFileOut, //__in HANDLE hFile, + memory.get(), //__out LPVOID lpBuffer, + bytesRead, //__in DWORD nNumberOfBytesToWrite, + &bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten, + NULL)) //__inout_opt LPOVERLAPPED lpOverlapped + throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted() + wxT(" (w)")); //w -> distinguish from fopen error message! + + if (bytesWritten != bytesRead) + throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + wxT("incomplete write")); totalBytesTransferred += bytesRead; @@ -1856,33 +1856,205 @@ void ffs3::copyFile(const Zstring& sourceFile, if (callback != NULL) switch (callback->updateCopyStatus(totalBytesTransferred)) { - case CopyFileCallback::CONTINUE: + case CallbackCopyFile::CONTINUE: break; - case CopyFileCallback::CANCEL: //a user aborted operation IS an error condition! + case CallbackCopyFile::CANCEL: //a user aborted operation IS an error condition! throw FileError(wxString(_("Error copying file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + zToWx(targetFile) + wxT("\"\n\n") + _("Operation aborted!")); } } - while (!fileIn.eof()); + while (!eof); - //close output stream before changing attributes - fileOut.close(); - //rename temporary file - ffs3::renameFile(temporary, targetFile); - guardTempFile.Dismiss(); + if (totalBytesTransferred == 0) //BackupRead silently fails reading encrypted files -> double check! + { + LARGE_INTEGER inputSize = {}; + if (!::GetFileSizeEx(hFileIn, &inputSize)) + throw FileError(wxString(_("Error reading file attributes:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted()); + + if (inputSize.QuadPart != 0) + throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\"") + + wxT("\n\n") + wxT("unknown error")); + } + + //time needs to be set at the end: BackupWrite() changes file time + if (!::SetFileTime(hFileOut, + &infoFileIn.ftCreationTime, + NULL, + &infoFileIn.ftLastWriteTime)) + throw FileError(wxString(_("Error changing modification time:")) + wxT("\n\"") + zToWx(targetFile) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted()); + + +#ifndef NDEBUG //dst hack: verify data written + if (dst::isFatDrive(targetFile)) //throw() + { + WIN32_FILE_ATTRIBUTE_DATA debugeAttr = {}; + assert(::GetFileAttributesEx(applyLongPathPrefix(targetFile).c_str(), //__in LPCTSTR lpFileName, + GetFileExInfoStandard, //__in GET_FILEEX_INFO_LEVELS fInfoLevelId, + &debugeAttr)); //__out LPVOID lpFileInformation + + assert(::CompareFileTime(&debugeAttr.ftCreationTime, &infoFileIn.ftCreationTime) == 0); + assert(::CompareFileTime(&debugeAttr.ftLastWriteTime, &infoFileIn.ftLastWriteTime) == 0); + } +#endif + + guardTarget.Dismiss(); + + /* + //create test sparse file + size_t sparseSize = 50 * 1024 * 1024; + HANDLE hSparse = ::CreateFile(L"C:\\sparse.file", + GENERIC_READ | GENERIC_WRITE, //read access required for FSCTL_SET_COMPRESSION + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + CREATE_NEW, + FILE_FLAG_SEQUENTIAL_SCAN, + NULL); + DWORD br = 0; + if (!::DeviceIoControl(hSparse, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &br,NULL)) + throw 1; + + LARGE_INTEGER liDistanceToMove = {}; + liDistanceToMove.QuadPart = sparseSize; + if (!::SetFilePointerEx(hSparse, liDistanceToMove, NULL, FILE_BEGIN)) + throw 1; + + if (!SetEndOfFile(hSparse)) + throw 1; - //ensure cleanup: - Loki::ScopeGuard guardTargetFile = Loki::MakeGuard(&ffs3::removeFile, targetFile); + FILE_ZERO_DATA_INFORMATION zeroInfo = {}; + zeroInfo.BeyondFinalZero.QuadPart = sparseSize; + if (!::DeviceIoControl(hSparse, FSCTL_SET_ZERO_DATA, &zeroInfo, sizeof(zeroInfo), NULL, 0, &br, NULL)) + throw 1; + + ::CloseHandle(hSparse); + */ +} +#endif + + +void rawCopyStream(const Zstring& sourceFile, + const Zstring& targetFile, + CallbackCopyFile* callback) //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting) +{ + Loki::ScopeGuard guardTarget = Loki::MakeGuard(&removeFile, targetFile); //transactional behavior: place guard before lifetime of FileOutput + try + { + //open sourceFile for reading + FileInput fileIn(sourceFile); //throw (FileError) + + //create targetFile and open it for writing + FileOutput fileOut(targetFile, FileOutput::ACC_CREATE_NEW); //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting) + + const size_t BUFFER_SIZE = 512 * 1024; //512 kb seems to be a reasonable buffer size + static const boost::scoped_array<char> memory(new char[BUFFER_SIZE]); + + //copy contents of sourceFile to targetFile + wxULongLong totalBytesTransferred; + do + { + const size_t bytesRead = fileIn.read(memory.get(), BUFFER_SIZE); //throw (FileError) + + fileOut.write(memory.get(), bytesRead); //throw (FileError) + + totalBytesTransferred += bytesRead; + + //invoke callback method to update progress indicators + if (callback != NULL) + switch (callback->updateCopyStatus(totalBytesTransferred)) + { + case CallbackCopyFile::CONTINUE: + break; + + case CallbackCopyFile::CANCEL: //a user aborted operation IS an error condition! + throw FileError(wxString(_("Error copying file:")) + wxT("\n\"") + zToWx(sourceFile) + wxT("\" ->\n\"") + + zToWx(targetFile) + wxT("\"\n\n") + _("Operation aborted!")); + } + } + while (!fileIn.eof()); + } + catch(ErrorTargetExisting&) + { + guardTarget.Dismiss(); //don't delete file that existed previously! + throw; + } //adapt file modification time: copyFileTimes(sourceFile, targetFile, true); //throw (FileError) + guardTarget.Dismiss(); //target has been created successfully! +} + + +inline +void copyFileImpl(const Zstring& sourceFile, + const Zstring& targetFile, + CallbackCopyFile* callback) //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting, ErrorFileLocked) +{ +#ifdef FFS_WIN + /* + rawCopyWinApi() rawCopyWinOptimized() + ------------------------------------- + Attributes YES YES + Filetimes YES YES + ADS YES YES + Encrypted YES YES + Compressed NO YES + Sparse NO YES + PERF - 6% faster + */ + + //rawCopyWinApi(sourceFile, targetFile, callback); //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting, ErrorFileLocked) + rawCopyWinOptimized(sourceFile, targetFile, callback); //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting, ErrorFileLocked) ->about 8% faster + +#elif defined FFS_LINUX + rawCopyStream(sourceFile, targetFile, callback); //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting) +#endif +} +} + + +void ffs3::copyFile(const Zstring& sourceFile, //throw (FileError: ErrorTargetPathMissing, ErrorFileLocked); + const Zstring& targetFile, + bool copyFilePermissions, + CallbackCopyFile* callback) +{ + Zstring temporary = targetFile + ffs3::TEMP_FILE_ENDING; //use temporary file until a correct date has been set + Loki::ScopeGuard guardTempFile = Loki::MakeGuard(&removeFile, boost::cref(temporary)); //transactional behavior: ensure cleanup (e.g. network drop) -> cref [!] + + //raw file copy + try + { + copyFileImpl(sourceFile, temporary, callback); //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting, ErrorFileLocked) + } + catch (ErrorTargetExisting&) + { + //determine non-used temp file name "first": + //using optimistic strategy: assume everything goes well, but recover on error -> minimize file accesses + temporary = createTempName(targetFile); + + //retry + copyFileImpl(sourceFile, temporary, callback); //throw (FileError) + } + + //have target file deleted (after read access on source and target has been confirmed) => allow for almost transactional overwrite + if (callback) callback->deleteTargetFile(targetFile); + + //rename temporary file: + //perf: this call is REALLY expensive on unbuffered volumes! ~40% performance decrease on FAT USB stick! + renameFile(temporary, targetFile); //throw (FileError) + + guardTempFile.Dismiss(); + Loki::ScopeGuard guardTargetFile = Loki::MakeGuard(&removeFile, targetFile); + + //perf: interestingly it is much faster to apply file times BEFORE renaming temporary! + //set file permissions if (copyFilePermissions) - copyObjectPermissions(sourceFile, targetFile, true); //throw FileError() + copyObjectPermissions(sourceFile, targetFile, true); //throw (FileError) guardTargetFile.Dismiss(); //target has been created successfully! } -#endif diff --git a/shared/file_handling.h b/shared/file_handling.h index 4ec9c6d2..1d68c399 100644 --- a/shared/file_handling.h +++ b/shared/file_handling.h @@ -7,26 +7,20 @@ #ifndef FILE_HANDLING_H_INCLUDED #define FILE_HANDLING_H_INCLUDED +#include <wx/longlong.h> #include "zstring.h" #include "file_error.h" -#include <wx/longlong.h> - -#ifdef FFS_WIN -#include "shadow.h" -#endif namespace ffs3 { -struct RemoveDirCallback; -struct MoveFileCallback; -struct CopyFileCallback; - +struct CallbackRemoveDir; +struct CallbackMoveFile; +struct CallbackCopyFile; -Zstring getFormattedDirectoryName(const Zstring& dirname); -bool fileExists( const Zstring& filename); //throw() replaces wxFileExists()! -bool dirExists( const Zstring& dirname); //throw() replaces wxDirExists(): optional 'cause wxDirExists treats symlinks correctly +bool fileExists( const Zstring& filename); //throw() replaces wxFileExists() +bool dirExists( const Zstring& dirname); //throw() replaces wxDirExists() bool symlinkExists( const Zstring& objname); //throw() check whether a symbolic link exists bool somethingExists(const Zstring& objname); //throw() check whether any object with this name exists @@ -43,61 +37,61 @@ ResponseSameVol onSameVolume(const Zstring& folderLeft, const Zstring& folderRig //copy file or directory create/last change date, void copyFileTimes(const Zstring& sourceDir, const Zstring& targetDir, bool derefSymlinks); //throw (FileError) -//copy filesystem permissions: probably requires admin rights -void copyObjectPermissions(const Zstring& source, const Zstring& target, bool derefSymlinks); //throw FileError(); - //symlink handling: always evaluate target wxULongLong getFilesize(const Zstring& filename); //throw (FileError) //file handling void removeFile(const Zstring& filename); //throw (FileError) -void removeDirectory(const Zstring& directory, RemoveDirCallback* callback = NULL); //throw (FileError) +void removeDirectory(const Zstring& directory, CallbackRemoveDir* callback = NULL); //throw (FileError) //rename file or directory: no copying!!! void renameFile(const Zstring& oldName, const Zstring& newName); //throw (FileError); -//move source to target; expectations: target not existing, all super-directories of target exist -void moveFile(const Zstring& sourceFile, const Zstring& targetFile, MoveFileCallback* callback = NULL); //throw (FileError); +//move source to target; expectations: all super-directories of target exist +//"ignoreExisting": if target already exists, source is deleted +void moveFile(const Zstring& sourceFile, const Zstring& targetFile, bool ignoreExisting, CallbackMoveFile* callback); //throw (FileError); //move source to target including subdirectories -//"ignoreExistingDirs": existing directories will be enhanced as long as this is possible without overwriting files -void moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExistingDirs, MoveFileCallback* callback = NULL); //throw (FileError); +//"ignoreExisting": existing directories and files will be enriched +void moveDirectory(const Zstring& sourceDir, const Zstring& targetDir, bool ignoreExisting, CallbackMoveFile* callback); //throw (FileError); //creates superdirectories automatically: -void createDirectory(const Zstring& directory, const Zstring& templateDir, bool copyDirectorySymLinks, bool copyFilePermissions); //throw (FileError); +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! -void copyFile(const Zstring& sourceFile, //throw (FileError); +void copyFile(const Zstring& sourceFile, //throw (FileError: ErrorTargetPathMissing, ErrorFileLocked (Windows-only)); const Zstring& targetFile, - bool copyFileSymLinks, bool copyFilePermissions, -#ifdef FFS_WIN - shadow::ShadowCopy* shadowCopyHandler, //supply handler for making shadow copies, may be NULL -#endif - CopyFileCallback* callback); //may be NULL + CallbackCopyFile* callback); //may be NULL //Note: it MAY happen that copyFile() leaves temp files behind, e.g. temporary network drop. // => clean them up at an appropriate time (automatically set sync directions to delete them). They have the following ending: const Zstring TEMP_FILE_ENDING = Zstr(".ffs_tmp"); +enum SymlinkType +{ + SYMLINK_TYPE_FILE, + SYMLINK_TYPE_DIR +}; +void copySymlink(const Zstring& sourceLink, const Zstring& targetLink, SymlinkType type, bool copyFilePermissions); //throw (FileError) //----------- callbacks --------------- -struct RemoveDirCallback +struct CallbackRemoveDir { - virtual ~RemoveDirCallback() {} + virtual ~CallbackRemoveDir() {} virtual void requestUiRefresh(const Zstring& currentObject) = 0; }; -struct MoveFileCallback //callback functionality +struct CallbackMoveFile //callback functionality { - virtual ~MoveFileCallback() {} + virtual ~CallbackMoveFile() {} enum Response { @@ -108,9 +102,13 @@ struct MoveFileCallback //callback functionality }; -struct CopyFileCallback //callback functionality +struct CallbackCopyFile //callback functionality { - virtual ~CopyFileCallback() {} + virtual ~CallbackCopyFile() {} + + //if target is existing user needs to implement deletion: copyFile() NEVER deletes target if already existing! + //at this point full read access on source had been proven, so it's safe to delete it. + virtual void deleteTargetFile(const Zstring& targetFile) = 0; //may throw exceptions enum Response { diff --git a/shared/file_io.cpp b/shared/file_io.cpp index e6de77bb..0afe17dd 100644 --- a/shared/file_io.cpp +++ b/shared/file_io.cpp @@ -5,9 +5,9 @@ // ************************************************************************** // #include "file_io.h" -#include <wx/intl.h> #include "string_conv.h" #include "system_func.h" +#include "i18n.h" #ifdef FFS_WIN #include "long_path_prefix.h" @@ -18,7 +18,15 @@ using namespace ffs3; -FileInput::FileInput(const Zstring& filename) : //throw FileError() +FileInput::FileInput(FileHandle handle, const Zstring& filename) : +#ifdef FFS_WIN + eofReached(false), +#endif + fileHandle(handle), + filename_(filename) {} + + +FileInput::FileInput(const Zstring& filename) : //throw (FileError, ErrorNotExisting) #ifdef FFS_WIN eofReached(false), #endif @@ -63,19 +71,19 @@ FileInput::FileInput(const Zstring& filename) : //throw FileError() if (lastError == ERROR_FILE_NOT_FOUND || lastError == ERROR_PATH_NOT_FOUND) throw ErrorNotExisting(errorMessage); - else - throw FileError(errorMessage); + + throw FileError(errorMessage); } #elif defined FFS_LINUX - fileHandle = ::fopen(filename.c_str(), "rb,type=record,noseek"); //utilize UTF-8 filename + fileHandle = ::fopen(filename.c_str(), "r,type=record,noseek"); //utilize UTF-8 filename if (fileHandle == NULL) { const int lastError = errno; const wxString& errorMessage = wxString(_("Error opening file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); if (lastError == ENOENT) throw ErrorNotExisting(errorMessage); - else - throw FileError(errorMessage); + + throw FileError(errorMessage); } #endif } @@ -91,25 +99,28 @@ FileInput::~FileInput() } -size_t FileInput::read(void* buffer, size_t bytesToRead) //returns actual number of bytes read; throw FileError() +size_t FileInput::read(void* buffer, size_t bytesToRead) //returns actual number of bytes read; throw (FileError) { #ifdef FFS_WIN DWORD bytesRead = 0; - if (!::ReadFile( - fileHandle, //__in HANDLE hFile, - buffer, //__out LPVOID lpBuffer, - static_cast<DWORD>(bytesToRead), //__in DWORD nNumberOfBytesToRead, - &bytesRead, //__out_opt LPDWORD lpNumberOfBytesRead, - NULL) //__inout_opt LPOVERLAPPED lpOverlapped - || bytesRead > bytesToRead) //must be fulfilled + if (!::ReadFile(fileHandle, //__in HANDLE hFile, + buffer, //__out LPVOID lpBuffer, + static_cast<DWORD>(bytesToRead), //__in DWORD nNumberOfBytesToRead, + &bytesRead, //__out_opt LPDWORD lpNumberOfBytesRead, + NULL)) //__inout_opt LPOVERLAPPED lpOverlapped throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + wxT("\n\n") + ffs3::getLastErrorFormatted()); + if (bytesRead > bytesToRead) + throw FileError(wxString(_("Error reading file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + + wxT("\n\n") + wxT("buffer overflow")); + if (bytesRead < bytesToRead) - eofReached = true; + eofReached = bytesRead < bytesToRead; return bytesRead; + #elif defined FFS_LINUX const size_t bytesRead = ::fread(buffer, 1, bytesToRead, fileHandle); if (::ferror(fileHandle) != 0) @@ -130,49 +141,83 @@ bool FileInput::eof() //end of file reached } -FileOutput::FileOutput(const Zstring& filename) : //throw FileError() +FileOutput::FileOutput(FileHandle handle, const Zstring& filename) : fileHandle(handle), filename_(filename) {} + + +FileOutput::FileOutput(const Zstring& filename, AccessFlag access) : //throw (FileError, ErrorTargetPathMissing, ErrorTargetExisting) filename_(filename) { #ifdef FFS_WIN fileHandle = ::CreateFile(ffs3::applyLongPathPrefix(filename).c_str(), GENERIC_WRITE, - FILE_SHARE_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, //note: FILE_SHARE_DELETE is required to rename file while handle is open! NULL, - CREATE_ALWAYS, + access == ACC_OVERWRITE ? CREATE_ALWAYS : CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); if (fileHandle == INVALID_HANDLE_VALUE) - throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + ffs3::getLastErrorFormatted()); + { + const DWORD lastError = ::GetLastError(); + const wxString& errorMessage = wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + + if (lastError == ERROR_FILE_EXISTS) + throw ErrorTargetExisting(errorMessage); + + if (lastError == ERROR_PATH_NOT_FOUND) + throw ErrorTargetPathMissing(errorMessage); + + throw FileError(errorMessage); + } + #elif defined FFS_LINUX - fileHandle = ::fopen(filename.c_str(), "wb,type=record,noseek"); //utilize UTF-8 filename - if (!fileHandle) - throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + - wxT("\n\n") + ffs3::getLastErrorFormatted()); + fileHandle = ::fopen(filename.c_str(), + //GNU extension: https://www.securecoding.cert.org/confluence/display/cplusplus/FIO03-CPP.+Do+not+make+assumptions+about+fopen()+and+file+creation + access == ACC_OVERWRITE ? "w,type=record,noseek" : "wx,type=record,noseek"); + if (fileHandle == NULL) + { + const int lastError = errno; + const wxString& errorMessage = wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + + wxT("\n\n") + ffs3::getLastErrorFormatted(lastError); + if (lastError == EEXIST) + throw ErrorTargetExisting(errorMessage); + + if (lastError == ENOENT) + throw ErrorTargetPathMissing(errorMessage); + + throw FileError(errorMessage); + } #endif } FileOutput::~FileOutput() { - close(); //may be called more than once +#ifdef FFS_WIN + ::CloseHandle(fileHandle); +#elif defined FFS_LINUX + ::fclose(fileHandle); //NEVER allow passing NULL to fclose! -> crash! +#endif } -void FileOutput::write(const void* buffer, size_t bytesToWrite) //throw FileError() +void FileOutput::write(const void* buffer, size_t bytesToWrite) //throw (FileError) { #ifdef FFS_WIN DWORD bytesWritten = 0; - if (!::WriteFile( - fileHandle, //__in HANDLE hFile, - buffer, //__out LPVOID lpBuffer, - static_cast<DWORD>(bytesToWrite), //__in DWORD nNumberOfBytesToRead, - &bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten, - NULL) //__inout_opt LPOVERLAPPED lpOverlapped - || bytesWritten != bytesToWrite) //must be fulfilled for synchronous writes! + if (!::WriteFile(fileHandle, //__in HANDLE hFile, + buffer, //__out LPVOID lpBuffer, + static_cast<DWORD>(bytesToWrite), //__in DWORD nNumberOfBytesToWrite, + &bytesWritten, //__out_opt LPDWORD lpNumberOfBytesWritten, + NULL)) //__inout_opt LPOVERLAPPED lpOverlapped throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + wxT("\n\n") + ffs3::getLastErrorFormatted() + wxT(" (w)")); //w -> distinguish from fopen error message! + + if (bytesWritten != bytesToWrite) //must be fulfilled for synchronous writes! + throw FileError(wxString(_("Error writing file:")) + wxT("\n\"") + zToWx(filename_) + wxT("\"") + + wxT("\n\n") + wxT("incomplete write")); + #elif defined FFS_LINUX const size_t bytesWritten = ::fwrite(buffer, 1, bytesToWrite, fileHandle); if (::ferror(fileHandle) != 0 || bytesWritten != bytesToWrite) @@ -180,17 +225,3 @@ void FileOutput::write(const void* buffer, size_t bytesToWrite) //throw FileErro wxT("\n\n") + ffs3::getLastErrorFormatted() + wxT(" (w)")); //w -> distinguish from fopen error message! #endif } - - -void FileOutput::close() //close file stream -{ - if (fileHandle != NULL) //NEVER allow passing NULL to fclose! -> crash! - { -#ifdef FFS_WIN - ::CloseHandle(fileHandle); -#elif defined FFS_LINUX - ::fclose(fileHandle); -#endif - fileHandle = NULL; - } -} diff --git a/shared/file_io.h b/shared/file_io.h index 0781595b..a1460f53 100644 --- a/shared/file_io.h +++ b/shared/file_io.h @@ -22,22 +22,27 @@ namespace ffs3 { //file IO optimized for sequential read/write accesses + better error reporting + long path support (following symlinks) +#ifdef FFS_WIN +typedef HANDLE FileHandle; +#elif defined FFS_LINUX +typedef FILE* FileHandle; +#endif + class FileInput { public: - FileInput(const Zstring& filename); //throw (FileError, ErrorNotExisting) + FileInput(const Zstring& filename); //throw (FileError: ErrorNotExisting) + FileInput(FileHandle handle, const Zstring& filename); //takes ownership! ~FileInput(); - size_t read(void* buffer, size_t bytesToRead); //throw FileError(); returns actual number of bytes read + size_t read(void* buffer, size_t bytesToRead); //throw (FileError); returns actual number of bytes read bool eof(); //end of file reached private: #ifdef FFS_WIN - HANDLE fileHandle; bool eofReached; -#elif defined FFS_LINUX - FILE* fileHandle; #endif + FileHandle fileHandle; const Zstring filename_; }; @@ -45,17 +50,19 @@ private: class FileOutput { public: - FileOutput(const Zstring& filename); //throw FileError() + enum AccessFlag + { + ACC_OVERWRITE, + ACC_CREATE_NEW + }; + FileOutput(const Zstring& filename, AccessFlag access); //throw (FileError: ErrorTargetPathMissing, ErrorTargetExisting) + FileOutput(FileHandle handle, const Zstring& filename); //takes ownership! ~FileOutput(); - void write(const void* buffer, size_t bytesToWrite); //throw FileError() - void close(); //close file stream + void write(const void* buffer, size_t bytesToWrite); //throw (FileError) + private: -#ifdef FFS_WIN - HANDLE fileHandle; -#elif defined FFS_LINUX - FILE* fileHandle; -#endif + FileHandle fileHandle; const Zstring filename_; }; @@ -65,11 +72,11 @@ private: class FileInputStream : public wxInputStream { public: - FileInputStream(const Zstring& filename) : //throw FileError() + FileInputStream(const Zstring& filename) : //throw (FileError) fileObj(filename) {} private: - virtual size_t OnSysRead(void* buffer, size_t bufsize) //throw FileError() + virtual size_t OnSysRead(void* buffer, size_t bufsize) //throw (FileError) { return fileObj.read(buffer, bufsize); } @@ -81,11 +88,11 @@ private: class FileOutputStream : public wxOutputStream { public: - FileOutputStream(const Zstring& filename) : //throw FileError() - fileObj(filename) {} + FileOutputStream(const Zstring& filename) : //throw (FileError) + fileObj(filename, FileOutput::ACC_OVERWRITE) {} private: - virtual size_t OnSysWrite(const void* buffer, size_t bufsize) //throw FileError() + virtual size_t OnSysWrite(const void* buffer, size_t bufsize) //throw (FileError) { fileObj.write(buffer, bufsize); return bufsize; diff --git a/shared/file_traverser.cpp b/shared/file_traverser.cpp index f0777898..2af0f4af 100644 --- a/shared/file_traverser.cpp +++ b/shared/file_traverser.cpp @@ -8,7 +8,6 @@ #include <limits> #include "system_constants.h" #include "system_func.h" -#include <wx/intl.h> #include "string_conv.h" #include "assert_static.h" #include "symlink_target.h" diff --git a/shared/localization.cpp b/shared/i18n.cpp index a412df1e..537d9fb4 100644 --- a/shared/localization.cpp +++ b/shared/i18n.cpp @@ -4,32 +4,32 @@ // * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // -#include "localization.h" +#include "i18n.h" +#include <fstream> +#include <map> +#include <wx/ffile.h> +#include <wx/intl.h> #include <wx/msgdlg.h> #include "../shared/standard_paths.h" #include "../shared/string_conv.h" #include "system_constants.h" -#include <fstream> -#include <map> -#include <wx/ffile.h> +#include <boost/any.hpp> +#include <boost/shared_ptr.hpp> +#include <list> -#if wxCHECK_VERSION(2, 9, 1) -#include <boost/cstdint.hpp> -#include <wx/translation.h> -#include <cstdlib> -#endif - -using ffs3::CustomLocale; using ffs3::LocalizationInfo; -//_("Browse") <- dummy string for wxDirPickerCtrl to be recognized by automatic text extraction! - namespace { //will receive their proper value in CustomLocale::CustomLocale() wxString THOUSANDS_SEPARATOR = wxT(","); wxString DECIMAL_POINT = wxT("."); + +typedef std::map<wxString, wxString> Translation; +Translation activeTranslation; //map original text |-> translation + +int activeLanguage = wxLANGUAGE_ENGLISH; } @@ -45,25 +45,13 @@ wxString ffs3::getDecimalPoint() } -const std::vector<ffs3::LocInfoLine>& LocalizationInfo::getMapping() +const std::vector<ffs3::LocInfoLine>& LocalizationInfo::get() { static LocalizationInfo instance; return instance.locMapping; } -namespace -{ -struct CompareByName : public std::binary_function<ffs3::LocInfoLine, ffs3::LocInfoLine, bool> -{ - bool operator()(const ffs3::LocInfoLine& lhs, const ffs3::LocInfoLine& rhs) const - { - return lhs.languageName < rhs.languageName; - } -}; -} - - LocalizationInfo::LocalizationInfo() { ffs3::LocInfoLine newEntry; @@ -242,8 +230,6 @@ LocalizationInfo::LocalizationInfo() newEntry.translatorName = wxT("Simon Park"); newEntry.languageFlag = wxT("south_korea.png"); locMapping.push_back(newEntry); - - //std::sort(locMapping.begin(), locMapping.end(), CompareByName()); } @@ -330,7 +316,7 @@ int mapLanguageDialect(int language) //case wxLANGUAGE_PORTUGUESE_BRAZILIAN: //case wxLANGUAGE_KOREAN: - //variants of wxLANGUAGE_ARABIC (also needed to detect RTL languages) + //variants of wxLANGUAGE_ARABIC case wxLANGUAGE_ARABIC_ALGERIA: case wxLANGUAGE_ARABIC_BAHRAIN: case wxLANGUAGE_ARABIC_EGYPT: @@ -472,18 +458,13 @@ private: }; -typedef std::map<wxString, wxString> TranslationMap; //map original text |-> translation - -void loadTranslation(const wxString& filename, TranslationMap& trans) //empty translation on error +void loadTranslation(const wxString& filename, Translation& trans) //empty translation on error { trans.clear(); UnicodeFileReader langFile(ffs3::getResourceDir() + wxT("Languages") + ffs3::zToWx(common::FILE_NAME_SEPARATOR) + filename); if (langFile.isOkay()) { - //save encoding info: required by mo file generator - trans.insert(std::make_pair(wxEmptyString, wxT("Content-Type: text/plain; charset=UTF-8\n"))); - int rowNumber = 0; wxString original; wxString tmpString; @@ -506,195 +487,265 @@ void loadTranslation(const wxString& filename, TranslationMap& trans) //empty tr } -#if wxCHECK_VERSION(2, 9, 1) -//this whole abomination is required to support language formats other than "mo" in wxWidgets v2.9 -class FFSTranslationLoader : public wxTranslationsLoader +void ffs3::setLanguage(int language) { -public: - static const wxString domainName() + static class StaticInit { - return wxT("FFS"); - } + public: + StaticInit() : loc(wxLANGUAGE_DEFAULT) //wxLocale: we need deferred initialization, sigh... + { + //::setlocale (LC_ALL, ""); -> implicitly called by wxLocale + const lconv* localInfo = ::localeconv(); - FFSTranslationLoader(const TranslationMap& trans, wxLanguage langId) : langId_(langId) - { - //generate mo file: http://www.gnu.org/software/hello/manual/gettext/MO-Files.html + //actually these two parameters are language dependent, but we take system setting to handle all kinds of language derivations + THOUSANDS_SEPARATOR = wxString::FromUTF8(localInfo->thousands_sep); + DECIMAL_POINT = wxString::FromUTF8(localInfo->decimal_point); - std::string binaryStream; + // why not working? + // THOUSANDS_SEPARATOR = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).thousands_sep(); + // DECIMAL_POINT = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).decimal_point(); + } + private: + wxLocale loc; //required for RTL language support (and nothing else) + } dummy; - const size_t offsetTableOrig = sizeof(wxMsgCatalogHeader); - const size_t offsetTableTrans = offsetTableOrig + trans.size() * sizeof(wxMsgTableEntry); - const size_t offsetTableString = offsetTableTrans + trans.size() * sizeof(wxMsgTableEntry); + activeLanguage = language; - wxMsgCatalogHeader header = - { - 0x950412de, //magic number (save in this machine's byte order) - 0, //revision - trans.size(), //numStrings - offsetTableOrig, //ofsOrigTable - offsetTableTrans, //ofsTransTable - 0, //nHashSize - 0, //ofsHashTable - }; - writeCobject(binaryStream, header); - - std::string tableOrig; - std::string tableTrans; - std::string stringsList; - for (TranslationMap::const_iterator i = trans.begin(); i != trans.end(); ++i) - { + //default: english + wxString languageFile; -#ifndef _MSC_VER -#warning redundant UTF8 conversion!!! -#endif - std::string origString = i->first.ToUTF8(); - const wxMsgTableEntry origEntry = {origString.length(), offsetTableString + stringsList.size()}; - writeCobject(tableOrig, origEntry); - stringsList.append(origString.c_str(), origString.length() + 1); //include NULL-termination - -#ifndef _MSC_VER -#warning redundant UTF8 conversion!!! -#endif - std::string transString = i->second.ToUTF8(); - const wxMsgTableEntry transEntry = {transString.length(), offsetTableString + stringsList.size()}; - writeCobject(tableTrans, transEntry); - stringsList.append(transString.c_str(), transString.length() + 1); //include NULL-termination + //(try to) retrieve language filename + const int mappedLanguage = mapLanguageDialect(language); + for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::get().begin(); i != LocalizationInfo::get().end(); ++i) + if (i->languageID == mappedLanguage) + { + languageFile = i->languageFile; + break; } - binaryStream += tableOrig; - binaryStream += tableTrans; - binaryStream += stringsList; - buffer = wxScopedCharBuffer::CreateOwned(static_cast<char*>(::malloc(binaryStream.size())), binaryStream.size()); //takes buffer ownership, calls ::free() - std::copy(binaryStream.begin(), binaryStream.end(), buffer.data()); + //load language file into buffer + activeTranslation.clear(); + if (!languageFile.empty()) + { + loadTranslation(languageFile, activeTranslation); //empty translation on error + if (activeTranslation.empty()) + { + wxMessageBox(wxString(_("Error reading file:")) + wxT(" \"") + languageFile + wxT("\""), _("Error"), wxOK | wxICON_ERROR); + activeLanguage = wxLANGUAGE_ENGLISH; //reset to english language to show this error just once + } } + else + ; //if languageFile is empty texts will be english per default +} - virtual wxMsgCatalog* LoadCatalog(const wxString& domain, const wxString& lang) - { - if (domain != domainName() || lang != wxLocale::GetLanguageCanonicalName(langId_)) //avoid superfluous calls by wxWidgets framework - return NULL; - return wxMsgCatalog::CreateFromData(buffer, domain); - } +int ffs3::getLanguage() +{ + return activeLanguage; +} - virtual wxArrayString GetAvailableTranslations(const wxString& domain) const - { - wxArrayString output; - if (domain == domainName()) - output.Add(wxLocale::GetLanguageCanonicalName(langId_)); - return output; - } -private: - struct wxMsgTableEntry - { - boost::uint32_t nLen, // length of the string - ofsString; // pointer to the string - }; +int ffs3::retrieveSystemLanguage() +{ + return wxLocale::GetSystemLanguage(); +} - // header of a .mo file - struct wxMsgCatalogHeader - { - boost::uint32_t magic, // offset +00: magic id - revision, // +04: revision - numStrings, // +08: number of strings in the file - ofsOrigTable, // +0C: start of original string table - ofsTransTable, // +10: start of translated string table - nHashSize, // +14: hash table size - ofsHashTable; // +18: offset of hash table start - }; - template <class T> - void writeCobject(std::string& str, T obj) - { - str.append(reinterpret_cast<const char*>(&obj), sizeof(obj)); - } - wxScopedCharBuffer buffer; //raw data in mo file format - const wxLanguage langId_; + +/* +typedef Zbase<wchar_t> Wstring; + +const Wstring TK_TERNARY_QUEST = L"?"; +const Wstring TK_TERNARY_COLON = L":"; +const Wstring TK_OR = L"||"; +const Wstring TK_AND = L"&&"; +const Wstring TK_EQUAL = L"=="; +const Wstring TK_NOT_EQUAL = L"!="; +const Wstring TK_LESS = L"<"; +const Wstring TK_LESS_EQUAL = L"<="; +const Wstring TK_GREATER = L">"; +const Wstring TK_GREATER_EQUAL = L">="; +const Wstring TK_MODULUS = L"%"; +const Wstring TK_N = L"n"; +const Wstring TK_BRACKET_LEFT = L"("; +const Wstring TK_BRACKET_RIGHT = L")"; +const Wstring TK_FORM_COUNT = L"nplurals="; +const Wstring TK_PHRASE_BEGIN = L"plural="; + + +template <class T> +struct Expr +{ + typedef T ValueType; + virtual ValueType eval() const = 0; }; -#endif -CustomLocale& CustomLocale::getInstance() +template <class In, class Out, class BiOp> +struct GenericBiExp : public Out { - static CustomLocale instance; - return instance; + GenericBiExp(const In& lhs, const In& rhs, BiOp biop) : lhs_(lhs), rhs_(rhs), biop_(biop) {} + virtual typename Out::ValueType eval() const { return biop_(lhs_.eval(), rhs_.eval()); } + const In& lhs_; + const In& rhs_; + BiOp biop_; +}; + +template <class Out, class In, class BiOp> +inline +GenericBiExp<In, Out, BiOp> makeBiExp(const In& lhs, const In& rhs, BiOp biop) +{ + return GenericBiExp<In, Out, BiOp>(lhs, rhs, biop); } +template <class Out> +struct TernaryExp : public Out +{ + TernaryExp(const Expr<bool>& ifExp, const Out& thenExp, const Out& elseExp) : ifExp_(ifExp), thenExp_(thenExp), elseExp_(elseExp) {} + virtual typename Out::ValueType eval() const { return ifExp_.eval() ? thenExp_.eval() : elseExp_.eval(); } + const Expr<bool>& ifExp_; + const Out& thenExp_; + const Out& elseExp_; +}; + +struct LiteralNumberEx : public Expr<int> +{ + LiteralNumberEx(int n) : n_(n) {} + virtual ValueType eval() const { return n_; } + int n_; +}; -class Translation : public TranslationMap {}; +struct NumberN : public Expr<int> +{ + NumberN(int& n) : n_(n) {} + virtual ValueType eval() const { return n_; } + int& n_; +}; -CustomLocale::CustomLocale() : - translationDB(new Translation), - currentLanguage(wxLANGUAGE_ENGLISH) +class PluralForm { - Init(wxLANGUAGE_DEFAULT); //setting a different language needn't be supported on all systems! +public: + struct ParserError {}; - //actually these two parameters are language dependent, but we take system setting to handle all kinds of language derivations - const lconv* localInfo = localeconv(); - THOUSANDS_SEPARATOR = wxString::FromUTF8(localInfo->thousands_sep); - DECIMAL_POINT = wxString::FromUTF8(localInfo->decimal_point); + PluralForm(const Wstring& phrase) //.po format,e.g.: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2) + { + Wstring tmp; + std::remove_copy_if(phrase.begin(), phrase.end(), std::back_inserter(tmp), std::iswspace); - // why not working? - // THOUSANDS_SEPARATOR = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).thousands_sep(); - // DECIMAL_POINT = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).decimal_point(); -} + size_t pos = tmp.find(TK_FORM_COUNT); + if (pos == Wstring::npos) + throw ParserError(); + count = tmp.substr(pos + TK_FORM_COUNT.size()).toNumber<int>(); -CustomLocale::~CustomLocale() {} //non-inline destructor for std::auto_ptr to work with forward declaration + pos = tmp.find(TK_PHRASE_BEGIN); + if (pos == Wstring::npos) + throw ParserError(); + expr = &parseNumber(tmp.substr(pos + TK_PHRASE_BEGIN.size())); + } -void CustomLocale::setLanguage(int language) -{ - currentLanguage = static_cast<wxLanguage>(language); + int formCount() const { return count; } - //default: english - wxString languageFile; + int getForm(int n) const { n_ = n ; return expr->eval(); } - //(try to) retrieve language filename - const int mappedLanguage = mapLanguageDialect(language); - for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::getMapping().begin(); i != LocalizationInfo::getMapping().end(); ++i) - if (i->languageID == mappedLanguage) - { - languageFile = i->languageFile; - break; - } +private: + const Expr<bool>& parseBool(const Wstring& phrase) + { + Wstring part1, part2; + if (trySplit(phrase, TK_OR, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseBool(part1), parseBool(part2), std::logical_or<bool>())); + else if (trySplit(phrase, TK_AND, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseBool(part1), parseBool(part2), std::logical_and<bool>())); + else if (trySplit(phrase, TK_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::equal_to<int>())); + else if (trySplit(phrase, TK_NOT_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::not_equal_to<int>())); + else if (trySplit(phrase, TK_LESS, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::less<int>())); + else if (trySplit(phrase, TK_LESS_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::less_equal<int>())); + else if (trySplit(phrase, TK_GREATER, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::greater<int>())); + else if (trySplit(phrase, TK_GREATER_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::greater_equal<int>())); + else + throw ParserError(); + } - //load language file into buffer - translationDB->clear(); - if (!languageFile.empty()) + const Expr<int>& parseNumber(const Wstring& phrase) { - loadTranslation(languageFile, *translationDB); //empty translation on error - if (translationDB->empty()) + Wstring part1, part2; + + + if (trySplit(phrase, TK_TERNARY_QUEST, part1, part2, TO_LEFT)) { - wxMessageBox(wxString(_("Error reading file:")) + wxT(" \"") + languageFile + wxT("\""), _("Error"), wxOK | wxICON_ERROR); - currentLanguage = wxLANGUAGE_ENGLISH; //reset to english language to show this error just once + Wstring part3; + if (!trySplit(Wstring(part2), TK_TERNARY_COLON, part2, part3, TO_LEFT)) + throw ParserError(); + return manageObj(TernaryExp<Expr<int> >(parseBool(part1), parseNumber(part2), parseNumber(part3))); + } + else if (trySplit(phrase, TK_MODULUS, part1, part2)) + return manageObj(makeBiExp<Expr<int> >(parseNumber(part1), parseNumber(part2), std::modulus<int>())); + else if (phrase == TK_N) + return manageObj(NumberN(n_)); + else //expect literal number + { + if (std::find_if(phrase.begin(), phrase.end(), std::not1(std::ptr_fun(std::iswdigit))) != phrase.end()) + throw ParserError(); + return manageObj(LiteralNumberEx(phrase.toNumber<int>())); } } - else - ; //if languageFile is empty texts will be english per default + enum Associativity + { + TO_LEFT, + TO_RIGHT + }; + static bool trySplit(const Wstring& phrase, const Wstring& delimiter, Wstring& part1, Wstring& part2, Associativity assoc = TO_RIGHT) + { + size_t pos = assoc == TO_LEFT ? + phrase.find(delimiter) : //reverse [!] + phrase.rfind(delimiter); + if (pos == Wstring::npos) + return false; + + part1 = phrase.substr(0, pos); + part2 = phrase.substr(pos + delimiter.size()); + return true; + } + + template <class T> + const T& manageObj(const T& obj) + { + dump.push_back(obj); + return *boost::any_cast<T>(&dump.back()); + } + int count; + const Expr<int>* expr; + mutable int n_; + + std::list<boost::any> dump; //manage polymorphc object lifetimes +}; -#if wxCHECK_VERSION(2, 9, 1) - wxTranslations::Set(new wxTranslations); - wxTranslations::Get()->SetLoader(new FFSTranslationLoader(*translationDB, currentLanguage)); //ownership passed - wxTranslations::Get()->SetLanguage(currentLanguage); - wxTranslations::Get()->AddCatalog(FFSTranslationLoader::domainName(), wxLANGUAGE_ENGLISH_US); - //... a little over design going on?!? -#endif -} + PluralForm dummy(L"nplurals=3; plural=n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 > 20) ? 1 : 2"); + int ddf = dummy.formCount(); + int kddf = dummy.getForm(0); +*/ -const wxChar* CustomLocale::GetString(const wxChar* szOrigString, const wxChar* szDomain) const + + +wxString ffs3::translate(const wxString& original) //translate into currently selected language { //look for translation in buffer table - const Translation::const_iterator i = translationDB->find(szOrigString); - if (i != translationDB->end()) + const Translation::const_iterator i = activeTranslation.find(original); + if (i != activeTranslation.end()) return i->second.c_str(); //fallback - return szOrigString; + return original; } - diff --git a/shared/localization.h b/shared/i18n.h index 3ce7bf24..0026cdd5 100644 --- a/shared/localization.h +++ b/shared/i18n.h @@ -7,23 +7,14 @@ #ifndef MISC_H_INCLUDED #define MISC_H_INCLUDED -#include <wx/intl.h> +#include <wx/string.h> #include <vector> -#include <memory> - -class Translation; - namespace ffs3 { -//language independent global variables: just use operating system's default setting! -wxString getThousandsSeparator(); -wxString getDecimalPoint(); - - struct LocInfoLine { - wxLanguage languageID; + int languageID; wxString languageName; wxString languageFile; wxString translatorName; @@ -33,7 +24,7 @@ struct LocInfoLine class LocalizationInfo { public: - static const std::vector<LocInfoLine>& getMapping(); + static const std::vector<LocInfoLine>& get(); private: LocalizationInfo(); @@ -44,27 +35,24 @@ private: }; -class CustomLocale : public wxLocale -{ -public: - static CustomLocale& getInstance(); - - void setLanguage(int language); +//language independent global variables: just use operating system's default setting! +wxString getThousandsSeparator(); +wxString getDecimalPoint(); - int getLanguage() const - { - return currentLanguage; - } +void setLanguage(int language); +int getLanguage(); - virtual const wxChar* GetString(const wxChar* szOrigString, const wxChar* szDomain = NULL) const; +int retrieveSystemLanguage(); -private: - CustomLocale(); - ~CustomLocale(); //non-inline destructor for std::auto_ptr to work with forward declaration -> superfluous in this case: singleton pattern! +wxString translate(const wxString& original); //translate into currently selected language - std::auto_ptr<Translation> translationDB; //careful with forward-declarations and auto_ptr! save in this case, 'cause full class info available - wxLanguage currentLanguage; -}; +//translate plural forms: "%x day|%x days" +//returns "%x day" if n == 1; "%x days" else for english language +wxString translate(const wxString& original, int n); } +//WXINTL_NO_GETTEXT_MACRO must be defined to deactivate wxWidgets underscore macro +#define _(s) ffs3::translate(wxT(s)) +#define _P(s, n) ffs3::translate(wxT(s), n) + #endif // MISC_H_INCLUDED diff --git a/shared/i18n_no_BOM.cpp b/shared/i18n_no_BOM.cpp new file mode 100644 index 00000000..78f2b230 --- /dev/null +++ b/shared/i18n_no_BOM.cpp @@ -0,0 +1,751 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. 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 "i18n.h" +#include <fstream> +#include <map> +#include <wx/ffile.h> +#include <wx/intl.h> +#include <wx/msgdlg.h> +#include "../shared/standard_paths.h" +#include "../shared/string_conv.h" +#include "system_constants.h" +#include <boost/any.hpp> +#include <boost/shared_ptr.hpp> +#include <list> + +using ffs3::LocalizationInfo; + + +namespace +{ +//will receive their proper value in CustomLocale::CustomLocale() +wxString THOUSANDS_SEPARATOR = wxT(","); +wxString DECIMAL_POINT = wxT("."); + +typedef std::map<wxString, wxString> Translation; +Translation activeTranslation; //map original text |-> translation + +int activeLanguage = wxLANGUAGE_ENGLISH; +} + + +wxString ffs3::getThousandsSeparator() +{ + return THOUSANDS_SEPARATOR; +} + + +wxString ffs3::getDecimalPoint() +{ + return DECIMAL_POINT; +} + + +const std::vector<ffs3::LocInfoLine>& LocalizationInfo::get() +{ + static LocalizationInfo instance; + return instance.locMapping; +} + + +LocalizationInfo::LocalizationInfo() +{ + ffs3::LocInfoLine newEntry; + + newEntry.languageID = wxLANGUAGE_CZECH; + newEntry.languageName = wxT("ÄŒeÅ¡tina"); + newEntry.languageFile = wxT("czech.lng"); + newEntry.translatorName = wxT("ViCi"); + newEntry.languageFlag = wxT("czechRep.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_GERMAN; + newEntry.languageName = wxT("Deutsch"); + newEntry.languageFile = wxT("german.lng"); + newEntry.translatorName = wxT("ZenJu"); + newEntry.languageFlag = wxT("germany.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_ENGLISH_UK; + newEntry.languageName = wxT("English (UK)"); + newEntry.languageFile = wxT("english_uk.lng"); + newEntry.translatorName = wxT("Robert Readman"); + newEntry.languageFlag = wxT("england.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_ENGLISH; + newEntry.languageName = wxT("English (US)"); + newEntry.languageFile = wxT(""); + newEntry.translatorName = wxT("ZenJu"); + newEntry.languageFlag = wxT("usa.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_SPANISH; + newEntry.languageName = wxT("Español"); + newEntry.languageFile = wxT("spanish.lng"); + newEntry.translatorName = wxT("Alexis MartÃnez"); + newEntry.languageFlag = wxT("spain.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_GREEK; + newEntry.languageName = wxT("Ελληνικά"); + newEntry.languageFile = wxT("greek.lng"); + newEntry.translatorName = wxT("ΓιώÏγος Γιαγλής"); + newEntry.languageFlag = wxT("greece.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_FRENCH; + newEntry.languageName = wxT("Français"); + newEntry.languageFile = wxT("french.lng"); + newEntry.translatorName = wxT("Jean-François Hartmann"); + newEntry.languageFlag = wxT("france.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_ITALIAN; + newEntry.languageName = wxT("Italiano"); + newEntry.languageFile = wxT("italian.lng"); + newEntry.translatorName = wxT("Emmo"); + newEntry.languageFlag = wxT("italy.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_HUNGARIAN; + newEntry.languageName = wxT("Magyar"); + newEntry.languageFile = wxT("hungarian.lng"); + newEntry.translatorName = wxT("Demon"); + newEntry.languageFlag = wxT("hungary.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_DUTCH; + newEntry.languageName = wxT("Nederlands"); + newEntry.languageFile = wxT("dutch.lng"); + newEntry.translatorName = wxT("Dion van Lieshout"); + newEntry.languageFlag = wxT("holland.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_POLISH; + newEntry.languageName = wxT("Polski"); + newEntry.languageFile = wxT("polish.lng"); + newEntry.translatorName = wxT("Wojtek Pietruszewski"); + newEntry.languageFlag = wxT("poland.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_PORTUGUESE; + newEntry.languageName = wxT("Português"); + newEntry.languageFile = wxT("portuguese.lng"); + newEntry.translatorName = wxT("QuestMark"); + newEntry.languageFlag = wxT("portugal.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_PORTUGUESE_BRAZILIAN; + newEntry.languageName = wxT("Português do Brasil"); + newEntry.languageFile = wxT("portuguese_br.lng"); + newEntry.translatorName = wxT("Edison Aranha"); + newEntry.languageFlag = wxT("brazil.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_RUSSIAN; + newEntry.languageName = wxT("PуÑÑкий"); + newEntry.languageFile = wxT("russian.lng"); + newEntry.translatorName = wxT("Fayzullin T.N. aka Svobodniy"); + newEntry.languageFlag = wxT("russia.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_ROMANIAN; + newEntry.languageName = wxT("Română"); + newEntry.languageFile = wxT("romanian.lng"); + newEntry.translatorName = wxT("Alexandru Bogdan Munteanu"); + newEntry.languageFlag = wxT("romania.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_SLOVENIAN; + newEntry.languageName = wxT("SlovenÅ¡Äina"); + newEntry.languageFile = wxT("slovenian.lng"); + newEntry.translatorName = wxT("Matej Badalic"); + newEntry.languageFlag = wxT("slovakia.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_FINNISH; + newEntry.languageName = wxT("Suomi"); + newEntry.languageFile = wxT("finnish.lng"); + newEntry.translatorName = wxT("Nalle Juslén"); + newEntry.languageFlag = wxT("finland.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_SWEDISH; + newEntry.languageName = wxT("Svenska"); + newEntry.languageFile = wxT("swedish.lng"); + newEntry.translatorName = wxT("Ã…ke Engelbrektson"); + newEntry.languageFlag = wxT("sweden.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_TURKISH; + newEntry.languageName = wxT("Türkçe"); + newEntry.languageFile = wxT("turkish.lng"); + newEntry.translatorName = wxT("Kaya Zeren"); + newEntry.languageFlag = wxT("turkey.png"); + locMapping.push_back(newEntry); + + // newEntry.languageID = wxLANGUAGE_HEBREW; + // newEntry.languageName = wxT("עִבְרִית"); + // newEntry.languageFile = wxT("hebrew.lng"); + // newEntry.translatorName = wxT("Moshe Olshevsky"); + // newEntry.languageFlag = wxT("isreal.png"); + // locMapping.push_back(newEntry); + + // newEntry.languageID = wxLANGUAGE_ARABIC; + // newEntry.languageName = wxT("العربية"); + // newEntry.languageFile = wxT("arabic.lng"); + // newEntry.translatorName = wxT("Yousef Shamshoum"); + // newEntry.languageFlag = wxT("arabic-language.png"); + // locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_JAPANESE; + newEntry.languageName = wxT("日本語"); + newEntry.languageFile = wxT("japanese.lng"); + newEntry.translatorName = wxT("Tilt"); + newEntry.languageFlag = wxT("japan.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_CHINESE_TRADITIONAL; + newEntry.languageName = wxT("æ£é«”ä¸æ–‡"); + newEntry.languageFile = wxT("chinese_traditional.lng"); + newEntry.translatorName = wxT("Carlos"); + newEntry.languageFlag = wxT("taiwan.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_CHINESE_SIMPLIFIED; + newEntry.languageName = wxT("简体ä¸æ–‡"); + newEntry.languageFile = wxT("chinese_simple.lng"); + newEntry.translatorName = wxT("CyberCowBoy"); + newEntry.languageFlag = wxT("china.png"); + locMapping.push_back(newEntry); + + newEntry.languageID = wxLANGUAGE_KOREAN; + newEntry.languageName = wxT("í•œêµì–´"); + newEntry.languageFile = wxT("korean.lng"); + newEntry.translatorName = wxT("Simon Park"); + newEntry.languageFlag = wxT("south_korea.png"); + locMapping.push_back(newEntry); +} + + +namespace +{ +int mapLanguageDialect(int language) +{ + switch (language) //map language dialects + { + //variants of wxLANGUAGE_GERMAN + case wxLANGUAGE_GERMAN_AUSTRIAN: + case wxLANGUAGE_GERMAN_BELGIUM: + case wxLANGUAGE_GERMAN_LIECHTENSTEIN: + case wxLANGUAGE_GERMAN_LUXEMBOURG: + case wxLANGUAGE_GERMAN_SWISS: + return wxLANGUAGE_GERMAN; + + //variants of wxLANGUAGE_FRENCH + case wxLANGUAGE_FRENCH_BELGIAN: + case wxLANGUAGE_FRENCH_CANADIAN: + case wxLANGUAGE_FRENCH_LUXEMBOURG: + case wxLANGUAGE_FRENCH_MONACO: + case wxLANGUAGE_FRENCH_SWISS: + return wxLANGUAGE_FRENCH; + + //variants of wxLANGUAGE_DUTCH + case wxLANGUAGE_DUTCH_BELGIAN: + return wxLANGUAGE_DUTCH; + + //variants of wxLANGUAGE_ITALIAN + case wxLANGUAGE_ITALIAN_SWISS: + return wxLANGUAGE_ITALIAN; + + //variants of wxLANGUAGE_CHINESE_SIMPLIFIED + case wxLANGUAGE_CHINESE: + case wxLANGUAGE_CHINESE_SINGAPORE: + return wxLANGUAGE_CHINESE_SIMPLIFIED; + + //variants of wxLANGUAGE_CHINESE_TRADITIONAL + case wxLANGUAGE_CHINESE_TAIWAN: + case wxLANGUAGE_CHINESE_HONGKONG: + case wxLANGUAGE_CHINESE_MACAU: + return wxLANGUAGE_CHINESE_TRADITIONAL; + + //variants of wxLANGUAGE_RUSSIAN + case wxLANGUAGE_RUSSIAN_UKRAINE: + return wxLANGUAGE_RUSSIAN; + + //variants of wxLANGUAGE_SPANISH + case wxLANGUAGE_SPANISH_ARGENTINA: + case wxLANGUAGE_SPANISH_BOLIVIA: + case wxLANGUAGE_SPANISH_CHILE: + case wxLANGUAGE_SPANISH_COLOMBIA: + case wxLANGUAGE_SPANISH_COSTA_RICA: + case wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC: + case wxLANGUAGE_SPANISH_ECUADOR: + case wxLANGUAGE_SPANISH_EL_SALVADOR: + case wxLANGUAGE_SPANISH_GUATEMALA: + case wxLANGUAGE_SPANISH_HONDURAS: + case wxLANGUAGE_SPANISH_MEXICAN: + case wxLANGUAGE_SPANISH_MODERN: + case wxLANGUAGE_SPANISH_NICARAGUA: + case wxLANGUAGE_SPANISH_PANAMA: + case wxLANGUAGE_SPANISH_PARAGUAY: + case wxLANGUAGE_SPANISH_PERU: + case wxLANGUAGE_SPANISH_PUERTO_RICO: + case wxLANGUAGE_SPANISH_URUGUAY: + case wxLANGUAGE_SPANISH_US: + case wxLANGUAGE_SPANISH_VENEZUELA: + return wxLANGUAGE_SPANISH; + + //variants of wxLANGUAGE_SWEDISH + case wxLANGUAGE_SWEDISH_FINLAND: + return wxLANGUAGE_SWEDISH; + + //case wxLANGUAGE_CZECH: + //case wxLANGUAGE_FINNISH: + //case wxLANGUAGE_GREEK: + //case wxLANGUAGE_JAPANESE: + //case wxLANGUAGE_POLISH: + //case wxLANGUAGE_SLOVENIAN: + //case wxLANGUAGE_HUNGARIAN: + //case wxLANGUAGE_PORTUGUESE: + //case wxLANGUAGE_PORTUGUESE_BRAZILIAN: + //case wxLANGUAGE_KOREAN: + + //variants of wxLANGUAGE_ARABIC + case wxLANGUAGE_ARABIC_ALGERIA: + case wxLANGUAGE_ARABIC_BAHRAIN: + case wxLANGUAGE_ARABIC_EGYPT: + case wxLANGUAGE_ARABIC_IRAQ: + case wxLANGUAGE_ARABIC_JORDAN: + case wxLANGUAGE_ARABIC_KUWAIT: + case wxLANGUAGE_ARABIC_LEBANON: + case wxLANGUAGE_ARABIC_LIBYA: + case wxLANGUAGE_ARABIC_MOROCCO: + case wxLANGUAGE_ARABIC_OMAN: + case wxLANGUAGE_ARABIC_QATAR: + case wxLANGUAGE_ARABIC_SAUDI_ARABIA: + case wxLANGUAGE_ARABIC_SUDAN: + case wxLANGUAGE_ARABIC_SYRIA: + case wxLANGUAGE_ARABIC_TUNISIA: + case wxLANGUAGE_ARABIC_UAE: + case wxLANGUAGE_ARABIC_YEMEN: + return wxLANGUAGE_ARABIC; + + //variants of wxLANGUAGE_ENGLISH_UK + case wxLANGUAGE_ENGLISH_AUSTRALIA: + case wxLANGUAGE_ENGLISH_NEW_ZEALAND: + case wxLANGUAGE_ENGLISH_TRINIDAD: + case wxLANGUAGE_ENGLISH_CARIBBEAN: + case wxLANGUAGE_ENGLISH_JAMAICA: + case wxLANGUAGE_ENGLISH_BELIZE: + case wxLANGUAGE_ENGLISH_EIRE: + case wxLANGUAGE_ENGLISH_SOUTH_AFRICA: + case wxLANGUAGE_ENGLISH_ZIMBABWE: + case wxLANGUAGE_ENGLISH_BOTSWANA: + case wxLANGUAGE_ENGLISH_DENMARK: + return wxLANGUAGE_ENGLISH_UK; + + default: + return language; + } +} + + +inline +void exchangeEscapeChars(wxString& data) +{ + wxString output; + + const wxChar* input = data.c_str(); + + wxChar value; + while ((value = *input) != wxChar(0)) + { + //read backslash + if (value == wxChar('\\')) + { + //read next character + ++input; + if ((value = *input) == wxChar(0)) + break; + + switch (value) + { + case wxChar('\\'): + output += wxChar('\\'); + break; + case wxChar('n'): + output += wxChar('\n'); + break; + case wxChar('t'): + output += wxChar('\t'); + break; + case wxChar('\"'): + output += wxChar('\"'); + break; + default: + output += value; + } + } + else + output += value; + + ++input; + } + data = output; +} + + +//workaround to get a FILE* from a unicode filename in a portable way +class UnicodeFileReader +{ +public: + UnicodeFileReader(const wxString& filename) : + inputFile(NULL) + { + wxFFile dummyFile(filename, wxT("rb")); + if (dummyFile.IsOpened()) + { + inputFile = dummyFile.fp(); + dummyFile.Detach(); + } + } + + ~UnicodeFileReader() + { + if (inputFile != NULL) + fclose(inputFile); + } + + bool isOkay() + { + return inputFile != NULL; + } + + bool getNextLine(wxString& line) + { + std::string output; + + while (true) + { + const int c = fgetc(inputFile); + if (c == EOF) + return false; + else if (c == 0xD) + { + //Delimiter: + //---------- + //Linux: 0xA \n + //Mac: 0xD \r + //Win: 0xD 0xA \r\n <- language files are in Windows format + + fgetc(inputFile); //discard the 0xA character + + line = wxString::FromUTF8(output.c_str(), output.length()); + return true; + } + output += static_cast<char>(c); + } + } + +private: + FILE* inputFile; +}; + + +void loadTranslation(const wxString& filename, Translation& trans) //empty translation on error +{ + trans.clear(); + + UnicodeFileReader langFile(ffs3::getResourceDir() + wxT("Languages") + ffs3::zToWx(common::FILE_NAME_SEPARATOR) + filename); + if (langFile.isOkay()) + { + int rowNumber = 0; + wxString original; + wxString tmpString; + while (langFile.getNextLine(tmpString)) + { + exchangeEscapeChars(tmpString); + + if (rowNumber++ % 2 == 0) + original = tmpString; + else + { + const wxString& translation = tmpString; + + if (!original.empty() && !translation.empty()) + trans.insert(std::make_pair(original, translation)); + } + } + } +} +} + + +void ffs3::setLanguage(int language) +{ + static class StaticInit + { + public: + StaticInit() : loc(wxLANGUAGE_DEFAULT) //wxLocale: we need deferred initialization, sigh... + { + //::setlocale (LC_ALL, ""); -> implicitly called by wxLocale + const lconv* localInfo = ::localeconv(); + + //actually these two parameters are language dependent, but we take system setting to handle all kinds of language derivations + THOUSANDS_SEPARATOR = wxString::FromUTF8(localInfo->thousands_sep); + DECIMAL_POINT = wxString::FromUTF8(localInfo->decimal_point); + + // why not working? + // THOUSANDS_SEPARATOR = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).thousands_sep(); + // DECIMAL_POINT = std::use_facet<std::numpunct<wchar_t> >(std::locale("")).decimal_point(); + } + private: + wxLocale loc; //required for RTL language support (and nothing else) + } dummy; + + activeLanguage = language; + + //default: english + wxString languageFile; + + //(try to) retrieve language filename + const int mappedLanguage = mapLanguageDialect(language); + for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::get().begin(); i != LocalizationInfo::get().end(); ++i) + if (i->languageID == mappedLanguage) + { + languageFile = i->languageFile; + break; + } + + //load language file into buffer + activeTranslation.clear(); + if (!languageFile.empty()) + { + loadTranslation(languageFile, activeTranslation); //empty translation on error + if (activeTranslation.empty()) + { + wxMessageBox(wxString(_("Error reading file:")) + wxT(" \"") + languageFile + wxT("\""), _("Error"), wxOK | wxICON_ERROR); + activeLanguage = wxLANGUAGE_ENGLISH; //reset to english language to show this error just once + } + } + else + ; //if languageFile is empty texts will be english per default +} + + +int ffs3::getLanguage() +{ + return activeLanguage; +} + + +int ffs3::retrieveSystemLanguage() +{ + return wxLocale::GetSystemLanguage(); +} + + + + +/* +typedef Zbase<wchar_t> Wstring; + +const Wstring TK_TERNARY_QUEST = L"?"; +const Wstring TK_TERNARY_COLON = L":"; +const Wstring TK_OR = L"||"; +const Wstring TK_AND = L"&&"; +const Wstring TK_EQUAL = L"=="; +const Wstring TK_NOT_EQUAL = L"!="; +const Wstring TK_LESS = L"<"; +const Wstring TK_LESS_EQUAL = L"<="; +const Wstring TK_GREATER = L">"; +const Wstring TK_GREATER_EQUAL = L">="; +const Wstring TK_MODULUS = L"%"; +const Wstring TK_N = L"n"; +const Wstring TK_BRACKET_LEFT = L"("; +const Wstring TK_BRACKET_RIGHT = L")"; +const Wstring TK_FORM_COUNT = L"nplurals="; +const Wstring TK_PHRASE_BEGIN = L"plural="; + + +template <class T> +struct Expr +{ + typedef T ValueType; + virtual ValueType eval() const = 0; +}; + + +template <class In, class Out, class BiOp> +struct GenericBiExp : public Out +{ + GenericBiExp(const In& lhs, const In& rhs, BiOp biop) : lhs_(lhs), rhs_(rhs), biop_(biop) {} + virtual typename Out::ValueType eval() const { return biop_(lhs_.eval(), rhs_.eval()); } + const In& lhs_; + const In& rhs_; + BiOp biop_; +}; + +template <class Out, class In, class BiOp> +inline +GenericBiExp<In, Out, BiOp> makeBiExp(const In& lhs, const In& rhs, BiOp biop) +{ + return GenericBiExp<In, Out, BiOp>(lhs, rhs, biop); +} + +template <class Out> +struct TernaryExp : public Out +{ + TernaryExp(const Expr<bool>& ifExp, const Out& thenExp, const Out& elseExp) : ifExp_(ifExp), thenExp_(thenExp), elseExp_(elseExp) {} + virtual typename Out::ValueType eval() const { return ifExp_.eval() ? thenExp_.eval() : elseExp_.eval(); } + const Expr<bool>& ifExp_; + const Out& thenExp_; + const Out& elseExp_; +}; + +struct LiteralNumberEx : public Expr<int> +{ + LiteralNumberEx(int n) : n_(n) {} + virtual ValueType eval() const { return n_; } + int n_; +}; + +struct NumberN : public Expr<int> +{ + NumberN(int& n) : n_(n) {} + virtual ValueType eval() const { return n_; } + int& n_; +}; + + +class PluralForm +{ +public: + struct ParserError {}; + + PluralForm(const Wstring& phrase) //.po format,e.g.: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2) + { + Wstring tmp; + std::remove_copy_if(phrase.begin(), phrase.end(), std::back_inserter(tmp), std::iswspace); + + size_t pos = tmp.find(TK_FORM_COUNT); + if (pos == Wstring::npos) + throw ParserError(); + + count = tmp.substr(pos + TK_FORM_COUNT.size()).toNumber<int>(); + + pos = tmp.find(TK_PHRASE_BEGIN); + if (pos == Wstring::npos) + throw ParserError(); + + expr = &parseNumber(tmp.substr(pos + TK_PHRASE_BEGIN.size())); + } + + int formCount() const { return count; } + + int getForm(int n) const { n_ = n ; return expr->eval(); } + +private: + const Expr<bool>& parseBool(const Wstring& phrase) + { + Wstring part1, part2; + if (trySplit(phrase, TK_OR, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseBool(part1), parseBool(part2), std::logical_or<bool>())); + else if (trySplit(phrase, TK_AND, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseBool(part1), parseBool(part2), std::logical_and<bool>())); + else if (trySplit(phrase, TK_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::equal_to<int>())); + else if (trySplit(phrase, TK_NOT_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::not_equal_to<int>())); + else if (trySplit(phrase, TK_LESS, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::less<int>())); + else if (trySplit(phrase, TK_LESS_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::less_equal<int>())); + else if (trySplit(phrase, TK_GREATER, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::greater<int>())); + else if (trySplit(phrase, TK_GREATER_EQUAL, part1, part2)) + return manageObj(makeBiExp<Expr<bool> >(parseNumber(part1), parseNumber(part2), std::greater_equal<int>())); + else + throw ParserError(); + } + + const Expr<int>& parseNumber(const Wstring& phrase) + { + Wstring part1, part2; + + + if (trySplit(phrase, TK_TERNARY_QUEST, part1, part2, TO_LEFT)) + { + Wstring part3; + if (!trySplit(Wstring(part2), TK_TERNARY_COLON, part2, part3, TO_LEFT)) + throw ParserError(); + return manageObj(TernaryExp<Expr<int> >(parseBool(part1), parseNumber(part2), parseNumber(part3))); + } + else if (trySplit(phrase, TK_MODULUS, part1, part2)) + return manageObj(makeBiExp<Expr<int> >(parseNumber(part1), parseNumber(part2), std::modulus<int>())); + else if (phrase == TK_N) + return manageObj(NumberN(n_)); + else //expect literal number + { + if (std::find_if(phrase.begin(), phrase.end(), std::not1(std::ptr_fun(std::iswdigit))) != phrase.end()) + throw ParserError(); + return manageObj(LiteralNumberEx(phrase.toNumber<int>())); + } + } + + enum Associativity + { + TO_LEFT, + TO_RIGHT + }; + static bool trySplit(const Wstring& phrase, const Wstring& delimiter, Wstring& part1, Wstring& part2, Associativity assoc = TO_RIGHT) + { + size_t pos = assoc == TO_LEFT ? + phrase.find(delimiter) : //reverse [!] + phrase.rfind(delimiter); + if (pos == Wstring::npos) + return false; + + part1 = phrase.substr(0, pos); + part2 = phrase.substr(pos + delimiter.size()); + return true; + } + + template <class T> + const T& manageObj(const T& obj) + { + dump.push_back(obj); + return *boost::any_cast<T>(&dump.back()); + } + + int count; + const Expr<int>* expr; + mutable int n_; + + std::list<boost::any> dump; //manage polymorphc object lifetimes +}; + + + PluralForm dummy(L"nplurals=3; plural=n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 > 20) ? 1 : 2"); + int ddf = dummy.formCount(); + int kddf = dummy.getForm(0); +*/ + + + +wxString ffs3::translate(const wxString& original) //translate into currently selected language +{ + //look for translation in buffer table + const Translation::const_iterator i = activeTranslation.find(original); + if (i != activeTranslation.end()) + return i->second.c_str(); + + //fallback + return original; +} diff --git a/library/pch.h b/shared/pch.h index fa384ce5..eb95fd50 100644 --- a/library/pch.h +++ b/shared/pch.h @@ -9,25 +9,25 @@ //pay attention when using this file: might cause issues! #ifdef NDEBUG -do NOT use in release build! -#endif - - //##################################################### - // basic wxWidgets headers -#ifndef WX_PRECOMP -#define WX_PRECOMP +#error do NOT use in release build! #endif #ifdef _MSC_VER #pragma warning(disable:4996) //"warning C4996: 'std::copy': Function call with parameters that may be unsafe" #endif +//##################################################### +// basic wxWidgets headers +#ifndef WX_PRECOMP +#define WX_PRECOMP +#endif + #include <wx/wxprec.h> - //##################################################### - // #include other rarely changing headers here +//##################################################### +// #include other rarely changing headers here - //STL headers +//STL headers #include <string> #include <vector> #include <set> @@ -48,7 +48,7 @@ do NOT use in release build! #include <new> #include <stdexcept> - //other wxWidgets headers +//other wxWidgets headers #include <wx/log.h> #include <wx/grid.h> #include <wx/animate.h> @@ -104,11 +104,11 @@ do NOT use in release build! #include <wx/help.h> #include <wx/event.h> - //other +//other #include "../shared/tinyxml/tinyxml.h" #include <sys/stat.h> - //Boost +//Boost #include <boost/shared_ptr.hpp> #include <boost/scoped_array.hpp> diff --git a/shared/perf.h b/shared/perf.h index 1ad4650d..641eee2b 100644 --- a/shared/perf.h +++ b/shared/perf.h @@ -8,13 +8,15 @@ #define DEBUG_PERF_HEADER #include <sstream> + +#ifdef __WXWINDOWS__ +#include <wx/msw/wrapwin.h> //includes "windows.h" +#else //#define WIN32_LEAN_AND_MEAN -> not in a header -/* #include <windows.h> #undef max #undef min -*/ -#include <wx/msw/wrapwin.h> //includes "windows.h" +#endif #ifdef __MINGW32__ @@ -28,37 +30,48 @@ class CpuTimer public: class TimerError {}; - DEPRECATED(CpuTimer()) : resultWasShown(false), startTime(), frequency() + DEPRECATED(CpuTimer()) : frequency(), startTime(), resultShown(false) { + SetThreadAffinity dummy; if (!::QueryPerformanceFrequency(&frequency)) throw TimerError(); if (!::QueryPerformanceCounter (&startTime)) throw TimerError(); } ~CpuTimer() { - if (!resultWasShown) + if (!resultShown) showResult(); } void showResult() { + SetThreadAffinity dummy; LARGE_INTEGER currentTime = {}; if (!::QueryPerformanceCounter(¤tTime)) throw TimerError(); - const long delta = 1000.0 * (currentTime.QuadPart - startTime.QuadPart) / frequency.QuadPart; + const long delta = static_cast<long>(1000.0 * (currentTime.QuadPart - startTime.QuadPart) / frequency.QuadPart); std::ostringstream ss; ss << delta << " ms"; ::MessageBoxA(NULL, ss.str().c_str(), "Timer", 0); - resultWasShown = true; + resultShown = true; if (!::QueryPerformanceCounter(&startTime)) throw TimerError(); //don't include call to MessageBox()! } private: - bool resultWasShown; - LARGE_INTEGER startTime; + class SetThreadAffinity + { + public: + SetThreadAffinity() : oldmask(::SetThreadAffinityMask(::GetCurrentThread(), 1)) { if (oldmask == 0) throw TimerError(); } + ~SetThreadAffinity() { ::SetThreadAffinityMask(::GetCurrentThread(), oldmask); } + private: + const DWORD_PTR oldmask; + }; + LARGE_INTEGER frequency; + LARGE_INTEGER startTime; + bool resultShown; }; //two macros for quick performance measurements diff --git a/shared/privilege.cpp b/shared/privilege.cpp index 00eb2855..5cb664e1 100644 --- a/shared/privilege.cpp +++ b/shared/privilege.cpp @@ -1,7 +1,6 @@ #include "privilege.h" -#include <wx/intl.h> #include "system_func.h" -//#include <boost/shared_ptr.hpp> +#include "i18n.h" #include "loki/ScopeGuard.h" using namespace ffs3; @@ -14,7 +13,7 @@ Privileges& Privileges::getInstance() } -bool Privileges::privilegeIsActive(LPCTSTR privilege) //throw FileError() +bool Privileges::privilegeIsActive(LPCTSTR privilege) //throw (FileError) { HANDLE hToken = NULL; if (!::OpenProcessToken(::GetCurrentProcess(), //__in HANDLE ProcessHandle, @@ -58,7 +57,7 @@ bool Privileges::privilegeIsActive(LPCTSTR privilege) //throw FileError() } -void Privileges::setPrivilege(LPCTSTR privilege, bool enable) //throw FileError() +void Privileges::setPrivilege(LPCTSTR privilege, bool enable) //throw (FileError) { HANDLE hToken = NULL; if (!::OpenProcessToken(::GetCurrentProcess(), //__in HANDLE ProcessHandle, diff --git a/shared/privilege.h b/shared/privilege.h index c5ec99c7..0c5d5f0c 100644 --- a/shared/privilege.h +++ b/shared/privilege.h @@ -15,7 +15,7 @@ class Privileges public: static Privileges& getInstance(); - void ensureActive(LPCTSTR privilege) //throw FileError() + void ensureActive(LPCTSTR privilege) //throw (FileError) { if (activePrivileges.find(privilege) != activePrivileges.end()) return; //privilege already active @@ -45,8 +45,8 @@ private: catch(...) {} } - static bool privilegeIsActive(LPCTSTR privilege); //throw FileError() - static void setPrivilege(LPCTSTR privilege, bool enable); //throw FileError() + static bool privilegeIsActive(LPCTSTR privilege); //throw (FileError) + static void setPrivilege(LPCTSTR privilege, bool enable); //throw (FileError) typedef std::map<Zstring, bool> PrivBuffType; //bool: enabled by this application diff --git a/shared/recycler.cpp b/shared/recycler.cpp index 4e9ce9a3..a2b080c9 100644 --- a/shared/recycler.cpp +++ b/shared/recycler.cpp @@ -5,10 +5,10 @@ // ************************************************************************** // #include "recycler.h" -#include "string_conv.h" -#include <wx/intl.h> #include <stdexcept> #include <iterator> +#include "i18n.h" +#include "string_conv.h" #ifdef FFS_WIN #include "dll_loader.h" diff --git a/shared/resolve_path.cpp b/shared/resolve_path.cpp new file mode 100644 index 00000000..b17c3fb5 --- /dev/null +++ b/shared/resolve_path.cpp @@ -0,0 +1,319 @@ +#include "resolve_path.h" +#include <boost/scoped_array.hpp> +#include <wx/utils.h> +#include <wx/datetime.h> +#include "string_conv.h" +#include "system_constants.h" +#include "loki/ScopeGuard.h" + +#ifdef FFS_WIN +#include "dll_loader.h" +#include <wx/msw/wrapwin.h> //includes "windows.h" +#include "long_path_prefix.h" + +#elif defined FFS_LINUX +#include <map> +#include "file_traverser.h" +#include "stdlib.h" +#endif + +using namespace ffs3; +using namespace common; + + +namespace +{ +#ifdef FFS_WIN +Zstring resolveRelativePath(const Zstring& relativeName, DWORD proposedBufferSize = 1000) +{ + boost::scoped_array<Zchar> fullPath(new Zchar[proposedBufferSize]); + const DWORD rv = ::GetFullPathName( + applyLongPathPrefix(relativeName).c_str(), //__in LPCTSTR lpFileName, + proposedBufferSize, //__in DWORD nBufferLength, + fullPath.get(), //__out LPTSTR lpBuffer, + NULL); //__out LPTSTR *lpFilePart + if (rv == 0 || rv == proposedBufferSize) + //ERROR! Don't do anything + return relativeName; + if (rv > proposedBufferSize) + return resolveRelativePath(relativeName, rv); + + return fullPath.get(); +} + +#elif defined FFS_LINUX +Zstring resolveRelativePath(const Zstring& relativeName) //additional: resolves symbolic links!!! +{ + char absolutePath[PATH_MAX + 1]; + if (::realpath(relativeName.c_str(), absolutePath) == NULL) + //ERROR! Don't do anything + return relativeName; + + return Zstring(absolutePath); +} +#endif + + +bool replaceMacro(wxString& macro) //macro without %-characters, return true if replaced successfully +{ + if (macro.IsEmpty()) + return false; + + //there are equally named environment variables %TIME%, %DATE% existing, so replace these first! + if (macro.CmpNoCase(wxT("time")) == 0) + { + macro = wxDateTime::Now().FormatISOTime(); + macro.Replace(wxT(":"), wxT("")); + return true; + } + + if (macro.CmpNoCase(wxT("date")) == 0) + { + macro = wxDateTime::Now().FormatISODate(); + return true; + } + + if (macro.CmpNoCase(wxT("weekday")) == 0) + { + macro = wxDateTime::Now().Format(wxT("%A")); + return true; + } + + if (macro.CmpNoCase(wxT("month")) == 0) + { + macro = wxDateTime::Now().Format(wxT("%B")); + return true; + } + + if (macro.CmpNoCase(wxT("week")) == 0) + { + macro = wxDateTime::Now().Format(wxT("%U")); + return true; + } + + if (macro.CmpNoCase(wxT("year")) == 0) + { + macro = wxDateTime::Now().Format(wxT("%Y")); + return true; + } + + //try to apply environment variables + wxString envValue; + if (wxGetEnv(macro, &envValue)) + { + macro = envValue; + + //some postprocessing: + macro.Trim(true); //remove leading, trailing blanks + macro.Trim(false); // + + //remove leading, trailing double-quotes + if (macro.StartsWith(wxT("\"")) && + macro.EndsWith(wxT("\"")) && + macro.length() >= 2) + macro = wxString(macro.c_str() + 1, macro.length() - 2); + return true; + } + + return false; +} + + +void expandMacros(wxString& text) +{ + const wxChar SEPARATOR = '%'; + + if (text.Find(SEPARATOR) != wxNOT_FOUND) + { + wxString prefix = text.BeforeFirst(SEPARATOR); + wxString postfix = text.AfterFirst(SEPARATOR); + if (postfix.Find(SEPARATOR) != wxNOT_FOUND) + { + wxString potentialMacro = postfix.BeforeFirst(SEPARATOR); + wxString rest = postfix.AfterFirst(SEPARATOR); //text == prefix + SEPARATOR + potentialMacro + SEPARATOR + rest + + if (replaceMacro(potentialMacro)) + { + expandMacros(rest); + text = prefix + potentialMacro + rest; + } + else + { + rest = SEPARATOR + rest; + expandMacros(rest); + text = prefix + SEPARATOR + potentialMacro + rest; + } + } + } +} + + +#ifdef FFS_LINUX +class TraverseMedia : public ffs3::TraverseCallback +{ +public: + typedef std::map<Zstring, Zstring> DeviceList; //device name -> device path mapping + + TraverseMedia(DeviceList& devices) : devices_(devices) {} + + virtual void onFile(const Zchar* shortName, const Zstring& fullName, const FileInfo& details) {} + virtual void onSymlink(const Zchar* shortName, const Zstring& fullName, const SymlinkInfo& details) {} + virtual ReturnValDir onDir(const Zchar* shortName, const Zstring& fullName) + { + devices_.insert(std::make_pair(shortName, fullName)); + return Loki::Int2Type<ReturnValDir::TRAVERSING_DIR_IGNORE>(); //DON'T traverse into subdirs + } + virtual void onError(const wxString& errorText) {} + +private: + DeviceList& devices_; +}; +#endif + + +Zstring getVolumePath(const Zstring& volumeName) //empty string on error +{ +#ifdef FFS_WIN + const size_t volGuidSize = 10000; + boost::scoped_array<wchar_t> volGuid(new wchar_t[volGuidSize]); + + HANDLE hVol = ::FindFirstVolume(volGuid.get(), volGuidSize); + if (hVol != INVALID_HANDLE_VALUE) + { + Loki::ScopeGuard dummy = Loki::MakeGuard(::FindVolumeClose, hVol); + (void)dummy; + + do + { + const size_t volNameSize = MAX_PATH + 1; + boost::scoped_array<wchar_t> volName(new wchar_t[volNameSize]); + + if (::GetVolumeInformation(volGuid.get(), //__in_opt LPCTSTR lpRootPathName, + volName.get(), //__out LPTSTR lpVolumeNameBuffer, + volNameSize, //__in DWORD nVolumeNameSize, + NULL, //__out_opt LPDWORD lpVolumeSerialNumber, + NULL, //__out_opt LPDWORD lpMaximumComponentLength, + NULL, //__out_opt LPDWORD lpFileSystemFlags, + NULL, //__out LPTSTR lpFileSystemNameBuffer, + 0)) //__in DWORD nFileSystemNameSize + { + if (EqualFilename()(volumeName, Zstring(volName.get()))) + { + //GetVolumePathNamesForVolumeName is not available for Windows 2000! + typedef BOOL (WINAPI *GetVolumePathNamesForVolumeNameWFunc)(LPCWSTR lpszVolumeName, + LPWCH lpszVolumePathNames, + DWORD cchBufferLength, + PDWORD lpcchReturnLength); + + static const GetVolumePathNamesForVolumeNameWFunc getVolumePathNamesForVolumeName = + util::getDllFun<GetVolumePathNamesForVolumeNameWFunc>(L"kernel32.dll", "GetVolumePathNamesForVolumeNameW"); + + if (getVolumePathNamesForVolumeName != NULL) + { + const DWORD volPathSize = 10000; + boost::scoped_array<wchar_t> volPath(new wchar_t[volPathSize]); + + DWORD returnedLen = 0; + if (getVolumePathNamesForVolumeName(volGuid.get(), //__in LPCTSTR lpszVolumeName, + volPath.get(), //__out LPTSTR lpszVolumePathNames, + volPathSize, //__in DWORD cchBufferLength, + &returnedLen)) //__out PDWORD lpcchReturnLength + { + return volPath.get(); //return first path name in double-null terminated list! + } + } + return volGuid.get(); //GUID looks ugly, but should be working correctly + } + } + } + while (::FindNextVolume(hVol, volGuid.get(), volGuidSize)); + } + +#elif defined FFS_LINUX + //due to the naming convention on Linux /media/<volume name> this function is not that useful, but... + + TraverseMedia::DeviceList deviceList; + + TraverseMedia traverser(deviceList); + traverseFolder("/media", false, traverser); //traverse one level + + TraverseMedia::DeviceList::const_iterator iter = deviceList.find(volumeName); + if (iter != deviceList.end()) + return iter->second; +#endif + return Zstring(); +} + + +void expandVolumeName(Zstring& text) // [volname]:\folder [volname]\folder [volname]folder -> C:\folder +{ + Zstring before; + Zstring volname; + Zstring after; + + size_t posStart = text.find(Zstr("[")); + if (posStart != Zstring::npos) + { + size_t posEnd = text.find(Zstr("]"), posStart); + if (posEnd != Zstring::npos) + { + before = Zstring(text.c_str(), posStart); + volname = Zstring(text.c_str() + posStart + 1, posEnd - posStart - 1); + after = Zstring(text.c_str() + posEnd + 1); + + if (after.StartsWith(Zstr(":"))) + after = after.AfterFirst(Zstr(':')); + if (after.StartsWith(Zstring() + FILE_NAME_SEPARATOR)) + after = after.AfterFirst(FILE_NAME_SEPARATOR); + } + } + + if (volname.empty()) + return; + + Zstring volPath = getVolumePath(volname); //return empty string on error + if (volPath.empty()) + return; + + if (!volPath.EndsWith(FILE_NAME_SEPARATOR)) + volPath += FILE_NAME_SEPARATOR; + + text = before + volPath + after; +} +} + + +Zstring ffs3::getFormattedDirectoryName(const Zstring& dirname) +{ + //Formatting is needed since functions expect the directory to end with '\' to be able to split the relative names. + //note: don't combine directory formatting with wxFileName, as it doesn't respect //?/ - prefix! + + wxString dirnameTmp = zToWx(dirname); + expandMacros(dirnameTmp); + + Zstring output = wxToZ(dirnameTmp); + + expandVolumeName(output); + + output.Trim(); + + if (output.empty()) //an empty string will later be returned as "\"; this is not desired + return Zstring(); + + /* + resolve relative names; required by: + WINDOWS: + - \\?\-prefix which needs absolute names + - Volume Shadow Copy: volume name needs to be part of each filename + - file icon buffer (at least for extensions that are actually read from disk, e.g. "exe") + - ::SHFileOperation(): Using relative path names is not thread safe + WINDOWS/LINUX: + - detection of dependent directories, e.g. "\" and "C:\test" + */ + output = resolveRelativePath(output); + + if (!output.EndsWith(FILE_NAME_SEPARATOR)) + output += FILE_NAME_SEPARATOR; + + return output; +} diff --git a/shared/resolve_path.h b/shared/resolve_path.h new file mode 100644 index 00000000..0bd4b0d2 --- /dev/null +++ b/shared/resolve_path.h @@ -0,0 +1,19 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. 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 RESOLVE_PATH_H_INCLUDED +#define RESOLVE_PATH_H_INCLUDED + +#include "zstring.h" + + +namespace ffs3 +{ +Zstring getFormattedDirectoryName(const Zstring& dirname); +} + + +#endif // RESOLVE_PATH_H_INCLUDED diff --git a/shared/serialize.cpp b/shared/serialize.cpp index f71207be..719d0861 100644 --- a/shared/serialize.cpp +++ b/shared/serialize.cpp @@ -5,12 +5,12 @@ // ************************************************************************** // #include "serialize.h" -#include <wx/intl.h> +#include "i18n.h" using namespace util; -void ReadInputStream::throwReadError() const //throw FileError() +void ReadInputStream::throwReadError() const //throw (FileError) { throw ffs3::FileError(wxString(_("Error reading from synchronization database:")) + wxT(" \n") + wxT("\"") + errorObjName_ + wxT("\"")); @@ -33,7 +33,7 @@ ReadInputStream::CharArray ReadInputStream::readArrayC() const //-------------------------------------------------------------------------------------------------------- -void WriteOutputStream::throwWriteError() const //throw FileError() +void WriteOutputStream::throwWriteError() const //throw (FileError) { throw ffs3::FileError(wxString(_("Error writing to synchronization database:")) + wxT(" \n") + wxT("\"") + errorObjName_ + wxT("\"")); diff --git a/shared/serialize.h b/shared/serialize.h index 8da0a449..db1848d5 100644 --- a/shared/serialize.h +++ b/shared/serialize.h @@ -27,18 +27,18 @@ Zstring readString(wxInputStream& stream); void writeString(wxOutputStream& stream, const Zstring& str); -class ReadInputStream //throw FileError() +class ReadInputStream //throw (FileError) { protected: ReadInputStream(wxInputStream& stream, const wxString& errorObjName) : stream_(stream), errorObjName_(errorObjName) {} template <class T> - T readNumberC() const; //throw FileError(), checked read operation + T readNumberC() const; //throw (FileError), checked read operation - Zstring readStringC() const; //throw FileError(), checked read operation + Zstring readStringC() const; //throw (FileError), checked read operation typedef boost::shared_ptr<std::vector<char> > CharArray; //there's no guarantee std::string has a ref-counted implementation... so use this "thing" - CharArray readArrayC() const; //throw FileError() + CharArray readArrayC() const; //throw (FileError) void check() const; @@ -49,22 +49,22 @@ protected: private: wxInputStream& stream_; - void throwReadError() const; //throw FileError() + void throwReadError() const; //throw (FileError) const wxString& errorObjName_; //used for error text only }; -class WriteOutputStream //throw FileError() +class WriteOutputStream //throw (FileError) { protected: WriteOutputStream(const wxString& errorObjName, wxOutputStream& stream) : stream_(stream), errorObjName_(errorObjName) {} template <class T> - void writeNumberC(T number) const; //throw FileError(), checked write operation + void writeNumberC(T number) const; //throw (FileError), checked write operation - void writeStringC(const Zstring& str) const; //throw FileError(), checked write operation + void writeStringC(const Zstring& str) const; //throw (FileError), checked write operation - void writeArrayC(const std::vector<char>& buffer) const; //throw FileError() + void writeArrayC(const std::vector<char>& buffer) const; //throw (FileError) void check() const; @@ -75,7 +75,7 @@ protected: private: wxOutputStream& stream_; - void throwWriteError() const; //throw FileError() + void throwWriteError() const; //throw (FileError) const wxString& errorObjName_; //used for error text only! }; diff --git a/shared/shadow.cpp b/shared/shadow.cpp index 9dab1494..150a8bbf 100644 --- a/shared/shadow.cpp +++ b/shared/shadow.cpp @@ -6,8 +6,8 @@ // #include "shadow.h" #include <wx/msw/wrapwin.h> //includes "windows.h" -#include <wx/intl.h> #include "system_constants.h" +#include "i18n.h" #include "dll_loader.h" #include <stdexcept> #include "assert_static.h" diff --git a/shared/standard_paths.cpp b/shared/standard_paths.cpp index 6f723ef7..e4f87dd6 100644 --- a/shared/standard_paths.cpp +++ b/shared/standard_paths.cpp @@ -6,12 +6,12 @@ // #include "standard_paths.h" #include <wx/stdpaths.h> -#include <wx/filename.h> #include "system_constants.h" #include "string_conv.h" using namespace ffs3; + bool ffs3::isPortableVersion() { #ifdef FFS_WIN @@ -25,7 +25,7 @@ bool ffs3::isPortableVersion() const wxString& ffs3::getBinaryDir() { - static wxString instance = wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath() + zToWx(common::FILE_NAME_SEPARATOR); + static wxString instance = zToWx(wxToZ(wxStandardPaths::Get().GetExecutablePath()).BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR); return instance; } diff --git a/shared/string_conv.h b/shared/string_conv.h index 85181d11..24cb521e 100644 --- a/shared/string_conv.h +++ b/shared/string_conv.h @@ -22,8 +22,8 @@ Zstring wxToZ(const wxChar* str); Zstring wxToZ(wxChar ch); - - +wxString zxToWx(const zxString& str); +zxString wxToZx(const wxString& str); @@ -105,6 +105,20 @@ Zstring wxToZ(wxChar ch) { return wxToZ(wxString(ch)); } + + +inline +wxString zxToWx(const zxString& str) +{ + return wxString(str.c_str(), str.length()); +} + + +inline +zxString wxToZx(const wxString& str) +{ + return zxString(str.c_str(), str.length()); +} } #endif // STRINGCONV_H_INCLUDED diff --git a/shared/symlink_target.h b/shared/symlink_target.h index 6dec85a0..200c76d8 100644 --- a/shared/symlink_target.h +++ b/shared/symlink_target.h @@ -10,9 +10,9 @@ #include "loki/ScopeGuard.h" #include <boost/scoped_array.hpp> #include "system_func.h" -#include <wx/intl.h> #include "string_conv.h" #include "file_error.h" +#include "i18n.h" #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" @@ -72,7 +72,7 @@ Zstring getSymlinkRawTargetString(const Zstring& linkPath) //throw (FileError) try //reading certain symlinks requires admin rights! This shall not cause an error in user mode! { //allow access to certain symbolic links/junctions - ffs3::Privileges::getInstance().ensureActive(SE_BACKUP_NAME); //throw FileError() + ffs3::Privileges::getInstance().ensureActive(SE_BACKUP_NAME); //throw (FileError) } catch (...) {} diff --git a/shared/system_constants.h b/shared/system_constants.h index 6f89609e..9c0cd4a4 100644 --- a/shared/system_constants.h +++ b/shared/system_constants.h @@ -16,7 +16,7 @@ namespace common // GLOBALS //------------------------------------------------ #ifdef FFS_WIN -const Zchar FILE_NAME_SEPARATOR = '\\'; +const Zchar FILE_NAME_SEPARATOR = '\\'; // const wxChar LINE_BREAK[] = wxT("\r\n"); //internal linkage #elif defined FFS_LINUX const Zchar FILE_NAME_SEPARATOR = '/'; @@ -26,5 +26,4 @@ const wxChar LINE_BREAK[] = wxT("\n"); const char BYTE_ORDER_MARK_UTF8[] = "\xEF\xBB\xBF"; } - #endif // SYSTEMCONSTANTS_H_INCLUDED diff --git a/shared/util.cpp b/shared/util.cpp index 2af7dc5b..7ab5b4e7 100644 --- a/shared/util.cpp +++ b/shared/util.cpp @@ -9,7 +9,7 @@ #include <wx/textctrl.h> #include <wx/combobox.h> #include <wx/filepicker.h> -#include "localization.h" +#include "i18n.h" #include "file_handling.h" #include "string_conv.h" #include <stdexcept> @@ -157,7 +157,7 @@ wxString ffs3::utcTimeToLocalString(const wxLongLong& utcTime) fileTimeLong += wxLongLong(2, 3054539008UL); //timeshift between ansi C time and FILETIME in seconds == 11644473600s fileTimeLong *= 10000000; - FILETIME lastWriteTimeUtc; + FILETIME lastWriteTimeUtc = {}; lastWriteTimeUtc.dwLowDateTime = fileTimeLong.GetLo(); //GetLo() returns unsigned lastWriteTimeUtc.dwHighDateTime = static_cast<DWORD>(fileTimeLong.GetHi()); //GetHi() returns signed @@ -212,25 +212,6 @@ wxString ffs3::utcTimeToLocalString(const wxLongLong& utcTime) wxT("\n\n") + getLastErrorFormatted()).ToAscii())); } - /* - //assemble time string (performance optimized) -> note: performance argument is not valid anymore - - wxString formattedTime; - formattedTime.reserve(20); - - writeFourDigitNumber(time.wYear, formattedTime); - formattedTime += wxChar('-'); - writeTwoDigitNumber(time.wMonth, formattedTime); - formattedTime += wxChar('-'); - writeTwoDigitNumber(time.wDay, formattedTime); - formattedTime += wxChar(' '); - formattedTime += wxChar(' '); - writeTwoDigitNumber(time.wHour, formattedTime); - formattedTime += wxChar(':'); - writeTwoDigitNumber(time.wMinute, formattedTime); - formattedTime += wxChar(':'); - writeTwoDigitNumber(time.wSecond, formattedTime); - */ const wxDateTime localTime(systemTimeLocal.wDay, wxDateTime::Month(systemTimeLocal.wMonth - 1), systemTimeLocal.wYear, diff --git a/shared/xml_base.cpp b/shared/xml_base.cpp index c3d04364..3f2a9e48 100644 --- a/shared/xml_base.cpp +++ b/shared/xml_base.cpp @@ -5,8 +5,8 @@ // ************************************************************************** // #include "xml_base.h" -#include <wx/intl.h> #include "file_io.h" +#include "i18n.h" #include "string_conv.h" #include "system_constants.h" #include <boost/scoped_array.hpp> @@ -68,8 +68,8 @@ void loadRawXmlDocument(const wxString& filename, TiXmlDocument& document) //thr try { - FileInput inputFile(wxToZ(filename)); //throw FileError(); - const size_t bytesRead = inputFile.read(&inputBuffer[0], inputBuffer.size()); //throw FileError() + FileInput inputFile(wxToZ(filename)); //throw (FileError); + const size_t bytesRead = inputFile.read(&inputBuffer[0], inputBuffer.size()); //throw (FileError) if (bytesRead == 0 || bytesRead >= inputBuffer.size()) //treat XML files larger than 2 MB as erroneous: loading larger files just wastes CPU + memory throw XmlError(wxString(_("Error parsing configuration file:")) + wxT("\n\"") + filename + wxT("\"")); @@ -165,14 +165,14 @@ bool saveNecessary(const Zstring& filename, const std::string& dataToWrite) //th { try { - if (ffs3::getFilesize(filename) != static_cast<unsigned long>(dataToWrite.size())) //throw FileError(); + if (ffs3::getFilesize(filename) != static_cast<unsigned long>(dataToWrite.size())) //throw (FileError); return true; boost::scoped_array<char> inputBuffer(new char[dataToWrite.size() + 1]); //+ 1 in order to test for end of file! - FileInput inputFile(filename); //throw FileError(); + FileInput inputFile(filename); //throw (FileError); - const size_t bytesRead = inputFile.read(inputBuffer.get(), dataToWrite.size() + 1); //throw FileError() + const size_t bytesRead = inputFile.read(inputBuffer.get(), dataToWrite.size() + 1); //throw (FileError) if (bytesRead != dataToWrite.size()) //implicit test for eof! return true; @@ -200,7 +200,7 @@ void xmlAccess::saveXmlDocument(const wxString& filename, const TiXmlDocument& d { try { - FileOutput outputFile(wxToZ(filename)); //throw FileError() + FileOutput outputFile(wxToZ(filename), FileOutput::ACC_OVERWRITE); //throw (FileError) outputFile.write(buffer.c_str(), buffer.length()); // } catch (const FileError& error) //more detailed error messages than with wxWidgets diff --git a/shared/zbase.h b/shared/zbase.h index a0322de0..f08a87e3 100644 --- a/shared/zbase.h +++ b/shared/zbase.h @@ -125,7 +125,7 @@ private: static size_t calcCapacity(size_t length) { - return (length + (19 - length % 16)); //allocate some additional length to speed up concatenation + return std::max<size_t>(16, length + length / 2); //exponential growth + min size } }; @@ -207,7 +207,7 @@ private: static size_t calcCapacity(size_t length) { - return (length + (19 - length % 16)); //allocate some additional length to speed up concatenation + return std::max<size_t>(16, length + length / 2); //exponential growth + min size } }; @@ -228,6 +228,11 @@ public: operator const T* () const; //implicit conversion to C-string //STL accessors + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef T value_type; const T* begin() const; const T* end() const; T* begin(); @@ -262,11 +267,13 @@ public: size_t find(const T* str, size_t pos = 0) const; //returns "npos" if not found size_t find(T ch, size_t pos = 0) const; // size_t rfind(T ch, size_t pos = npos) const; // + size_t rfind(const T* str, size_t pos = npos) const; // Zbase& replace(size_t pos1, size_t n1, const T* str, size_t n2); void reserve(size_t minCapacity); Zbase& assign(const T* source, size_t len); void resize(size_t newSize, T fillChar = 0); void swap(Zbase& other); + void push_back(T val); //STL access //number conversion template <class N> static Zbase fromNumber(N number); @@ -620,6 +627,21 @@ size_t Zbase<T, SP, AP>::rfind(T ch, size_t pos) const template <class T, template <class, class> class SP, class AP> +inline +size_t Zbase<T, SP, AP>::rfind(const T* str, size_t pos) const +{ + assert(pos == npos || pos <= length()); + + const size_t strLen = z_impl::cStringLength(str); + const T* currEnd = pos == npos ? end() : begin() + std::min(pos + strLen, length()); + + const T* iter = std::find_end(begin(), currEnd, + str, str + strLen); + return iter == currEnd ? npos : iter - begin(); +} + + +template <class T, template <class, class> class SP, class AP> Zbase<T, SP, AP>& Zbase<T, SP, AP>::replace(size_t pos1, size_t n1, const T* str, size_t n2) { assert(str < rawStr || rawStr + length() < str); //str mustn't point to data in this string @@ -863,6 +885,14 @@ T* Zbase<T, SP, AP>::end() template <class T, template <class, class> class SP, class AP> inline +void Zbase<T, SP, AP>::push_back(T val) +{ + operator+=(val); +} + + +template <class T, template <class, class> class SP, class AP> +inline bool Zbase<T, SP, AP>::empty() const { return length() == 0; @@ -1067,8 +1097,8 @@ template <class N> inline N Zbase<T, SP, AP>::toNumber() const { - std::basic_istringstream<T> ss(std::basic_string<T>(rawStr)); - T number = 0; + std::basic_istringstream<T> ss((std::basic_string<T>(rawStr))); + N number = 0; ss >> number; return number; } diff --git a/shared/zstring.h b/shared/zstring.h index 73e2f066..286ed7cc 100644 --- a/shared/zstring.h +++ b/shared/zstring.h @@ -115,10 +115,10 @@ typedef char Zchar; #endif //"The reason for all the fuss above" (Loki/SmartPtr) -typedef Zbase<Zchar, StorageRefCount, AllocatorFreeStoreChecked> Zstring; - - +typedef Zbase<Zchar, StorageRefCount, AllocatorFreeStoreChecked> Zstring; //for use with file names +//fast replacement for wxString modelling exponential growth +typedef Zbase<wchar_t, StorageRefCount, AllocatorFreeStoreChecked> zxString; //general unicode string diff --git a/structures.cpp b/structures.cpp index 7eb1eb4e..6f38a0cf 100644 --- a/structures.cpp +++ b/structures.cpp @@ -5,7 +5,7 @@ // ************************************************************************** // #include "structures.h" -#include <wx/intl.h> +#include "shared/i18n.h" //#include <stdexcept> using namespace ffs3; diff --git a/synchronization.cpp b/synchronization.cpp index 77b734eb..f98e15f6 100644 --- a/synchronization.cpp +++ b/synchronization.cpp @@ -6,7 +6,6 @@ // #include "synchronization.h" #include <stdexcept> -#include <wx/intl.h> #include <wx/msgdlg.h> #include <wx/log.h> #include "shared/string_conv.h" @@ -14,7 +13,9 @@ #include "shared/system_constants.h" #include "library/status_handler.h" #include "shared/file_handling.h" +#include "shared/resolve_path.h" #include "shared/recycler.h" +#include "shared/i18n.h" #include <wx/file.h> #include <boost/bind.hpp> #include "shared/global_func.h" @@ -30,6 +31,7 @@ #include "shared/long_path_prefix.h" #include <boost/scoped_ptr.hpp> #include "shared/perf.h" +#include "shared/shadow.h" #endif using namespace ffs3; @@ -519,25 +521,6 @@ SyncProcess::SyncProcess(xmlAccess::OptionalDialogs& warnings, //-------------------------------------------------------------------------------------------------------------- -namespace -{ -void ensureExists(const Zstring& dirname, const Zstring& templateDir, bool copyFilePermissions) //throw (FileError) -{ - if (!dirname.empty()) //kind of pathological ? - if (!ffs3::dirExists(dirname)) - { - //lazy creation of alternate deletion directory (including super-directories of targetFile) - ffs3::createDirectory(dirname, templateDir, false, copyFilePermissions); - } - /*symbolic link handling: - if "not traversing symlinks": fullName == c:\syncdir<symlinks>\some\dirs\leaf<symlink> - => setting irrelevant - if "traversing symlinks": fullName == c:\syncdir<symlinks>\some\dirs<symlinks>\leaf<symlink> - => setting NEEDS to be false: We want to move leaf, therefore symlinks in "some\dirs" must not interfere */ -} -} - - class DeletionHandling { public: @@ -690,21 +673,21 @@ const Zstring& DeletionHandling::getSessionDir<RIGHT_SIDE>() const namespace { -class MoveFileCallbackImpl : public MoveFileCallback //callback functionality +class CallbackMoveFileImpl : public CallbackMoveFile //callback functionality { public: - MoveFileCallbackImpl(StatusHandler& handler) : statusHandler_(handler) {} + CallbackMoveFileImpl(StatusHandler& handler) : statusHandler_(handler) {} virtual Response requestUiRefresh(const Zstring& currentObject) //DON'T throw exceptions here, at least in Windows build! { #ifdef FFS_WIN statusHandler_.requestUiRefresh(false); //don't allow throwing exception within this call: windows copying callback can't handle this if (statusHandler_.abortIsRequested()) - return MoveFileCallback::CANCEL; + return CallbackMoveFile::CANCEL; #elif defined FFS_LINUX statusHandler_.requestUiRefresh(); //exceptions may be thrown here! #endif - return MoveFileCallback::CONTINUE; + return CallbackMoveFile::CONTINUE; } private: @@ -712,9 +695,9 @@ private: }; -struct RemoveDirCallbackImpl : public RemoveDirCallback +struct CallbackRemoveDirImpl : public CallbackRemoveDir { - RemoveDirCallbackImpl(StatusHandler& handler) : statusHandler_(handler) {} + CallbackRemoveDirImpl(StatusHandler& handler) : statusHandler_(handler) {} virtual void requestUiRefresh(const Zstring& currentObject) { @@ -770,8 +753,8 @@ void DeletionHandling::removeFile(const FileSystemObject& fileObj) const if (!dirExists(targetDir)) createDirectory(targetDir); //throw (FileError) - MoveFileCallbackImpl callBack(statusUpdater_); //if file needs to be copied we need callback functionality to update screen and offer abort - moveFile(fileObj.getFullName<side>(), targetFile, &callBack); + CallbackMoveFileImpl callBack(statusUpdater_); //if file needs to be copied we need callback functionality to update screen and offer abort + moveFile(fileObj.getFullName<side>(), targetFile, true, &callBack); } break; } @@ -787,7 +770,7 @@ void DeletionHandling::removeFolder(const FileSystemObject& dirObj) const { case DELETE_PERMANENTLY: { - RemoveDirCallbackImpl remDirCallback(statusUpdater_); + CallbackRemoveDirImpl remDirCallback(statusUpdater_); removeDirectory(dirObj.getFullName<side>(), &remDirCallback); } break; @@ -825,7 +808,7 @@ void DeletionHandling::removeFolder(const FileSystemObject& dirObj) const if (!dirExists(targetSuperDir)) createDirectory(targetSuperDir); //throw (FileError) - MoveFileCallbackImpl callBack(statusUpdater_); //if files need to be copied, we need callback functionality to update screen and offer abort + CallbackMoveFileImpl callBack(statusUpdater_); //if files need to be copied, we need callback functionality to update screen and offer abort moveDirectory(dirObj.getFullName<side>(), targetDir, true, &callBack); } break; @@ -929,8 +912,9 @@ private: //more low level helper template <ffs3::SelectedSide side> void deleteSymlink(const SymLinkMapping& linkObj) const; - void copySymlink(const Zstring& source, const Zstring& target, LinkDescriptor::LinkType type) const; - void copyFileUpdating(const Zstring& source, const Zstring& target, const wxULongLong& sourceFileSize) const; + void copySymlink(const Zstring& source, const Zstring& target, LinkDescriptor::LinkType type, bool inRecursion = false) const; + template <class DelTargetCommand> + void copyFileUpdating(const Zstring& source, const Zstring& target, const DelTargetCommand& cmd, const wxULongLong& sourceFileSize, int recursionLvl = 0) const; void verifyFileCopy(const Zstring& source, const Zstring& target) const; StatusHandler& statusUpdater_; @@ -1009,18 +993,35 @@ void SynchronizeFolderPair::execute(HierarchyObject& hierObj) } } + namespace { -//runtime impact per file: SSD: 0s, HDD: 43 µs, USB stick: 1 ms -inline -void checkFileReadable(const Zstring& filename) //throw (FileError) +struct NullCommand { - ffs3::FileInput file(filename); //throw (FileError) - char buffer[1]; - file.read(buffer, 1); // -} + void operator()() const {} +}; + + +template <SelectedSide side> +class DelTargetCommand +{ +public: + DelTargetCommand(FileMapping& fileObj, const DeletionHandling& delHandling) : fileObj_(fileObj), delHandling_(delHandling) {} + + void operator()() const + { + //delete target and copy source + delHandling_.removeFile<side>(fileObj_); //throw (FileError) + fileObj_.removeObject<side>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!) + } + +private: + FileMapping& fileObj_; + const DeletionHandling& delHandling_; +}; } + void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const { Zstring statusText; @@ -1037,7 +1038,9 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - copyFileUpdating(fileObj.getFullName<RIGHT_SIDE>(), target, fileObj.getFileSize<RIGHT_SIDE>()); + copyFileUpdating(fileObj.getFullName<RIGHT_SIDE>(), target, + NullCommand(), //no target to delete + fileObj.getFileSize<RIGHT_SIDE>()); break; case SO_CREATE_NEW_RIGHT: @@ -1049,7 +1052,9 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - copyFileUpdating(fileObj.getFullName<LEFT_SIDE>(), target, fileObj.getFileSize<LEFT_SIDE>()); + copyFileUpdating(fileObj.getFullName<LEFT_SIDE>(), target, + NullCommand(), //no target to delete + fileObj.getFileSize<LEFT_SIDE>()); break; case SO_DELETE_LEFT: @@ -1058,7 +1063,7 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - delHandling_.removeFile<LEFT_SIDE>(fileObj); //throw FileError() + delHandling_.removeFile<LEFT_SIDE>(fileObj); //throw (FileError) break; case SO_DELETE_RIGHT: @@ -1067,7 +1072,7 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - delHandling_.removeFile<RIGHT_SIDE>(fileObj); //throw FileError() + delHandling_.removeFile<RIGHT_SIDE>(fileObj); //throw (FileError) break; case SO_OVERWRITE_LEFT: @@ -1079,14 +1084,9 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - //1. check read access: don't delete target file if source cannot be read (e.g. is locked) - checkFileReadable(fileObj.getFullName<RIGHT_SIDE>()); //throw (FileError) - - //2. delete target and copy source - delHandling_.removeFile<LEFT_SIDE>(fileObj); //throw FileError() - fileObj.removeObject<LEFT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!) - - copyFileUpdating(fileObj.getFullName<RIGHT_SIDE>(), target, fileObj.getFileSize<RIGHT_SIDE>()); + copyFileUpdating(fileObj.getFullName<RIGHT_SIDE>(), target, + DelTargetCommand<LEFT_SIDE>(fileObj, delHandling_), //delete target at appropriate time + fileObj.getFileSize<RIGHT_SIDE>()); break; case SO_OVERWRITE_RIGHT: @@ -1098,14 +1098,9 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - //1. check read access: don't delete target file if source cannot be read (e.g. is locked) - checkFileReadable(fileObj.getFullName<LEFT_SIDE>()); //throw (FileError) - - //2. delete target and copy source - delHandling_.removeFile<RIGHT_SIDE>(fileObj); //throw FileError() - fileObj.removeObject<RIGHT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!) - - copyFileUpdating(fileObj.getFullName<LEFT_SIDE>(), target, fileObj.getFileSize<LEFT_SIDE>()); + copyFileUpdating(fileObj.getFullName<LEFT_SIDE>(), target, + DelTargetCommand<RIGHT_SIDE>(fileObj, delHandling_), //delete target at appropriate time + fileObj.getFileSize<LEFT_SIDE>()); break; case SO_COPY_METADATA_TO_LEFT: @@ -1115,8 +1110,8 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh if (fileObj.getShortName<LEFT_SIDE>() != fileObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only) - moveFile(fileObj.getFullName<LEFT_SIDE>(), - fileObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + fileObj.getShortName<RIGHT_SIDE>()); //throw (FileError); + renameFile(fileObj.getFullName<LEFT_SIDE>(), + fileObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + fileObj.getShortName<RIGHT_SIDE>()); //throw (FileError); if (!sameFileTime(fileObj.getLastWriteTime<LEFT_SIDE>(), fileObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision copyFileTimes(fileObj.getFullName<RIGHT_SIDE>(), fileObj.getFullName<LEFT_SIDE>(), true); //deref symlinks; throw (FileError) @@ -1129,8 +1124,8 @@ void SynchronizeFolderPair::synchronizeFile(FileMapping& fileObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh if (fileObj.getShortName<LEFT_SIDE>() != fileObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only) - moveFile(fileObj.getFullName<RIGHT_SIDE>(), - fileObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + fileObj.getShortName<LEFT_SIDE>()); //throw (FileError); + renameFile(fileObj.getFullName<RIGHT_SIDE>(), + fileObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + fileObj.getShortName<LEFT_SIDE>()); //throw (FileError); if (!sameFileTime(fileObj.getLastWriteTime<LEFT_SIDE>(), fileObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision copyFileTimes(fileObj.getFullName<LEFT_SIDE>(), fileObj.getFullName<RIGHT_SIDE>(), true); //deref symlinks; throw (FileError) @@ -1188,7 +1183,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - deleteSymlink<LEFT_SIDE>(linkObj); //throw FileError() + deleteSymlink<LEFT_SIDE>(linkObj); //throw (FileError) break; case SO_DELETE_RIGHT: @@ -1197,7 +1192,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - deleteSymlink<RIGHT_SIDE>(linkObj); //throw FileError() + deleteSymlink<RIGHT_SIDE>(linkObj); //throw (FileError) break; case SO_OVERWRITE_LEFT: @@ -1209,7 +1204,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - deleteSymlink<LEFT_SIDE>(linkObj); //throw FileError() + deleteSymlink<LEFT_SIDE>(linkObj); //throw (FileError) linkObj.removeObject<LEFT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!) copySymlink(linkObj.getFullName<RIGHT_SIDE>(), target, linkObj.getLinkType<RIGHT_SIDE>()); @@ -1224,7 +1219,7 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - deleteSymlink<RIGHT_SIDE>(linkObj); //throw FileError() + deleteSymlink<RIGHT_SIDE>(linkObj); //throw (FileError) linkObj.removeObject<RIGHT_SIDE>(); //remove file from FileMapping, to keep in sync (if subsequent copying fails!!) copySymlink(linkObj.getFullName<LEFT_SIDE>(), target, linkObj.getLinkType<LEFT_SIDE>()); @@ -1237,8 +1232,8 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh if (linkObj.getShortName<LEFT_SIDE>() != linkObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only) - moveFile(linkObj.getFullName<LEFT_SIDE>(), - linkObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + linkObj.getShortName<RIGHT_SIDE>()); //throw (FileError); + renameFile(linkObj.getFullName<LEFT_SIDE>(), + linkObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + linkObj.getShortName<RIGHT_SIDE>()); //throw (FileError); if (!sameFileTime(linkObj.getLastWriteTime<LEFT_SIDE>(), linkObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision copyFileTimes(linkObj.getFullName<RIGHT_SIDE>(), linkObj.getFullName<LEFT_SIDE>(), false); //don't deref symlinks; throw (FileError) @@ -1251,8 +1246,8 @@ void SynchronizeFolderPair::synchronizeLink(SymLinkMapping& linkObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh if (linkObj.getShortName<LEFT_SIDE>() != linkObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only) - moveFile(linkObj.getFullName<RIGHT_SIDE>(), - linkObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + linkObj.getShortName<LEFT_SIDE>()); //throw (FileError); + renameFile(linkObj.getFullName<RIGHT_SIDE>(), + linkObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + linkObj.getShortName<LEFT_SIDE>()); //throw (FileError); if (!sameFileTime(linkObj.getLastWriteTime<LEFT_SIDE>(), linkObj.getLastWriteTime<RIGHT_SIDE>(), 2)) ////respect 2 second FAT/FAT32 precision copyFileTimes(linkObj.getFullName<LEFT_SIDE>(), linkObj.getFullName<RIGHT_SIDE>(), false); //don't deref symlinks; throw (FileError) @@ -1292,7 +1287,7 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const //some check to catch the error that directory on source has been deleted externally after "compare"... if (!ffs3::dirExists(dirObj.getFullName<RIGHT_SIDE>())) throw FileError(wxString(_("Source directory does not exist anymore:")) + wxT("\n\"") + zToWx(dirObj.getFullName<RIGHT_SIDE>()) + wxT("\"")); - createDirectory(target, dirObj.getFullName<RIGHT_SIDE>(), false, copyFilePermissions_); //no symlink copying! + createDirectory(target, dirObj.getFullName<RIGHT_SIDE>(), copyFilePermissions_); //no symlink copying! break; case SO_CREATE_NEW_RIGHT: @@ -1306,7 +1301,7 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const //some check to catch the error that directory on source has been deleted externally after "compare"... if (!ffs3::dirExists(dirObj.getFullName<LEFT_SIDE>())) throw FileError(wxString(_("Source directory does not exist anymore:")) + wxT("\n\"") + zToWx(dirObj.getFullName<LEFT_SIDE>()) + wxT("\"")); - createDirectory(target, dirObj.getFullName<LEFT_SIDE>(), false, copyFilePermissions_); //no symlink copying! + createDirectory(target, dirObj.getFullName<LEFT_SIDE>(), copyFilePermissions_); //no symlink copying! break; case SO_DELETE_LEFT: @@ -1316,7 +1311,7 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - delHandling_.removeFolder<LEFT_SIDE>(dirObj); //throw FileError() + delHandling_.removeFolder<LEFT_SIDE>(dirObj); //throw (FileError) { //progress indicator update: DON'T forget to notify about implicitly deleted objects! const SyncStatistics subObjects(dirObj); @@ -1335,7 +1330,7 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const statusUpdater_.reportInfo(statusText); statusUpdater_.requestUiRefresh(); //trigger display refresh - delHandling_.removeFolder<RIGHT_SIDE>(dirObj); //throw FileError() + delHandling_.removeFolder<RIGHT_SIDE>(dirObj); //throw (FileError) { //progress indicator update: DON'T forget to notify about implicitly deleted objects! const SyncStatistics subObjects(dirObj); @@ -1354,8 +1349,8 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh if (dirObj.getShortName<LEFT_SIDE>() != dirObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only) - moveFile(dirObj.getFullName<LEFT_SIDE>(), - dirObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + dirObj.getShortName<RIGHT_SIDE>()); //throw (FileError); + renameFile(dirObj.getFullName<LEFT_SIDE>(), + dirObj.getFullName<LEFT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + dirObj.getShortName<RIGHT_SIDE>()); //throw (FileError); //copyFileTimes(dirObj.getFullName<RIGHT_SIDE>(), dirObj.getFullName<LEFT_SIDE>(), true); //throw (FileError) -> is executed after sub-objects have finished synchronization break; @@ -1366,8 +1361,8 @@ void SynchronizeFolderPair::synchronizeFolder(DirMapping& dirObj) const statusUpdater_.requestUiRefresh(); //trigger display refresh if (dirObj.getShortName<LEFT_SIDE>() != dirObj.getShortName<RIGHT_SIDE>()) //adapt difference in case (windows only) - moveFile(dirObj.getFullName<RIGHT_SIDE>(), - dirObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + dirObj.getShortName<LEFT_SIDE>()); //throw (FileError); + renameFile(dirObj.getFullName<RIGHT_SIDE>(), + dirObj.getFullName<RIGHT_SIDE>().BeforeLast(common::FILE_NAME_SEPARATOR) + common::FILE_NAME_SEPARATOR + dirObj.getShortName<LEFT_SIDE>()); //throw (FileError); //copyFileTimes(dirObj.getFullName<LEFT_SIDE>(), dirObj.getFullName<RIGHT_SIDE>(), true); //throw (FileError) -> is executed after sub-objects have finished synchronization break; @@ -1642,8 +1637,8 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf for (DirSpaceRequAvailList::const_iterator i = diskSpaceMissing.begin(); i != diskSpaceMissing.end(); ++i) warningMessage += wxString(wxT("\n\n")) + wxT("\"") + zToWx(i->first) + wxT("\"\n") + - _("Free disk space required:") + wxT(" ") + formatFilesizeToShortString(i->second.first) + wxT("\n") + - _("Free disk space available:") + wxT(" ") + formatFilesizeToShortString(i->second.second); + _("Free disk space required:") + wxT(" ") + formatFilesizeToShortString(i->second.first) + wxT("\n") + + _("Free disk space available:") + wxT(" ") + formatFilesizeToShortString(i->second.second); statusUpdater.reportWarning(warningMessage, m_warnings.warningNotEnoughDiskSpace); } @@ -1792,13 +1787,18 @@ void SyncProcess::startSynchronizationProcess(const std::vector<FolderPairSyncCf //########################################################################################### //callback functionality for smooth progress indicators -class WhileCopying : public ffs3::CopyFileCallback //callback functionality +template <class DelTargetCommand> +class WhileCopying : public ffs3::CallbackCopyFile //callback functionality { public: + WhileCopying(wxLongLong& bytesTransferredLast, + StatusHandler& statusHandler, + const DelTargetCommand& cmd) : + bytesTransferredLast_(bytesTransferredLast), + statusHandler_(statusHandler), + cmd_(cmd) {} - WhileCopying(wxLongLong& bytesTransferredLast, StatusHandler& statusHandler) : - m_bytesTransferredLast(bytesTransferredLast), - m_statusHandler(statusHandler) {} + virtual void deleteTargetFile(const Zstring& targetFile) { cmd_(); } virtual Response updateCopyStatus(const wxULongLong& totalBytesTransferred) { @@ -1806,88 +1806,165 @@ public: const wxLongLong totalBytes = common::convertToSigned(totalBytesTransferred); //inform about the (differential) processed amount of data - m_statusHandler.updateProcessedData(0, totalBytes - m_bytesTransferredLast); - m_bytesTransferredLast = totalBytes; + statusHandler_.updateProcessedData(0, totalBytes - bytesTransferredLast_); + bytesTransferredLast_ = totalBytes; #ifdef FFS_WIN - m_statusHandler.requestUiRefresh(false); //don't allow throwing exception within this call: windows copying callback can't handle this - if (m_statusHandler.abortIsRequested()) - return CopyFileCallback::CANCEL; + statusHandler_.requestUiRefresh(false); //don't allow throwing exception within this call: windows copying callback can't handle this + if (statusHandler_.abortIsRequested()) + return CallbackCopyFile::CANCEL; #elif defined FFS_LINUX - m_statusHandler.requestUiRefresh(); //exceptions may be thrown here! + statusHandler_.requestUiRefresh(); //exceptions may be thrown here! #endif - return CopyFileCallback::CONTINUE; + return CallbackCopyFile::CONTINUE; } private: - wxLongLong& m_bytesTransferredLast; - StatusHandler& m_statusHandler; + wxLongLong& bytesTransferredLast_; + StatusHandler& statusHandler_; + DelTargetCommand cmd_; }; -//copy file while executing statusUpdater->requestUiRefresh() calls -void SynchronizeFolderPair::copyFileUpdating(const Zstring& source, const Zstring& target, const wxULongLong& totalBytesToCpy) const +class CleanUpStats //lambdas coming soon... unfortunately Loki::ScopeGuard is no option because of lazy function argument evaluation (-1 * ...) { - //create folders first (see http://sourceforge.net/tracker/index.php?func=detail&aid=2628943&group_id=234430&atid=1093080) - const Zstring targetDir = target.BeforeLast(common::FILE_NAME_SEPARATOR); - const Zstring templateDir = source.BeforeLast(common::FILE_NAME_SEPARATOR); + bool dismissed; + StatusHandler& statusUpdater_; + const wxLongLong& bytesTransferred_; - ensureExists(targetDir, templateDir, copyFilePermissions_); //throw (FileError) +public: + CleanUpStats(StatusHandler& statusUpdater, const wxLongLong& bytesTransferred) : dismissed(false), statusUpdater_(statusUpdater), bytesTransferred_(bytesTransferred) {} + ~CleanUpStats() + { + if (!dismissed) + try + { + statusUpdater_.updateProcessedData(0, bytesTransferred_ * -1); //throw ? + } + catch (...) {} + } + void dismiss() { dismissed = true; } +}; - //start of (possibly) long-running copy process: ensure status updates are performed regularly - wxLongLong totalBytesTransferred; - WhileCopying callback(totalBytesTransferred, statusUpdater_); +//copy file while executing statusUpdater->requestUiRefresh() calls +template <class DelTargetCommand> +void SynchronizeFolderPair::copyFileUpdating(const Zstring& source, const Zstring& target, const DelTargetCommand& cmd, const wxULongLong& totalBytesToCpy, int recursionLvl) const +{ + const int exceptionPaths = 2; try { - ffs3::copyFile(source, + //start of (possibly) long-running copy process: ensure status updates are performed regularly + wxLongLong totalBytesTransferred; + CleanUpStats dummy(statusUpdater_, totalBytesTransferred); //error situation: undo communication of processed amount of data + + WhileCopying<DelTargetCommand> callback(totalBytesTransferred, statusUpdater_, cmd); + + ffs3::copyFile(source, //type File implicitly means symlinks need to be dereferenced! target, - false, //type File implicitly means symlinks need to be dereferenced! copyFilePermissions_, + &callback); //throw (FileError, ErrorFileLocked); + + //inform about the (remaining) processed amount of data + dummy.dismiss(); + statusUpdater_.updateProcessedData(0, common::convertToSigned(totalBytesToCpy) - totalBytesTransferred); + } #ifdef FFS_WIN - shadowCopyHandler_, -#endif - &callback); + catch (ErrorFileLocked&) + { + if (recursionLvl >= exceptionPaths) throw; + + //if file is locked (try to) use Windows Volume Shadow Copy Service + if (shadowCopyHandler_ == NULL) throw; - if (verifyCopiedFiles_) //verify if data was copied correctly - verifyFileCopy(source, target); + Zstring shadowFilename; + try + { + //contains prefix: E.g. "\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Program Files\FFS\sample.dat" + shadowFilename = shadowCopyHandler_->makeShadowCopy(source); //throw (FileError) + } + catch (const FileError& e) + { + wxString errorMsg = _("Error copying locked file %x!"); + errorMsg.Replace(wxT("%x"), wxString(wxT("\"")) + zToWx(source) + wxT("\"")); + errorMsg += wxT("\n\n") + e.msg(); + throw FileError(errorMsg); + } + + //now try again + return copyFileUpdating(shadowFilename, target, cmd, totalBytesToCpy, recursionLvl + 1); } - catch (...) +#endif + catch (ErrorTargetPathMissing&) { - //error situation: undo communication of processed amount of data - statusUpdater_.updateProcessedData(0, totalBytesTransferred * -1 ); + if (recursionLvl >= exceptionPaths) throw; + + //create folders "first" (see http://sourceforge.net/tracker/index.php?func=detail&aid=2628943&group_id=234430&atid=1093080) + //using optimistic strategy: assume everything goes well, but cover up on error -> minimize file accesses + const Zstring targetDir = target.BeforeLast(common::FILE_NAME_SEPARATOR); + const Zstring templateDir = source.BeforeLast(common::FILE_NAME_SEPARATOR); + + if (!targetDir.empty() && !ffs3::dirExists(targetDir)) + { + ffs3::createDirectory(targetDir, templateDir, copyFilePermissions_); //throw (FileError) + /*symbolic link handling: + if "not traversing symlinks": fullName == c:\syncdir<symlinks>\some\dirs\leaf<symlink> + => setting irrelevant + if "traversing symlinks": fullName == c:\syncdir<symlinks>\some\dirs<symlinks>\leaf<symlink> + => setting NEEDS to be false: We want to move leaf, therefore symlinks in "some\dirs" must not interfere */ + + //now try again + return copyFileUpdating(source, target, cmd, totalBytesToCpy, recursionLvl + 1); + } throw; } - //inform about the (remaining) processed amount of data - statusUpdater_.updateProcessedData(0, common::convertToSigned(totalBytesToCpy) - totalBytesTransferred); + //todo: transactional behavior: delete target if verification fails? + + if (verifyCopiedFiles_) //verify if data was copied correctly + verifyFileCopy(source, target); //throw (FileError) } -void SynchronizeFolderPair::copySymlink(const Zstring& source, const Zstring& target, LinkDescriptor::LinkType type) const +void SynchronizeFolderPair::copySymlink(const Zstring& source, const Zstring& target, LinkDescriptor::LinkType type, bool inRecursion) const { - //create folders first (see http://sourceforge.net/tracker/index.php?func=detail&aid=2628943&group_id=234430&atid=1093080) + try + { + switch (type) + { + case LinkDescriptor::TYPE_DIR: + ffs3::copySymlink(source, target, SYMLINK_TYPE_DIR, copyFilePermissions_); //throw (FileError) + break; - const Zstring targetDir = target.BeforeLast(common::FILE_NAME_SEPARATOR); - const Zstring templateDir = source.BeforeLast(common::FILE_NAME_SEPARATOR); + case LinkDescriptor::TYPE_FILE: //Windows: true file symlink; Linux: file-link or broken link + ffs3::copySymlink(source, target, SYMLINK_TYPE_FILE, copyFilePermissions_); //throw (FileError) + break; + } + } + catch (FileError&) + { + if (inRecursion) throw; - ensureExists(targetDir, templateDir, copyFilePermissions_); //throw (FileError) + //create folders "first" (see http://sourceforge.net/tracker/index.php?func=detail&aid=2628943&group_id=234430&atid=1093080) + //using optimistic strategy: assume everything goes well, but cover up on error -> minimize file accesses + const Zstring targetDir = target.BeforeLast(common::FILE_NAME_SEPARATOR); + const Zstring templateDir = source.BeforeLast(common::FILE_NAME_SEPARATOR); - switch (type) - { - case LinkDescriptor::TYPE_DIR: - ffs3::createDirectory(target, source, true, copyFilePermissions_); //copy symlink - break; + if (!targetDir.empty() && !ffs3::dirExists(targetDir)) + { + ffs3::createDirectory(targetDir, templateDir, copyFilePermissions_); //throw (FileError) + /*symbolic link handling: + if "not traversing symlinks": fullName == c:\syncdir<symlinks>\some\dirs\leaf<symlink> + => setting irrelevant + if "traversing symlinks": fullName == c:\syncdir<symlinks>\some\dirs<symlinks>\leaf<symlink> + => setting NEEDS to be false: We want to move leaf, therefore symlinks in "some\dirs" must not interfere */ + + //now try again + return copySymlink(source, target, type, true); + } - case LinkDescriptor::TYPE_FILE: //Windows: true file symlink; Linux: file-link or broken link - ffs3::copyFile(source, target, true, //copy symlink - copyFilePermissions_, -#ifdef FFS_WIN - shadowCopyHandler_, -#endif - NULL); - break; + throw; } } diff --git a/ui/batch_config.cpp b/ui/batch_config.cpp index 5630d000..ca489916 100644 --- a/ui/batch_config.cpp +++ b/ui/batch_config.cpp @@ -6,6 +6,7 @@ // #include "batch_config.h" #include "../shared/xml_base.h" +#include "../shared/dir_picker_i18n.h" #include "folder_pair.h" #include <iterator> #include <wx/wupdlock.h> @@ -140,8 +141,8 @@ public: DirectoryPairBatch(wxWindow* parent, BatchDialog& batchDialog) : BatchFolderPairGenerated(parent), FolderPairCallback<BatchFolderPairGenerated>(static_cast<BatchFolderPairGenerated&>(*this), batchDialog), //pass BatchFolderPairGenerated part... - dirNameLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft), - dirNameRight(m_panelRight, m_dirPickerRight, m_directoryRight) {} + dirNameLeft (*m_panelLeft, *m_dirPickerLeft, *m_directoryLeft), + dirNameRight(*m_panelRight, *m_dirPickerRight, *m_directoryRight) {} void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) { @@ -172,12 +173,12 @@ public: FolderPairCallback<BatchDlgGenerated>(batchDialog, batchDialog), //prepare drag & drop - dirNameLeft(batchDialog.m_panelLeft, - batchDialog.m_dirPickerLeft, - batchDialog.m_directoryLeft), - dirNameRight(batchDialog.m_panelRight, - batchDialog.m_dirPickerRight, - batchDialog.m_directoryRight) {} + dirNameLeft(*batchDialog.m_panelLeft, + *batchDialog.m_dirPickerLeft, + *batchDialog.m_directoryLeft), + dirNameRight(*batchDialog.m_panelRight, + *batchDialog.m_dirPickerRight, + *batchDialog.m_directoryRight) {} void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) { @@ -247,7 +248,7 @@ void BatchDialog::init() //prepare drag & drop for loading of *.ffs_batch files SetDropTarget(new BatchFileDropEvent(*this)); - logfileDir.reset(new DirectoryName(m_panelLogging, m_dirPickerLogfileDir, m_textCtrlLogfileDir)); + logfileDir.reset(new DirectoryName(*m_panelLogging, *m_dirPickerLogfileDir, *m_textCtrlLogfileDir, sbSizerLogfileDir)); //set icons for this dialog m_bpButtonAddPair->SetBitmapLabel(GlobalResources::instance().getImage(wxT("addFolderPair"))); @@ -628,13 +629,13 @@ void BatchDialog::loadBatchCfg(const xmlAccess::XmlBatchConfig& batchCfg) //make working copy localBatchCfg = batchCfg; - logfileDir->setName(wxToZ(batchCfg.logFileDirectory)); - m_spinCtrlLogCountMax->SetValue(static_cast<int>(batchCfg.logFileCountMax)); - m_checkBoxSilent->SetValue(batchCfg.silent); //error handling is dependent from m_checkBoxSilent! /|\ \|/ setSelectionHandleError(batchCfg.handleError); + logfileDir->setName(wxToZ(batchCfg.logFileDirectory)); + m_spinCtrlLogCountMax->SetValue(static_cast<int>(batchCfg.logFileCountMax)); //attention: this one emits a "change value" event!! => updateGui() called implicitly! + //set first folder pair firstFolderPair->setValues(batchCfg.mainCfg.firstPair.leftDirectory, batchCfg.mainCfg.firstPair.rightDirectory, diff --git a/ui/batch_status_handler.cpp b/ui/batch_status_handler.cpp index 9d57b4e3..859415fa 100644 --- a/ui/batch_status_handler.cpp +++ b/ui/batch_status_handler.cpp @@ -11,6 +11,7 @@ #include <wx/msgdlg.h> #include "../shared/standard_paths.h" #include "../shared/file_handling.h" +#include "../shared/resolve_path.h" #include "../shared/string_conv.h" #include "../shared/global_func.h" #include "../shared/app_main.h" @@ -71,32 +72,34 @@ public: throw FileError(wxString(_("Unable to create logfile!")) + wxT("\"") + logfileName + wxT("\"")); //write header - wxString headerLine = wxString(wxT("FreeFileSync - ")) + - _("Batch execution") + wxT(" (") + - _("Date") + wxT(": ") + wxDateTime::Now().FormatDate() + wxT(" ") + //"Date" is used at other places, too - _("Time") + wxT(":") + wxT(" ") + wxDateTime::Now().FormatTime() + wxT(")"); + wxString headerLine = wxString(wxT("FreeFileSync - ")) + _("Batch execution") + + wxT(" (") + _("Date") + wxT(": ") + wxDateTime::Now().FormatDate() + wxT(")"); //"Date" is used at other places, too + logFile.Write(headerLine + wxChar('\n')); logFile.Write(wxString().Pad(headerLine.Len(), wxChar('-')) + wxChar('\n') + wxChar('\n')); + /* wxString caption = _("Log-messages:"); logFile.Write(caption + wxChar('\n')); logFile.Write(wxString().Pad(caption.Len(), wxChar('-')) + wxChar('\n')); + */ - logFile.Write(wxString(wxT("[")) + wxDateTime::Now().FormatTime() + wxT("] ") + _("Start") + wxChar('\n') + wxChar('\n')); + logItemStart = wxString(wxT("[")) + wxDateTime::Now().FormatTime() + wxT("] ") + _("Start"); totalTime.Start(); //measure total time } - void writeLog(const ErrorLogging& log) + void writeLog(const ErrorLogging& log, const wxString& finalStatus) { + logFile.Write(finalStatus + wxChar('\n') + wxChar('\n')); //highlight result by placing at beginning of file + + logFile.Write(logItemStart + wxChar('\n') + wxChar('\n')); + //write actual logfile const std::vector<wxString>& messages = log.getFormattedMessages(); for (std::vector<wxString>::const_iterator i = messages.begin(); i != messages.end(); ++i) logFile.Write(*i + wxChar('\n')); - } - ~LogFile() - { //write ending logFile.Write(wxChar('\n')); @@ -111,7 +114,7 @@ public: FindLogfiles traverseCallback(wxToZ(jobName_), logFiles); traverseFolder(wxToZ(logfileName).BeforeLast(common::FILE_NAME_SEPARATOR), //throw(); - false, //follow Symlinks + false, //don't follow symlinks traverseCallback); if (logFiles.size() <= maxCount) @@ -162,6 +165,7 @@ private: wxString logfileName; wxFFile logFile; wxStopWatch totalTime; + wxString logItemStart; }; @@ -205,23 +209,28 @@ BatchStatusHandler::~BatchStatusHandler() const int totalErrors = errorLog.typeCount(TYPE_ERROR | TYPE_FATAL_ERROR); //evaluate before finalizing log //finalize error log + wxString finalStatus; if (abortIsRequested()) { returnValue = -4; - errorLog.logMsg(_("Synchronization aborted!"), TYPE_ERROR); + finalStatus = _("Synchronization aborted!"); + errorLog.logMsg(finalStatus, TYPE_ERROR); } else if (totalErrors > 0) { returnValue = -5; - errorLog.logMsg(_("Synchronization completed with errors!"), TYPE_WARNING); + finalStatus = _("Synchronization completed with errors!"); + errorLog.logMsg(finalStatus, TYPE_WARNING); } else - errorLog.logMsg(_("Synchronization completed successfully!"), TYPE_INFO); - + { + finalStatus = _("Synchronization completed successfully!"); + errorLog.logMsg(finalStatus, TYPE_INFO); + } //print the results list: logfile if (logFile.get()) - logFile->writeLog(errorLog); + logFile->writeLog(errorLog, finalStatus); //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/gui_generated.cpp b/ui/gui_generated.cpp index bfedac26..9a1328a7 100644 --- a/ui/gui_generated.cpp +++ b/ui/gui_generated.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 17 2010) +// C++ code generated with wxFormBuilder (version Mar 22 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -8,6 +8,7 @@ #include "../library/custom_grid.h" #include "../shared/custom_button.h" #include "../shared/custom_combo_box.h" +#include "../shared/dir_picker_i18n.h" #include "../shared/toggle_button.h" #include "gui_generated.h" @@ -16,864 +17,848 @@ 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 ); - m_menuFile->Append( m_menuItem10 ); - - m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); - 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 ); - 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-L"), 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 ); - - - bSizerTopButtons->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 wxButtonWithImage( m_panelTopButtons, wxID_OK, _("Compare"), wxDefaultPosition, wxSize( 180,42 ), 0 ); - m_buttonCompare->SetDefault(); - m_buttonCompare->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) ); - 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, wxT("Arial Black") ) ); - 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") ); - - m_bpButtonCmpConfig->SetToolTip( _("Comparison settings") ); - - fgSizer121->Add( m_bpButtonCmpConfig, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 ); - - bSizerTopButtons->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - - bSizerTopButtons->Add( 0, 0, 1, 0, 5 ); - - 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") ); - - m_bpButtonSyncConfig->SetToolTip( _("Synchronization settings") ); - - fgSizer12->Add( m_bpButtonSyncConfig, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); - - m_buttonStartSync = new wxButtonWithImage( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( -1,42 ), 0 ); - m_buttonStartSync->SetFont( wxFont( 14, 74, 90, 92, false, wxT("Arial Black") ) ); - m_buttonStartSync->SetToolTip( _("Start synchronization") ); - - fgSizer12->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerTopButtons->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - - bSizerTopButtons->Add( 15, 0, 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_directoryLeft = new CustomComboBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizerDirLeft->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( 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") ); - - 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_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer160->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - 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_bpButtonAddPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - - sbSizerDirRight->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); - - m_bpButtonRemovePair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - sbSizerDirRight->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_directoryRight = new CustomComboBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - sbSizerDirRight->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( 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|wxRIGHT, 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, 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( 38 ); - 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|wxLEFT, 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 ); - - - bSizerConfig->Add( 10, 0, 0, 0, 5 ); - - 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") ); - - 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") ); - - 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_NEEDED_SB|wxLB_SINGLE|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* bSizer140; - bSizer140 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer140->Add( 10, 0, 0, 0, 5 ); - - m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); - bSizer140->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - wxBoxSizer* bSizer23; - bSizer23 = new wxBoxSizer( wxVERTICAL ); - - m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") ); - - bSizer23->Add( m_checkBoxHideFilt, 0, wxEXPAND, 5 ); - - bSizer140->Add( bSizer23, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_panelFilter->SetSizer( bSizer140 ); - m_panelFilter->Layout(); - bSizer140->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 ); - m_textCtrlCreate->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - m_textCtrlUpdate->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - m_textCtrlDelete->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - m_textCtrlData->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - - m_staticTextStatusLeft = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeft->Wrap( -1 ); - m_staticTextStatusLeft->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer53->Add( m_staticTextStatusLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer451->Add( bSizer53, 1, wxALIGN_CENTER_VERTICAL|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, 70, 90, 92, false, wxEmptyString ) ); - - bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 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 ); - - m_staticTextStatusRight = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRight->Wrap( -1 ); - m_staticTextStatusRight->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); - - bSizer52->Add( m_staticTextStatusRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer50; - bSizer50 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer50->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bitmap15 = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); - bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 2 ); - - bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); - - bSizer451->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 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_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); - m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), 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 ); + m_menuFile->Append( m_menuItem10 ); + + m_menuItem11 = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("2. &Synchronize...") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); + 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 ); + 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-L"), 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 ); + + + bSizerTopButtons->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 wxButtonWithImage( 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 ); + + bSizerTopButtons->Add( fgSizer121, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + + bSizerTopButtons->Add( 0, 0, 1, 0, 5 ); + + 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 wxButtonWithImage( m_panelTopButtons, wxID_ANY, _("Synchronize..."), wxDefaultPosition, wxSize( -1,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 ); + + bSizerTopButtons->Add( fgSizer12, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + + bSizerTopButtons->Add( 15, 0, 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_directoryLeft = new CustomComboBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + sbSizerDirLeft->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new FfsDirPickerCtrl( 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_bpButtonLocalFilter = new wxBitmapButton( m_panelTopMiddle, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer160->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer160->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + 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_bpButtonAddPair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + + sbSizerDirRight->Add( m_bpButtonAddPair, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 3 ); + + m_bpButtonRemovePair = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + sbSizerDirRight->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_directoryRight = new CustomComboBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + sbSizerDirRight->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new FfsDirPickerCtrl( 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|wxRIGHT, 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, 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( 38 ); + 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|wxLEFT, 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 ); + + + bSizerConfig->Add( 10, 0, 0, 0, 5 ); + + 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_NEEDED_SB|wxLB_SINGLE|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* bSizer140; + bSizer140 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer140->Add( 10, 0, 0, 0, 5 ); + + m_bpButtonFilter = new wxBitmapButton( m_panelFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|wxFULL_REPAINT_ON_RESIZE ); + bSizer140->Add( m_bpButtonFilter, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + wxBoxSizer* bSizer23; + bSizer23 = new wxBoxSizer( wxVERTICAL ); + + m_checkBoxHideFilt = new wxCheckBox( m_panelFilter, wxID_ANY, _("Hide excluded items"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxHideFilt->SetToolTip( _("Hide filtered or temporarily excluded files") ); + + bSizer23->Add( m_checkBoxHideFilt, 0, wxEXPAND, 5 ); + + bSizer140->Add( bSizer23, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_panelFilter->SetSizer( bSizer140 ); + m_panelFilter->Layout(); + bSizer140->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 ); + m_textCtrlCreate->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + m_textCtrlUpdate->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + m_textCtrlDelete->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + m_textCtrlData->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + + m_staticTextStatusLeft = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeft->Wrap( -1 ); + m_staticTextStatusLeft->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer53->Add( m_staticTextStatusLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer451->Add( bSizer53, 1, wxALIGN_CENTER_VERTICAL|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, 70, 90, 92, false, wxEmptyString ) ); + + bSizer451->Add( m_staticTextStatusMiddle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 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 ); + + m_staticTextStatusRight = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRight->Wrap( -1 ); + m_staticTextStatusRight->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) ); + + bSizer52->Add( m_staticTextStatusRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer50; + bSizer50 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer50->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bitmap15 = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 10,10 ), 0 ); + bSizer50->Add( m_bitmap15, 0, wxALIGN_BOTTOM, 2 ); + + bSizer52->Add( bSizer50, 1, wxALIGN_BOTTOM|wxEXPAND, 5 ); + + bSizer451->Add( bSizer52, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 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_dirPickerLeft->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); + m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), 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 ); } 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_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); - m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); - m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); - m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), 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::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_dirPickerLeft->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainDialogGenerated::OnDirSelected ), NULL, this ); + m_bpButtonSwapSides->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnSwapSides ), NULL, this ); + m_bpButtonAddPair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnAddFolderPair ), NULL, this ); + m_bpButtonRemovePair->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::OnRemoveTopFolderPair ), 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 ); + } 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_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( 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_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer95->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - 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_bpButtonRemovePair = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - - bSizer135->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( 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 ); + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxHORIZONTAL ); + + m_directoryLeft = new wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer134->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_dirPickerLeft = new FfsDirPickerCtrl( 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_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer95->Add( m_bpButtonLocalFilter, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer95->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + 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_bpButtonRemovePair = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 19,21 ), wxBU_AUTODRAW ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + + bSizer135->Add( m_bpButtonRemovePair, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_directoryRight = new wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer135->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new FfsDirPickerCtrl( m_panelRight, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerRight->SetToolTip( _("Select a folder") ); + + bSizer135->Add( m_dirPickerRight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_panelRight->SetSizer( bSizer135 ); + m_panelRight->Layout(); + bSizer135->Fit( m_panelRight ); + bSizer74->Add( m_panelRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bSizer74 ); + this->Layout(); + bSizer74->Fit( this ); } FolderPairGenerated::~FolderPairGenerated() @@ -882,113 +867,111 @@ FolderPairGenerated::~FolderPairGenerated() 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") ); - - 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 wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( 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_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer114->Add( m_bpButtonLocalFilter, 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 wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( 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_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer115->Add( m_bpButtonAltSyncCfg, 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 ); - - 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 wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer114->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new FfsDirPickerCtrl( 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_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer114->Add( m_bpButtonLocalFilter, 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 wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new FfsDirPickerCtrl( 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_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer115->Add( m_bpButtonAltSyncCfg, 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 ); + + bSizer142->Add( bSizer140, 0, wxEXPAND, 5 ); + + + bSizer142->Add( 0, 5, 0, 0, 5 ); + + this->SetSizer( bSizer142 ); + this->Layout(); + bSizer142->Fit( this ); } BatchFolderPairGenerated::~BatchFolderPairGenerated() @@ -997,573 +980,562 @@ BatchFolderPairGenerated::~BatchFolderPairGenerated() 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( 460,420 ), wxDefaultSize ); - - wxBoxSizer* bSizer54; - bSizer54 = new wxBoxSizer( wxVERTICAL ); - - bSizer69 = 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( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer69->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer69->Add( 0, 5, 0, 0, 5 ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Assemble a batch file for automated synchronization. To start in batch mode simply pass the name of the file to the FreeFileSync executable: FreeFileSync.exe <batchfile>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText44->Wrap( 500 ); - 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") ); - - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer69->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer69->Add( 0, 5, 0, 0, 5 ); - - m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP, 5 ); - - m_staticText531 = new wxStaticText( this, wxID_ANY, _("Configuration overview:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText531->Wrap( -1 ); - m_staticText531->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Arial Black") ) ); - - bSizer69->Add( m_staticText531, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_notebookSettings = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelOverview = new wxPanel( m_notebookSettings, 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") ); - - 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, 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") ); - - 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") ); - - 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") ); - - 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 wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLeft = new wxDirPickerCtrl( 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_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer1141->Add( m_bpButtonLocalFilter, 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 wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerRight = new wxDirPickerCtrl( 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_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); - bSizer115->Add( m_bpButtonAltSyncCfg, 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 ); - - 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 ); - - wxFlexGridSizer* fgSizer15; - fgSizer15 = new wxFlexGridSizer( 1, 2, 10, 10 ); - fgSizer15->SetFlexibleDirection( wxBOTH ); - fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - wxStaticBoxSizer* sbSizer24; - sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Status feedback") ), wxVERTICAL ); - - - sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_checkBoxSilent = new wxCheckBox( m_panelOverview, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxSilent->SetToolTip( _("Start minimized and write status information to a logfile") ); - - sbSizer24->Add( m_checkBoxSilent, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 14 ); - - - sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); - - fgSizer15->Add( sbSizer24, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer25; - sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); - - wxArrayString m_choiceHandleErrorChoices; - m_choiceHandleError = new wxChoice( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); - m_choiceHandleError->SetSelection( 0 ); - sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - fgSizer15->Add( sbSizer25, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer120->Add( fgSizer15, 0, 0, 5 ); - - bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 10 ); - - m_panelOverview->SetSizer( bSizer67 ); - m_panelOverview->Layout(); - bSizer67->Fit( m_panelOverview ); - m_notebookSettings->AddPage( m_panelOverview, _("Overview"), true ); - m_panelLogging = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer117; - bSizer117 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer119; - bSizer119 = new wxBoxSizer( wxVERTICAL ); - - m_staticText120 = new wxStaticText( m_panelLogging, wxID_ANY, _("Select logfile directory:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText120->Wrap( -1 ); - bSizer119->Add( m_staticText120, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - wxStaticBoxSizer* sbSizer251; - sbSizer251 = new wxStaticBoxSizer( new wxStaticBox( m_panelLogging, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); - - m_textCtrlLogfileDir = new wxTextCtrl( m_panelLogging, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer251->Add( m_textCtrlLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerLogfileDir = new wxDirPickerCtrl( m_panelLogging, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_dirPickerLogfileDir->SetToolTip( _("Select a folder") ); - - sbSizer251->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer119->Add( sbSizer251, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer152; - bSizer152 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText96 = new wxStaticText( m_panelLogging, wxID_ANY, _("Maximum number of logfiles:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText96->Wrap( -1 ); - bSizer152->Add( m_staticText96, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer152->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_spinCtrlLogCountMax = new wxSpinCtrl( m_panelLogging, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer152->Add( m_spinCtrlLogCountMax, 0, wxALL, 5 ); - - bSizer119->Add( bSizer152, 0, wxEXPAND, 5 ); - - bSizer117->Add( bSizer119, 0, wxEXPAND|wxALL, 10 ); - - m_panelLogging->SetSizer( bSizer117 ); - m_panelLogging->Layout(); - bSizer117->Fit( m_panelLogging ); - m_notebookSettings->AddPage( m_panelLogging, _("Logging"), false ); - - bSizer69->Add( m_notebookSettings, 1, wxEXPAND, 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, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 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 ); - - bSizer69->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer54->Add( bSizer69, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 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_checkBoxSilent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), 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( 460,420 ), wxDefaultSize ); + + wxBoxSizer* bSizer54; + bSizer54 = new wxBoxSizer( wxVERTICAL ); + + bSizer69 = 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( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer69->Add( bSizer87, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer69->Add( 0, 5, 0, 0, 5 ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Assemble a batch file for automated synchronization. To start in batch mode simply pass the name of the file to the FreeFileSync executable: FreeFileSync.exe <batchfile>. This can also be scheduled in your operating system's task planner."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText44->Wrap( 500 ); + 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 ); + + bSizer69->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + bSizer69->Add( 0, 5, 0, 0, 5 ); + + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer69->Add( m_staticline10, 0, wxEXPAND|wxTOP, 5 ); + + m_staticText531 = new wxStaticText( this, wxID_ANY, _("Configuration overview:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText531->Wrap( -1 ); + m_staticText531->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Arial Black") ) ); + + bSizer69->Add( m_staticText531, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_notebookSettings = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelOverview = new wxPanel( m_notebookSettings, 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, 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 wxTextCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1141->Add( m_directoryLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLeft = new FfsDirPickerCtrl( 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_bpButtonLocalFilter = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer1141->Add( m_bpButtonLocalFilter, 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 wxTextCtrl( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer115->Add( m_directoryRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerRight = new FfsDirPickerCtrl( 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_bpButtonAltSyncCfg = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 20,20 ), wxBU_AUTODRAW ); + bSizer115->Add( m_bpButtonAltSyncCfg, 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 ); + + 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 ); + + wxFlexGridSizer* fgSizer15; + fgSizer15 = new wxFlexGridSizer( 1, 2, 10, 10 ); + fgSizer15->SetFlexibleDirection( wxBOTH ); + fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + wxStaticBoxSizer* sbSizer24; + sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Status feedback") ), wxVERTICAL ); + + + sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_checkBoxSilent = new wxCheckBox( m_panelOverview, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxSilent->SetToolTip( _("Start minimized and write status information to a logfile") ); + + sbSizer24->Add( m_checkBoxSilent, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 14 ); + + + sbSizer24->Add( 0, 0, 1, wxEXPAND, 5 ); + + fgSizer15->Add( sbSizer24, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer25; + sbSizer25 = new wxStaticBoxSizer( new wxStaticBox( m_panelOverview, wxID_ANY, _("Error handling") ), wxHORIZONTAL ); + + wxArrayString m_choiceHandleErrorChoices; + m_choiceHandleError = new wxChoice( m_panelOverview, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleErrorChoices, 0 ); + m_choiceHandleError->SetSelection( 0 ); + sbSizer25->Add( m_choiceHandleError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + fgSizer15->Add( sbSizer25, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer120->Add( fgSizer15, 0, 0, 5 ); + + bSizer67->Add( bSizer120, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 10 ); + + m_panelOverview->SetSizer( bSizer67 ); + m_panelOverview->Layout(); + bSizer67->Fit( m_panelOverview ); + m_notebookSettings->AddPage( m_panelOverview, _("Overview"), true ); + m_panelLogging = new wxPanel( m_notebookSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer117; + bSizer117 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer119; + bSizer119 = new wxBoxSizer( wxVERTICAL ); + + m_staticText120 = new wxStaticText( m_panelLogging, wxID_ANY, _("Select logfile directory:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText120->Wrap( -1 ); + bSizer119->Add( m_staticText120, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizerLogfileDir = new wxStaticBoxSizer( new wxStaticBox( m_panelLogging, wxID_ANY, _("Drag && drop") ), wxHORIZONTAL ); + + m_textCtrlLogfileDir = new wxTextCtrl( m_panelLogging, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerLogfileDir->Add( m_textCtrlLogfileDir, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerLogfileDir = new FfsDirPickerCtrl( m_panelLogging, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dirPickerLogfileDir->SetToolTip( _("Select a folder") ); + + sbSizerLogfileDir->Add( m_dirPickerLogfileDir, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer119->Add( sbSizerLogfileDir, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer152; + bSizer152 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText96 = new wxStaticText( m_panelLogging, wxID_ANY, _("Maximum number of logfiles:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText96->Wrap( -1 ); + bSizer152->Add( m_staticText96, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer152->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_spinCtrlLogCountMax = new wxSpinCtrl( m_panelLogging, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer152->Add( m_spinCtrlLogCountMax, 0, wxALL, 5 ); + + bSizer119->Add( bSizer152, 0, wxEXPAND, 5 ); + + bSizer117->Add( bSizer119, 0, wxEXPAND|wxALL, 10 ); + + m_panelLogging->SetSizer( bSizer117 ); + m_panelLogging->Layout(); + bSizer117->Fit( m_panelLogging ); + m_notebookSettings->AddPage( m_panelLogging, _("Logging"), false ); + + bSizer69->Add( m_notebookSettings, 1, wxEXPAND, 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, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 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 ); + + bSizer69->Add( bSizer68, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer54->Add( bSizer69, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 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_checkBoxSilent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), 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_checkBoxSilent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), 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_checkBoxSilent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::OnCheckSilent ), 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 ); + } 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 ); - - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer157; - bSizer157 = new wxBoxSizer( wxVERTICAL ); - - bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText321 = new wxStaticText( this, wxID_ANY, _("Elements 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, _("Elements 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_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemaining->Wrap( -1 ); - m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - sSizerTimeRemaining->Add( m_staticTextTimeRemaining, 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|wxBOTTOM|wxRIGHT|wxLEFT, 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, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|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 ); - - - 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 ); + + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer157; + bSizer157 = new wxBoxSizer( wxVERTICAL ); + + bSizerFilesFound = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText321 = new wxStaticText( this, wxID_ANY, _("Elements 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, _("Elements 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_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemaining->Wrap( -1 ); + m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + sSizerTimeRemaining->Add( m_staticTextTimeRemaining, 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|wxBOTTOM|wxRIGHT|wxLEFT, 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, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|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 ); + + + bSizer40->Add( 0, 0, 1, wxEXPAND, 5 ); + + this->SetSizer( bSizer40 ); + this->Layout(); + bSizer40->Fit( this ); } CompareStatusGenerated::~CompareStatusGenerated() @@ -1572,2161 +1544,2149 @@ CompareStatusGenerated::~CompareStatusGenerated() 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, wxEmptyString ), wxVERTICAL ); - - m_staticText1 = new wxStaticText( this, wxID_ANY, _("Select variant:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1->Wrap( -1 ); - m_staticText1->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - sbSizer7->Add( m_staticText1, 0, wxALL, 5 ); - - 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, 0 ); - 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 and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText81->Wrap( 300 ); - 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( 300 ); - 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( 300 ); - 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 ) ); - m_radioBtnCustom->Enable( false ); - - fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer* bSizer65; - bSizer65 = new wxBoxSizer( wxVERTICAL ); - - - bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText23 = new wxStaticText( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE|wxSTATIC_BORDER ); - m_staticText23->Wrap( -1 ); - m_staticText23->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - - bSizer65->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); - - fgSizer1->Add( bSizer65, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText9->Wrap( 300 ); - 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 ); - - 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, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer201->Add( sbSizerErrorHandling, 0, wxEXPAND|wxRIGHT, 10 ); - - wxStaticBoxSizer* sbSizer231; - sbSizer231 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxVERTICAL ); - - wxArrayString m_choiceHandleDeletionChoices; - m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 ); - m_choiceHandleDeletion->SetSelection( 0 ); - sbSizer231->Add( m_choiceHandleDeletion, 0, wxBOTTOM, 5 ); - - m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1151; - bSizer1151 = new wxBoxSizer( wxHORIZONTAL ); - - m_textCtrlCustomDelFolder = new wxTextCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlCustomDelFolder->SetMinSize( wxSize( 200,-1 ) ); - - bSizer1151->Add( m_textCtrlCustomDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_dirPickerCustomDelFolder = new wxDirPickerCtrl( 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 ); - sbSizer231->Add( m_panelCustomDeletionDir, 0, 0, 5 ); - - bSizer201->Add( sbSizer231, 0, wxEXPAND, 5 ); - - bSizer29->Add( bSizer201, 0, wxTOP|wxBOTTOM, 5 ); - - - bSizer29->Add( 0, 5, 1, 0, 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|wxALL, 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 ); - - - bSizer291->Add( 20, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer29->Add( bSizer291, 0, wxEXPAND, 5 ); - - bSizer181->Add( bSizer29, 0, wxEXPAND, 5 ); - - - bSizer181->Add( 10, 0, 0, 0, 5 ); - - sbSizerSyncDirections = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), 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_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizerSyncDirections->Add( gSizer3, 0, wxEXPAND, 5 ); - - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizerSyncDirections->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer* bSizer121; - bSizer121 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer122; - bSizer122 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftOnly->SetToolTip( _("Files/folders that exist on left side only") ); - - bSizer122->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer122->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer122->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer122, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer123; - bSizer123 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightOnly->SetToolTip( _("Files/folders that exist on right side only") ); - - bSizer123->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer123->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer123->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer123, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer124; - bSizer124 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapLeftNewer->SetToolTip( _("Files that exist on both sides, left one is newer") ); - - bSizer124->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer124->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer124->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer124, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer125; - bSizer125 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapRightNewer->SetToolTip( _("Files that exist on both sides, right one is newer") ); - - bSizer125->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer125->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer125->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer125, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer126; - bSizer126 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapDifferent->SetToolTip( _("Files that have different content") ); - - bSizer126->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer126->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer126->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer126, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer127; - bSizer127 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); - m_bitmapConflict->SetToolTip( _("Conflicts/files that cannot be categorized") ); - - bSizer127->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer127->Add( 5, 0, 0, 0, 5 ); - - m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); - bSizer127->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer121->Add( bSizer127, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer181->Add( sbSizerSyncDirections, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer7->Add( bSizer181, 0, wxALL, 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_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), 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_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), 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 ); - 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 ); + 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, wxEmptyString ), wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Select variant:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + m_staticText1->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + sbSizer7->Add( m_staticText1, 0, wxALL, 5 ); + + 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, 0 ); + 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 and conflicts are detected automatically."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( 300 ); + 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( 300 ); + 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( 300 ); + 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 ) ); + m_radioBtnCustom->Enable( false ); + + fgSizer1->Add( m_radioBtnCustom, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer65; + bSizer65 = new wxBoxSizer( wxVERTICAL ); + + + bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText23 = new wxStaticText( this, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE|wxSTATIC_BORDER ); + m_staticText23->Wrap( -1 ); + m_staticText23->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + + bSizer65->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizer65->Add( 0, 0, 1, wxEXPAND, 5 ); + + fgSizer1->Add( bSizer65, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, _("Configure your own synchronization rules."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( 300 ); + 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 ); + + 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, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer201->Add( sbSizerErrorHandling, 0, wxEXPAND|wxRIGHT, 10 ); + + sbSizerCustDelDir = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Deletion handling") ), wxVERTICAL ); + + wxArrayString m_choiceHandleDeletionChoices; + m_choiceHandleDeletion = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHandleDeletionChoices, 0 ); + m_choiceHandleDeletion->SetSelection( 0 ); + sbSizerCustDelDir->Add( m_choiceHandleDeletion, 0, wxBOTTOM, 5 ); + + m_panelCustomDeletionDir = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1151; + bSizer1151 = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlCustomDelFolder = new wxTextCtrl( m_panelCustomDeletionDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textCtrlCustomDelFolder->SetMinSize( wxSize( 200,-1 ) ); + + bSizer1151->Add( m_textCtrlCustomDelFolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPickerCustomDelFolder = new FfsDirPickerCtrl( 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, 0, 0, 5 ); + + bSizer201->Add( sbSizerCustDelDir, 0, wxEXPAND, 5 ); + + bSizer29->Add( bSizer201, 0, wxTOP|wxBOTTOM, 5 ); + + + bSizer29->Add( 0, 5, 1, 0, 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|wxALL, 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 ); + + + bSizer291->Add( 20, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer29->Add( bSizer291, 0, wxEXPAND, 5 ); + + bSizer181->Add( bSizer29, 0, wxEXPAND, 5 ); + + + bSizer181->Add( 10, 0, 0, 0, 5 ); + + sbSizerSyncDirections = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Configuration") ), 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_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizerSyncDirections->Add( gSizer3, 0, wxEXPAND, 5 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + sbSizerSyncDirections->Add( m_staticline3, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + wxBoxSizer* bSizer121; + bSizer121 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer122; + bSizer122 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeftOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapLeftOnly->SetToolTip( _("Files/folders that exist on left side only") ); + + bSizer122->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer122->Add( 5, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_bpButtonLeftOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer122->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer122, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer123; + bSizer123 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapRightOnly = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapRightOnly->SetToolTip( _("Files/folders that exist on right side only") ); + + bSizer123->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer123->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonRightOnly = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer123->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer123, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer124; + bSizer124 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapLeftNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapLeftNewer->SetToolTip( _("Files that exist on both sides, left one is newer") ); + + bSizer124->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer124->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonLeftNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer124->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer124, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer125; + bSizer125 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapRightNewer = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapRightNewer->SetToolTip( _("Files that exist on both sides, right one is newer") ); + + bSizer125->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer125->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonRightNewer = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer125->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer125, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer126; + bSizer126 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapDifferent = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapDifferent->SetToolTip( _("Files that have different content") ); + + bSizer126->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer126->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonDifferent = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer126->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer126, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer127; + bSizer127 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmapConflict = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 45,45 ), 0 ); + m_bitmapConflict->SetToolTip( _("Conflicts/files that cannot be categorized") ); + + bSizer127->Add( m_bitmapConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer127->Add( 5, 0, 0, 0, 5 ); + + m_bpButtonConflict = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 42,42 ), wxBU_AUTODRAW ); + bSizer127->Add( m_bpButtonConflict, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer121->Add( bSizer127, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + sbSizerSyncDirections->Add( bSizer121, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer181->Add( sbSizerSyncDirections, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer7->Add( bSizer181, 0, wxALL, 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_radioBtnMirror->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_buttonOneWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), 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_radioBtnCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_choiceHandleError->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_choiceHandleDeletion->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), 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 ); + 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 ); } 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_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); - m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), 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_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); - m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); - m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), 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 ); - 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 ); - + // 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_radioBtnMirror->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), NULL, this ); + m_buttonOneWay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncLeftToRight ), 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_radioBtnCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnSyncCustom ), NULL, this ); + m_choiceHandleError->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeErrorHandling ), NULL, this ); + m_choiceHandleDeletion->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( SyncCfgDlgGenerated::OnChangeDeletionHandling ), 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 ); + 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 ); + } 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 - filesize\n - last write time and date\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 - filesize\n - last write time and date\nare the same") ); - - fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File size and date"), wxDefaultPosition, wxSize( -1,42 ), 0 ); - m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); - m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\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 ); - - m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - sbSizer6->Add( m_staticline14, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - m_bpButtonHelp->SetToolTip( _("Help") ); - - sbSizer6->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 ); - - - bSizer55->Add( 0, 4, 0, 0, 5 ); - - 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( 0 ); - sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer55->Add( sbSizer25, 0, wxEXPAND|wxTOP, 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, wxALL|wxALIGN_CENTER_VERTICAL, 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_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); - m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), 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 - filesize\n - last write time and date\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 - filesize\n - last write time and date\nare the same") ); + + fgSizer16->Add( m_bitmapByTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonTimeSize = new wxButton( this, wxID_ANY, _("File size and date"), wxDefaultPosition, wxSize( -1,42 ), 0 ); + m_buttonTimeSize->SetFont( wxFont( 11, 70, 90, 92, false, wxEmptyString ) ); + m_buttonTimeSize->SetToolTip( _("Files are found equal if\n - filesize\n - last write time and date\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 ); + + m_staticline14 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + sbSizer6->Add( m_staticline14, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); + m_bpButtonHelp->SetToolTip( _("Help") ); + + sbSizer6->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer55->Add( sbSizer6, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 ); + + + bSizer55->Add( 0, 4, 0, 0, 5 ); + + 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( 0 ); + sbSizer25->Add( m_choiceHandleSymlinks, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer55->Add( sbSizer25, 0, wxEXPAND|wxTOP, 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, wxALL|wxALIGN_CENTER_VERTICAL, 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_radioBtnContent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_bpButtonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); + m_choiceHandleSymlinks->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), 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_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); - m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); - m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), 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_radioBtnContent->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_buttonContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnContent ), NULL, this ); + m_bpButtonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CmpCfgDlgGenerated::OnShowHelp ), NULL, this ); + m_choiceHandleSymlinks->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CmpCfgDlgGenerated::OnChangeErrorHandling ), 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,300 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - - wxBoxSizer* bSizer27; - bSizer27 = new wxBoxSizer( wxVERTICAL ); - - - bSizer27->Add( 0, 15, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer37; - bSizer37 = new wxBoxSizer( wxHORIZONTAL ); - - bSizer27->Add( bSizer37, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxBoxSizer* bSizer42; - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_bitmapStatus = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); - bSizer42->Add( m_bitmapStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextStatus = new wxStaticText( this, 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|wxRIGHT|wxLEFT, 5 ); - - m_animationControl1 = new wxAnimationCtrl( this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE ); - m_animationControl1->SetMinSize( wxSize( 45,45 ) ); - - bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - - bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer27->Add( bSizer42, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - bSizer31 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer111; - bSizer111 = new wxBoxSizer( wxVERTICAL ); - - bSizerObjectsRemaining = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText25 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText25->Wrap( -1 ); - m_staticText25->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerObjectsRemaining->Add( m_staticText25, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextRemainingObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticTextRemainingObj->Wrap( -1 ); - m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerObjectsRemaining->Add( m_staticTextRemainingObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticText96 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText96->Wrap( -1 ); - m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsRemaining->Add( m_staticText96, 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") ) ); - - bSizerObjectsRemaining->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText97 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText97->Wrap( -1 ); - m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsRemaining->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 ); - - bSizer111->Add( bSizerObjectsRemaining, 0, 0, 5 ); - - bSizerObjectsProcessed = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText251 = new wxStaticText( this, wxID_ANY, _("Elements processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText251->Wrap( -1 ); - m_staticText251->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerObjectsProcessed->Add( m_staticText251, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextProcessedObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_staticTextProcessedObj->Wrap( -1 ); - m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticTextProcessedObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticText98 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText98->Wrap( -1 ); - m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - m_staticTextDataProcessed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDataProcessed->Wrap( -1 ); - m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 ); - - m_staticText99 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText99->Wrap( -1 ); - m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); - - bSizerObjectsProcessed->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 ); - - bSizer111->Add( bSizerObjectsProcessed, 0, 0, 5 ); - - bSizer31->Add( bSizer111, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer114; - bSizer114 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText55->Wrap( -1 ); - m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer114->Add( m_staticText55, 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") ) ); - - bSizer114->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer31->Add( bSizer114, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer27->Add( bSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizerProgressText = new wxBoxSizer( wxVERTICAL ); - - m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizerProgressText->Add( m_textCtrlInfo, 3, wxEXPAND|wxALL, 5 ); - - bSizer27->Add( bSizerProgressText, 1, wxEXPAND, 5 ); - - m_gauge1 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); - bSizer27->Add( m_gauge1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer28 = new wxBoxSizer( wxHORIZONTAL ); - - bSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText108 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText108->Wrap( -1 ); - m_staticText108->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerSpeed->Add( m_staticText108, 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") ) ); - - bSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - - bSizerSpeed->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer28->Add( bSizerSpeed, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer28->Add( 0, 0, 1, 0, 5 ); - - m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - m_buttonOK->Enable( false ); - m_buttonOK->Hide(); - - bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - - bSizer28->Add( 0, 0, 1, 0, 5 ); - - bSizerRemTime = new wxBoxSizer( wxHORIZONTAL ); - - - bSizerRemTime->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - m_staticText21->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizerRemTime->Add( m_staticText21, 0, wxALIGN_BOTTOM, 5 ); - - m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemaining->Wrap( -1 ); - m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); - - bSizerRemTime->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - - bSizer28->Add( bSizerRemTime, 1, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer27->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 ); - - - bSizer27->Add( 0, 5, 0, wxEXPAND, 5 ); - - this->SetSizer( bSizer27 ); - 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,300 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + wxBoxSizer* bSizer27; + bSizer27 = new wxBoxSizer( wxVERTICAL ); + + + bSizer27->Add( 0, 15, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer37; + bSizer37 = new wxBoxSizer( wxHORIZONTAL ); + + bSizer27->Add( bSizer37, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* bSizer42; + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_bitmapStatus = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 28,28 ), 0 ); + bSizer42->Add( m_bitmapStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextStatus = new wxStaticText( this, 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|wxRIGHT|wxLEFT, 5 ); + + m_animationControl1 = new wxAnimationCtrl( this, wxID_ANY, wxNullAnimation, wxDefaultPosition, wxDefaultSize, wxAC_DEFAULT_STYLE ); + m_animationControl1->SetMinSize( wxSize( 45,45 ) ); + + bSizer42->Add( m_animationControl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + bSizer42->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer27->Add( bSizer42, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer31 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer111; + bSizer111 = new wxBoxSizer( wxVERTICAL ); + + bSizerObjectsRemaining = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText25 = new wxStaticText( this, wxID_ANY, _("Elements remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText25->Wrap( -1 ); + m_staticText25->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerObjectsRemaining->Add( m_staticText25, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextRemainingObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextRemainingObj->Wrap( -1 ); + m_staticTextRemainingObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerObjectsRemaining->Add( m_staticTextRemainingObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticText96 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText96->Wrap( -1 ); + m_staticText96->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsRemaining->Add( m_staticText96, 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") ) ); + + bSizerObjectsRemaining->Add( m_staticTextDataRemaining, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText97 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText97->Wrap( -1 ); + m_staticText97->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsRemaining->Add( m_staticText97, 0, wxALIGN_BOTTOM, 5 ); + + bSizer111->Add( bSizerObjectsRemaining, 0, 0, 5 ); + + bSizerObjectsProcessed = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText251 = new wxStaticText( this, wxID_ANY, _("Elements processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText251->Wrap( -1 ); + m_staticText251->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerObjectsProcessed->Add( m_staticText251, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextProcessedObj = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextProcessedObj->Wrap( -1 ); + m_staticTextProcessedObj->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticTextProcessedObj, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticText98 = new wxStaticText( this, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText98->Wrap( -1 ); + m_staticText98->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticText98, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + m_staticTextDataProcessed = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDataProcessed->Wrap( -1 ); + m_staticTextDataProcessed->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticTextDataProcessed, 0, wxALIGN_BOTTOM, 5 ); + + m_staticText99 = new wxStaticText( this, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText99->Wrap( -1 ); + m_staticText99->SetFont( wxFont( 9, 74, 90, 90, false, wxT("Arial") ) ); + + bSizerObjectsProcessed->Add( m_staticText99, 0, wxALIGN_BOTTOM, 5 ); + + bSizer111->Add( bSizerObjectsProcessed, 0, 0, 5 ); + + bSizer31->Add( bSizer111, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer114; + bSizer114 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText55 = new wxStaticText( this, wxID_ANY, _("Time elapsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText55->Wrap( -1 ); + m_staticText55->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer114->Add( m_staticText55, 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") ) ); + + bSizer114->Add( m_staticTextTimeElapsed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer31->Add( bSizer114, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer27->Add( bSizer31, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizerProgressText = new wxBoxSizer( wxVERTICAL ); + + m_textCtrlInfo = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizerProgressText->Add( m_textCtrlInfo, 3, wxEXPAND|wxALL, 5 ); + + bSizer27->Add( bSizerProgressText, 1, wxEXPAND, 5 ); + + m_gauge1 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxSize( -1,20 ), wxGA_HORIZONTAL ); + bSizer27->Add( m_gauge1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + bSizer28 = new wxBoxSizer( wxHORIZONTAL ); + + bSizerSpeed = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText108 = new wxStaticText( this, wxID_ANY, _("Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText108->Wrap( -1 ); + m_staticText108->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerSpeed->Add( m_staticText108, 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") ) ); + + bSizerSpeed->Add( m_staticTextSpeed, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + + bSizerSpeed->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer28->Add( bSizerSpeed, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer28->Add( 0, 0, 1, 0, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonOK->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + m_buttonOK->Enable( false ); + m_buttonOK->Hide(); + + bSizer28->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonPause->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer28->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_buttonAbort = new wxButton( this, wxID_CANCEL, _("&Abort"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_buttonAbort->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer28->Add( m_buttonAbort, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + + bSizer28->Add( 0, 0, 1, 0, 5 ); + + bSizerRemTime = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerRemTime->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Time remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + m_staticText21->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizerRemTime->Add( m_staticText21, 0, wxALIGN_BOTTOM, 5 ); + + m_staticTextTimeRemaining = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemaining->Wrap( -1 ); + m_staticTextTimeRemaining->SetFont( wxFont( 9, 74, 90, 92, false, wxT("Arial") ) ); + + bSizerRemTime->Add( m_staticTextTimeRemaining, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + + bSizer28->Add( bSizerRemTime, 1, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer27->Add( bSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 ); + + + bSizer27->Add( 0, 5, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer27 ); + 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, 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|wxALL, 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, 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|wxALL, 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 ); + } HelpDlgGenerated::HelpDlgGenerated( 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* bSizer20; - bSizer20 = new wxBoxSizer( wxVERTICAL ); - - - bSizer20->Add( 0, 10, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer85; - bSizer85 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmap25 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); - bSizer85->Add( m_bitmap25, 1, wxALIGN_CENTER_HORIZONTAL|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( wxHORIZONTAL ); - - - bSizer72->Add( 20, 0, 0, 0, 5 ); - - m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Help"), 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|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizer72->Add( 20, 0, 0, 0, 5 ); - - m_panel8->SetSizer( bSizer72 ); - m_panel8->Layout(); - bSizer72->Fit( m_panel8 ); - bSizer85->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - - bSizer85->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer20->Add( bSizer85, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_scrolledWindow1 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); - m_scrolledWindow1->SetScrollRate( 5, 5 ); - m_scrolledWindow1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); - - wxBoxSizer* bSizer70; - bSizer70 = new wxBoxSizer( wxVERTICAL ); - - m_staticText59 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("Compare by \"File size and date\""), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText59->Wrap( 500 ); - m_staticText59->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - - bSizer70->Add( m_staticText59, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticText60 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText60->Wrap( 500 ); - bSizer70->Add( m_staticText60, 0, wxALL, 5 ); - - m_staticText61 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("When the comparison is started with this option set the following decision tree is processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText61->Wrap( 500 ); - bSizer70->Add( m_staticText61, 0, wxALL, 5 ); - - m_treeCtrl1 = new wxTreeCtrl( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxSize( -1,175 ), wxTR_DEFAULT_STYLE ); - m_treeCtrl1->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer70->Add( m_treeCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_staticText63 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText63->Wrap( 500 ); - bSizer70->Add( m_staticText63, 0, wxALL, 5 ); - - m_staticText75 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText75->Wrap( -1 ); - bSizer70->Add( m_staticText75, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText76 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- left newer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText76->Wrap( -1 ); - bSizer70->Add( m_staticText76, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText77 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- right newer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText77->Wrap( -1 ); - bSizer70->Add( m_staticText77, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText79 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText79->Wrap( -1 ); - bSizer70->Add( m_staticText79, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText80 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText80->Wrap( -1 ); - bSizer70->Add( m_staticText80, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText78 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- conflict"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText78->Wrap( -1 ); - bSizer70->Add( m_staticText78, 0, wxRIGHT|wxLEFT, 5 ); - - m_scrolledWindow1->SetSizer( bSizer70 ); - m_scrolledWindow1->Layout(); - bSizer70->Fit( m_scrolledWindow1 ); - m_notebook1->AddPage( m_scrolledWindow1, _("File size and date"), true ); - m_scrolledWindow5 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); - m_scrolledWindow5->SetScrollRate( 5, 5 ); - m_scrolledWindow5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); - - wxBoxSizer* bSizer74; - bSizer74 = new wxBoxSizer( wxVERTICAL ); - - m_staticText65 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("Compare by \"File content\""), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText65->Wrap( 500 ); - m_staticText65->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); - - bSizer74->Add( m_staticText65, 0, wxALL, 5 ); - - m_staticText66 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText66->Wrap( 500 ); - bSizer74->Add( m_staticText66, 0, wxALL, 5 ); - - m_treeCtrl2 = new wxTreeCtrl( m_scrolledWindow5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE ); - m_treeCtrl2->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_treeCtrl2->SetMinSize( wxSize( -1,130 ) ); - - bSizer74->Add( m_treeCtrl2, 0, wxALL|wxEXPAND, 5 ); - - m_staticText69 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText69->Wrap( 500 ); - bSizer74->Add( m_staticText69, 0, wxALL, 5 ); - - m_staticText81 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText81->Wrap( -1 ); - bSizer74->Add( m_staticText81, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText82 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- different"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText82->Wrap( -1 ); - bSizer74->Add( m_staticText82, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText83 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText83->Wrap( -1 ); - bSizer74->Add( m_staticText83, 0, wxRIGHT|wxLEFT, 5 ); - - m_staticText84 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - bSizer74->Add( m_staticText84, 0, wxRIGHT|wxLEFT, 5 ); - - m_scrolledWindow5->SetSizer( bSizer74 ); - m_scrolledWindow5->Layout(); - bSizer74->Fit( m_scrolledWindow5 ); - m_notebook1->AddPage( m_scrolledWindow5, _("File content"), false ); - - bSizer20->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 ); - - m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); - m_button8->SetDefault(); - m_button8->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); - - bSizer20->Add( m_button8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizer20 ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); - m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxVERTICAL ); + + + bSizer20->Add( 0, 10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer85; + bSizer85 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap25 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), 0 ); + bSizer85->Add( m_bitmap25, 1, wxALIGN_CENTER_HORIZONTAL|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( wxHORIZONTAL ); + + + bSizer72->Add( 20, 0, 0, 0, 5 ); + + m_staticText56 = new wxStaticText( m_panel8, wxID_ANY, _("Help"), 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|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizer72->Add( 20, 0, 0, 0, 5 ); + + m_panel8->SetSizer( bSizer72 ); + m_panel8->Layout(); + bSizer72->Fit( m_panel8 ); + bSizer85->Add( m_panel8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + + bSizer85->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer20->Add( bSizer85, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_scrolledWindow1 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); + m_scrolledWindow1->SetScrollRate( 5, 5 ); + m_scrolledWindow1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); + + wxBoxSizer* bSizer70; + bSizer70 = new wxBoxSizer( wxVERTICAL ); + + m_staticText59 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("Compare by \"File size and date\""), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText59->Wrap( 500 ); + m_staticText59->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + + bSizer70->Add( m_staticText59, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticText60 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("This variant evaluates two equally named files as being equal when they have the same file size AND the same last write date and time."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText60->Wrap( 500 ); + bSizer70->Add( m_staticText60, 0, wxALL, 5 ); + + m_staticText61 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("When the comparison is started with this option set the following decision tree is processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText61->Wrap( 500 ); + bSizer70->Add( m_staticText61, 0, wxALL, 5 ); + + m_treeCtrl1 = new wxTreeCtrl( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxSize( -1,175 ), wxTR_DEFAULT_STYLE ); + m_treeCtrl1->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer70->Add( m_treeCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticText63 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText63->Wrap( 500 ); + bSizer70->Add( m_staticText63, 0, wxALL, 5 ); + + m_staticText75 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText75->Wrap( -1 ); + bSizer70->Add( m_staticText75, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText76 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- left newer"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText76->Wrap( -1 ); + bSizer70->Add( m_staticText76, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText77 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- right newer"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText77->Wrap( -1 ); + bSizer70->Add( m_staticText77, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText79 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText79->Wrap( -1 ); + bSizer70->Add( m_staticText79, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText80 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText80->Wrap( -1 ); + bSizer70->Add( m_staticText80, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText78 = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("- conflict"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText78->Wrap( -1 ); + bSizer70->Add( m_staticText78, 0, wxRIGHT|wxLEFT, 5 ); + + m_scrolledWindow1->SetSizer( bSizer70 ); + m_scrolledWindow1->Layout(); + bSizer70->Fit( m_scrolledWindow1 ); + m_notebook1->AddPage( m_scrolledWindow1, _("File size and date"), true ); + m_scrolledWindow5 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL ); + m_scrolledWindow5->SetScrollRate( 5, 5 ); + m_scrolledWindow5->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVEBORDER ) ); + + wxBoxSizer* bSizer74; + bSizer74 = new wxBoxSizer( wxVERTICAL ); + + m_staticText65 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("Compare by \"File content\""), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText65->Wrap( 500 ); + m_staticText65->SetFont( wxFont( 10, 70, 90, 92, true, wxEmptyString ) ); + + bSizer74->Add( m_staticText65, 0, wxALL, 5 ); + + m_staticText66 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As the name suggests, two files which share the same name are marked as equal if and only if they have the same content. This option is useful for consistency checks rather than backup operations. Therefore the file times are not taken into account at all.\n\nWith this option enabled the decision tree is smaller:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText66->Wrap( 500 ); + bSizer74->Add( m_staticText66, 0, wxALL, 5 ); + + m_treeCtrl2 = new wxTreeCtrl( m_scrolledWindow5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE ); + m_treeCtrl2->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_treeCtrl2->SetMinSize( wxSize( -1,130 ) ); + + bSizer74->Add( m_treeCtrl2, 0, wxALL|wxEXPAND, 5 ); + + m_staticText69 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("As a result the files are separated into the following categories:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText69->Wrap( 500 ); + bSizer74->Add( m_staticText69, 0, wxALL, 5 ); + + m_staticText81 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- equal"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( -1 ); + bSizer74->Add( m_staticText81, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText82 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- different"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText82->Wrap( -1 ); + bSizer74->Add( m_staticText82, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText83 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists left only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + bSizer74->Add( m_staticText83, 0, wxRIGHT|wxLEFT, 5 ); + + m_staticText84 = new wxStaticText( m_scrolledWindow5, wxID_ANY, _("- exists right only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText84->Wrap( -1 ); + bSizer74->Add( m_staticText84, 0, wxRIGHT|wxLEFT, 5 ); + + m_scrolledWindow5->SetSizer( bSizer74 ); + m_scrolledWindow5->Layout(); + bSizer74->Fit( m_scrolledWindow5 ); + m_notebook1->AddPage( m_scrolledWindow5, _("File content"), false ); + + bSizer20->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 ); + + m_button8 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize( 100,32 ), 0 ); + m_button8->SetDefault(); + m_button8->SetFont( wxFont( 10, 70, 90, 90, false, wxEmptyString ) ); + + bSizer20->Add( m_button8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer20 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); + m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); } HelpDlgGenerated::~HelpDlgGenerated() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); - m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), NULL, this ); - + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HelpDlgGenerated::OnClose ) ); + m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HelpDlgGenerated::OnOK ), 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 ); - m_build->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - - 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_scrolledWindowCodeInfo = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); - m_scrolledWindowCodeInfo->SetScrollRate( 5, 5 ); - m_scrolledWindowCodeInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - m_scrolledWindowCodeInfo->SetMinSize( wxSize( -1,120 ) ); - - bSizerCodeInfo = new wxBoxSizer( wxVERTICAL ); - - m_staticText72 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _("Source code written completely 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|wxEXPAND, 5 ); - - m_staticText73 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _(" MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText73->Wrap( -1 ); - bSizerCodeInfo->Add( m_staticText73, 0, wxALL|wxEXPAND, 5 ); - - m_hyperlink21 = new wxHyperlinkCtrl( m_scrolledWindowCodeInfo, 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_scrolledWindowCodeInfo->SetSizer( bSizerCodeInfo ); - m_scrolledWindowCodeInfo->Layout(); - bSizerCodeInfo->Fit( m_scrolledWindowCodeInfo ); - bSizer53->Add( m_scrolledWindowCodeInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 10 ); - - 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,140 ) ); - m_scrolledWindowTranslators->SetMaxSize( wxSize( -1,145 ) ); - - 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%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8"), 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%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8") ); - - 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,32 ), 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 ); + 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 ); + m_build->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + + 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_scrolledWindowCodeInfo = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER|wxHSCROLL|wxVSCROLL ); + m_scrolledWindowCodeInfo->SetScrollRate( 5, 5 ); + m_scrolledWindowCodeInfo->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + m_scrolledWindowCodeInfo->SetMinSize( wxSize( -1,120 ) ); + + bSizerCodeInfo = new wxBoxSizer( wxVERTICAL ); + + m_staticText72 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _("Source code written completely 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|wxEXPAND, 5 ); + + m_staticText73 = new wxStaticText( m_scrolledWindowCodeInfo, wxID_ANY, _(" MinGW \t- Windows port of GNU Compiler Collection\n wxWidgets \t- Open-Source GUI framework\n wxFormBuilder\t- wxWidgets GUI-builder\n CodeBlocks \t- Open-Source IDE"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText73->Wrap( -1 ); + bSizerCodeInfo->Add( m_staticText73, 0, wxALL|wxEXPAND, 5 ); + + m_hyperlink21 = new wxHyperlinkCtrl( m_scrolledWindowCodeInfo, 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_scrolledWindowCodeInfo->SetSizer( bSizerCodeInfo ); + m_scrolledWindowCodeInfo->Layout(); + bSizerCodeInfo->Fit( m_scrolledWindowCodeInfo ); + bSizer53->Add( m_scrolledWindowCodeInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM, 10 ); + + 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,140 ) ); + m_scrolledWindowTranslators->SetMaxSize( wxSize( -1,145 ) ); + + 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%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8"), 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%40gmx%2ede&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=EN&bn=PP%2dDonationsBF&charset=UTF%2d8") ); + + 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,32 ), 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, 10 ); - - - bSizer24->Add( 0, 5, 0, wxEXPAND, 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, 10 ); + + + bSizer24->Add( 0, 5, 0, wxEXPAND, 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, 10 ); - - - bSizer24->Add( 0, 5, 0, wxEXPAND, 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, 10 ); + + + bSizer24->Add( 0, 5, 0, wxEXPAND, 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, 10 ); - - - bSizer24->Add( 0, 5, 0, wxEXPAND, 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_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, 10 ); + + + bSizer24->Add( 0, 5, 0, wxEXPAND, 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_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_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_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 ); - - - bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); - - 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 ); - - - bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); - - bSizer24->Add( bSizer41, 0, 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, wxALL|wxALIGN_CENTER_VERTICAL, 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, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); - - m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); - m_textCtrlMessage->SetBackgroundColour( wxColour( 208, 208, 208 ) ); - - bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 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 ); + + + bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); + + 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 ); + + + bSizer41->Add( 0, 0, 1, wxEXPAND, 5 ); + + bSizer24->Add( bSizer41, 0, 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, wxALL|wxALIGN_CENTER_VERTICAL, 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, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer24->Add( bSizer99, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 10 ); + + m_textCtrlMessage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlMessage->SetBackgroundColour( wxColour( 208, 208, 208 ) ); + + bSizer24->Add( m_textCtrlMessage, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 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( wxDefaultSize, 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 ); - - m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText44->Wrap( 400 ); - bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_bpButtonHelp = new wxBitmapButton( this, wxID_HELP, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW ); - m_bpButtonHelp->SetToolTip( _("Help") ); - - m_bpButtonHelp->SetToolTip( _("Help") ); - - bSizer70->Add( m_bpButtonHelp, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - bSizer21->Add( bSizer70, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 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 ); - - wxStaticBoxSizer* sbSizer8; - sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - wxFlexGridSizer* fgSizer3; - fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer3->AddGrowableCol( 1 ); - fgSizer3->AddGrowableRow( 1 ); - fgSizer3->SetFlexibleDirection( wxBOTH ); - fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - m_staticText15->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer3->Add( m_staticText15, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - fgSizer3->Add( m_bitmap8, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); - fgSizer3->Add( m_textCtrlInclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - sbSizer8->Add( fgSizer3, 1, wxEXPAND, 5 ); - - wxFlexGridSizer* fgSizer4; - fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer4->AddGrowableCol( 1 ); - fgSizer4->AddGrowableRow( 1 ); - fgSizer4->SetFlexibleDirection( wxBOTH ); - fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - m_staticText16->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); - - fgSizer4->Add( m_staticText16, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); - fgSizer4->Add( m_bitmap9, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); - fgSizer4->Add( m_textCtrlExclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - sbSizer8->Add( fgSizer4, 1, wxEXPAND, 5 ); - - bSizer21->Add( sbSizer8, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - bSizer21->Add( 0, 0, 0, 0, 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, wxALL|wxALIGN_CENTER_VERTICAL, 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_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( wxDefaultSize, 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 ); + + m_staticText44 = new wxStaticText( this, wxID_ANY, _("Only files/directories that pass filtering will be selected for synchronization. The filter will be applied to the name relative(!) to the base synchronization directories."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText44->Wrap( 400 ); + bSizer70->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 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, 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 ); + + wxStaticBoxSizer* sbSizer8; + sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer3; + fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer3->AddGrowableCol( 1 ); + fgSizer3->AddGrowableRow( 1 ); + fgSizer3->SetFlexibleDirection( wxBOTH ); + fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + m_staticText15->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer3->Add( m_staticText15, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bitmap8 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + fgSizer3->Add( m_bitmap8, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_textCtrlInclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + fgSizer3->Add( m_textCtrlInclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer8->Add( fgSizer3, 1, wxEXPAND, 5 ); + + wxFlexGridSizer* fgSizer4; + fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer4->AddGrowableCol( 1 ); + fgSizer4->AddGrowableRow( 1 ); + fgSizer4->SetFlexibleDirection( wxBOTH ); + fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + + fgSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, _("Exclude"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + m_staticText16->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) ); + + fgSizer4->Add( m_staticText16, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_bitmap9 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 ); + fgSizer4->Add( m_bitmap9, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlExclude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + fgSizer4->Add( m_textCtrlExclude, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + sbSizer8->Add( fgSizer4, 1, wxEXPAND, 5 ); + + bSizer21->Add( sbSizer8, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + bSizer21->Add( 0, 0, 0, 0, 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, wxALL|wxALIGN_CENTER_VERTICAL, 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_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_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_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") ); - - 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") ); - - 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, wxALL, 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, wxALL, 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, 10, 0, 0, 5 ); - - wxStaticBoxSizer* sbSizer23; - sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights)") ); - - sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 ); - - m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy filesystem permissions"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and directory permissions\n(Requires Administrator rights)") ); - - sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 ); - - m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizer23->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); - - 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 wxButtonWithImage( 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|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - sbSizer23->Add( bSizer101, 0, wxEXPAND, 5 ); - - bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - bSizer95->Add( 0, 10, 0, 0, 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, 129 ); - m_gridCustomCommand->SetColSize( 1, 179 ); - 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, wxALL, 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, 10, 0, 0, 5 ); + + wxStaticBoxSizer* sbSizer23; + sbSizer23 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); + + m_checkBoxCopyLocked = new wxCheckBox( this, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using Volume Shadow Copy Service\n(Requires Administrator rights)") ); + + sbSizer23->Add( m_checkBoxCopyLocked, 0, wxALL|wxEXPAND, 5 ); + + m_checkBoxCopyPermissions = new wxCheckBox( this, wxID_ANY, _("Copy filesystem permissions"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and directory permissions\n(Requires Administrator rights)") ); + + sbSizer23->Add( m_checkBoxCopyPermissions, 0, wxALL|wxEXPAND, 5 ); + + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + sbSizer23->Add( m_staticline10, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); + + 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 wxButtonWithImage( 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|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + sbSizer23->Add( bSizer101, 0, wxEXPAND, 5 ); + + bSizer95->Add( sbSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + bSizer95->Add( 0, 10, 0, 0, 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, 129 ); + m_gridCustomCommand->SetColSize( 1, 179 ); + 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, wxALL, 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 wxButtonWithImage( 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( 4, 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 ); - m_textCtrlCreateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - m_textCtrlUpdateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - m_textCtrlDeleteL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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( 3, 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 ); - m_textCtrlCreateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - m_textCtrlUpdateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 ); - m_textCtrlDeleteR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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_READONLY ); - m_textCtrlData->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); - 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 wxButtonWithImage( 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( 4, 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 ); + m_textCtrlCreateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + m_textCtrlUpdateL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + m_textCtrlDeleteL->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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( 3, 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 ); + m_textCtrlCreateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + m_textCtrlUpdateR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); + m_textCtrlDeleteR->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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_READONLY ); + m_textCtrlData->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) ); + 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 ); - this->SetBackgroundColour( wxColour( 255, 255, 255 ) ); - - 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() @@ -3735,67 +3695,67 @@ 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, 10, 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, 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, wxALL|wxEXPAND, 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|wxEXPAND, 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, 10, 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, 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, wxALL|wxEXPAND, 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|wxEXPAND, 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 ); + } diff --git a/ui/gui_generated.h b/ui/gui_generated.h index 7e7a6b20..4a70820a 100644 --- a/ui/gui_generated.h +++ b/ui/gui_generated.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 17 2010) +// C++ code generated with wxFormBuilder (version Mar 22 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -14,6 +14,7 @@ class CustomComboBox; class CustomGridLeft; class CustomGridMiddle; class CustomGridRight; +class FfsDirPickerCtrl; class ToggleButton; class wxButtonWithImage; @@ -53,1049 +54,1053 @@ class wxButtonWithImage; #include <wx/hyperlink.h> #include <wx/checklst.h> +#include "../shared/i18n.h" + /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /// 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; - - wxButtonWithImage* m_buttonCompare; - wxButton* m_buttonAbort; - wxBitmapButton* m_bpButtonCmpConfig; - - - wxStaticText* m_staticTextSyncVariant; - wxBitmapButton* m_bpButtonSyncConfig; - wxButtonWithImage* m_buttonStartSync; - - wxPanel* m_panelDirectoryPairs; - wxStaticBoxSizer* sbSizerDirLeft; - wxPanel* m_panelTopMiddle; - - wxBitmapButton* m_bpButtonSwapSides; - - - - wxStaticBoxSizer* sbSizerDirRight; - wxBitmapButton* m_bpButtonAddPair; - 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; - - wxStaticText* m_staticTextStatusLeft; - - wxStaticLine* m_staticline9; - - wxStaticText* m_staticTextStatusMiddle; - - wxStaticLine* m_staticline10; - - wxStaticText* m_staticTextStatusRight; - - 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 OnDirSelected( wxFileDirPickerEvent& event ) { event.Skip(); } - virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); } - virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } - virtual void OnLeftGridDoubleClick( wxGridEvent& event ) { event.Skip(); } - virtual void 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; - CustomComboBox* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - wxPanel* m_panelTopRight; - wxBitmapButton* m_bpButtonRemovePair; - CustomComboBox* m_directoryRight; - wxDirPickerCtrl* 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_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; + + wxButtonWithImage* m_buttonCompare; + wxButton* m_buttonAbort; + wxBitmapButton* m_bpButtonCmpConfig; + + + wxStaticText* m_staticTextSyncVariant; + wxBitmapButton* m_bpButtonSyncConfig; + wxButtonWithImage* m_buttonStartSync; + + wxPanel* m_panelDirectoryPairs; + wxStaticBoxSizer* sbSizerDirLeft; + wxPanel* m_panelTopMiddle; + + wxBitmapButton* m_bpButtonSwapSides; + + + + wxStaticBoxSizer* sbSizerDirRight; + wxBitmapButton* m_bpButtonAddPair; + 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; + + wxStaticText* m_staticTextStatusLeft; + + wxStaticLine* m_staticline9; + + wxStaticText* m_staticTextStatusMiddle; + + wxStaticLine* m_staticline10; + + wxStaticText* m_staticTextStatusRight; + + 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 OnDirSelected( wxFileDirPickerEvent& event ) { event.Skip(); } + virtual void OnSwapSides( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAddFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRemoveTopFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void OnLeftGridDoubleClick( wxGridEvent& event ) { event.Skip(); } + virtual void 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; + CustomComboBox* m_directoryLeft; + FfsDirPickerCtrl* m_dirPickerLeft; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + wxPanel* m_panelTopRight; + wxBitmapButton* m_bpButtonRemovePair; + CustomComboBox* m_directoryRight; + FfsDirPickerCtrl* 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(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class FolderPairGenerated /////////////////////////////////////////////////////////////////////////////// -class FolderPairGenerated : public wxPanel +class FolderPairGenerated : public wxPanel { -private: - -protected: - - - - -public: - wxPanel* m_panelLeft; - wxTextCtrl* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxPanel* m_panel20; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonAltSyncCfg; - wxPanel* m_panelRight; - wxBitmapButton* m_bpButtonRemovePair; - wxTextCtrl* m_directoryRight; - wxDirPickerCtrl* 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; + wxTextCtrl* m_directoryLeft; + FfsDirPickerCtrl* m_dirPickerLeft; + wxPanel* m_panel20; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonAltSyncCfg; + wxPanel* m_panelRight; + wxBitmapButton* m_bpButtonRemovePair; + wxTextCtrl* m_directoryRight; + FfsDirPickerCtrl* 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 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; - wxTextCtrl* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxBitmapButton* m_bpButtonLocalFilter; - wxTextCtrl* m_directoryRight; - wxDirPickerCtrl* m_dirPickerRight; - 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; + wxTextCtrl* m_directoryLeft; + FfsDirPickerCtrl* m_dirPickerLeft; + wxBitmapButton* m_bpButtonLocalFilter; + wxTextCtrl* m_directoryRight; + FfsDirPickerCtrl* m_dirPickerRight; + 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 BatchDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class BatchDlgGenerated : public wxDialog +class BatchDlgGenerated : public wxDialog { -private: - -protected: - wxBoxSizer* bSizer69; - wxStaticBitmap* m_bitmap27; - wxPanel* m_panel8; - wxStaticText* m_staticText56; - - - wxStaticText* m_staticText44; - wxBitmapButton* m_bpButtonHelp; - - wxStaticLine* m_staticline10; - wxStaticText* m_staticText531; - wxNotebook* m_notebookSettings; - 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; - - - wxCheckBox* m_checkBoxSilent; - - wxChoice* m_choiceHandleError; - wxPanel* m_panelLogging; - wxStaticText* m_staticText120; - wxTextCtrl* m_textCtrlLogfileDir; - wxDirPickerCtrl* m_dirPickerLogfileDir; - wxStaticText* m_staticText96; - - wxSpinCtrl* m_spinCtrlLogCountMax; - 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 OnCheckSilent( 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; - wxTextCtrl* m_directoryLeft; - wxDirPickerCtrl* m_dirPickerLeft; - wxBitmapButton* m_bpButtonLocalFilter; - wxPanel* m_panelRight; - wxTextCtrl* m_directoryRight; - wxDirPickerCtrl* m_dirPickerRight; - wxBitmapButton* m_bpButtonAltSyncCfg; - - 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: + wxBoxSizer* bSizer69; + wxStaticBitmap* m_bitmap27; + wxPanel* m_panel8; + wxStaticText* m_staticText56; + + + wxStaticText* m_staticText44; + wxBitmapButton* m_bpButtonHelp; + + wxStaticLine* m_staticline10; + wxStaticText* m_staticText531; + wxNotebook* m_notebookSettings; + 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; + + + wxCheckBox* m_checkBoxSilent; + + wxChoice* m_choiceHandleError; + wxPanel* m_panelLogging; + wxStaticText* m_staticText120; + wxStaticBoxSizer* sbSizerLogfileDir; + wxTextCtrl* m_textCtrlLogfileDir; + FfsDirPickerCtrl* m_dirPickerLogfileDir; + wxStaticText* m_staticText96; + + wxSpinCtrl* m_spinCtrlLogCountMax; + 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 OnCheckSilent( 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; + wxTextCtrl* m_directoryLeft; + FfsDirPickerCtrl* m_dirPickerLeft; + wxBitmapButton* m_bpButtonLocalFilter; + wxPanel* m_panelRight; + wxTextCtrl* m_directoryRight; + FfsDirPickerCtrl* m_dirPickerRight; + wxBitmapButton* m_bpButtonAltSyncCfg; + + 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 CompareStatusGenerated /////////////////////////////////////////////////////////////////////////////// -class CompareStatusGenerated : public wxPanel +class CompareStatusGenerated : public wxPanel { -private: - -protected: - - 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_staticTextTimeRemaining; - - wxBoxSizer* sSizerTimeElapsed; - wxStaticText* m_staticTextTimeElapsed; - wxStaticText* m_staticText30; - wxTextCtrl* m_textCtrlStatus; - wxGauge* m_gauge2; - - -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: + + 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_staticTextTimeRemaining; + + wxBoxSizer* sSizerTimeElapsed; + wxStaticText* m_staticTextTimeElapsed; + wxStaticText* m_staticText30; + wxTextCtrl* m_textCtrlStatus; + wxGauge* m_gauge2; + + + 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 SyncCfgDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class SyncCfgDlgGenerated : public wxDialog +class SyncCfgDlgGenerated : public wxDialog { -private: - -protected: - wxStaticText* m_staticText1; - 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; - - wxStaticText* m_staticText23; - - wxStaticText* m_staticText9; - - wxBoxSizer* bSizer201; - wxStaticBoxSizer* sbSizerErrorHandling; - wxChoice* m_choiceHandleError; - wxChoice* m_choiceHandleDeletion; - wxPanel* m_panelCustomDeletionDir; - wxTextCtrl* m_textCtrlCustomDelFolder; - wxDirPickerCtrl* m_dirPickerCustomDelFolder; - - wxButton* m_buttonOK; - wxButton* m_button16; - - - wxStaticBoxSizer* sbSizerSyncDirections; - wxStaticText* m_staticText21; - wxStaticText* m_staticText31; - wxStaticLine* m_staticline3; - wxStaticBitmap* m_bitmapLeftOnly; - - wxBitmapButton* m_bpButtonLeftOnly; - wxStaticBitmap* m_bitmapRightOnly; - - wxBitmapButton* m_bpButtonRightOnly; - wxStaticBitmap* m_bitmapLeftNewer; - - wxBitmapButton* m_bpButtonLeftNewer; - wxStaticBitmap* m_bitmapRightNewer; - - wxBitmapButton* m_bpButtonRightNewer; - wxStaticBitmap* m_bitmapDifferent; - - wxBitmapButton* m_bpButtonDifferent; - wxStaticBitmap* m_bitmapConflict; - - wxBitmapButton* m_bpButtonConflict; - - // 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 OnSyncLeftToRight( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); } - virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } - virtual void OnChangeDeletionHandling( wxCommandEvent& event ) { event.Skip(); } - virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancel( 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(); } - - -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: + wxStaticText* m_staticText1; + 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; + + wxStaticText* m_staticText23; + + wxStaticText* m_staticText9; + + wxBoxSizer* bSizer201; + wxStaticBoxSizer* sbSizerErrorHandling; + wxChoice* m_choiceHandleError; + wxStaticBoxSizer* sbSizerCustDelDir; + wxChoice* m_choiceHandleDeletion; + wxPanel* m_panelCustomDeletionDir; + wxTextCtrl* m_textCtrlCustomDelFolder; + FfsDirPickerCtrl* m_dirPickerCustomDelFolder; + + wxButton* m_buttonOK; + wxButton* m_button16; + + + wxStaticBoxSizer* sbSizerSyncDirections; + wxStaticText* m_staticText21; + wxStaticText* m_staticText31; + wxStaticLine* m_staticline3; + wxStaticBitmap* m_bitmapLeftOnly; + + wxBitmapButton* m_bpButtonLeftOnly; + wxStaticBitmap* m_bitmapRightOnly; + + wxBitmapButton* m_bpButtonRightOnly; + wxStaticBitmap* m_bitmapLeftNewer; + + wxBitmapButton* m_bpButtonLeftNewer; + wxStaticBitmap* m_bitmapRightNewer; + + wxBitmapButton* m_bpButtonRightNewer; + wxStaticBitmap* m_bitmapDifferent; + + wxBitmapButton* m_bpButtonDifferent; + wxStaticBitmap* m_bitmapConflict; + + wxBitmapButton* m_bpButtonConflict; + + // 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 OnSyncLeftToRight( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncUpdate( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSyncCustom( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeDeletionHandling( wxCommandEvent& event ) { event.Skip(); } + virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancel( 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(); } + + + 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; - wxStaticLine* m_staticline14; - wxBitmapButton* m_bpButtonHelp; - - wxChoice* m_choiceHandleSymlinks; - 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 OnContent( wxCommandEvent& event ) { event.Skip(); } - virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } - virtual void OnChangeErrorHandling( 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; + wxStaticLine* m_staticline14; + wxBitmapButton* m_bpButtonHelp; + + wxChoice* m_choiceHandleSymlinks; + 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 OnContent( wxCommandEvent& event ) { event.Skip(); } + virtual void OnShowHelp( wxCommandEvent& event ) { event.Skip(); } + virtual void OnChangeErrorHandling( 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: - - - wxStaticBitmap* m_bitmapStatus; - wxStaticText* m_staticTextStatus; - wxAnimationCtrl* m_animationControl1; - - wxBoxSizer* bSizer31; - wxBoxSizer* bSizerObjectsRemaining; - wxStaticText* m_staticText25; - wxStaticText* m_staticTextRemainingObj; - wxStaticText* m_staticText96; - wxStaticText* m_staticTextDataRemaining; - wxStaticText* m_staticText97; - wxBoxSizer* bSizerObjectsProcessed; - wxStaticText* m_staticText251; - wxStaticText* m_staticTextProcessedObj; - wxStaticText* m_staticText98; - wxStaticText* m_staticTextDataProcessed; - wxStaticText* m_staticText99; - - wxStaticText* m_staticText55; - wxStaticText* m_staticTextTimeElapsed; - wxBoxSizer* bSizerProgressText; - wxTextCtrl* m_textCtrlInfo; - wxBoxSizer* bSizer28; - wxBoxSizer* bSizerSpeed; - wxStaticText* m_staticText108; - wxStaticText* m_staticTextSpeed; - - - wxButton* m_buttonOK; - wxButton* m_buttonPause; - wxButton* m_buttonAbort; - - wxBoxSizer* bSizerRemTime; - - wxStaticText* m_staticText21; - wxStaticText* m_staticTextTimeRemaining; - - - // 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( 638,350 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - - ~SyncStatusDlgGenerated(); - + private: + + protected: + + + wxStaticBitmap* m_bitmapStatus; + wxStaticText* m_staticTextStatus; + wxAnimationCtrl* m_animationControl1; + + wxBoxSizer* bSizer31; + wxBoxSizer* bSizerObjectsRemaining; + wxStaticText* m_staticText25; + wxStaticText* m_staticTextRemainingObj; + wxStaticText* m_staticText96; + wxStaticText* m_staticTextDataRemaining; + wxStaticText* m_staticText97; + wxBoxSizer* bSizerObjectsProcessed; + wxStaticText* m_staticText251; + wxStaticText* m_staticTextProcessedObj; + wxStaticText* m_staticText98; + wxStaticText* m_staticTextDataProcessed; + wxStaticText* m_staticText99; + + wxStaticText* m_staticText55; + wxStaticText* m_staticTextTimeElapsed; + wxBoxSizer* bSizerProgressText; + wxTextCtrl* m_textCtrlInfo; + wxBoxSizer* bSizer28; + wxBoxSizer* bSizerSpeed; + wxStaticText* m_staticText108; + wxStaticText* m_staticTextSpeed; + + + wxButton* m_buttonOK; + wxButton* m_buttonPause; + wxButton* m_buttonAbort; + + wxBoxSizer* bSizerRemTime; + + wxStaticText* m_staticText21; + wxStaticText* m_staticTextTimeRemaining; + + + // 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( 638,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 HelpDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class HelpDlgGenerated : public wxDialog +class HelpDlgGenerated : public wxDialog { -private: - -protected: - - wxStaticBitmap* m_bitmap25; - wxPanel* m_panel8; - - wxStaticText* m_staticText56; - - - wxNotebook* m_notebook1; - wxScrolledWindow* m_scrolledWindow1; - wxStaticText* m_staticText59; - wxStaticText* m_staticText60; - wxStaticText* m_staticText61; - wxTreeCtrl* m_treeCtrl1; - wxStaticText* m_staticText63; - wxStaticText* m_staticText75; - wxStaticText* m_staticText76; - wxStaticText* m_staticText77; - wxStaticText* m_staticText79; - wxStaticText* m_staticText80; - wxStaticText* m_staticText78; - wxScrolledWindow* m_scrolledWindow5; - wxStaticText* m_staticText65; - wxStaticText* m_staticText66; - wxTreeCtrl* m_treeCtrl2; - wxStaticText* m_staticText69; - wxStaticText* m_staticText81; - wxStaticText* m_staticText82; - wxStaticText* m_staticText83; - wxStaticText* m_staticText84; - wxButton* m_button8; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } - - -public: - - HelpDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 579,543 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~HelpDlgGenerated(); - + private: + + protected: + + wxStaticBitmap* m_bitmap25; + wxPanel* m_panel8; + + wxStaticText* m_staticText56; + + + wxNotebook* m_notebook1; + wxScrolledWindow* m_scrolledWindow1; + wxStaticText* m_staticText59; + wxStaticText* m_staticText60; + wxStaticText* m_staticText61; + wxTreeCtrl* m_treeCtrl1; + wxStaticText* m_staticText63; + wxStaticText* m_staticText75; + wxStaticText* m_staticText76; + wxStaticText* m_staticText77; + wxStaticText* m_staticText79; + wxStaticText* m_staticText80; + wxStaticText* m_staticText78; + wxScrolledWindow* m_scrolledWindow5; + wxStaticText* m_staticText65; + wxStaticText* m_staticText66; + wxTreeCtrl* m_treeCtrl2; + wxStaticText* m_staticText69; + wxStaticText* m_staticText81; + wxStaticText* m_staticText82; + wxStaticText* m_staticText83; + wxStaticText* m_staticText84; + wxButton* m_button8; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } + + + public: + + HelpDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 579,543 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~HelpDlgGenerated(); + }; /////////////////////////////////////////////////////////////////////////////// /// Class AboutDlgGenerated /////////////////////////////////////////////////////////////////////////////// -class AboutDlgGenerated : public wxDialog +class AboutDlgGenerated : public wxDialog { -private: - -protected: - - wxPanel* m_panel5; - wxStaticBitmap* m_bitmap11; - wxStaticText* m_build; - - wxScrolledWindow* m_scrolledWindowCodeInfo; - wxBoxSizer* bSizerCodeInfo; - wxStaticText* m_staticText72; - wxStaticText* m_staticText73; - 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; + + wxScrolledWindow* m_scrolledWindowCodeInfo; + wxBoxSizer* bSizerCodeInfo; + wxStaticText* m_staticText72; + wxStaticText* m_staticText73; + 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(); + }; /////////////////////////////////////////////////////////////////////////////// /// 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 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 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; - - wxCheckBox* m_checkBoxDeleteBothSides; - - wxCheckBox* m_checkBoxUseRecycler; - wxTextCtrl* m_textCtrlMessage; - 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; + + wxCheckBox* m_checkBoxDeleteBothSides; + + wxCheckBox* m_checkBoxUseRecycler; + wxTextCtrl* m_textCtrlMessage; + 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; - - wxStaticText* m_staticText15; - wxStaticBitmap* m_bitmap8; - wxTextCtrl* m_textCtrlInclude; - - wxStaticText* m_staticText16; - wxStaticBitmap* m_bitmap9; - wxTextCtrl* m_textCtrlExclude; - - 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 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; + + wxStaticText* m_staticText15; + wxStaticBitmap* m_bitmap8; + wxTextCtrl* m_textCtrlInclude; + + wxStaticText* m_staticText16; + wxStaticBitmap* m_bitmap9; + wxTextCtrl* m_textCtrlExclude; + + 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 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_checkBoxCopyLocked; - wxCheckBox* m_checkBoxCopyPermissions; - wxStaticLine* m_staticline10; - wxStaticText* m_staticText100; - - wxButtonWithImage* 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_checkBoxCopyLocked; + wxCheckBox* m_checkBoxCopyPermissions; + wxStaticLine* m_staticline10; + wxStaticText* m_staticText100; + + wxButtonWithImage* 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: - wxButtonWithImage* 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: + wxButtonWithImage* 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(); + }; #endif //__gui_generated__ diff --git a/ui/main_dlg.cpp b/ui/main_dlg.cpp index 97093e7b..d394b9fe 100644 --- a/ui/main_dlg.cpp +++ b/ui/main_dlg.cpp @@ -5,17 +5,23 @@ // ************************************************************************** // #include "main_dlg.h" -#include <wx/filename.h> +#include <iterator> #include <stdexcept> -#include "../shared/system_constants.h" #include <wx/clipbrd.h> #include <wx/dataobj.h> -#include <iterator> #include <wx/ffile.h> +#include <wx/imaglist.h> +#include <wx/wupdlock.h> +#include <wx/msgdlg.h> +#include <wx/sound.h> +#include <wx/display.h> +#include <wx/app.h> +#include <boost/bind.hpp> +#include "../shared/system_constants.h" #include "../library/custom_grid.h" #include "../shared/custom_button.h" #include "../shared/custom_combo_box.h" -#include <wx/msgdlg.h> +#include "../shared/dir_picker_i18n.h" #include "../comparison.h" #include "../synchronization.h" #include "../algorithm.h" @@ -24,7 +30,7 @@ #include "check_version.h" #include "gui_status_handler.h" #include "sync_cfg.h" -#include "../shared/localization.h" +#include "../shared/i18n.h" #include "../shared/string_conv.h" #include "small_dlgs.h" #include "../shared/mouse_move_dlg.h" @@ -33,26 +39,21 @@ #include "../shared/dir_name.h" #include "../library/filter.h" #include "../structures.h" -#include <wx/imaglist.h> -#include <wx/wupdlock.h> #include "grid_view.h" #include "../library/resources.h" #include "../shared/file_handling.h" +#include "../shared/resolve_path.h" #include "../shared/recycler.h" #include "../shared/xml_base.h" #include "../shared/standard_paths.h" #include "../shared/toggle_button.h" #include "folder_pair.h" #include "../shared/global_func.h" -#include <wx/sound.h> #include "search.h" #include "../shared/help_provider.h" #include "is_null_filter.h" #include "batch_config.h" #include "../shared/check_exist.h" -#include <wx/display.h> -#include <wx/app.h> -#include <boost/bind.hpp> using namespace ffs3; using ffs3::CustomLocale; @@ -73,11 +74,11 @@ class DirectoryNameMainImpl : public DirectoryNameMainDlg { public: DirectoryNameMainImpl(MainDialog& mainDlg, - wxWindow* dropWindow1, - wxWindow* dropWindow2, - wxDirPickerCtrl* dirPicker, - wxComboBox* dirName, - wxStaticBoxSizer* staticBox) : + wxWindow& dropWindow1, + wxWindow& dropWindow2, + wxDirPickerCtrl& dirPicker, + wxComboBox& dirName, + wxStaticBoxSizer& staticBox) : DirectoryNameMainDlg(dropWindow1, dropWindow2, dirPicker, dirName, staticBox), mainDlg_(mainDlg) {} @@ -217,8 +218,8 @@ public: DirectoryPair(wxWindow* parent, MainDialog& mainDialog) : FolderPairGenerated(parent), FolderPairCallback<FolderPairGenerated>(static_cast<FolderPairGenerated&>(*this), mainDialog), //pass FolderPairGenerated part... - dirNameLeft( m_panelLeft, m_dirPickerLeft, m_directoryLeft), - dirNameRight(m_panelRight, m_dirPickerRight, m_directoryRight) {} + dirNameLeft (*m_panelLeft, *m_dirPickerLeft, *m_directoryLeft), + dirNameRight(*m_panelRight, *m_dirPickerRight, *m_directoryRight) {} void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) { @@ -250,17 +251,17 @@ public: //prepare drag & drop dirNameLeft(mainDialog, - mainDialog.m_panelLeft, - mainDialog.m_panelTopLeft, - mainDialog.m_dirPickerLeft, - mainDialog.m_directoryLeft, - mainDialog.sbSizerDirLeft), + *mainDialog.m_panelLeft, + *mainDialog.m_panelTopLeft, + *mainDialog.m_dirPickerLeft, + *mainDialog.m_directoryLeft, + *mainDialog.sbSizerDirLeft), dirNameRight(mainDialog, - mainDialog.m_panelRight, - mainDialog.m_panelTopRight, - mainDialog.m_dirPickerRight, - mainDialog.m_directoryRight, - mainDialog.sbSizerDirRight) {} + *mainDialog.m_panelRight, + *mainDialog.m_panelTopRight, + *mainDialog.m_dirPickerRight, + *mainDialog.m_directoryRight, + *mainDialog.sbSizerDirRight) {} void setValues(const Zstring& leftDir, const Zstring& rightDir, AltSyncCfgPtr syncCfg, const FilterConfig& filter) { @@ -380,7 +381,7 @@ MainDialog::MainDialog(const wxString& cfgFileName, xmlAccess::XmlGlobalSettings wxString currentConfigFile = cfgFileName; //this one has priority if (currentConfigFile.empty()) currentConfigFile = settings.gui.lastUsedConfigFile; //next: suggest name of last used selection - if (currentConfigFile.empty() || !fileExists(wxToZ(currentConfigFile))) currentConfigFile = lastConfigFileName(); //if above fails... + if (currentConfigFile.empty() || !fileExists(wxToZ(currentConfigFile))) currentConfigFile = lastRunConfigName(); //if above fails... bool loadCfgSuccess = false; if (!cfgFileName.empty() || fileExists(wxToZ(currentConfigFile))) @@ -439,8 +440,10 @@ 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_panelViewFilter ->SetLayoutDirection(wxLayout_LeftToRight); + m_panelStatusBar ->SetLayoutDirection(wxLayout_LeftToRight); + m_panelGrids ->SetLayoutDirection(wxLayout_LeftToRight); + m_panelDirectoryPairs->SetLayoutDirection(wxLayout_LeftToRight); //------------------------------------------------------------------------------------------------------ //---------------- support for dockable gui style -------------------------------- @@ -458,7 +461,7 @@ 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_buttonCompare->GetSize().GetHeight() - 5)); + wxAuiPaneInfo().Name(wxT("Panel1")).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) @@ -568,7 +571,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, #endif //create language selection menu - for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::getMapping().begin(); i != LocalizationInfo::getMapping().end(); ++i) + for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::get().begin(); i != LocalizationInfo::get().end(); ++i) { wxMenuItem* newItem = new wxMenuItem(m_menuLanguages, wxID_ANY, i->languageName, wxEmptyString, wxITEM_NORMAL ); newItem->SetBitmap(GlobalResources::instance().getImage(i->languageFlag)); @@ -588,6 +591,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, //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 Connect(wxEVT_IDLE, wxEventHandler(MainDialog::OnIdleEvent), NULL, this); @@ -646,7 +650,7 @@ void MainDialog::init(const xmlAccess::XmlGuiConfig guiCfg, } //---------------------------------------------------------------------------------------------------------------------------------------------------------------- - addFileToCfgHistory(lastConfigFileName()); //make sure <Last session> is always part of history list + addFileToCfgHistory(lastRunConfigName()); //make sure <Last session> is always part of history list } @@ -657,7 +661,9 @@ void MainDialog::cleanUp(bool saveLastUsedConfig) cleanedUp = true; //important! event source wxTheApp is NOT dependent on this instance -> disconnect! - wxTheApp->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this); + wxTheApp->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this); + wxTheApp->Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(MainDialog::OnGlobalKeyEvent), NULL, this); + //no need for wxEventHandler::Disconnect() here; event sources are components of this window and are destroyed, too @@ -669,7 +675,7 @@ void MainDialog::cleanUp(bool saveLastUsedConfig) //save configuration if (saveLastUsedConfig) - writeConfigurationToXml(lastConfigFileName()); //don't throw exceptions in destructors + writeConfigurationToXml(lastRunConfigName()); //don't throw exceptions in destructors } } @@ -791,12 +797,13 @@ void MainDialog::setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, void MainDialog::filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTable, int leadingRow) { - if (rowsToFilterOnUiTable.size() > 0) + 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(); @@ -829,7 +836,7 @@ void MainDialog::OnIdleEvent(wxEvent& event) stackObjects.pop(); if (stackObjects.empty()) - m_staticTextStatusMiddle->SetForegroundColour(*wxBLACK); //reset color + m_staticTextStatusMiddle->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); //reset color m_panelStatusBar->Layout(); } @@ -839,31 +846,33 @@ void MainDialog::OnIdleEvent(wxEvent& event) } -void MainDialog::copySelectionToClipboard(const CustomGrid* selectedGrid) +void MainDialog::copySelectionToClipboard(CustomGrid& selectedGrid) { - const std::set<size_t> selectedRows = getSelectedRows(selectedGrid); + const std::set<size_t> selectedRows = getSelectedRows(&selectedGrid); if (selectedRows.size() > 0) { - wxString clipboardString; + zxString clipboardString; //perf: wxString doesn't model exponential growth and so is out + + const int colCount = selectedGrid.GetNumberCols(); for (std::set<size_t>::const_iterator i = selectedRows.begin(); i != selectedRows.end(); ++i) { - for (int k = 0; k < const_cast<CustomGrid*>(selectedGrid)->GetNumberCols(); ++k) + for (int k = 0; k < colCount; ++k) { - clipboardString+= const_cast<CustomGrid*>(selectedGrid)->GetCellValue(static_cast<int>(*i), k); - if (k != const_cast<CustomGrid*>(selectedGrid)->GetNumberCols() - 1) - clipboardString+= '\t'; + clipboardString += wxToZx(selectedGrid.GetCellValue(static_cast<int>(*i), k)); + if (k != colCount - 1) + clipboardString += wxT('\t'); } - clipboardString+= '\n'; + clipboardString += wxT('\n'); } - if (!clipboardString.IsEmpty()) + 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(clipboardString) ); + wxTheClipboard->SetData(new wxTextDataObject(zxToWx(clipboardString))); wxTheClipboard->Close(); } } @@ -906,11 +915,13 @@ public: //register abort button mainDlg->m_buttonAbort->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ManualDeletionHandler::OnAbortCompare ), NULL, this ); + mainDlg->Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(ManualDeletionHandler::OnKeyPressed), NULL, this); } ~ManualDeletionHandler() { //de-register abort button + mainDlg->Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(ManualDeletionHandler::OnKeyPressed), NULL, this); mainDlg->m_buttonAbort->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ManualDeletionHandler::OnAbortCompare ), NULL, this ); mainDlg->enableAllElements(); @@ -954,9 +965,11 @@ public: statusMessage.Replace(wxT("%x"), ffs3::numberToStringSep(deletionCount), false); statusMessage.Replace(wxT("%y"), ffs3::numberToStringSep(totalObjToDelete), false); - mainDlg->m_staticTextStatusMiddle->SetLabel(statusMessage); - mainDlg->m_panelStatusBar->Layout(); - + if (mainDlg->m_staticTextStatusMiddle->GetLabel() != statusMessage) + { + mainDlg->m_staticTextStatusMiddle->SetLabel(statusMessage); + mainDlg->m_panelStatusBar->Layout(); + } updateUiNow(); } @@ -970,6 +983,16 @@ private: abortRequested = true; //don't throw exceptions in a GUI-Callback!!! (throw ffs3::AbortThisProcess()) } + void OnKeyPressed(wxKeyEvent& event) + { + const int keyCode = event.GetKeyCode(); + if (keyCode == WXK_ESCAPE) + abortRequested = true; //don't throw exceptions in a GUI-Callback!!! (throw ffs3::AbortThisProcess()) + + event.Skip(); + } + + MainDialog* const mainDlg; const size_t totalObjToDelete; @@ -1169,23 +1192,23 @@ void MainDialog::clearStatusBar() while (stackObjects.size() > 0) stackObjects.pop(); - m_staticTextStatusMiddle->SetForegroundColour(*wxBLACK); //reset color - m_staticTextStatusLeft->SetLabel(wxEmptyString); + m_staticTextStatusMiddle->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); //reset color + m_staticTextStatusLeft ->SetLabel(wxEmptyString); m_staticTextStatusMiddle->SetLabel(wxEmptyString); - m_staticTextStatusRight->SetLabel(wxEmptyString); + m_staticTextStatusRight ->SetLabel(wxEmptyString); } void MainDialog::disableAllElements() { //disenables all elements (except abort button) that might receive user input during long-running processes: comparison, deletion - m_panelViewFilter ->Disable(); - m_bpButtonCmpConfig ->Disable(); - m_panelFilter ->Disable(); - m_panelConfig ->Disable(); - m_bpButtonSyncConfig->Disable(); - m_buttonStartSync ->Disable(); - m_panelGrids ->Disable(); + m_panelViewFilter ->Disable(); + m_bpButtonCmpConfig ->Disable(); + m_panelFilter ->Disable(); + m_panelConfig ->Disable(); + m_bpButtonSyncConfig ->Disable(); + m_buttonStartSync ->Disable(); + m_panelGrids ->Disable(); m_panelDirectoryPairs->Disable(); m_menubar1->EnableTop(0, false); m_menubar1->EnableTop(1, false); @@ -1207,13 +1230,13 @@ void MainDialog::disableAllElements() void MainDialog::enableAllElements() { - m_panelViewFilter ->Enable(); - m_bpButtonCmpConfig ->Enable(); - m_panelFilter ->Enable(); - m_panelConfig ->Enable(); - m_bpButtonSyncConfig->Enable(); - m_buttonStartSync ->Enable(); - m_panelGrids ->Enable(); + m_panelViewFilter ->Enable(); + m_bpButtonCmpConfig ->Enable(); + m_panelFilter ->Enable(); + m_panelConfig ->Enable(); + m_bpButtonSyncConfig ->Enable(); + m_buttonStartSync ->Enable(); + m_panelGrids ->Enable(); m_panelDirectoryPairs->Enable(); m_menubar1->EnableTop(0, true); m_menubar1->EnableTop(1, true); @@ -1326,7 +1349,7 @@ void MainDialog::onGridLeftButtonEvent(wxKeyEvent& event) { case 'C': case WXK_INSERT: //CTRL + C || CTRL + INS - copySelectionToClipboard(m_gridLeft); + copySelectionToClipboard(*m_gridLeft); return; // -> swallow event! don't allow default grid commands! case 'A': //CTRL + A @@ -1402,7 +1425,7 @@ void MainDialog::onGridMiddleButtonEvent(wxKeyEvent& event) { case 'C': case WXK_INSERT: //CTRL + C || CTRL + INS - copySelectionToClipboard(m_gridMiddle); + copySelectionToClipboard(*m_gridMiddle); return; } @@ -1419,7 +1442,7 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event) { case 'C': case WXK_INSERT: //CTRL + C || CTRL + INS - copySelectionToClipboard(m_gridRight); + copySelectionToClipboard(*m_gridRight); return; case 'A': //CTRL + A @@ -1486,12 +1509,24 @@ void MainDialog::onGridRightButtonEvent(wxKeyEvent& event) } +bool isPartOf(const wxWindow* child, const wxWindow* top) +{ + for (const wxWindow* i = child; i != NULL; i = i->GetParent()) + if (i == top) + return true; + return false; +} + + void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events without explicit menu entry :) { //avoid recursion!!! -> this ugly construct seems to be the only (portable) way to avoid re-entrancy //recursion may happen in multiple situations: e.g. modal dialogs, wxGrid::ProcessEvent()! if (processingGlobalKeyEvent || - !IsEnabled() || !m_gridLeft->IsEnabled()) //only handle if main window is in use + !IsShown() || + !IsActive() || + !IsEnabled() || //only handle if main window is in use + !m_gridLeft->IsEnabled()) // { event.Skip(); return; @@ -1499,20 +1534,13 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou class PreventRecursion { public: - PreventRecursion(bool& active) : active_(active) - { - active_ = true; - } - ~PreventRecursion() - { - active_ = false; - } + PreventRecursion(bool& active) : active_(active) { active_ = true; } + ~PreventRecursion() { active_ = false; } private: bool& active_; } dummy(processingGlobalKeyEvent); //---------------------------------------------------- - const int keyCode = event.GetKeyCode(); //CTRL + X @@ -1520,45 +1548,52 @@ void MainDialog::OnGlobalKeyEvent(wxKeyEvent& event) //process key events withou switch (keyCode) { case 'F': //CTRL + F - { ffs3::startFind(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); return; //-> swallow event! - } - break; } switch (keyCode) { case WXK_F3: //F3 case WXK_NUMPAD_F3: // - { ffs3::findNext(*this, *m_gridLeft, *m_gridRight, globalSettings->gui.textSearchRespectCase); return; //-> swallow event! - } - break; - //redirect certain (unhandled) keys directly to grid! - case WXK_PAGEUP: - case WXK_PAGEDOWN: - case WXK_HOME: - case WXK_END: + //redirect certain (unhandled) keys directly to grid! + case WXK_UP: + case WXK_DOWN: + case WXK_LEFT: + case WXK_RIGHT: case WXK_NUMPAD_UP: case WXK_NUMPAD_DOWN: case WXK_NUMPAD_LEFT: case WXK_NUMPAD_RIGHT: + + case WXK_PAGEUP: + case WXK_PAGEDOWN: + case WXK_HOME: + case WXK_END: case WXK_NUMPAD_PAGEUP: case WXK_NUMPAD_PAGEDOWN: case WXK_NUMPAD_HOME: case WXK_NUMPAD_END: - if (wxWindow::FindFocus() != m_directoryLeft && //don't propagate keyboard commands if currently changing directory field - wxWindow::FindFocus() != m_directoryRight) + { + 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) && + !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_scrolledWindowFolderPairs)) { m_gridLeft->SetFocus(); m_gridLeft->GetEventHandler()->ProcessEvent(event); //propagating event catched at wxTheApp to child leads to recursion, but we prevented it... event.Skip(false); //definitively handled now! return; } - break; + } + break; } event.Skip(); @@ -1916,9 +1951,9 @@ void MainDialog::OnContextExcludeObject(wxCommandEvent& event) void MainDialog::OnContextCopyClipboard(wxCommandEvent& event) { if (m_gridLeft->isLeadGrid()) - copySelectionToClipboard(m_gridLeft); + copySelectionToClipboard(*m_gridLeft); else if (m_gridRight->isLeadGrid()) - copySelectionToClipboard(m_gridRight); + copySelectionToClipboard(*m_gridRight); } @@ -2188,10 +2223,10 @@ void MainDialog::OnDirSelected(wxFileDirPickerEvent& event) wxString getFormattedHistoryElement(const wxString& filename) { - wxString output = wxFileName(filename).GetFullName(); - if (output.EndsWith(wxT(".ffs_gui"))) - output = output.BeforeLast('.'); - return output; + Zstring output = wxToZ(filename).AfterLast(common::FILE_NAME_SEPARATOR); + if (output.EndsWith(Zstr(".ffs_gui"))) + output = output.BeforeLast(Zstr('.')); + return zToWx(output); } @@ -2225,7 +2260,7 @@ void MainDialog::addFileToCfgHistory(const wxString& filename) { int newPos = -1; //the default config file should receive another name on GUI - if (util::sameFileSpecified(wxToZ(lastConfigFileName()), wxToZ(filename))) + if (util::sameFileSpecified(wxToZ(lastRunConfigName()), wxToZ(filename))) newPos = m_listBoxHistory->Append(_("<Last session>"), new wxClientDataString(filename)); //insert at beginning of list else newPos = m_listBoxHistory->Append(getFormattedHistoryElement(filename), new wxClientDataString(filename)); //insert at beginning of list @@ -2509,7 +2544,7 @@ void MainDialog::setLastUsedConfig(const wxString& filename, const xmlAccess::Xm addFileToCfgHistory(filename); //put filename on list of last used config files //set title - if (filename == lastConfigFileName()) + if (filename == lastRunConfigName()) { SetTitle(wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization")); currentConfigFileName.clear(); @@ -2626,7 +2661,7 @@ xmlAccess::XmlGuiConfig MainDialog::getCurrentConfiguration() const } -const wxString& MainDialog::lastConfigFileName() +const wxString& MainDialog::lastRunConfigName() { static wxString instance = ffs3::getConfigDir() + wxT("LastRun.ffs_gui"); return instance; @@ -3925,56 +3960,57 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) } } - wxString exportString; + zxString exportString; //perf: wxString doesn't model exponential growth and so is out + //write legend - exportString += wxString(_("Legend")) + wxT('\n'); + exportString += wxToZx(_("Legend")) + wxT('\n'); if (syncPreview->previewIsEnabled()) { - exportString += wxString(wxT("\"")) + getDescription(SO_CREATE_NEW_LEFT) + wxT("\";") + getSymbol(SO_CREATE_NEW_LEFT) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_CREATE_NEW_RIGHT) + wxT("\";") + getSymbol(SO_CREATE_NEW_RIGHT) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_DELETE_LEFT) + wxT("\";") + getSymbol(SO_DELETE_LEFT) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_DELETE_RIGHT) + wxT("\";") + getSymbol(SO_DELETE_RIGHT) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_OVERWRITE_LEFT) + wxT("\";") + getSymbol(SO_OVERWRITE_LEFT) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_OVERWRITE_RIGHT) + wxT("\";") + getSymbol(SO_OVERWRITE_RIGHT) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_DO_NOTHING) + wxT("\";") + getSymbol(SO_DO_NOTHING) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_EQUAL) + wxT("\";") + getSymbol(SO_EQUAL) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(SO_UNRESOLVED_CONFLICT) + wxT("\";") + getSymbol(SO_UNRESOLVED_CONFLICT) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_CREATE_NEW_LEFT)) + wxT("\";") + wxToZx(getSymbol(SO_CREATE_NEW_LEFT)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_CREATE_NEW_RIGHT)) + wxT("\";") + wxToZx(getSymbol(SO_CREATE_NEW_RIGHT)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_DELETE_LEFT)) + wxT("\";") + wxToZx(getSymbol(SO_DELETE_LEFT)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_DELETE_RIGHT)) + wxT("\";") + wxToZx(getSymbol(SO_DELETE_RIGHT)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_OVERWRITE_LEFT)) + wxT("\";") + wxToZx(getSymbol(SO_OVERWRITE_LEFT)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_OVERWRITE_RIGHT)) + wxT("\";") + wxToZx(getSymbol(SO_OVERWRITE_RIGHT)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_DO_NOTHING)) + wxT("\";") + wxToZx(getSymbol(SO_DO_NOTHING)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_EQUAL)) + wxT("\";") + wxToZx(getSymbol(SO_EQUAL)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(SO_UNRESOLVED_CONFLICT)) + wxT("\";") + wxToZx(getSymbol(SO_UNRESOLVED_CONFLICT)) + wxT('\n'); } else { - exportString += wxString(wxT("\"")) + getDescription(FILE_LEFT_SIDE_ONLY) + wxT("\";") + getSymbol(FILE_LEFT_SIDE_ONLY) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(FILE_RIGHT_SIDE_ONLY) + wxT("\";") + getSymbol(FILE_RIGHT_SIDE_ONLY) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(FILE_LEFT_NEWER) + wxT("\";") + getSymbol(FILE_LEFT_NEWER) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(FILE_RIGHT_NEWER) + wxT("\";") + getSymbol(FILE_RIGHT_NEWER) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(FILE_DIFFERENT) + wxT("\";") + getSymbol(FILE_DIFFERENT) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(FILE_EQUAL) + wxT("\";") + getSymbol(FILE_EQUAL) + wxT('\n'); - exportString += wxString(wxT("\"")) + getDescription(FILE_CONFLICT) + wxT("\";") + getSymbol(FILE_CONFLICT) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(FILE_LEFT_SIDE_ONLY)) + wxT("\";") + wxToZx(getSymbol(FILE_LEFT_SIDE_ONLY)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(FILE_RIGHT_SIDE_ONLY)) + wxT("\";") + wxToZx(getSymbol(FILE_RIGHT_SIDE_ONLY)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(FILE_LEFT_NEWER)) + wxT("\";") + wxToZx(getSymbol(FILE_LEFT_NEWER)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(FILE_RIGHT_NEWER)) + wxT("\";") + wxToZx(getSymbol(FILE_RIGHT_NEWER)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(FILE_DIFFERENT)) + wxT("\";") + wxToZx(getSymbol(FILE_DIFFERENT)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(FILE_EQUAL)) + wxT("\";") + wxToZx(getSymbol(FILE_EQUAL)) + wxT('\n'); + exportString += wxT("\"") + wxToZx(getDescription(FILE_CONFLICT)) + wxT("\";") + wxToZx(getSymbol(FILE_CONFLICT)) + wxT('\n'); } - exportString += '\n'; + exportString += wxT('\n'); //write header const int colsLeft = m_gridLeft->GetNumberCols(); for (int k = 0; k < colsLeft; ++k) { - exportString += m_gridLeft->GetColLabelValue(k); - exportString += ';'; + exportString += wxToZx(m_gridLeft->GetColLabelValue(k)); + exportString += wxT(';'); } const int colsMiddle = m_gridMiddle->GetNumberCols(); for (int k = 0; k < colsMiddle; ++k) { - exportString += m_gridMiddle->GetColLabelValue(k); - exportString += ';'; + exportString += wxToZx(m_gridMiddle->GetColLabelValue(k)); + exportString += wxT(';'); } const int colsRight = m_gridRight->GetNumberCols(); for (int k = 0; k < colsRight; ++k) { - exportString += m_gridRight->GetColLabelValue(k); + exportString += wxToZx(m_gridRight->GetColLabelValue(k)); if (k != m_gridRight->GetNumberCols() - 1) - exportString += ';'; + exportString += wxT(';'); } - exportString += '\n'; + exportString += wxT('\n'); //begin work const int rowsTotal = m_gridLeft->GetNumberRows(); @@ -3982,23 +4018,23 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) { for (int k = 0; k < colsLeft; ++k) { - exportString += m_gridLeft->GetCellValue(i, k); - exportString += ';'; + exportString += wxToZx(m_gridLeft->GetCellValue(i, k)); + exportString += wxT(';'); } for (int k = 0; k < colsMiddle; ++k) { - exportString += m_gridMiddle->GetCellValue(i, k); - exportString += ';'; + exportString += wxToZx(m_gridMiddle->GetCellValue(i, k)); + exportString += wxT(';'); } for (int k = 0; k < colsRight; ++k) { - exportString += m_gridRight->GetCellValue(i, k); + exportString += wxToZx(m_gridRight->GetCellValue(i, k)); if (k != colsRight - 1) - exportString += ';'; + exportString += wxT(';'); } - exportString += '\n'; + exportString += wxT('\n'); } //write export file @@ -4006,7 +4042,7 @@ void MainDialog::OnMenuExportFileList(wxCommandEvent& event) if (output.IsOpened()) { output.Write(common::BYTE_ORDER_MARK_UTF8, sizeof(common::BYTE_ORDER_MARK_UTF8) - 1); - output.Write(exportString); + output.Write(exportString.c_str(), exportString.size() * sizeof(zxString::value_type)); pushStatusInformation(_("File list exported!")); } else @@ -4085,7 +4121,7 @@ void MainDialog::OnMenuQuit(wxCommandEvent& event) void MainDialog::switchProgramLanguage(const int langID) { //create new dialog with respect to new language - CustomLocale::getInstance().setLanguage(langID); //language is a global attribute + ffs3::setLanguage(langID); //language is a global attribute const xmlAccess::XmlGuiConfig currentGuiCfg = getCurrentConfiguration(); @@ -4151,7 +4187,7 @@ void MainDialog::SyncPreview::enableSynchronization(bool value) if (value) { synchronizationEnabled = true; - mainDlg_->m_buttonStartSync->SetForegroundColour(*wxBLACK); + mainDlg_->m_buttonStartSync->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); mainDlg_->m_buttonStartSync->setBitmapFront(GlobalResources::instance().getImage(wxT("sync"))); } else diff --git a/ui/main_dlg.h b/ui/main_dlg.h index ca466240..9b8d491b 100644 --- a/ui/main_dlg.h +++ b/ui/main_dlg.h @@ -72,7 +72,7 @@ private: xmlAccess::XmlGuiConfig getCurrentConfiguration() const; void setCurrentConfiguration(const xmlAccess::XmlGuiConfig& newGuiCfg); - static const wxString& lastConfigFileName(); + static const wxString& lastRunConfigName(); xmlAccess::XmlGuiConfig lastConfigurationSaved; //support for: "Save changed configuration?" dialog //used when saving configuration @@ -103,7 +103,7 @@ private: std::set<size_t> getSelectedRows() const; void setSyncDirManually(const std::set<size_t>& rowsToSetOnUiTable, const ffs3::SyncDirection dir); void filterRangeManually(const std::set<size_t>& rowsToFilterOnUiTable, int leadingRow); - void copySelectionToClipboard(const CustomGrid* selectedGrid); + void copySelectionToClipboard(CustomGrid& selectedGrid); void deleteSelectedFiles(); void openExternalApplication(const wxString& commandline); diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp index 7431a4c1..6e86fbba 100644 --- a/ui/progress_indicator.cpp +++ b/ui/progress_indicator.cpp @@ -450,27 +450,24 @@ private: const std::vector<wxString>& messages = log_.getFormattedMessages(includedTypes); - wxString newLogText; + + zxString newLogText; //perf: wxString doesn't model exponential growth and so is out if (!messages.empty()) for (std::vector<wxString>::const_iterator i = messages.begin(); i != messages.end(); ++i) { - newLogText += *i; + newLogText += wxToZx(*i); newLogText += wxT("\n\n"); } else //if no messages match selected view filter, show final status message at least { const std::vector<wxString>& allMessages = log_.getFormattedMessages(); if (!allMessages.empty()) - newLogText = allMessages.back(); + newLogText = wxToZx(allMessages.back()); } -#ifndef _MSC_VER -#warning design okay? -#endif - wxWindowUpdateLocker dummy(m_textCtrlInfo); - m_textCtrlInfo->ChangeValue(newLogText); + m_textCtrlInfo->ChangeValue(zxToWx(newLogText)); m_textCtrlInfo->ShowPosition(m_textCtrlInfo->GetLastPosition()); } diff --git a/ui/small_dlgs.cpp b/ui/small_dlgs.cpp index 542b7d2c..598580e3 100644 --- a/ui/small_dlgs.cpp +++ b/ui/small_dlgs.cpp @@ -14,7 +14,7 @@ #include "../synchronization.h" #include "../library/custom_grid.h" #include "../shared/custom_button.h" -#include "../shared/localization.h" +#include "../shared/i18n.h" #include "../shared/global_func.h" #include "../shared/build_info.h" #include <wx/wupdlock.h> @@ -50,7 +50,7 @@ AboutDlg::AboutDlg(wxWindow* window) : AboutDlgGenerated(window) m_bitmapTransl->SetBitmap(GlobalResources::instance().getImage(wxT("translation"))); //create language credits - for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::getMapping().begin(); i != LocalizationInfo::getMapping().end(); ++i) + for (std::vector<LocInfoLine>::const_iterator i = LocalizationInfo::get().begin(); i != LocalizationInfo::get().end(); ++i) { //flag wxStaticBitmap* staticBitmapFlag = new wxStaticBitmap(m_scrolledWindowTranslators, wxID_ANY, GlobalResources::instance().getImage(i->languageFlag), wxDefaultPosition, wxSize(-1,11), 0 ); diff --git a/ui/sync_cfg.cpp b/ui/sync_cfg.cpp index bbfcda06..406ca5c6 100644 --- a/ui/sync_cfg.cpp +++ b/ui/sync_cfg.cpp @@ -11,6 +11,7 @@ #include <wx/wupdlock.h> #include "../shared/mouse_move_dlg.h" #include "../shared/string_conv.h" +#include "../shared/dir_picker_i18n.h" using namespace ffs3; @@ -28,7 +29,7 @@ SyncCfgDialog::SyncCfgDialog(wxWindow* window, refHandleDeletion(handleDeletion), refCustomDeletionDirectory(customDeletionDirectory), refIgnoreErrors(ignoreErrors), - customDelFolder(new DirectoryName(m_panelCustomDeletionDir, m_dirPickerCustomDelFolder, m_textCtrlCustomDelFolder)) + customDelFolder(new DirectoryName(*m_panelCustomDeletionDir, *m_dirPickerCustomDelFolder, *m_textCtrlCustomDelFolder)) { #ifdef FFS_WIN new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp index c307c7ab..d82d5733 100644 --- a/ui/tray_icon.cpp +++ b/ui/tray_icon.cpp @@ -7,6 +7,7 @@ #include "tray_icon.h" #include "../library/resources.h" #include "small_dlgs.h" +#include "../shared/i18n.h" #include <wx/taskbar.h> #include <cmath> #include <wx/image.h> diff --git a/version/version.h b/version/version.h index 808504b8..29953689 100644 --- a/version/version.h +++ b/version/version.h @@ -2,5 +2,5 @@ namespace ffs3 { -const wxString currentVersion = wxT("3.14"); //internal linkage! +const wxString currentVersion = wxT("3.15"); //internal linkage! } diff --git a/version/version.rc b/version/version.rc index 2d2c3ac5..69e9e6cc 100644 --- a/version/version.rc +++ b/version/version.rc @@ -1,2 +1,2 @@ -#define VER_FREEFILESYNC 3,14,0,0 -#define VER_FREEFILESYNC_STR "3.14\0" +#define VER_FREEFILESYNC 3,15,0,0 +#define VER_FREEFILESYNC_STR "3.15\0" diff --git a/wxWidgets-Fix/apply-patches.cmd b/wxWidgets-Fix/apply-patches.cmd index 361abedd..80b94874 100644 --- a/wxWidgets-Fix/apply-patches.cmd +++ b/wxWidgets-Fix/apply-patches.cmd @@ -1,8 +1,6 @@ @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 -patch %1\include\wx\generic\grid.h grid.h.patch - -::fix translation of "Browse" text -patch %1\include\wx\filepicker.h filepicker.h.patch
\ No newline at end of file +patch "%1\src\generic\grid.cpp" grid.cpp.patch +patch "%1\include\wx\generic\grid.h" grid.h.patch +pause
\ No newline at end of file diff --git a/wxWidgets-Fix/filepicker.h.patch b/wxWidgets-Fix/filepicker.h.patch deleted file mode 100644 index d72184c4..00000000 --- a/wxWidgets-Fix/filepicker.h.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- old 2009-03-06 11:00:42.000000000 +0100 -+++ include\wx\filepicker.h 2009-10-24 16:55:45.968750000 +0200 -@@ -17,6 +17,7 @@ - #if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL - - #include "wx/pickerbase.h" -+#include "wx/intl.h" - - class WXDLLIMPEXP_FWD_CORE wxDialog; - class WXDLLIMPEXP_FWD_CORE wxFileDirPickerEvent; -@@ -326,7 +329,7 @@ - const wxString& message, - const wxString& WXUNUSED(wildcard)) - { -- return new wxDirPickerWidget(parent, wxID_ANY, wxDirPickerWidgetLabel, -+ return new wxDirPickerWidget(parent, wxID_ANY, _("Browse"), - path, message, - wxDefaultPosition, wxDefaultSize, - GetPickerStyle(GetWindowStyle())); |