diff options
author | B. Stack <bgstack15@gmail.com> | 2025-01-20 19:25:18 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2025-01-20 19:25:18 -0500 |
commit | de65d3c0295894f8eafc4c7582dfe180dc58c81e (patch) | |
tree | 3ba8ec770b81468ca4ad83d985b991c5f669de22 | |
parent | add upstream 13.9 (diff) | |
download | FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.gz FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.bz2 FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.zip |
135 files changed, 7617 insertions, 7032 deletions
@@ -4,9 +4,9 @@ that affect FreeFileSync. Therefore it is NOT RECOMMENDED TO COMPILE AGAINST OLD the ones mentioned below. The remaining issues that are yet to be fixed are listed in the following: ----------------- -| libcurl 8.7.0| ----------------- +----------------- +| libcurl 8.11.1| +----------------- __________________________________________________________________________________________________________ /lib/ftp.c https://github.com/curl/curl/issues/1455 @@ -46,9 +46,9 @@ https://github.com/curl/curl/issues/4342 __________________________________________________________________________________________________________ ------------------------------ -| libssh2 master 2022-11-11 | ------------------------------ +------------------ +| libssh2 1.11.1 | +------------------ __________________________________________________________________________________________________________ src/session.c memory leak: https://github.com/libssh2/libssh2/issues/28 @@ -65,9 +65,35 @@ ________________________________________________________________________________ ------------------- -| wxWidgets 3.2.4 | +| wxWidgets 3.3.0 | ------------------- __________________________________________________________________________________________________________ +/include/wx/settings.h +Support changing system colors for proper dark mode support: + ++ struct wxColorHook ++ { ++ virtual ~wxColorHook() {} ++ virtual wxColor getColor(wxSystemColour index) const = 0; ++ }; ++ WXDLLIMPEXP_CORE inline std::unique_ptr<wxColorHook>& refGlobalColorHook() ++ { ++ static std::unique_ptr<wxColorHook> globalColorHook; ++ return globalColorHook; ++ } + +class WXDLLIMPEXP_CORE wxSystemSettings : public wxSystemSettingsNative +{ +public: ++ static wxColour GetColour(wxSystemColour index) ++ { ++ if (refGlobalColorHook()) ++ return refGlobalColorHook()->getColor(index); ++ ++ return wxSystemSettingsNative::GetColour(index); ++ } + +__________________________________________________________________________________________________________ /include/wx/features.h wxWidgets/GTK2 on some Linux systems incorrectly detects high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114 => hack away high-DPI support for GTK2 (= pretend GTK2 has device independent pixels, which it clearly has not!) @@ -172,3 +198,25 @@ See: http://soundfile.sapp.org/doc/WaveFormat/ => skip 8 bytes (Subchunk2ID and - m_data->m_data = (&m_data->m_dataWithHeader[data_offset]); + m_data->m_data = (&m_data->m_dataWithHeader[data_offset + 8]); + +__________________________________________________________________________________________________________ +/src/gtk/button.cpp +now this is absurd: if we add wxTranslations for "&OK/&Cancel", wxWidgets will detect "wxIsStockLabel()", +throw away the label and do gtk_button_set_label(wxGetStockGtkID(wxID_OK/wxID_CANCEL)) instead, +which will result in *untranslated* confirmation buttons everywhere! +https://github.com/wxWidgets/wxWidgets/blob/6561ca020048de57ec28fec5b27f80b00d445cdd/src/gtk/button.cpp#L253 + +#ifndef __WXGTK4__ + wxGCC_WARNING_SUPPRESS(deprecated-declarations) +- if (wxIsStockID(m_windowId) && wxIsStockLabel(m_windowId, label)) +- { +- const char* stock = wxGetStockGtkID(m_windowId); +- if (stock) +- { +- gtk_button_set_label(GTK_BUTTON(m_widget), stock); +- gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE); +- return; +- } +- } + wxGCC_WARNING_RESTORE() +#endif diff --git a/Changelog.txt b/Changelog.txt index 9e4c4fc9..472cfbae 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,18 @@ +FreeFileSync 14.0 [2025-01-17] +------------------------------ +Dark mode support (Windows 10 20H1, macOS 10.14 (Mojave), Linux) +Fixed dock icon progress percentage divergence (macOS) +Prevent "App Napp during comparison/synchronization (macOS) +Enhance EINVAL error message for unsupported characters +Support running with background priority (Linux) +Fixed installer access denied when creating shell links (Windows) +Improved size and date formatting for file listing (macOS) +Improved context menu customization grid +Reduced peak memory consumption by 12% +Automatically set appropriate text color for config panel background +Revived and updated Italian translation + + FreeFileSync 13.9 [2024-12-07] ------------------------------ Fixed CURLE_SEND_ERROR: OpenSSL SSL_write: SSL_ERROR_SYSCALL, errno 0 diff --git a/FreeFileSync/Build/Resources/Icons.zip b/FreeFileSync/Build/Resources/Icons.zip Binary files differindex 54b3e15d..4bc78027 100644 --- a/FreeFileSync/Build/Resources/Icons.zip +++ b/FreeFileSync/Build/Resources/Icons.zip diff --git a/FreeFileSync/Build/Resources/Languages.zip b/FreeFileSync/Build/Resources/Languages.zip Binary files differindex 01541b62..0c97e990 100644 --- a/FreeFileSync/Build/Resources/Languages.zip +++ b/FreeFileSync/Build/Resources/Languages.zip diff --git a/FreeFileSync/Build/Resources/cacert.pem b/FreeFileSync/Build/Resources/cacert.pem index eb11b2fd..e8cc6c1c 100644 --- a/FreeFileSync/Build/Resources/cacert.pem +++ b/FreeFileSync/Build/Resources/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Tue Nov 26 13:58:25 2024 GMT +## Certificate data from Mozilla as of: Tue Dec 31 04:12:05 2024 GMT ## ## Find updated versions here: https://curl.se/docs/caextract.html ## @@ -16,7 +16,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.29. -## SHA256: 36105b01631f9fc03b1eca779b44a30a1a5890b9bf8dc07ccb001a07301e01cf +## SHA256: c99d6d3f8d3d4e47719ba2b648992f5b58b150128d3aca3c05c566d8dc98e116 ## @@ -584,27 +584,6 @@ NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= -----END CERTIFICATE----- -SecureSign RootCA11 -=================== ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi -SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS -b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw -KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 -cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL -TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO -wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq -g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP -O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA -bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX -t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh -OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r -bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ -Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 -y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 -lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= ------END CERTIFICATE----- - Microsec e-Szigno Root CA 2009 ============================== -----BEGIN CERTIFICATE----- @@ -2319,40 +2298,6 @@ hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB dBb9HxEGmpv0 -----END CERTIFICATE----- -Entrust Root Certification Authority - G4 -========================================= ------BEGIN CERTIFICATE----- -MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV -BAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu -bmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1 -dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYT -AlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0 -L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhv -cml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3D -umSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV -3imz/f3ET+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds -8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQ -e9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7 -ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5X -xNMhIWNlUpEbsZmOeX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV -7rtNOzK+mndmnqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8 -dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mW -Hv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T -AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9n -MA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4Q -jbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht -7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/B7NTeLUK -YvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uIAeV8KEsD+UmDfLJ/fOPt -jqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS02FREAutp9lfx1/cH6NcjKF+ -m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKW -RGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjA -JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G -+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT -kcpG2om3PVODLAgfi49T3f+sHw== ------END CERTIFICATE----- - Microsoft ECC Root Certificate Authority 2017 ============================================= -----BEGIN CERTIFICATE----- @@ -3170,36 +3115,6 @@ AwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozmut6Dacpps6kFtZaSF4fC0urQe87YQVt8 rgIwRt7qy12a7DLCZRawTDBcMPPaTnOGBtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR -----END CERTIFICATE----- -Security Communication RootCA3 -============================== ------BEGIN CERTIFICATE----- -MIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNVBAYTAkpQMSUw -IwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScwJQYDVQQDEx5TZWN1cml0eSBD -b21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2MDYxNzE2WhcNMzgwMTE4MDYxNzE2WjBdMQsw -CQYDVQQGEwJKUDElMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UE -AxMeU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltzkBtnTCHsXzW7OT4rCmDvu20r -hvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOzQD11EKzAlrenfna84xtSGc4RHwsE -NPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MGTfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2 -/D5Q4eAvJj1+XCO1eXDe+uDRpdYMQXF79+qMHIjH7Iv10S9VlkZ8WjtYO/u62C21Jdp6Ts9EriGm -npjKIG58u4iFW/vAEGK78vknR+/RiTlDxN/e4UG/VHMgly1s2vPUB6PmudhvrvyMGS7TZ2crldtY -XLVqAvO4g160a75BflcJdURQVc1aEWEhCmHCqYj9E7wtiS/NYeCVvsq1e+F7NGcLH7YMx3weGVPK -p7FKFSBWFHA9K4IsD50VHUeAR/94mQ4xr28+j+2GaR57GIgUssL8gjMunEst+3A7caoreyYn8xrC -3PsXuKHqy6C0rtOUfnrQq8PsOC0RLoi/1D+tEjtCrI8Cbn3M0V9hvqG8OmpI6iZVIhZdXw3/JzOf -GAN0iltSIEdrRU0id4xVJ/CvHozJgyJUt5rQT9nO/NkuHJYosQLTA70lUhw0Zk8jq/R3gpYd0Vcw -CBEF/VfR2ccCAwEAAaNCMEAwHQYDVR0OBBYEFGQUfPxYchamCik0FW8qy7z8r6irMA4GA1UdDwEB -/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4ICAQDcAiMI4u8hOscNtybS -YpOnpSNyByCCYN8Y11StaSWSntkUz5m5UoHPrmyKO1o5yGwBQ8IibQLwYs1OY0PAFNr0Y/Dq9HHu -Tofjcan0yVflLl8cebsjqodEV+m9NU1Bu0soo5iyG9kLFwfl9+qd9XbXv8S2gVj/yP9kaWJ5rW4O -H3/uHWnlt3Jxs/6lATWUVCvAUm2PVcTJ0rjLyjQIUYWg9by0F1jqClx6vWPGOi//lkkZhOpn2ASx -YfQAW0q3nHE3GYV5v4GwxxMOdnE+OoAGrgYWp421wsTL/0ClXI2lyTrtcoHKXJg80jQDdwj98ClZ -XSEIx2C/pHF7uNkegr4Jr2VvKKu/S7XuPghHJ6APbw+LP6yVGPO5DtxnVW5inkYO0QR4ynKudtml -+LLfiAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU1cXrvMUVnuiZIesn -KwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD2NCcnWXL0CsnMQMeNuE9 -dnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI//1ZqmfHAuc1Uh6N//g7kdPjIe1qZ9LPFm -6Vwdp6POXiUyK+OVrCoHzrQoeIY8LaadTdJ0MN1kURXbg4NR16/9M51NZg== ------END CERTIFICATE----- - Security Communication ECC RootCA1 ================================== -----BEGIN CERTIFICATE----- diff --git a/FreeFileSync/Source/Makefile b/FreeFileSync/Source/Makefile index f49b9ff6..01d87aaa 100644 --- a/FreeFileSync/Source/Makefile +++ b/FreeFileSync/Source/Makefile @@ -101,6 +101,7 @@ cppFiles+=../../zen/sys_info.cpp cppFiles+=../../zen/sys_version.cpp cppFiles+=../../zen/thread.cpp cppFiles+=../../zen/zlib_wrap.cpp +cppFiles+=../../wx+/darkmode.cpp cppFiles+=../../wx+/file_drop.cpp cppFiles+=../../wx+/grid.cpp cppFiles+=../../wx+/image_tools.cpp diff --git a/FreeFileSync/Source/RealTimeSync/Makefile b/FreeFileSync/Source/RealTimeSync/Makefile index bac4de39..c1952bd8 100644 --- a/FreeFileSync/Source/RealTimeSync/Makefile +++ b/FreeFileSync/Source/RealTimeSync/Makefile @@ -25,6 +25,7 @@ cppFiles+=../base/icon_loader.cpp cppFiles+=../ffs_paths.cpp cppFiles+=../icon_buffer.cpp cppFiles+=../localization.cpp +cppFiles+=../../../wx+/darkmode.cpp cppFiles+=../../../wx+/file_drop.cpp cppFiles+=../../../wx+/image_tools.cpp cppFiles+=../../../wx+/image_resources.cpp diff --git a/FreeFileSync/Source/RealTimeSync/application.cpp b/FreeFileSync/Source/RealTimeSync/application.cpp index 62a21148..2a7d404f 100644 --- a/FreeFileSync/Source/RealTimeSync/application.cpp +++ b/FreeFileSync/Source/RealTimeSync/application.cpp @@ -7,15 +7,13 @@ #include "application.h" #include "main_dlg.h" #include <zen/file_access.h> -//#include <zen/thread.h> #include <zen/shutdown.h> #include <zen/resolve_path.h> #include <wx/clipbrd.h> #include <wx/event.h> -//#include <wx/log.h> #include <wx/tooltip.h> #include <wx+/app_main.h> -//#include <wx+/popup_dlg.h> +#include <wx+/darkmode.h> #include <wx+/image_resources.h> #include "config.h" #include "../localization.h" @@ -62,6 +60,17 @@ bool Application::OnInit() notifyAppError(msg); }); + //tentatively set program language to OS default until GlobalSettings.xml is read later + try { fff::localizationInit(appendPath(fff::getResourceDirPath(), Zstr("Languages.zip"))); } //throw FileError + catch (const FileError& e) { logExtraError(e.toString()); } + + GlobalConfig globalCfg; + try { globalCfg = getGlobalConfig(); } //throw FileError + catch (const FileError& e) { logExtraError(e.toString()); } + + try { fff::setLanguage(globalCfg.programLanguage); } //throw FileError + catch (const FileError& e) { logExtraError(e.toString()); } + try { imageResourcesInit(appendPath(fff::getResourceDirPath(), Zstr("Icons.zip"))); } catch (const FileError& e) { logExtraError(e.toString()); } //not critical in this context @@ -102,7 +111,7 @@ bool Application::OnInit() { loadCSS("Gtk3Styles.old.css"); //throw SysError } - catch (const SysError& e3) { logExtraError(_("Error during process initialization.") + L"\n\n" + e3.toString()); } + catch (const SysError& e3) { logExtraError(_("Failed to update the color theme.") + L"\n\n" + e3.toString()); } } #else #error unknown GTK version! @@ -117,6 +126,9 @@ bool Application::OnInit() else assert(!oldHandler); + try { colorThemeInit(*this, globalCfg.appColorTheme); } //throw FileError + catch (const FileError& e) { logExtraError(e.toString()); } //not critical in this context + //Windows User Experience Interaction Guidelines: tool tips should have 5s timeout, info tips no timeout => compromise: wxToolTip::Enable(true); //wxWidgets screw-up: wxToolTip::SetAutoPop is no-op if global tooltip window is not yet constructed: wxToolTip::Enable creates it wxToolTip::SetAutoPop(15'000); //https://docs.microsoft.com/en-us/windows/win32/uxguide/ctrl-tooltips-and-infotips @@ -124,13 +136,6 @@ bool Application::OnInit() SetAppName(L"RealTimeSync"); //if not set, defaults to executable name - try - { - fff::localizationInit(appendPath(fff::getResourceDirPath(), Zstr("Languages.zip"))); //throw FileError - fff::setLanguage(getProgramLanguage()); //throw FileError - } - catch (const FileError& e) { logExtraError(e.toString()); } - auto onSystemShutdown = [](int /*unused*/ = 0) { onSystemShutdownRunTasks(); @@ -148,7 +153,7 @@ bool Application::OnInit() //Note: app start is deferred: -> see FreeFileSync CallAfter([&] { onEnterEventLoop(); }); - return true; //true: continue processing; false: exit immediately. + return true; //true: continue processing; false: exit immediately } diff --git a/FreeFileSync/Source/RealTimeSync/config.cpp b/FreeFileSync/Source/RealTimeSync/config.cpp index a0738a26..56d34e3e 100644 --- a/FreeFileSync/Source/RealTimeSync/config.cpp +++ b/FreeFileSync/Source/RealTimeSync/config.cpp @@ -10,7 +10,6 @@ #include <zenxml/xml.h> #include <wx/uilocale.h> #include "../ffs_paths.h" -#include "../localization.h" using namespace zen; using namespace rts; @@ -32,6 +31,22 @@ bool readText(const std::string& input, wxLanguage& value) } return false; } + + +template <> inline +bool readText(const std::string& input, ColorTheme& value) +{ + const std::string tmp = trimCpy(input); + if (tmp == "Default") + value = ColorTheme::System; + else if (tmp == "Light") + value = ColorTheme::Light; + else if (tmp == "Dark") + value = ColorTheme::Dark; + else + return false; + return true; +} } @@ -49,21 +64,15 @@ std::string getConfigType(const XmlDoc& doc) } -void readConfig(const XmlIn& in, XmlRealConfig& cfg, int formatVer) +void readConfig(const XmlIn& in, FfsRealConfig& cfg, int /*formatVer*/) { in["Directories"](cfg.directories); in["Delay" ](cfg.delay); in["Commandline"](cfg.commandline); - - //TODO: remove if clause after migration! 2020-04-14 - if (formatVer < 2) - if (startsWithAsciiNoCase(cfg.commandline, "cmd /c ") || - startsWithAsciiNoCase(cfg.commandline, "cmd.exe /c ")) - cfg.commandline = afterFirst(cfg.commandline, Zstr("/c "), IfNotFoundReturn::all); } -void writeConfig(const XmlRealConfig& cfg, XmlOut& out) +void writeConfig(const FfsRealConfig& cfg, XmlOut& out) { out["Directories"](cfg.directories); out["Delay" ](cfg.delay); @@ -72,7 +81,7 @@ void writeConfig(const XmlRealConfig& cfg, XmlOut& out) } -std::pair<XmlRealConfig, std::wstring /*warningMsg*/> rts::readConfig(const Zstring& filePath) //throw FileError +std::pair<FfsRealConfig, std::wstring /*warningMsg*/> rts::readConfig(const Zstring& filePath) //throw FileError { XmlDoc doc = loadXml(filePath); //throw FileError @@ -83,7 +92,7 @@ std::pair<XmlRealConfig, std::wstring /*warningMsg*/> rts::readConfig(const Zstr /*bool success =*/ doc.root().getAttribute("XmlFormat", formatVer); XmlIn in(doc); - XmlRealConfig cfg; + FfsRealConfig cfg; ::readConfig(in, cfg, formatVer); std::wstring warningMsg; @@ -103,7 +112,7 @@ std::pair<XmlRealConfig, std::wstring /*warningMsg*/> rts::readConfig(const Zstr } -void rts::writeConfig(const XmlRealConfig& cfg, const Zstring& filePath) //throw FileError +void rts::writeConfig(const FfsRealConfig& cfg, const Zstring& filePath) //throw FileError { XmlDoc doc("FreeFileSync"); doc.root().setAttribute("XmlType", "REAL"); @@ -116,7 +125,7 @@ void rts::writeConfig(const XmlRealConfig& cfg, const Zstring& filePath) //throw } -std::pair<XmlRealConfig, std::wstring /*warningMsg*/> rts::readRealOrBatchConfig(const Zstring& filePath) //throw FileError +std::pair<FfsRealConfig, std::wstring /*warningMsg*/> rts::readRealOrBatchConfig(const Zstring& filePath) //throw FileError { XmlDoc doc = loadXml(filePath); //throw FileError //quick exit if file is not an FFS XML @@ -165,7 +174,7 @@ std::pair<XmlRealConfig, std::wstring /*warningMsg*/> rts::readRealOrBatchConfig } }(); - XmlRealConfig cfg + FfsRealConfig cfg { .directories = {uniqueFolders.begin(), uniqueFolders.end()}, .commandline = escapeCommandArg(ffsLaunchPath) + Zstr(' ') + escapeCommandArg(filePath), @@ -177,8 +186,10 @@ std::pair<XmlRealConfig, std::wstring /*warningMsg*/> rts::readRealOrBatchConfig } -wxLanguage rts::getProgramLanguage() //throw FileError +GlobalConfig rts::getGlobalConfig() //throw FileError { + GlobalConfig globalCfg; + const Zstring& filePath = appendPath(fff::getConfigDirPath(), Zstr("GlobalSettings.xml")); XmlDoc doc; @@ -189,7 +200,7 @@ wxLanguage rts::getProgramLanguage() //throw FileError catch (FileError&) { if (!itemExists(filePath)) //throw FileError - return fff::getDefaultLanguage(); + return globalCfg; throw; } @@ -198,14 +209,13 @@ wxLanguage rts::getProgramLanguage() //throw FileError XmlIn in(doc); - wxLanguage lng = wxLANGUAGE_UNKNOWN; - in["Language"].attribute("Code", lng); - + in["Language"].attribute("Code", globalCfg.programLanguage); + in["ColorTheme"].attribute("Appearance", globalCfg.appColorTheme); if (const std::wstring& errors = in.getErrors(); !errors.empty()) throw FileError(replaceCpy(_("File %x does not contain a valid configuration."), L"%x", fmtPath(filePath)), _("The following XML elements could not be read:") + L'\n' + errors); - return lng; + return globalCfg; } diff --git a/FreeFileSync/Source/RealTimeSync/config.h b/FreeFileSync/Source/RealTimeSync/config.h index 3afc72f2..c94ef309 100644 --- a/FreeFileSync/Source/RealTimeSync/config.h +++ b/FreeFileSync/Source/RealTimeSync/config.h @@ -9,25 +9,32 @@ #include <vector> #include <zen/zstring.h> +#include <wx+/darkmode.h> #include <wx/language.h> +#include "../localization.h" namespace rts { -struct XmlRealConfig +struct FfsRealConfig { std::vector<Zstring> directories; Zstring commandline; unsigned int delay = 10; }; -std::pair<XmlRealConfig, std::wstring /*warningMsg*/> readConfig(const Zstring& filePath); //throw FileError -void writeConfig(const XmlRealConfig& config, const Zstring& filePath); //throw FileError +std::pair<FfsRealConfig, std::wstring /*warningMsg*/> readConfig(const Zstring& filePath); //throw FileError +void writeConfig(const FfsRealConfig& config, const Zstring& filePath); //throw FileError //reuse (some of) FreeFileSync's xml files -std::pair<XmlRealConfig, std::wstring /*warningMsg*/> readRealOrBatchConfig(const Zstring& filePath); //throw FileError +std::pair<FfsRealConfig, std::wstring /*warningMsg*/> readRealOrBatchConfig(const Zstring& filePath); //throw FileError -wxLanguage getProgramLanguage(); //throw FileError +struct GlobalConfig +{ + wxLanguage programLanguage = fff::getDefaultLanguage(); + zen::ColorTheme appColorTheme = zen::ColorTheme::System; +}; +GlobalConfig getGlobalConfig(); //throw FileError } #endif //XML_PROC_H_0813748158321813490 diff --git a/FreeFileSync/Source/RealTimeSync/main_dlg.cpp b/FreeFileSync/Source/RealTimeSync/main_dlg.cpp index 4a4812e9..ad39b450 100644 --- a/FreeFileSync/Source/RealTimeSync/main_dlg.cpp +++ b/FreeFileSync/Source/RealTimeSync/main_dlg.cpp @@ -129,7 +129,7 @@ MainDialog::MainDialog(const Zstring& cfgFilePath) : nullptr /*staticText*/, getDroppedPathsFilter(*this)); //--------------------------- load config values ------------------------------------ - XmlRealConfig newConfig; + FfsRealConfig newConfig; Zstring currentConfigFile = cfgFilePath; if (currentConfigFile.empty()) @@ -187,7 +187,7 @@ MainDialog::MainDialog(const Zstring& cfgFilePath) : MainDialog::~MainDialog() { - const XmlRealConfig currentCfg = getConfiguration(); + const FfsRealConfig currentCfg = getConfiguration(); try { writeConfig(currentCfg, lastRunConfigPath_); //throw FileError @@ -244,7 +244,7 @@ void MainDialog::onStart(wxCommandEvent& event) { Hide(); - XmlRealConfig currentCfg = getConfiguration(); + FfsRealConfig currentCfg = getConfiguration(); const Zstring activeCfgFilePath = !equalNativePath(activeConfigFile_, lastRunConfigPath_) ? activeConfigFile_ : Zstring(); switch (runFolderMonitor(currentCfg, ::extractJobName(activeCfgFilePath))) @@ -286,7 +286,7 @@ void MainDialog::onConfigSave(wxCommandEvent& event) if (!endsWithAsciiNoCase(targetFilePath, Zstr(".ffs_real"))) //no weird shit! targetFilePath += Zstr(".ffs_real"); //https://freefilesync.org/forum/viewtopic.php?t=9451#p34724 - const XmlRealConfig currentCfg = getConfiguration(); + const FfsRealConfig currentCfg = getConfiguration(); try { writeConfig(currentCfg, targetFilePath); //throw FileError @@ -301,7 +301,7 @@ void MainDialog::onConfigSave(wxCommandEvent& event) void MainDialog::loadConfig(const Zstring& filepath) { - XmlRealConfig newConfig; + FfsRealConfig newConfig; if (!filepath.empty()) try @@ -361,7 +361,7 @@ void MainDialog::onFilesDropped(FileDropEvent& event) } -void MainDialog::setConfiguration(const XmlRealConfig& cfg) +void MainDialog::setConfiguration(const FfsRealConfig& cfg) { const Zstring& firstFolderPath = cfg.directories.empty() ? Zstring() : cfg.directories[0]; const std::vector<Zstring> addFolderPaths = cfg.directories.empty() ? std::vector<Zstring>() : @@ -379,9 +379,9 @@ void MainDialog::setConfiguration(const XmlRealConfig& cfg) } -XmlRealConfig MainDialog::getConfiguration() +FfsRealConfig MainDialog::getConfiguration() { - XmlRealConfig output; + FfsRealConfig output; output.directories.push_back(firstFolderPanel_->getPath()); diff --git a/FreeFileSync/Source/RealTimeSync/main_dlg.h b/FreeFileSync/Source/RealTimeSync/main_dlg.h index e23f0a78..888747cf 100644 --- a/FreeFileSync/Source/RealTimeSync/main_dlg.h +++ b/FreeFileSync/Source/RealTimeSync/main_dlg.h @@ -8,18 +8,18 @@ #define MAIN_DLG_H_2384790842252445 #include "gui_generated.h" -#include <vector> -#include <memory> +//#include <vector> +//#include <memory> #include <zen/zstring.h> #include <wx+/async_task.h> #include <wx+/file_drop.h> -#include <wx/timer.h> +//#include <wx/timer.h> #include "folder_selector2.h" namespace rts { -struct XmlRealConfig; +struct FfsRealConfig; class DirectoryPanel; @@ -50,8 +50,8 @@ private: void onMenuQuit (wxCommandEvent& event) override { Close(); } void onFilesDropped(zen::FileDropEvent& event); - void setConfiguration(const XmlRealConfig& cfg); - XmlRealConfig getConfiguration(); + void setConfiguration(const FfsRealConfig& cfg); + FfsRealConfig getConfiguration(); void setLastUsedConfig(const Zstring& filepath); void insertAddFolder(const std::vector<Zstring>& newFolders, size_t pos); diff --git a/FreeFileSync/Source/RealTimeSync/tray_menu.cpp b/FreeFileSync/Source/RealTimeSync/tray_menu.cpp index c74a082f..339bd23e 100644 --- a/FreeFileSync/Source/RealTimeSync/tray_menu.cpp +++ b/FreeFileSync/Source/RealTimeSync/tray_menu.cpp @@ -6,7 +6,6 @@ #include "tray_menu.h" #include <chrono> -//#include <zen/thread.h> #include <zen/resolve_path.h> #include <wx/taskbar.h> #include <wx/icon.h> //Linux needs this @@ -228,7 +227,7 @@ private: } -rts::CancelReason rts::runFolderMonitor(const XmlRealConfig& config, const wxString& jobname) +rts::CancelReason rts::runFolderMonitor(const FfsRealConfig& config, const wxString& jobname) { std::vector<Zstring> dirNamesNonFmt = config.directories; std::erase_if(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! diff --git a/FreeFileSync/Source/RealTimeSync/tray_menu.h b/FreeFileSync/Source/RealTimeSync/tray_menu.h index cf8b4341..01a894f8 100644 --- a/FreeFileSync/Source/RealTimeSync/tray_menu.h +++ b/FreeFileSync/Source/RealTimeSync/tray_menu.h @@ -18,7 +18,7 @@ enum class CancelReason requestGui, requestExit }; -CancelReason runFolderMonitor(const XmlRealConfig& config, const wxString& jobname); //jobname may be empty +CancelReason runFolderMonitor(const FfsRealConfig& config, const wxString& jobname); //jobname may be empty } #endif //TRAY_MENU_H_3967857420987534253245 diff --git a/FreeFileSync/Source/afs/abstract_impl.h b/FreeFileSync/Source/afs/abstract_impl.h index f4e7a883..ad34f79a 100644 --- a/FreeFileSync/Source/afs/abstract_impl.h +++ b/FreeFileSync/Source/afs/abstract_impl.h @@ -94,7 +94,7 @@ public: pal->protPathLocks_.access([&](std::map<NativePath, std::weak_ptr<BlockInfo>>& pathLocks) { //clean up obsolete entries - std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); }); + std::erase_if(pathLocks, [](const auto& v) { return v.second.expired(); }); //get or create: std::weak_ptr<BlockInfo>& weakPtr = pathLocks[nativePath]; diff --git a/FreeFileSync/Source/afs/ftp.cpp b/FreeFileSync/Source/afs/ftp.cpp index b9bbe24b..ad150741 100644 --- a/FreeFileSync/Source/afs/ftp.cpp +++ b/FreeFileSync/Source/afs/ftp.cpp @@ -5,7 +5,6 @@ // ***************************************************************************** #include "ftp.h" -//#include <zen/basic_math.h> #include <zen/sys_error.h> #include <zen/globals.h> #include <zen/resolve_path.h> @@ -1186,7 +1185,7 @@ FtpItem getFtpSymlinkInfo(const FtpLogin& login, const AfsPath& linkPath) //thro //...or some server return ASCII size or fail with '550 SIZE not allowed in ASCII mode: https://freefilesync.org/forum/viewtopic.php?t=7669&start=30#p27742 const std::string sizeBuf = session.runSingleFtpCommand("*SIZE " + session.getServerPathInternal(linkPath), true /*requestUtf8*/); //throw SysError, SysErrorFtpProtocol - //alternative: use libcurl + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T? => nah, suprise (motherfucker)! libcurl adds needless "REST 0" command! + //alternative: use libcurl + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T? => nah, surprise (motherfucker)! libcurl adds needless "REST 0" command! for (const std::string_view& line : splitFtpResponse(sizeBuf)) if (startsWith(line, "213 ")) // 213<space>[rubbish]<file size> according to libcurl { diff --git a/FreeFileSync/Source/afs/gdrive.cpp b/FreeFileSync/Source/afs/gdrive.cpp index 6ba67f77..bf325112 100644 --- a/FreeFileSync/Source/afs/gdrive.cpp +++ b/FreeFileSync/Source/afs/gdrive.cpp @@ -9,9 +9,7 @@ #include <unordered_set> //needed by clang #include <unordered_map> // #include <libcurl/curl_wrap.h> //DON'T include <curl/curl.h> directly! -//#include <zen/basic_math.h> #include <zen/base64.h> -//#include <zen/crc.h> #include <zen/file_access.h> #include <zen/file_io.h> #include <zen/file_traverser.h> @@ -463,7 +461,7 @@ GdriveAccessInfo gdriveAuthorizeAccess(const std::string& gdriveLoginHint, const .ai_flags = AI_ADDRCONFIG | //no such issue on Linux: https://bugs.chromium.org/p/chromium/issues/detail?id=5234 AI_PASSIVE, //the returned socket addresses will be suitable for bind(2)ing a socket that will accept(2) connections. - .ai_family = AF_INET, //make sure our server is reached by IPv4 127.0.0.1, not IPv6 [::1] + .ai_family = AF_UNSPEC, //don't care if AF_INET or AF_INET6 .ai_socktype = SOCK_STREAM, //we *do* care about this one! }; addrinfo* servinfo = nullptr; @@ -477,7 +475,8 @@ GdriveAccessInfo gdriveAuthorizeAccess(const std::string& gdriveLoginHint, const if (rcGai != 0) THROW_LAST_SYS_ERROR_GAI(rcGai); if (!servinfo) - throw SysError(L"getaddrinfo: empty server info"); + throw SysError(formatSystemError("getaddrinfo", L"" /*errorCode*/, L"No local IP address available")); + const auto getBoundSocket = [](const auto& /*::addrinfo*/ ai) { @@ -497,34 +496,49 @@ GdriveAccessInfo gdriveAuthorizeAccess(const std::string& gdriveLoginHint, const SocketType socket = invalidSocket; - std::optional<SysError> firstError; + for (const auto* /*::addrinfo*/ si = servinfo; si; si = si->ai_next) - try - { - socket = getBoundSocket(*si); //throw SysError; pass ownership - break; - } - catch (const SysError& e) { if (!firstError) firstError = e; } + if (si->ai_family == AF_INET || + si->ai_family == AF_INET6) + try + { + socket = getBoundSocket(*si); //throw SysError; pass ownership + break; + } + catch (const SysError& e) { if (!firstError) firstError = e; } if (socket == invalidSocket) - throw* firstError; //list was not empty, so there must have been an error! - + { + if (firstError) + throw *firstError; + throw SysError(formatSystemError("getaddrinfo", L"" /*errorCode*/, L"No local IPv4 or IPv6 address available")); + } ZEN_ON_SCOPE_EXIT(closeSocket(socket)); - sockaddr_storage addr = {}; //"sufficiently large to store address information for IPv4 (AF_INET) or IPv6 (AF_INET6)" => sockaddr_in and sockaddr_in6 + sockaddr_storage addr = {}; //"sufficiently large to store address information for IPv4 (AF_INET/sockaddr_in) or IPv6 (AF_INET6/sockaddr_in6)" socklen_t addrLen = sizeof(addr); if (::getsockname(socket, reinterpret_cast<sockaddr*>(&addr), &addrLen) != 0) THROW_LAST_SYS_ERROR_WSA("getsockname"); - if (addr.ss_family != AF_INET) + std::string redirectUrl; + if (addr.ss_family == AF_INET) + { + //the socket is not bound to a specific local IP: + // char buf[INET_ADDRSTRLEN] = {}; //inet_ntop -> "0.0.0.0" + // inet_ntop(AF_INET, &reinterpret_cast<const sockaddr_in&>(addr).sin_addr, buf, std::size(buf)); + const int port = ntohs(reinterpret_cast<const sockaddr_in&>(addr).sin_port); + redirectUrl = "http://127.0.0.1:" + numberTo<std::string>(port); + } + else if (addr.ss_family == AF_INET6) //inet_ntop() == "::" + { + const int port = ntohs(reinterpret_cast<const sockaddr_in6&>(addr).sin6_port); + redirectUrl = "http://[::1]:" + numberTo<std::string>(port); + } + else throw SysError(formatSystemError("getsockname", L"", L"Unexpected protocol family: " + numberTo<std::wstring>(addr.ss_family))); - const int port = ntohs(reinterpret_cast<const sockaddr_in&>(addr).sin_port); - //the socket is not bound to a specific local IP => inet_ntoa(reinterpret_cast<const sockaddr_in&>(addr).sin_addr) == "0.0.0.0" - const std::string redirectUrl = "http://127.0.0.1:" + numberTo<std::string>(port); - if (::listen(socket, SOMAXCONN) != 0) THROW_LAST_SYS_ERROR_WSA("listen"); @@ -859,7 +873,7 @@ std::vector<StarredFolderDetails> getStarredFolders(const GdriveAccess& access) {"corpora", "allDrives"}, //"The 'user' corpus includes all files in "My Drive" and "Shared with me" https://developers.google.com/drive/api/v3/reference/files/list {"includeItemsFromAllDrives", "true"}, {"pageSize", "1000"}, //"[1, 1000] Default: 100" - {"q", std::string("not trashed and starred and mimeType = '") + gdriveFolderMimeType + "'"}, + {"q", std::string("starred and mimeType = '") + gdriveFolderMimeType + "' and not trashed"}, {"spaces", "drive"}, {"supportsAllDrives", "true"}, {"fields", "nextPageToken,incompleteSearch,files(id,name,driveId)"}, //https://developers.google.com/drive/api/v3/reference/files @@ -1036,7 +1050,7 @@ std::vector<GdriveItem> readFolderContent(const std::string& folderId, const Gdr {"corpora", "allDrives"}, //"The 'user' corpus includes all files in "My Drive" and "Shared with me" https://developers.google.com/drive/api/v3/reference/files/list {"includeItemsFromAllDrives", "true"}, {"pageSize", "1000"}, //"[1, 1000] Default: 100" - {"q", "not trashed and '" + folderId + "' in parents"}, + {"q", "'" + folderId + "' in parents and not trashed"}, {"spaces", "drive"}, {"supportsAllDrives", "true"}, {"fields", "nextPageToken,incompleteSearch,files(id,name,mimeType,ownedByMe,size,modifiedTime,parents,shortcutDetails(targetId))"}, //https://developers.google.com/drive/api/v3/reference/files diff --git a/FreeFileSync/Source/afs/sftp.cpp b/FreeFileSync/Source/afs/sftp.cpp index 37d8f77a..9bcae933 100644 --- a/FreeFileSync/Source/afs/sftp.cpp +++ b/FreeFileSync/Source/afs/sftp.cpp @@ -1034,7 +1034,7 @@ private: /**/ cache.idleSshSessions.pop_back(); //run ~SshSession *inside* the lock! => avoid hitting server limits! return; //don't hold lock for too long: delete only one session at a time, then yield... } - std::erase_if(cache.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer + std::erase_if(cache.sshSessionsWithThreadAffinity, [](const auto& v) { return v.second.expired(); }); //clean up dangling weak pointer done = true; }); if (done) diff --git a/FreeFileSync/Source/application.cpp b/FreeFileSync/Source/application.cpp index 0f82caa6..98c73dce 100644 --- a/FreeFileSync/Source/application.cpp +++ b/FreeFileSync/Source/application.cpp @@ -7,20 +7,17 @@ #include "application.h" #include <memory> #include <zen/file_access.h> -//#include <zen/perf.h> #include <zen/shutdown.h> #include <zen/process_exec.h> #include <zen/resolve_path.h> #include <zen/sys_info.h> #include <wx/clipbrd.h> #include <wx/tooltip.h> -//#include <wx/log.h> #include <wx+/app_main.h> +#include <wx+/darkmode.h> #include <wx+/popup_dlg.h> #include <wx+/image_resources.h> -//#include <wx/msgdlg.h> #include "afs/concrete.h" -//#include "base/algorithm.h" #include "base/comparison.h" #include "base/synchronization.h" #include "ui/batch_status_handler.h" @@ -83,7 +80,7 @@ void showSyntaxHelp() L"-DirPair " + _("directory") + L' ' + _("directory") + L'\n' + _("Any number of alternative directory pairs for at most one config file.") + L"\n\n" + - L"-Edit" + '\n' + + L"-Edit" + L'\n' + _("Open the selected configuration for editing only, without executing it.") + L"\n\n" + _("global config file:") + L'\n' + @@ -120,6 +117,10 @@ bool Application::OnInit() catch (const FileError& e) { assert(false); notifyAppError(e.toString()); } }); + //tentatively set program language to OS default until GlobalSettings.xml is read later + try { localizationInit(appendPath(getResourceDirPath(), Zstr("Languages.zip"))); } //throw FileError + catch (const FileError& e) { logExtraError(e.toString()); } + //parallel xBRZ-scaling! => run as early as possible try { imageResourcesInit(appendPath(getResourceDirPath(), Zstr("Icons.zip"))); } catch (const FileError& e) { logExtraError(e.toString()); } //not critical in this context @@ -169,7 +170,7 @@ bool Application::OnInit() { loadCSS("Gtk3Styles.old.css"); //throw SysError } - catch (const SysError& e2) { logExtraError(_("Error during process initialization.") + L"\n\n" + e2.toString()); } + catch (const SysError& e2) { logExtraError(_("Failed to update the color theme.") + L"\n\n" + e2.toString()); } } #else #error unknown GTK version! @@ -191,10 +192,6 @@ bool Application::OnInit() SetAppName(L"FreeFileSync"); //if not set, defaults to executable name - //tentatively set program language to OS default until GlobalSettings.xml is read later - try { localizationInit(appendPath(getResourceDirPath(), Zstr("Languages.zip"))); } //throw FileError - catch (const FileError& e) { logExtraError(e.toString()); } - initAfs({getResourceDirPath(), getConfigDirPath()}); //bonus: using FTP Gdrive implicitly inits OpenSSL (used in runSanityChecks() on Linux) already during globals init @@ -222,7 +219,7 @@ bool Application::OnInit() //Note: app start is deferred: batch mode requires the wxApp eventhandler to be established for UI update events. This is not the case at the time of OnInit()! CallAfter([&] { onEnterEventLoop(); }); - return true; //true: continue processing; false: exit immediately. + return true; //true: continue processing; false: exit immediately } @@ -233,7 +230,7 @@ int Application::OnExit() localizationCleanup(); imageResourcesCleanup(); teardownAfs(); - + colorThemeCleanup(); return wxApp::OnExit(); } @@ -268,7 +265,7 @@ void Application::onEnterEventLoop() //parse command line arguments std::vector<std::pair<Zstring, Zstring>> dirPathPhrasePairs; std::vector<Zstring> cfgFilePaths; - Zstring globalConfigFile; + Zstring globalCfgPathAlt; bool openForEdit = false; { const char* optionEdit = "-edit"; @@ -359,7 +356,7 @@ void Application::onEnterEventLoop() endsWithAsciiNoCase(filePath, Zstr(".ffs_batch"))) cfgFilePaths.push_back(filePath); else if (endsWithAsciiNoCase(filePath, Zstr(".xml"))) - globalConfigFile = filePath; + globalCfgPathAlt = filePath; else throw FileError(replaceCpy(_("Cannot open file %x."), L"%x", fmtPath(filePath)), _("Unexpected file extension:") + L' ' + fmtPath(getFileExtension(filePath)) + L'\n' + @@ -379,6 +376,9 @@ void Application::onEnterEventLoop() { if (!dirPathPhrasePairs.empty()) { + if (cfgFilePaths.size() > 1) + throw FileError(_("Directories cannot be set for more than one configuration file.")); + //check if config at folder-pair level is present: this probably doesn't make sense when replacing/adding the user-specified directories if (hasNonDefaultConfig(mainCfg.firstPair) || std::any_of(mainCfg.additionalPairs.begin(), mainCfg.additionalPairs.end(), hasNonDefaultConfig)) throw FileError(_("The config file must not contain settings at directory pair level when directories are set via command line.")); @@ -396,68 +396,80 @@ void Application::onEnterEventLoop() } }; - //distinguish sync scenarios: - //--------------------------- - const Zstring globalConfigFilePath = !globalConfigFile.empty() ? globalConfigFile : getGlobalConfigDefaultPath(); + const Zstring globalCfgFilePath = !globalCfgPathAlt.empty() ? globalCfgPathAlt : getGlobalConfigDefaultPath(); + + GlobalConfig globalCfg; + try + { + std::wstring warningMsg; + std::tie(globalCfg, warningMsg) = readGlobalConfig(globalCfgFilePath); //throw FileError + assert(warningMsg.empty()); //ignore parsing errors: should be migration problems only *cross-fingers* + } + catch (const FileError& e) + { + try + { + bool cfgFileExists = true; + try { cfgFileExists = itemExists(globalCfgFilePath); /*throw FileError*/ } //=> unclear which exception is more relevant/useless: + catch (const FileError& e2) { throw FileError(replaceCpy(e.toString(), L"\n\n", L'\n'), replaceCpy(e2.toString(), L"\n\n", L'\n')); } + + if (cfgFileExists) + throw; + } + catch (const FileError& e3) { logExtraError(e3.toString()); } + } + + //late GlobalSettings.xml-dependent app initialization: + try { setLanguage(globalCfg.programLanguage); } //throw FileError + catch (const FileError& e) { logExtraError(e.toString()); } + try { colorThemeInit(*this, globalCfg.appColorTheme); } //throw FileError + catch (const FileError& e) { logExtraError(e.toString()); } //not critical in this context + + + //----------------------------------------------------------- + //distinguish sync scenarios: + //----------------------------------------------------------- if (cfgFilePaths.empty()) { //gui mode: default startup if (dirPathPhrasePairs.empty()) - runGuiMode(globalConfigFilePath); + MainDialog::create(globalCfg, globalCfgFilePath); //gui mode: default config with given directories else { - XmlGuiConfig guiCfg; + FfsGuiConfig guiCfg; guiCfg.mainCfg.syncCfg.directionCfg = getDefaultSyncCfg(SyncVariant::mirror); replaceDirectories(guiCfg.mainCfg); //throw FileError - runGuiMode(globalConfigFilePath, guiCfg, std::vector<Zstring>(), !openForEdit /*startComparison*/); + MainDialog::create(guiCfg, {} /*cfgFilePaths*/, globalCfg, globalCfgFilePath, !openForEdit /*startComparison*/); } } - else if (cfgFilePaths.size() == 1) + else if (const Zstring filePath0 = cfgFilePaths[0]; + //batch mode (single config) + cfgFilePaths.size() == 1 && endsWithAsciiNoCase(filePath0, Zstr(".ffs_batch")) && !openForEdit) { - const Zstring filePath = cfgFilePaths[0]; - - //batch mode - if (endsWithAsciiNoCase(filePath, Zstr(".ffs_batch")) && !openForEdit) - { - auto [batchCfg, warningMsg] = readBatchConfig(filePath); //throw FileError - if (!warningMsg.empty()) - throw FileError(warningMsg); //batch mode: break on errors AND even warnings! - - replaceDirectories(batchCfg.guiCfg.mainCfg); //throw FileError - - runBatchMode(globalConfigFilePath, batchCfg, filePath); - } - //GUI mode: single config (ffs_gui *or* ffs_batch) - else - { - auto [guiCfg, warningMsg] = readAnyConfig({filePath}); //throw FileError - if (!warningMsg.empty()) - showNotificationDialog(nullptr, DialogInfoType::warning, PopupDialogCfg().setDetailInstructions(warningMsg)); - //what about simulating changed config on parsing errors? + auto [batchCfg, warningMsg] = readBatchConfig(filePath0); //throw FileError + if (!warningMsg.empty()) + throw FileError(warningMsg); //batch mode: break on errors AND even warnings! - replaceDirectories(guiCfg.mainCfg); //throw FileError - //what about simulating changed config due to directory replacement? - //-> propably fine to not show as changed on GUI and not ask user to save on exit! + replaceDirectories(batchCfg.guiCfg.mainCfg); //throw FileError - runGuiMode(globalConfigFilePath, guiCfg, {filePath}, !openForEdit); //caveat: guiCfg and filepath do not match if directories were set/replaced via command line! - } + runBatchMode(batchCfg, filePath0, globalCfg, globalCfgFilePath); } - //gui mode: merged configs - else + else //GUI mode: (ffs_gui *or* ffs_batch) { - if (!dirPathPhrasePairs.empty()) - throw FileError(_("Directories cannot be set for more than one configuration file.")); - - const auto& [guiCfg, warningMsg] = readAnyConfig(cfgFilePaths); //throw FileError + auto [guiCfg, warningMsg] = readAnyConfig(cfgFilePaths); //throw FileError if (!warningMsg.empty()) showNotificationDialog(nullptr, DialogInfoType::warning, PopupDialogCfg().setDetailInstructions(warningMsg)); //what about simulating changed config on parsing errors? - runGuiMode(globalConfigFilePath, guiCfg, cfgFilePaths, !openForEdit /*startComparison*/); + replaceDirectories(guiCfg.mainCfg); //throw FileError + //what about simulating changed config due to directory replacement? + //-> propably fine to not show as changed on GUI and not ask user to save on exit! + + MainDialog::create(guiCfg, cfgFilePaths, globalCfg, globalCfgFilePath, !openForEdit /*startComparison*/); } } catch (const FileError& e) @@ -468,61 +480,11 @@ void Application::onEnterEventLoop() } -void Application::runGuiMode(const Zstring& globalConfigFilePath) { MainDialog::create(globalConfigFilePath); } - - -void Application::runGuiMode(const Zstring& globalConfigFilePath, - const XmlGuiConfig& guiCfg, - const std::vector<Zstring>& cfgFilePaths, - bool startComparison) -{ - MainDialog::create(globalConfigFilePath, nullptr, guiCfg, cfgFilePaths, startComparison); -} - - -void Application::runBatchMode(const Zstring& globalConfigFilePath, const XmlBatchConfig& batchCfg, const Zstring& cfgFilePath) +void Application::runBatchMode(const FfsBatchConfig& batchCfg, const Zstring& cfgFilePath, GlobalConfig globalCfg, const Zstring& globalCfgFilePath) { const bool allowUserInteraction = !batchCfg.batchExCfg.autoCloseSummary || (!batchCfg.guiCfg.mainCfg.ignoreErrors && batchCfg.batchExCfg.batchErrorHandling == BatchErrorHandling::showPopup); - XmlGlobalSettings globalCfg; - try - { - std::wstring warningMsg; - std::tie(globalCfg, warningMsg) = readGlobalConfig(globalConfigFilePath); //throw FileError - assert(warningMsg.empty()); //ignore parsing errors: should be migration problems only *cross-fingers* - } - catch (const FileError& e) - { - try - { - bool cfgFileExists = true; - try { cfgFileExists = itemExists(globalConfigFilePath); /*throw FileError*/ } //=> unclear which exception is more relevant/useless: - catch (const FileError& e2) { throw FileError(replaceCpy(e.toString(), L"\n\n", L'\n'), replaceCpy(e2.toString(), L"\n\n", L'\n')); } - - if (cfgFileExists) - throw; - } - catch (const FileError& e3) - { - raiseExitCode(exitCode_, FfsExitCode::exception); - - if (allowUserInteraction) - showNotificationDialog(nullptr, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e3.toString())); - else - logExtraError(e3.toString()); - - return; - } - } - - try - { - setLanguage(globalCfg.programLanguage); //throw FileError - } - catch (const FileError& e) { logExtraError(e.toString()); } - - //all settings have been read successfully... /* regular check for software updates -> disabled for batch if (batchCfg.showProgress && manualProgramUpdateRequired()) @@ -737,7 +699,7 @@ void Application::runBatchMode(const Zstring& globalConfigFilePath, const XmlBat //--------------------------------------------------------------------------- try //save global settings to XML: e.g. ignored warnings, last sync stats { - writeConfig(globalCfg, globalConfigFilePath); //FileError + writeConfig(globalCfg, globalCfgFilePath); //FileError } catch (const FileError& e) { @@ -757,7 +719,7 @@ void Application::runBatchMode(const Zstring& globalConfigFilePath, const XmlBat break; case FinalRequest::switchGui: //open new top-level window *after* progress dialog is gone => run on main event loop - MainDialog::create(globalConfigFilePath, &globalCfg, batchCfg.guiCfg, {cfgFilePath}, true /*startComparison*/); + MainDialog::create(batchCfg.guiCfg, {cfgFilePath}, globalCfg, globalCfgFilePath, true /*startComparison*/); break; case FinalRequest::shutdown: diff --git a/FreeFileSync/Source/application.h b/FreeFileSync/Source/application.h index 2642f431..2195f9f4 100644 --- a/FreeFileSync/Source/application.h +++ b/FreeFileSync/Source/application.h @@ -25,9 +25,8 @@ private: wxLayoutDirection GetLayoutDirection() const override; void onEnterEventLoop(); - void runGuiMode (const Zstring& globalConfigFile); - void runGuiMode (const Zstring& globalConfigFile, const XmlGuiConfig& guiCfg, const std::vector<Zstring>& cfgFilePaths, bool startComparison); - void runBatchMode(const Zstring& globalConfigFile, const XmlBatchConfig& batchCfg, const Zstring& cfgFilePath); + void runBatchMode(const FfsBatchConfig& batchCfg, const Zstring& cfgFilePath, + GlobalConfig globalCfg, const Zstring& globalCfgFilePath); FfsExitCode exitCode_ = FfsExitCode::success; }; diff --git a/FreeFileSync/Source/base/algorithm.cpp b/FreeFileSync/Source/base/algorithm.cpp index 6a8cc3ac..4b1318ad 100644 --- a/FreeFileSync/Source/base/algorithm.cpp +++ b/FreeFileSync/Source/base/algorithm.cpp @@ -5,7 +5,6 @@ // ***************************************************************************** #include "algorithm.h" -//#include <zen/perf.h> #include <zen/crc.h> #include <zen/guid.h> #include <zen/file_access.h> //needed for TempFileBuffer only @@ -23,7 +22,8 @@ using namespace fff; void fff::swapGrids(const MainConfiguration& mainCfg, FolderComparison& folderCmp, PhaseCallback& callback /*throw X*/) //throw X { - std::for_each(begin(folderCmp), end(folderCmp), [](BaseFolderPair& baseFolder) { baseFolder.flip(); }); + for (BaseFolderPair& baseFolder : asRange(folderCmp)) + baseFolder.flip(); redetermineSyncDirection(extractDirectionCfg(folderCmp, mainCfg), callback); //throw FileError @@ -44,11 +44,11 @@ private: void recurse(ContainerObject& conObj) const { - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) processFile(file); - for (SymlinkPair& link : conObj.refSubLinks()) + for (SymlinkPair& link : conObj.symlinks()) processLink(link); - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) processFolder(folder); } @@ -195,22 +195,29 @@ private: //test if non-equal items exist in scanned data bool allItemsCategoryEqual(const ContainerObject& conObj) { - return std::all_of(conObj.refSubFiles().begin(), conObj.refSubFiles().end(), - [](const FilePair& file) { return file.getCategory() == FILE_EQUAL; })&& + for (const FilePair& file : conObj.files()) + if (file.getCategory() != FILE_EQUAL) + return false; - std::all_of(conObj.refSubLinks().begin(), conObj.refSubLinks().end(), - [](const SymlinkPair& symlink) { return symlink.getLinkCategory() == SYMLINK_EQUAL; })&& + for (const SymlinkPair& symlink : conObj.symlinks()) + if (symlink.getLinkCategory() != SYMLINK_EQUAL) + return false; - std::all_of(conObj.refSubFolders().begin(), conObj.refSubFolders().end(), [](const FolderPair& folder) - { - return folder.getDirCategory() == DIR_EQUAL && allItemsCategoryEqual(folder); //short-circuit behavior! - }); + for (const FolderPair& folder : conObj.subfolders()) + if (folder.getDirCategory() != DIR_EQUAL || !allItemsCategoryEqual(folder)) //short-circuit behavior! + return false; + + return true; } } bool fff::allElementsEqual(const FolderComparison& folderCmp) { - return std::all_of(begin(folderCmp), end(folderCmp), [](const BaseFolderPair& baseFolder) { return allItemsCategoryEqual(baseFolder); }); + for (const BaseFolderPair& baseFolder : asRange(folderCmp)) + if (!allItemsCategoryEqual(baseFolder)) + return false; + + return true; } //--------------------------------------------------------------------------------------------------------------- @@ -351,9 +358,9 @@ private: void recurse(ContainerObject& conObj, const InSyncFolder* dbFolderL, const InSyncFolder* dbFolderR) { - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) { - file.setMoveRef(nullptr); //discard remnants from previous move detection and start fresh (e.g. consider manual folder rename) + file.setMovePair(nullptr); //discard remnants from previous move detection and start fresh (e.g. consider manual folder rename) const AFS::FingerPrint filePrintL = file.isEmpty<SelectSide::left >() ? 0 : file.getFilePrint<SelectSide::left >(); const AFS::FingerPrint filePrintR = file.isEmpty<SelectSide::right>() ? 0 : file.getFilePrint<SelectSide::right>(); @@ -383,7 +390,7 @@ private: } } - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) { auto getDbEntry = [](const InSyncFolder* dbFolder, const ZstringNorm& folderName) -> const InSyncFolder* { @@ -495,8 +502,8 @@ private: if (FilePair* fileRightOnly = getAssocFilePair<SelectSide::right>(dbFile)) if (sameSizeAndDate<SelectSide::right>(*fileRightOnly, dbFile)) { - if (fileLeftOnly ->getMoveRef() == nullptr && //needless checks? (file prints are unique in this context) - fileRightOnly->getMoveRef() == nullptr && // + if (!fileLeftOnly ->getMovePair() && //needless checks? (file prints are unique in this context) + !fileRightOnly->getMovePair() && // fileLeftOnly ->getCategory() == FILE_LEFT_ONLY && //is it possible we could get conflicting matches!? fileRightOnly->getCategory() == FILE_RIGHT_ONLY) //=> likely 'yes', but only in obscure cases //--------------- found a match --------------- @@ -523,14 +530,10 @@ private: fileRightOnly->removeItem<SelectSide::right>(); //=> call ContainerObject::removeDoubleEmpty() later! } else //regular move pair: mark it! - { - fileLeftOnly ->setMoveRef(fileRightOnly->getId()); - fileRightOnly->setMoveRef(fileLeftOnly ->getId()); - } + fileLeftOnly->setMovePair(fileRightOnly); } else - assert(fileLeftOnly ->getMoveRef() == fileRightOnly->getId() && - fileRightOnly->getMoveRef() == fileLeftOnly ->getId()); + assert(fileLeftOnly->getMovePair() == fileRightOnly); } } @@ -593,11 +596,11 @@ private: void recurse(ContainerObject& conObj, const InSyncFolder* dbFolder) const { - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) processFile(file, dbFolder); - for (SymlinkPair& symlink : conObj.refSubLinks()) + for (SymlinkPair& symlink : conObj.symlinks()) processSymlink(symlink, dbFolder); - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) processDir(folder, dbFolder); } @@ -639,17 +642,7 @@ private: return file.setSyncDirConflict(txtDbNotInSync_); //consider renamed/moved files as "updated" with regards to "changes"-based sync settings: https://freefilesync.org/forum/viewtopic.php?t=10594 - const bool renamedOrMoved = cat == FILE_RENAMED || [&file] - { - if (const FileSystemObject::ObjectId moveFileRef = file.getMoveRef()) - if (auto refFile = dynamic_cast<const FilePair*>(FileSystemObject::retrieve(moveFileRef))) - { - if (refFile->getMoveRef() == file.getId()) //both ends should agree... - return true; - else assert(false); //...and why shouldn't they? - } - return false; - }(); + const bool renamedOrMoved = cat == FILE_RENAMED || file.getMovePair(); const CudAction changeL = compareDbEntry<SelectSide::left >(file, dbEntryL, fileTimeTolerance_, ignoreTimeShiftMinutes_, renamedOrMoved); const CudAction changeR = compareDbEntry<SelectSide::right>(file, dbEntryR, fileTimeTolerance_, ignoreTimeShiftMinutes_, renamedOrMoved); @@ -925,10 +918,8 @@ void fff::setActiveStatus(bool newStatus, FolderComparison& folderCmp) { auto onFsItem = [newStatus](FileSystemObject& fsObj) { fsObj.setActive(newStatus); }; - std::for_each(begin(folderCmp), end(folderCmp), [onFsItem](BaseFolderPair& baseFolder) - { + for (BaseFolderPair& baseFolder : asRange(folderCmp)) visitFSObjectRecursively(baseFolder, onFsItem, onFsItem, onFsItem); - }); } @@ -977,11 +968,11 @@ private: void recurse(ContainerObject& conObj) const { - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) processFile(file); - for (SymlinkPair& symlink : conObj.refSubLinks()) + for (SymlinkPair& symlink : conObj.symlinks()) processLink(symlink); - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) processDir(folder); } @@ -1031,11 +1022,11 @@ private: void recurse(fff::ContainerObject& conObj) const { - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) processFile(file); - for (SymlinkPair& symlink : conObj.refSubLinks()) + for (SymlinkPair& symlink : conObj.symlinks()) processLink(symlink); - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) processDir(folder); } @@ -1165,7 +1156,7 @@ bool matchesTime(const T& obj, time_t timeFrom, time_t timeTo) void fff::applyTimeSpanFilter(FolderComparison& folderCmp, time_t timeFrom, time_t timeTo) { - std::for_each(begin(folderCmp), end(folderCmp), [timeFrom, timeTo](BaseFolderPair& baseFolder) + for (BaseFolderPair& baseFolder : asRange(folderCmp)) { visitFSObjectRecursively(baseFolder, [](FolderPair& folder) { folder.setActive(false); }, @@ -1190,7 +1181,7 @@ void fff::applyTimeSpanFilter(FolderComparison& folderCmp, time_t timeFrom, time symlink.setActive(matchesTime<SelectSide::right>(symlink, timeFrom, timeTo) || matchesTime<SelectSide::left> (symlink, timeFrom, timeTo)); }); - }); + } } @@ -1639,15 +1630,15 @@ void renameItemsOneSide(const std::vector<FileSystemObject*>& selection, const bool nameAlreadyExisting = [&] { - for (const FilePair& file : fsObj.parent().refSubFiles()) + for (const FilePair& file : fsObj.parent().files()) if (haveNameClash(file)) return true; - for (const SymlinkPair& symlink : fsObj.parent().refSubLinks()) + for (const SymlinkPair& symlink : fsObj.parent().symlinks()) if (haveNameClash(symlink)) return true; - for (const FolderPair& folder : fsObj.parent().refSubFolders()) + for (const FolderPair& folder : fsObj.parent().subfolders()) if (haveNameClash(folder)) return true; return false; diff --git a/FreeFileSync/Source/base/algorithm.h b/FreeFileSync/Source/base/algorithm.h index b769f3ea..e091644e 100644 --- a/FreeFileSync/Source/base/algorithm.h +++ b/FreeFileSync/Source/base/algorithm.h @@ -7,7 +7,6 @@ #ifndef ALGORITHM_H_34218518475321452548 #define ALGORITHM_H_34218518475321452548 -//#include <functional> #include <span> #include "structures.h" #include "file_hierarchy.h" diff --git a/FreeFileSync/Source/base/cmp_filetime.h b/FreeFileSync/Source/base/cmp_filetime.h index 72eb198d..00613061 100644 --- a/FreeFileSync/Source/base/cmp_filetime.h +++ b/FreeFileSync/Source/base/cmp_filetime.h @@ -8,7 +8,6 @@ #define CMP_FILETIME_H_032180451675845 #include <ctime> -//#include <algorithm> namespace fff diff --git a/FreeFileSync/Source/base/comparison.cpp b/FreeFileSync/Source/base/comparison.cpp index 0b2b4ff7..1280f76a 100644 --- a/FreeFileSync/Source/base/comparison.cpp +++ b/FreeFileSync/Source/base/comparison.cpp @@ -6,7 +6,6 @@ #include "comparison.h" #include <zen/process_priority.h> -//#include <zen/perf.h> #include <zen/time.h> #include "algorithm.h" #include "parallel_scan.h" @@ -758,7 +757,7 @@ void MergeSides::fillOneSide(const FolderContainer& folderCont, const Zstringc* forEachSorted(folderCont.symlinks, [&](const Zstring& linkName, const LinkAttributes& attrib) { - SymlinkPair& newItem = output.addLink<side>(linkName, attrib); + SymlinkPair& newItem = output.addSymlink<side>(linkName, attrib); checkFailedRead<side>(newItem, errorMsg); }); @@ -868,7 +867,8 @@ void MergeSides::mergeFolders(const FolderContainer& lhs, const FolderContainer& fileRight.second); if (!checkFailedRead(newItem, errorMsg)) undefinedFiles_.push_back(&newItem); - static_assert(std::is_same_v<ContainerObject::FileList, std::list<FilePair>>); //ContainerObject::addFile() must NOT invalidate references used in "undefinedFiles"! + static_assert(std::is_same_v<ContainerObject::FileList::value_type, SharedRef<FilePair>>); + //ContainerObject::addFile() must NOT invalidate references used in "undefinedFiles"! }); //----------------------------------------------------------------------------------------------- @@ -876,20 +876,20 @@ void MergeSides::mergeFolders(const FolderContainer& lhs, const FolderContainer& matchFolders(lhs.symlinks, rhs.symlinks, [&](const SymlinkData& symlinkLeft, const Zstringc* conflictMsg) { - SymlinkPair& newItem = output.addLink<SelectSide::left>(symlinkLeft.first, symlinkLeft.second); + SymlinkPair& newItem = output.addSymlink<SelectSide::left>(symlinkLeft.first, symlinkLeft.second); checkFailedRead(newItem, conflictMsg ? conflictMsg : errorMsg); }, [&](const SymlinkData& symlinkRight, const Zstringc* conflictMsg) { - SymlinkPair& newItem = output.addLink<SelectSide::right>(symlinkRight.first, symlinkRight.second); + SymlinkPair& newItem = output.addSymlink<SelectSide::right>(symlinkRight.first, symlinkRight.second); checkFailedRead(newItem, conflictMsg ? conflictMsg : errorMsg); }, [&](const SymlinkData& symlinkLeft, const SymlinkData& symlinkRight) //both sides { - SymlinkPair& newItem = output.addLink(symlinkLeft.first, - symlinkLeft.second, - symlinkRight.first, - symlinkRight.second); + SymlinkPair& newItem = output.addSymlink(symlinkLeft.first, + symlinkLeft.second, + symlinkRight.first, + symlinkRight.second); if (!checkFailedRead(newItem, errorMsg)) undefinedSymlinks_.push_back(&newItem); }); @@ -922,15 +922,15 @@ void MergeSides::mergeFolders(const FolderContainer& lhs, const FolderContainer& //uncheck excluded directories (see parallelDeviceTraversal()) + remove superfluous excluded subdirectories void stripExcludedDirectories(ContainerObject& conObj, const PathFilter& filter) { - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) stripExcludedDirectories(folder, filter); /* remove superfluous directories: this does not invalidate "std::vector<FilePair*>& undefinedFiles", since we delete folders only - and there is no side-effect for memory positions of FilePair and SymlinkPair thanks to std::list! */ - static_assert(std::is_same_v<std::list<FolderPair>, ContainerObject::FolderList>); + and there is no side-effect for memory positions of FilePair and SymlinkPair thanks to SharedRef! */ + static_assert(std::is_same_v<ContainerObject::FolderList::value_type, SharedRef<FolderPair>>); - conObj.refSubFolders().remove_if([&](FolderPair& folder) + conObj.foldersRemoveIf([&](FolderPair& folder) { const bool included = folder.passDirFilter(filter, nullptr /*childItemMightMatch*/); //child items were already excluded during scanning @@ -938,9 +938,9 @@ void stripExcludedDirectories(ContainerObject& conObj, const PathFilter& filter) folder.setActive(false); return !included && //don't check active status, but eval filter directly! - folder.refSubFolders().empty() && - folder.refSubLinks ().empty() && - folder.refSubFiles ().empty(); + folder.subfolders().empty() && + folder.symlinks ().empty() && + folder.files ().empty(); }); } @@ -1070,19 +1070,11 @@ FolderComparison fff::compare(WarningDialogs& warnings, //------------------------------------------------------------------------------- - //specify process and resource handling priorities - std::unique_ptr<ScheduleForBackgroundProcessing> backgroundPrio; - if (runWithBackgroundPriority) - tryReportingError([&] - { - backgroundPrio = std::make_unique<ScheduleForBackgroundProcessing>(); //throw FileError - }, callback); //throw X - //prevent operating system going into sleep state - std::unique_ptr<PreventStandby> noStandby; + std::unique_ptr<SetProcessPriority> noStandby; try { - noStandby = std::make_unique<PreventStandby>(); //throw FileError + noStandby = std::make_unique<SetProcessPriority>(runWithBackgroundPriority ? ProcessPriority::background : ProcessPriority::normal); //throw FileError } catch (const FileError& e) //failure is not critical => log only { diff --git a/FreeFileSync/Source/base/db_file.cpp b/FreeFileSync/Source/base/db_file.cpp index e75f7cdb..a52d47a6 100644 --- a/FreeFileSync/Source/base/db_file.cpp +++ b/FreeFileSync/Source/base/db_file.cpp @@ -8,9 +8,7 @@ #include <bit> //std::endian #include <zen/guid.h> #include <zen/crc.h> -//#include <zen/build_info.h> #include <zen/zlib_wrap.h> -//#include "../afs/concrete.h" #include "../afs/native.h" #include "status_handler_impl.h" @@ -579,16 +577,16 @@ private: void recurse(const ContainerObject& conObj, const Zstring& relPath, InSyncFolder& dbFolder) { - process(conObj.refSubFiles (), relPath, dbFolder.files); - process(conObj.refSubLinks (), relPath, dbFolder.symlinks); - process(conObj.refSubFolders(), relPath, dbFolder.folders); + processFiles (conObj, relPath, dbFolder.files); + processLinks (conObj, relPath, dbFolder.symlinks); + processFolders(conObj, relPath, dbFolder.folders); } - void process(const ContainerObject::FileList& currentFiles, const Zstring& parentRelPath, InSyncFolder::FileList& dbFiles) + void processFiles(const ContainerObject& conObj, const Zstring& parentRelPath, InSyncFolder::FileList& dbFiles) { std::unordered_set<ZstringNorm> toPreserve; - for (const FilePair& file : currentFiles) + for (const FilePair& file : conObj.files()) if (!file.isPairEmpty()) { if (file.getCategory() == FILE_EQUAL) //data in sync: write current state @@ -628,11 +626,11 @@ private: }); } - void process(const ContainerObject::SymlinkList& currentSymlinks, const Zstring& parentRelPath, InSyncFolder::SymlinkList& dbSymlinks) + void processLinks(const ContainerObject& conObj, const Zstring& parentRelPath, InSyncFolder::SymlinkList& dbSymlinks) { std::unordered_set<ZstringNorm> toPreserve; - for (const SymlinkPair& symlink : currentSymlinks) + for (const SymlinkPair& symlink : conObj.symlinks()) if (!symlink.isPairEmpty()) { if (symlink.getLinkCategory() == SYMLINK_EQUAL) //data in sync: write current state @@ -667,11 +665,11 @@ private: }); } - void process(const ContainerObject::FolderList& currentFolders, const Zstring& parentRelPath, InSyncFolder::FolderList& dbFolders) + void processFolders(const ContainerObject& conObj, const Zstring& parentRelPath, InSyncFolder::FolderList& dbFolders) { std::unordered_map<ZstringNorm, const FolderPair*> toPreserve; - for (const FolderPair& folder : currentFolders) + for (const FolderPair& folder : conObj.subfolders()) if (!folder.isPairEmpty()) { if (folder.getDirCategory() == DIR_EQUAL) diff --git a/FreeFileSync/Source/base/dir_lock.cpp b/FreeFileSync/Source/base/dir_lock.cpp index cf0ff18a..9162551f 100644 --- a/FreeFileSync/Source/base/dir_lock.cpp +++ b/FreeFileSync/Source/base/dir_lock.cpp @@ -545,7 +545,7 @@ private: void tidyUp() //remove obsolete entries { - std::erase_if(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); + std::erase_if(locksByGuid_, [](const auto& v) { return v.second.expired(); }); std::erase_if(guidByPath_, [&](const auto& v) { return !locksByGuid_.contains(v.second); }); } diff --git a/FreeFileSync/Source/base/file_hierarchy.cpp b/FreeFileSync/Source/base/file_hierarchy.cpp index d293042f..ad53ec1c 100644 --- a/FreeFileSync/Source/base/file_hierarchy.cpp +++ b/FreeFileSync/Source/base/file_hierarchy.cpp @@ -57,13 +57,11 @@ std::wstring fff::getShortDisplayNameForFolderPair(const AbstractPath& itemPathL void ContainerObject::removeDoubleEmpty() { - auto isEmpty = [](const FileSystemObject& fsObj) { return fsObj.isPairEmpty(); }; + eraseIf(files_, [](const auto& fsObj) { return fsObj.ref().isPairEmpty(); }); + eraseIf(symlinks_, [](const auto& fsObj) { return fsObj.ref().isPairEmpty(); }); + eraseIf(subfolders_, [](const auto& fsObj) { return fsObj.ref().isPairEmpty(); }); - refSubFiles ().remove_if(isEmpty); - refSubLinks ().remove_if(isEmpty); - refSubFolders().remove_if(isEmpty); - - for (FolderPair& folder : refSubFolders()) + for (FolderPair& folder : subfolders()) folder.removeDoubleEmpty(); } @@ -236,9 +234,9 @@ SyncOperation getIsolatedSyncOperation(const FileSystemObject& fsObj, template <class Predicate> inline bool hasDirectChild(const ContainerObject& conObj, Predicate p) { - return std::any_of(conObj.refSubFiles ().begin(), conObj.refSubFiles ().end(), p) || - std::any_of(conObj.refSubLinks ().begin(), conObj.refSubLinks ().end(), p) || - std::any_of(conObj.refSubFolders().begin(), conObj.refSubFolders().end(), p); + return std::any_of(conObj.files ().begin(), conObj.files ().end(), p) || + std::any_of(conObj.symlinks ().begin(), conObj.symlinks ().end(), p) || + std::any_of(conObj.subfolders().begin(), conObj.subfolders().end(), p); } } @@ -343,27 +341,23 @@ SyncOperation FilePair::applyMoveOptimization(SyncOperation op) const { /* check whether we can optimize "create + delete" via "move": note: as long as we consider "create + delete" cases only, detection of renamed files, should be fine even for "binary" comparison variant! */ - if (moveFileRef_) - if (auto refFile = dynamic_cast<const FilePair*>(FileSystemObject::retrieve(moveFileRef_))) - { - if (refFile->moveFileRef_ == getId()) //both ends should agree... - { - const SyncOperation opRef = refFile->FileSystemObject::getSyncOperation(); //do *not* make a virtual call! - if (op == SO_CREATE_LEFT && - opRef == SO_DELETE_LEFT) - op = SO_MOVE_LEFT_TO; - else if (op == SO_DELETE_LEFT && - opRef == SO_CREATE_LEFT) - op = SO_MOVE_LEFT_FROM; - else if (op == SO_CREATE_RIGHT && - opRef == SO_DELETE_RIGHT) - op = SO_MOVE_RIGHT_TO; - else if (op == SO_DELETE_RIGHT && - opRef == SO_CREATE_RIGHT) - op = SO_MOVE_RIGHT_FROM; - } - else assert(false); //...and why shouldn't they? - } + if (FilePair* refFile = getMovePair()) + { + const SyncOperation opRef = refFile->FileSystemObject::getSyncOperation(); //do *not* make a virtual call! + if (op == SO_CREATE_LEFT && + opRef == SO_DELETE_LEFT) + op = SO_MOVE_LEFT_TO; + else if (op == SO_DELETE_LEFT && + opRef == SO_CREATE_LEFT) + op = SO_MOVE_LEFT_FROM; + else if (op == SO_CREATE_RIGHT && + opRef == SO_DELETE_RIGHT) + op = SO_MOVE_RIGHT_TO; + else if (op == SO_DELETE_RIGHT && + opRef == SO_CREATE_RIGHT) + op = SO_MOVE_RIGHT_FROM; + } + return op; } @@ -560,9 +554,8 @@ std::wstring fff::getSyncOpDescription(const FileSystemObject& fsObj) case SO_MOVE_RIGHT_FROM: case SO_MOVE_RIGHT_TO: if (auto fileFrom = dynamic_cast<const FilePair*>(&fsObj)) - if (auto fileTo = dynamic_cast<const FilePair*>(FileSystemObject::retrieve(fileFrom->getMoveRef()))) + if (const FilePair* fileTo = fileFrom->getMovePair()) { - assert(fileTo->getMoveRef() == fileFrom->getId()); const bool onLeft = op == SO_MOVE_LEFT_FROM || op == SO_MOVE_LEFT_TO; const bool isMoveSource = op == SO_MOVE_LEFT_FROM || op == SO_MOVE_RIGHT_FROM; diff --git a/FreeFileSync/Source/base/file_hierarchy.h b/FreeFileSync/Source/base/file_hierarchy.h index 11698018..08c3a902 100644 --- a/FreeFileSync/Source/base/file_hierarchy.h +++ b/FreeFileSync/Source/base/file_hierarchy.h @@ -8,10 +8,6 @@ #define FILE_HIERARCHY_H_257235289645296 #include <string> -//#include <memory> -#include <list> -//#include <functional> -#include <unordered_set> #include <unordered_map> #include "structures.h" #include "path_filter.h" @@ -68,7 +64,7 @@ struct FolderContainer files.insert_or_assign(itemName, attr); //update entry if already existing (e.g. during folder traverser "retry") } - void addLink(const Zstring& itemName, const LinkAttributes& attr) + void addSymlink(const Zstring& itemName, const LinkAttributes& attr) { symlinks.insert_or_assign(itemName, attr); } @@ -158,15 +154,15 @@ class BaseFolderPair; /*------------------------------------------------------------------ inheritance diagram: - ObjectMgr PathInformation - /|\ /|\ - |________ _________|_________ - || | - FileSystemObject ContainerObject - /|\ /|\ - ___________|___________ ______|______ - | | | | | - SymlinkPair FilePair FolderPair BaseFolderPair +std::enable_shared_from_this PathInformation + /|\ /|\ + |____________ _________|_________ + | | | + FileSystemObject ContainerObject + /|\ /|\ + ___________|___________ ______|______ + | | | | | + SymlinkPair FilePair FolderPair BaseFolderPair ------------------------------------------------------------------*/ @@ -198,45 +194,43 @@ class ContainerObject : public virtual PathInformation friend class FileSystemObject; //access to updateRelPathsRecursion() public: - using FileList = std::list<FilePair>; //MergeSides::execute() requires a structure that doesn't invalidate pointers after push_back() - using SymlinkList = std::list<SymlinkPair>; // - using FolderList = std::list<FolderPair>; + using FileList = std::vector<zen::SharedRef<FilePair>>; //MergeSides::execute() requires a structure that doesn't invalidate pointers after push_back() + using SymlinkList = std::vector<zen::SharedRef<SymlinkPair>>; // + using FolderList = std::vector<zen::SharedRef<FolderPair>>; - FolderPair& addFolder(const Zstring& itemNameL, //file exists on both sides - const FolderAttributes& left, - const Zstring& itemNameR, - const FolderAttributes& right); + FolderPair& addFolder(const Zstring& itemNameL, const FolderAttributes& attribL, + const Zstring& itemNameR, const FolderAttributes& attribR); //exists on both sides template <SelectSide side> - FolderPair& addFolder(const Zstring& itemName, //dir exists on one side only - const FolderAttributes& attr); + FolderPair& addFolder(const Zstring& itemName, const FolderAttributes& attr); //exists on one side only - FilePair& addFile(const Zstring& itemNameL, //file exists on both sides - const FileAttributes& left, - const Zstring& itemNameR, - const FileAttributes& right); + FilePair& addFile(const Zstring& itemNameL, const FileAttributes& attribL, + const Zstring& itemNameR, const FileAttributes& attribR); //exists on both sides template <SelectSide side> - FilePair& addFile(const Zstring& itemName, //file exists on one side only - const FileAttributes& attr); + FilePair& addFile(const Zstring& itemName, const FileAttributes& attr); //exists on one side only - SymlinkPair& addLink(const Zstring& itemNameL, //link exists on both sides - const LinkAttributes& left, - const Zstring& itemNameR, - const LinkAttributes& right); + SymlinkPair& addSymlink(const Zstring& itemNameL, const LinkAttributes& attribL, + const Zstring& itemNameR, const LinkAttributes& attribR); //exists on both sides template <SelectSide side> - SymlinkPair& addLink(const Zstring& itemName, //link exists on one side only - const LinkAttributes& attr); + SymlinkPair& addSymlink(const Zstring& itemName, const LinkAttributes& attr); //exists on one side only - const FileList& refSubFiles() const { return subFiles_; } - /**/ FileList& refSubFiles() { return subFiles_; } + zen::Range<zen::DerefIter<FileList::const_iterator, const FilePair>> files() const { return {files_.begin(), files_.end()}; } + zen::Range<zen::DerefIter<FileList:: iterator, FilePair>> files() { return {files_.begin(), files_.end()}; } - const SymlinkList& refSubLinks() const { return subLinks_; } - /**/ SymlinkList& refSubLinks() { return subLinks_; } + zen::Range<zen::DerefIter<SymlinkList::const_iterator, const SymlinkPair>> symlinks() const { return {symlinks_.begin(), symlinks_.end()}; } + zen::Range<zen::DerefIter<SymlinkList:: iterator, SymlinkPair>> symlinks() { return {symlinks_.begin(), symlinks_.end()}; } - const FolderList& refSubFolders() const { return subFolders_; } - /**/ FolderList& refSubFolders() { return subFolders_; } + zen::Range<zen::DerefIter<FolderList::const_iterator, const FolderPair>> subfolders() const { return {subfolders_.begin(), subfolders_.end()}; } + zen::Range<zen::DerefIter<FolderList:: iterator, FolderPair>> subfolders() { return {subfolders_.begin(), subfolders_.end()}; } + + void clearFiles () { files_ .clear(); } + void clearSymlinks () { symlinks_ .clear(); } + void clearSubfolders() { subfolders_.clear(); } + + template <class Function> + void foldersRemoveIf(Function fun) { zen::eraseIf(subfolders_, [fun](auto& fsObj) { return fun(fsObj.ref()); }); } const BaseFolderPair& getBase() const { return base_; } /**/ BaseFolderPair& getBase() { return base_; } @@ -265,9 +259,9 @@ private: Zstring getRelativePathL() const override { return relPathL_; } Zstring getRelativePathR() const override { return relPathR_; } - FileList subFiles_; - SymlinkList subLinks_; - FolderList subFolders_; + FileList files_; + SymlinkList symlinks_; + FolderList subfolders_; Zstring relPathL_; //path relative to base sync dir (without leading/trailing FILE_NAME_SEPARATOR) Zstring relPathR_; //class invariant: shared Zstring iff equal! @@ -330,41 +324,11 @@ private: }; -//get rid of SharedRef<> indirection -template <class IterImpl, //underlying iterator type - class T> //target value type -class DerefIter -{ -public: - using iterator_category = std::bidirectional_iterator_tag; - using value_type = T; - using difference_type = ptrdiff_t; - using pointer = T*; - using reference = T&; - - DerefIter() {} - DerefIter(IterImpl it) : it_(it) {} - //DerefIter(const DerefIter& other) : it_(other.it_) {} - DerefIter& operator++() { ++it_; return *this; } - DerefIter& operator--() { --it_; return *this; } - inline friend DerefIter operator++(DerefIter& it, int) { return it++; } - inline friend DerefIter operator--(DerefIter& it, int) { return it--; } - inline friend ptrdiff_t operator-(const DerefIter& lhs, const DerefIter& rhs) { return lhs.it_ - rhs.it_; } - bool operator==(const DerefIter&) const = default; - T& operator* () const { return it_->ref(); } - T* operator->() const { return &it_->ref(); } -private: - IterImpl it_{}; -}; - - using FolderComparison = std::vector<zen::SharedRef<BaseFolderPair>>; //make sure pointers to sub-elements remain valid //don't change this back to std::vector<BaseFolderPair> inconsiderately: comparison uses push_back to add entries which may result in a full copy! -DerefIter<typename FolderComparison::iterator, BaseFolderPair> inline begin( FolderComparison& vect) { return vect.begin(); } -DerefIter<typename FolderComparison::iterator, BaseFolderPair> inline end ( FolderComparison& vect) { return vect.end (); } -DerefIter<typename FolderComparison::const_iterator, const BaseFolderPair> inline begin(const FolderComparison& vect) { return vect.begin(); } -DerefIter<typename FolderComparison::const_iterator, const BaseFolderPair> inline end (const FolderComparison& vect) { return vect.end (); } +zen::Range<zen::DerefIter<FolderComparison::iterator, BaseFolderPair>> inline asRange( FolderComparison& vect) { return {vect.begin(), vect.end()}; } +zen::Range<zen::DerefIter<FolderComparison::const_iterator, const BaseFolderPair>> inline asRange(const FolderComparison& vect) { return {vect.begin(), vect.end()}; } //------------------------------------------------------------------ struct FSObjectVisitor @@ -375,41 +339,9 @@ struct FSObjectVisitor virtual void visit(const FolderPair& folder ) = 0; }; - -//inherit from this class to allow safe random access by id instead of unsafe raw pointer -//allow for similar semantics like std::weak_ptr without having to use std::shared_ptr -template <class T> -class ObjectMgr -{ -public: - using ObjectId = ObjectMgr*; - using ObjectIdConst = const ObjectMgr*; - - ObjectIdConst getId() const { return this; } - /**/ ObjectId getId() { return this; } - - static const T* retrieve(ObjectIdConst id) //returns nullptr if object is not valid anymore - { - return static_cast<const T*>(activeObjects_.contains(id) ? id : nullptr); - } - static T* retrieve(ObjectId id) { return const_cast<T*>(retrieve(static_cast<ObjectIdConst>(id))); } - -protected: - ObjectMgr () { activeObjects_.insert(this); } - ~ObjectMgr() { activeObjects_.erase (this); } - -private: - ObjectMgr (const ObjectMgr& rhs) = delete; - ObjectMgr& operator=(const ObjectMgr& rhs) = delete; //it's not well-defined what copying an objects means regarding object-identity in this context - - //our global ObjectMgr is not thread-safe (and currently does not need to be!) - //assert(runningOnMainThread()); -> still, may be accessed by synchronization worker threads, one thread at a time - static inline std::unordered_set<const ObjectMgr*> activeObjects_; //external linkage! -}; - //------------------------------------------------------------------ -class FileSystemObject : public ObjectMgr<FileSystemObject>, public virtual PathInformation +class FileSystemObject : public std::enable_shared_from_this<FileSystemObject>, public virtual PathInformation { public: virtual void accept(FSObjectVisitor& visitor) const = 0; @@ -493,7 +425,7 @@ private: //conserve memory (avoid std::string SSO overhead + allow ref-counting!) Zstring itemNameL_; //use as indicator: empty means "not existing on this side" - Zstring itemNameR_; //class invariant: shared Zstring iff equal! + Zstring itemNameR_; //class invariant: same Zstring.c_str() pointer iff equal! ContainerObject& parent_; }; @@ -572,8 +504,9 @@ public: template <SelectSide side> AFS::FingerPrint getFilePrint() const; template <SelectSide side> void clearFilePrint(); - void setMoveRef(ObjectId refId) { moveFileRef_ = refId; } //reference to corresponding renamed file - ObjectId getMoveRef() const { assert(!moveFileRef_ || (isEmpty<SelectSide::left>() != isEmpty<SelectSide::right>())); return moveFileRef_; } //may be nullptr + + void setMovePair(FilePair* ref); //reference to corresponding moved/renamed file + FilePair* getMovePair() const; //may be nullptr SyncOperation testSyncOperation(SyncDirection testSyncDir) const override; //semantics: "what if"! assumes "active, no conflict, no recursion (directory)! SyncOperation getSyncOperation() const override; @@ -607,7 +540,7 @@ private: FileAttributes attrL_; FileAttributes attrR_; - ObjectId moveFileRef_ = nullptr; //optional, filled by redetermineSyncDirection() + std::weak_ptr<FilePair> moveFileRef_; //optional, filled by DetectMovedFiles::findAndSetMovePair() FileContentCategory contentCategory_ = FileContentCategory::unknown; Zstringc categoryDescr_; //optional: custom category description (e.g. FileContentCategory::conflict or invalidTime) @@ -615,7 +548,7 @@ private: //------------------------------------------------------------------ -class SymlinkPair : public FileSystemObject //this class models a TRUE symbolic link, i.e. one that is NEVER dereferenced: deref-links should be directly placed in class File/FolderPair +class SymlinkPair : public FileSystemObject //models an unresolved symbolic link: followed-links should go in FilePair/FolderPair { public: void accept(FSObjectVisitor& visitor) const override; @@ -726,11 +659,11 @@ public: void execute(ContainerObject& conObj) { - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) onFile_(file); - for (SymlinkPair& symlink : conObj.refSubLinks()) + for (SymlinkPair& symlink : conObj.symlinks()) onSymlink_(symlink); - for (FolderPair& subFolder : conObj.refSubFolders()) + for (FolderPair& subFolder : conObj.subfolders()) { onFolder_(subFolder); execute(subFolder); @@ -873,14 +806,16 @@ template <SelectSide side> inline void FileSystemObject::removeFsObject() { if (isEmpty<getOtherSide<side>>()) - itemNameL_ = itemNameR_ = Zstring(); //ensure (c_str) class invariant! + { + selectParam<side>(itemNameL_, itemNameR_) = selectParam<getOtherSide<side>>(itemNameL_, itemNameR_); //ensure (c_str) class invariant! + setSyncDir(SyncDirection::none); //calls notifySyncCfgChanged() + } else + { selectParam<side>(itemNameL_, itemNameR_).clear(); - - if (isPairEmpty()) - setSyncDir(SyncDirection::none); //calls notifySyncCfgChanged() - else //keep current syncDir_ + //keep current syncDir_ notifySyncCfgChanged(); //needed!? + } propagateChangedItemName<side>(); } @@ -889,22 +824,12 @@ void FileSystemObject::removeFsObject() template <SelectSide side> inline void FilePair::removeItem() { + if (isEmpty<getOtherSide<side>>()) + setMovePair(nullptr); //cut ties between "move" pairs + selectParam<side>(attrL_, attrR_) = FileAttributes(); contentCategory_ = FileContentCategory::unknown; removeFsObject<side>(); - - //cut ties between "move" pairs - if (isPairEmpty()) - { - if (moveFileRef_) - if (auto refFile = dynamic_cast<FilePair*>(FileSystemObject::retrieve(moveFileRef_))) - { - if (refFile->moveFileRef_ == getId()) //both ends should agree... - refFile->moveFileRef_ = nullptr; - else assert(false); //...and why shouldn't they? - } - moveFileRef_ = nullptr; - } } @@ -920,11 +845,11 @@ void SymlinkPair::removeItem() template <SelectSide side> inline void FolderPair::removeItem() { - for (FilePair& file : refSubFiles()) + for (FilePair& file : files()) file.removeItem<side>(); - for (SymlinkPair& symlink : refSubLinks()) + for (SymlinkPair& symlink : symlinks()) symlink.removeItem<side>(); - for (FolderPair& folder : refSubFolders()) + for (FolderPair& folder : subfolders()) folder.removeItem<side>(); selectParam<side>(attrL_, attrR_) = FolderAttributes(); @@ -987,7 +912,7 @@ void ContainerObject::updateRelPathsRecursion(const FileSystemObject& fsAlias) fsAlias.parent().relPathR_), fsAlias.getItemName<side>()); assert(relPathL_.c_str() == relPathR_.c_str() || relPathL_ != relPathR_); - for (FolderPair& folder : subFolders_) + for (FolderPair& folder : subfolders()) folder.updateRelPathsRecursion<side>(folder); } @@ -1008,83 +933,71 @@ ContainerObject::ContainerObject(const FileSystemObject& fsAlias) : inline -FolderPair& ContainerObject::addFolder(const Zstring& itemNameL, - const FolderAttributes& left, - const Zstring& itemNameR, - const FolderAttributes& right) +FolderPair& ContainerObject::addFolder(const Zstring& itemNameL, const FolderAttributes& attribL, + const Zstring& itemNameR, const FolderAttributes& attribR) { - subFolders_.emplace_back(itemNameL, left, itemNameR, right, *this); - return subFolders_.back(); + subfolders_.push_back(makeSharedRef<FolderPair>(itemNameL, attribL, itemNameR, attribR, *this)); + return subfolders_.back().ref(); } template <> inline FolderPair& ContainerObject::addFolder<SelectSide::left>(const Zstring& itemName, const FolderAttributes& attr) { - subFolders_.emplace_back(itemName, attr, Zstring(), FolderAttributes(), *this); - return subFolders_.back(); + return addFolder(itemName, attr, Zstring(), FolderAttributes()); } template <> inline FolderPair& ContainerObject::addFolder<SelectSide::right>(const Zstring& itemName, const FolderAttributes& attr) { - subFolders_.emplace_back(Zstring(), FolderAttributes(), itemName, attr, *this); - return subFolders_.back(); + return addFolder(Zstring(), FolderAttributes(), itemName, attr); } inline -FilePair& ContainerObject::addFile(const Zstring& itemNameL, - const FileAttributes& left, - const Zstring& itemNameR, - const FileAttributes& right) //file exists on both sides +FilePair& ContainerObject::addFile(const Zstring& itemNameL, const FileAttributes& attribL, + const Zstring& itemNameR, const FileAttributes& attribR) { - subFiles_.emplace_back(itemNameL, left, itemNameR, right, *this); - return subFiles_.back(); + files_.push_back(makeSharedRef<FilePair>(itemNameL, attribL, itemNameR, attribR, *this)); + return files_.back().ref(); } template <> inline FilePair& ContainerObject::addFile<SelectSide::left>(const Zstring& itemName, const FileAttributes& attr) { - subFiles_.emplace_back(itemName, attr, Zstring(), FileAttributes(), *this); - return subFiles_.back(); + return addFile(itemName, attr, Zstring(), FileAttributes()); } template <> inline FilePair& ContainerObject::addFile<SelectSide::right>(const Zstring& itemName, const FileAttributes& attr) { - subFiles_.emplace_back(Zstring(), FileAttributes(), itemName, attr, *this); - return subFiles_.back(); + return addFile(Zstring(), FileAttributes(), itemName, attr); } inline -SymlinkPair& ContainerObject::addLink(const Zstring& itemNameL, - const LinkAttributes& left, - const Zstring& itemNameR, - const LinkAttributes& right) //link exists on both sides +SymlinkPair& ContainerObject::addSymlink(const Zstring& itemNameL, const LinkAttributes& attribL, + const Zstring& itemNameR, const LinkAttributes& attribR) { - subLinks_.emplace_back(itemNameL, left, itemNameR, right, *this); - return subLinks_.back(); + symlinks_.push_back(makeSharedRef<SymlinkPair>(itemNameL, attribL, itemNameR, attribR, *this)); + return symlinks_.back().ref(); } template <> inline -SymlinkPair& ContainerObject::addLink<SelectSide::left>(const Zstring& itemName, const LinkAttributes& attr) +SymlinkPair& ContainerObject::addSymlink<SelectSide::left>(const Zstring& itemName, const LinkAttributes& attr) { - subLinks_.emplace_back(itemName, attr, Zstring(), LinkAttributes(), *this); - return subLinks_.back(); + return addSymlink(itemName, attr, Zstring(), LinkAttributes()); } template <> inline -SymlinkPair& ContainerObject::addLink<SelectSide::right>(const Zstring& itemName, const LinkAttributes& attr) +SymlinkPair& ContainerObject::addSymlink<SelectSide::right>(const Zstring& itemName, const LinkAttributes& attr) { - subLinks_.emplace_back(Zstring(), LinkAttributes(), itemName, attr, *this); - return subLinks_.back(); + return addSymlink(Zstring(), LinkAttributes(), itemName, attr); } @@ -1099,11 +1012,11 @@ void FileSystemObject::flip() inline void ContainerObject::flip() { - for (FilePair& file : refSubFiles()) + for (FilePair& file : files()) file.flip(); - for (SymlinkPair& symlink : refSubLinks()) + for (SymlinkPair& symlink : symlinks()) symlink.flip(); - for (FolderPair& folder : refSubFolders()) + for (FolderPair& folder : subfolders()) folder.flip(); std::swap(relPathL_, relPathR_); @@ -1436,6 +1349,46 @@ void FilePair::clearFilePrint() } +inline +void FilePair::setMovePair(FilePair* ref) +{ + FilePair* refOld = getMovePair(); + if (ref != refOld) + { + if (refOld) + refOld->moveFileRef_.reset(); + + if (ref) + { + FilePair* refOld2 = ref->getMovePair(); + assert(!refOld2); //destroying already exising pair!? why? + if (refOld2) + refOld2 ->moveFileRef_.reset(); + + /**/ moveFileRef_ = std::static_pointer_cast<FilePair>(ref->shared_from_this()); + ref->moveFileRef_ = std::static_pointer_cast<FilePair>( shared_from_this()); + } + else + moveFileRef_.reset(); + } + else + assert(!ref); //are we called needlessly!? +} + + +inline +FilePair* FilePair::getMovePair() const +{ + if (moveFileRef_.expired()) //skip std::shared_ptr construction => premature optimization? + return nullptr; + + FilePair* ref = moveFileRef_.lock().get(); + assert(!ref || (isEmpty<SelectSide::left>() != isEmpty<SelectSide::right>())); + assert(!ref || ref->moveFileRef_.lock().get() == this); //both ends should agree + return ref; +} + + template <SelectSide sideTrg> inline void FolderPair::setSyncedTo(bool isSymlinkTrg, bool isSymlinkSrc) @@ -1459,19 +1412,11 @@ void FilePair::setSyncedTo(uint64_t fileSize, bool isSymlinkTrg, bool isSymlinkSrc) { + setMovePair(nullptr); //cut ties between "move" pairs + selectParam< sideTrg >(attrL_, attrR_) = {lastWriteTimeTrg, fileSize, filePrintTrg, isSymlinkTrg}; selectParam<getOtherSide<sideTrg>>(attrL_, attrR_) = {lastWriteTimeSrc, fileSize, filePrintSrc, isSymlinkSrc}; - //cut ties between "move" pairs - if (moveFileRef_) - if (auto refFile = dynamic_cast<FilePair*>(FileSystemObject::retrieve(moveFileRef_))) - { - if (refFile->moveFileRef_ == getId()) //both ends should agree... - refFile->moveFileRef_ = nullptr; - else assert(false); //...and why shouldn't they? - } - moveFileRef_ = nullptr; - setItemName<sideTrg>(getItemName<getOtherSide<sideTrg>>()); contentCategory_ = FileContentCategory::equal; diff --git a/FreeFileSync/Source/base/icon_loader.cpp b/FreeFileSync/Source/base/icon_loader.cpp index 76c24f03..f4b75891 100644 --- a/FreeFileSync/Source/base/icon_loader.cpp +++ b/FreeFileSync/Source/base/icon_loader.cpp @@ -5,7 +5,6 @@ // ***************************************************************************** #include "icon_loader.h" -//#include <zen/scope_guard.h> #include <zen/thread.h> //includes <std/thread.hpp> #include <gtk/gtk.h> diff --git a/FreeFileSync/Source/base/lock_holder.h b/FreeFileSync/Source/base/lock_holder.h index 9f200e48..127d337e 100644 --- a/FreeFileSync/Source/base/lock_holder.h +++ b/FreeFileSync/Source/base/lock_holder.h @@ -1,8 +1,6 @@ #ifndef LOCK_HOLDER_H_489572039485723453425 #define LOCK_HOLDER_H_489572039485723453425 -//#include <zen/stl_tools.h> -//#include <zen/file_path.h> #include "dir_lock.h" #include "process_callback.h" diff --git a/FreeFileSync/Source/base/parallel_scan.cpp b/FreeFileSync/Source/base/parallel_scan.cpp index 2a1d1400..b508eaec 100644 --- a/FreeFileSync/Source/base/parallel_scan.cpp +++ b/FreeFileSync/Source/base/parallel_scan.cpp @@ -6,7 +6,6 @@ #include "parallel_scan.h" #include <chrono> -//#include <zen/file_error.h> #include <zen/thread.h> #include <zen/scope_guard.h> @@ -360,7 +359,7 @@ DirCallback::HandleLink DirCallback::onSymlink(const AFS::SymlinkInfo& si) //thr case SymLinkHandling::asLink: if (cfg_.filter.ref().passFileFilter(relPath)) //always use file filter: Link type may not be "stable" on Linux! { - output_.addLink(si.itemName, {.modTime = si.modTime}); + output_.addSymlink(si.itemName, {.modTime = si.modTime}); cfg_.acb.incItemsScanned(); //add 1 element to the progress indicator } return HandleLink::skip; diff --git a/FreeFileSync/Source/base/path_filter.h b/FreeFileSync/Source/base/path_filter.h index 779928ca..0ec02e7b 100644 --- a/FreeFileSync/Source/base/path_filter.h +++ b/FreeFileSync/Source/base/path_filter.h @@ -7,8 +7,6 @@ #ifndef HARD_FILTER_H_825780275842758345 #define HARD_FILTER_H_825780275842758345 -//#include <vector> -//#include <memory> #include <unordered_set> #include <zen/zstring.h> diff --git a/FreeFileSync/Source/base/soft_filter.h b/FreeFileSync/Source/base/soft_filter.h index 22b357ee..170e355c 100644 --- a/FreeFileSync/Source/base/soft_filter.h +++ b/FreeFileSync/Source/base/soft_filter.h @@ -7,7 +7,6 @@ #ifndef SOFT_FILTER_H_810457108534657 #define SOFT_FILTER_H_810457108534657 -//#include <algorithm> #include <limits> #include "structures.h" diff --git a/FreeFileSync/Source/base/structures.cpp b/FreeFileSync/Source/base/structures.cpp index b5a3fad9..f841f97c 100644 --- a/FreeFileSync/Source/base/structures.cpp +++ b/FreeFileSync/Source/base/structures.cpp @@ -5,8 +5,6 @@ // ***************************************************************************** #include "structures.h" -//#include <iterator> -//#include <ctime> #include <zen/i18n.h> #include <zen/time.h> #include "../afs/concrete.h" diff --git a/FreeFileSync/Source/base/structures.h b/FreeFileSync/Source/base/structures.h index 5054ae0d..1e66181e 100644 --- a/FreeFileSync/Source/base/structures.h +++ b/FreeFileSync/Source/base/structures.h @@ -9,7 +9,6 @@ #include <variant> #include <vector> -//#include <memory> #include <chrono> #include <zen/zstring.h> #include "../afs/abstract.h" @@ -360,8 +359,6 @@ struct MainConfiguration std::string emailNotifyAddress; //optional ResultsNotification emailNotifyCondition = ResultsNotification::always; - std::wstring notes; - bool operator==(const MainConfiguration&) const = default; }; diff --git a/FreeFileSync/Source/base/synchronization.cpp b/FreeFileSync/Source/base/synchronization.cpp index b241e81a..6796474c 100644 --- a/FreeFileSync/Source/base/synchronization.cpp +++ b/FreeFileSync/Source/base/synchronization.cpp @@ -7,9 +7,6 @@ #include "synchronization.h" #include <tuple> #include <zen/process_priority.h> -//#include <zen/perf.h> -//#include <zen/guid.h> -//#include <zen/crc.h> #include "algorithm.h" #include "db_file.h" #include "status_handler_impl.h" @@ -35,7 +32,8 @@ const size_t CONFLICTS_PREVIEW_MAX = 25; //=> consider memory consumption, log f SyncStatistics::SyncStatistics(const FolderComparison& folderCmp) { - std::for_each(begin(folderCmp), end(folderCmp), [&](const BaseFolderPair& baseFolder) { recurse(baseFolder); }); + for (const BaseFolderPair& baseFolder : asRange(folderCmp)) + recurse(baseFolder); } @@ -55,16 +53,16 @@ SyncStatistics::SyncStatistics(const FilePair& file) inline void SyncStatistics::recurse(const ContainerObject& conObj) { - for (const FilePair& file : conObj.refSubFiles()) + for (const FilePair& file : conObj.files()) processFile(file); - for (const SymlinkPair& symlink : conObj.refSubLinks()) + for (const SymlinkPair& symlink : conObj.symlinks()) processLink(symlink); - for (const FolderPair& folder : conObj.refSubFolders()) + for (const FolderPair& folder : conObj.subfolders()) processFolder(folder); - rowsTotal_ += conObj.refSubFolders().size(); - rowsTotal_ += conObj.refSubFiles ().size(); - rowsTotal_ += conObj.refSubLinks ().size(); + rowsTotal_ += conObj.subfolders().size(); + rowsTotal_ += conObj.files ().size(); + rowsTotal_ += conObj.symlinks ().size(); } @@ -269,7 +267,7 @@ private: void recurse(const ContainerObject& conObj) { //process files - for (const FilePair& file : conObj.refSubFiles()) + for (const FilePair& file : conObj.files()) switch (file.getSyncOperation()) //evaluate comparison result and sync direction { case SO_CREATE_LEFT: @@ -318,7 +316,7 @@ private: //[...] //recurse into sub-dirs - for (const FolderPair& folder : conObj.refSubFolders()) + for (const FolderPair& folder : conObj.subfolders()) switch (folder.getSyncOperation()) { case SO_DELETE_LEFT: @@ -503,14 +501,14 @@ private: void recurse(const ContainerObject& conObj, uint64_t parentPathHash) { - for (const FilePair& file : conObj.refSubFiles()) + for (const FilePair& file : conObj.files()) childPathRefs_.push_back({&file, getPathHash(file, parentPathHash)}); //S1 -> T (update) is not a conflict (anymore) if S1, S2 contain different files //S2 -> T (update) https://freefilesync.org/forum/viewtopic.php?t=9365#p36466 - for (const SymlinkPair& symlink : conObj.refSubLinks()) + for (const SymlinkPair& symlink : conObj.symlinks()) childPathRefs_.push_back({&symlink, getPathHash(symlink, parentPathHash)}); - for (const FolderPair& subFolder : conObj.refSubFolders()) + for (const FolderPair& subFolder : conObj.subfolders()) { const uint64_t folderPathHash = getPathHash(subFolder, parentPathHash); @@ -609,7 +607,7 @@ void checkPathRaceCondition(const BaseFolderPair& baseFolderP, const BaseFolderP std::vector<const ContainerObject*> childFolderP2; for (const ContainerObject* childFolder : childFolderP) - for (const FolderPair& folder : childFolder->refSubFolders()) + for (const FolderPair& folder : childFolder->subfolders()) if (equalNoCase(folder.getItemName<sideP>(), itemName)) childFolderP2.push_back(&folder); //no "break": yes, weird, but there could be more than one (for case-sensitive file system) @@ -1380,7 +1378,7 @@ RingBuffer<Workload::WorkItems> FolderPairSyncer::getFolderLevelWorkItems(PassNo if (pass == PassNo::zero) { //create folders as required by file move targets: - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) if (needZeroPass(folder)) workItems.push_back([this, &folder, &workload, pass] { @@ -1391,14 +1389,14 @@ RingBuffer<Workload::WorkItems> FolderPairSyncer::getFolderLevelWorkItems(PassNo else foldersToInspect.push_back(&folder); - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) if (needZeroPass(file)) workItems.push_back([this, &file] { executeFileMove(file); /*throw ThreadStopRequest*/ }); } else { //synchronize folders *first* (see comment above "Multithreaded File Copy") - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) if (pass == getPass(folder)) workItems.push_back([this, &folder, &workload, pass] { @@ -1410,7 +1408,7 @@ RingBuffer<Workload::WorkItems> FolderPairSyncer::getFolderLevelWorkItems(PassNo foldersToInspect.push_back(&folder); //synchronize files: - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) if (pass == getPass(file)) workItems.push_back([this, &file] { @@ -1418,7 +1416,7 @@ RingBuffer<Workload::WorkItems> FolderPairSyncer::getFolderLevelWorkItems(PassNo }); //synchronize symbolic links: - for (SymlinkPair& symlink : conObj.refSubLinks()) + for (SymlinkPair& symlink : conObj.symlinks()) if (pass == getPass(symlink)) workItems.push_back([this, &symlink] { @@ -1464,6 +1462,8 @@ RingBuffer<Workload::WorkItems> FolderPairSyncer::getFolderLevelWorkItems(PassNo template <SelectSide side> void FolderPairSyncer::executeFileMoveImpl(FilePair& fileFrom, FilePair& fileTo) //throw ThreadStopRequest { + assert(fileFrom.getMovePair() == &fileTo); + const bool fallBackCopyDelete = [&] { //creation of parent folder has failed earlier? => fall back to delete + copy @@ -1479,8 +1479,8 @@ void FolderPairSyncer::executeFileMoveImpl(FilePair& fileFrom, FilePair& fileTo) } //name clash with folders/symlinks? obscure => fall back to delete + copy - if (haveNameClash<side>(fileTo, fileTo.parent().refSubFolders()) || - haveNameClash<side>(fileTo, fileTo.parent().refSubLinks ())) + if (haveNameClash<side>(fileTo, fileTo.parent().subfolders()) || + haveNameClash<side>(fileTo, fileTo.parent().symlinks ())) { reportInfo(AFS::generateMoveErrorMsg(fileFrom.getAbstractPath<side>(), fileTo.getAbstractPath<side>()) + L"\n\n" + replaceCpy(_("The name %x is already used by another item."), L"%x", fmtPath(fileTo.getItemName<side>())), acb_); //throw ThreadStopRequest @@ -1513,8 +1513,7 @@ void FolderPairSyncer::executeFileMoveImpl(FilePair& fileFrom, FilePair& fileTo) return {getCUD(statSrc) + getCUD(statTrg), statSrc.getBytesToProcess() + statTrg.getBytesToProcess()}; }; const auto [itemsBefore, bytesBefore] = getStats(); - fileFrom.setMoveRef(nullptr); - fileTo .setMoveRef(nullptr); + fileFrom.setMovePair(nullptr); const auto [itemsAfter, bytesAfter] = getStats(); //fix statistics total to match "copy + delete" @@ -1530,10 +1529,8 @@ void FolderPairSyncer::executeFileMove(FilePair& file) //throw ThreadStopRequest { case SO_MOVE_LEFT_TO: case SO_MOVE_RIGHT_TO: - if (FilePair* fileFrom = dynamic_cast<FilePair*>(FileSystemObject::retrieve(file.getMoveRef()))) + if (FilePair* fileFrom = file.getMovePair()) { - assert(fileFrom->getMoveRef() == file.getId()); - if (syncOp == SO_MOVE_LEFT_TO) executeFileMoveImpl<SelectSide::left>(*fileFrom, file); //throw ThreadStopRequest else @@ -1564,11 +1561,11 @@ void FolderPairSyncer::executeFileMove(FilePair& file) //throw ThreadStopRequest bool FolderPairSyncer::containsMoveTarget(const FolderPair& parent) { - for (const FilePair& file : parent.refSubFiles()) + for (const FilePair& file : parent.files()) if (needZeroPass(file)) return true; - for (const FolderPair& subFolder : parent.refSubFolders()) + for (const FolderPair& subFolder : parent.subfolders()) if (containsMoveTarget(subFolder)) return true; return false; @@ -1582,13 +1579,13 @@ bool FolderPairSyncer::needZeroPass(const FolderPair& folder) { case SO_CREATE_LEFT: return containsMoveTarget(folder) && //recursive! watch perf! - !haveNameClash<SelectSide::left>(folder, folder.parent().refSubFiles()) && //name clash with files/symlinks? obscure => skip folder creation - !haveNameClash<SelectSide::left>(folder, folder.parent().refSubLinks()); // => move: fall back to delete + copy + !haveNameClash<SelectSide::left>(folder, folder.parent().files ()) && //name clash with files/symlinks? obscure => skip folder creation + !haveNameClash<SelectSide::left>(folder, folder.parent().symlinks()); // => move: fall back to delete + copy case SO_CREATE_RIGHT: return containsMoveTarget(folder) && //recursive! watch perf! - !haveNameClash<SelectSide::right>(folder, folder.parent().refSubFiles()) && //name clash with files/symlinks? obscure => skip folder creation - !haveNameClash<SelectSide::right>(folder, folder.parent().refSubLinks()); // => move: fall back to delete + copy + !haveNameClash<SelectSide::right>(folder, folder.parent().files ()) && //name clash with files/symlinks? obscure => skip folder creation + !haveNameClash<SelectSide::right>(folder, folder.parent().symlinks()); // => move: fall back to delete + copy case SO_DO_NOTHING: //implies !isEmpty<side>(); see FolderPair::getSyncOperation() case SO_UNRESOLVED_CONFLICT: // @@ -1853,10 +1850,9 @@ void FolderPairSyncer::synchronizeFileInt(FilePair& file, SyncOperation syncOp) case SO_MOVE_LEFT_TO: case SO_MOVE_RIGHT_TO: - if (FilePair* fileFrom = dynamic_cast<FilePair*>(FileSystemObject::retrieve(file.getMoveRef()))) + if (FilePair* fileFrom = file.getMovePair()) { FilePair* fileTo = &file; - assert(fileFrom->getMoveRef() == fileTo->getId()); assert((fileFrom->getSyncOperation() == SO_MOVE_LEFT_FROM && fileTo->getSyncOperation() == SO_MOVE_LEFT_TO && sideTrg == SelectSide::left) || (fileFrom->getSyncOperation() == SO_MOVE_RIGHT_FROM && fileTo->getSyncOperation() == SO_MOVE_RIGHT_TO && sideTrg == SelectSide::right)); @@ -2199,9 +2195,9 @@ void FolderPairSyncer::synchronizeFolderInt(FolderPair& folder, SyncOperation sy //attention when fixing statistics due to missing folder: child items may be scheduled for move, so deletion will have move-references flip back to copy + delete! const SyncStatistics statsBefore(folder.base()); //=> don't bother considering individual move operations, just calculate over the whole tree - folder.refSubFiles ().clear(); // - folder.refSubLinks ().clear(); //update FolderPair - folder.refSubFolders().clear(); // + folder.clearFiles(); // + folder.clearSymlinks(); //update FolderPair + folder.clearSubfolders(); // folder.removeItem<sideSrc>(); // const SyncStatistics statsAfter(folder.base()); @@ -2226,10 +2222,10 @@ void FolderPairSyncer::synchronizeFolderInt(FolderPair& folder, SyncOperation sy //TODO: implement parallel folder deletion - folder.refSubFiles ().clear(); // - folder.refSubLinks ().clear(); //update FolderPair - folder.refSubFolders().clear(); // - folder.removeItem<sideTrg>(); // + folder.clearFiles(); // + folder.clearSymlinks(); //update FolderPair + folder.clearSubfolders(); // + folder.removeItem<sideTrg>(); // } break; @@ -2444,14 +2440,13 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime { int itemsTotal = 0; int64_t bytesTotal = 0; - std::for_each(begin(folderCmp), end(folderCmp), - [&](const BaseFolderPair& baseFolder) + for (const BaseFolderPair& baseFolder : asRange(folderCmp)) { SyncStatistics fpStats(baseFolder); itemsTotal += getCUD(fpStats); bytesTotal += fpStats.getBytesToProcess(); folderPairStats.push_back(fpStats); - }); + } //inform about the total amount of data that will be processed from now on //keep at beginning so that all gui elements are initialized properly @@ -2462,19 +2457,11 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime //------------------------------------------------------------------------------- - //specify process and resource handling priorities - std::unique_ptr<ScheduleForBackgroundProcessing> backgroundPrio; - if (runWithBackgroundPriority) - tryReportingError([&] - { - backgroundPrio = std::make_unique<ScheduleForBackgroundProcessing>(); //throw FileError - }, callback); //throw X - //prevent operating system going into sleep state - std::unique_ptr<PreventStandby> noStandby; + std::unique_ptr<SetProcessPriority> noStandby; try { - noStandby = std::make_unique<PreventStandby>(); //throw FileError + noStandby = std::make_unique<SetProcessPriority>(runWithBackgroundPriority ? ProcessPriority::background : ProcessPriority::normal); //throw FileError } catch (const FileError& e) //failure is not critical => log only { @@ -2504,7 +2491,7 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime bool haveFullPair = false; std::wstring partialPairList; - std::for_each(begin(folderCmp), end(folderCmp), [&](const BaseFolderPair& baseFolder) + for (const BaseFolderPair& baseFolder : asRange(folderCmp)) { const AbstractPath& folderPathL = baseFolder.getAbstractPath<SelectSide::left >(); const AbstractPath& folderPathR = baseFolder.getAbstractPath<SelectSide::right>(); @@ -2517,7 +2504,7 @@ void fff::synchronize(const std::chrono::system_clock::time_point& syncStartTime } else if (!AFS::isNullPath(folderPathL)) haveFullPair = true; - }); + } //error if: partial pairs or all empty -> single-folder comparison scenario doesn't include synchronization if (!partialPairList.empty() || !haveFullPair) diff --git a/FreeFileSync/Source/base_tools.cpp b/FreeFileSync/Source/base_tools.cpp index 179ecdab..75152d0f 100644 --- a/FreeFileSync/Source/base_tools.cpp +++ b/FreeFileSync/Source/base_tools.cpp @@ -5,7 +5,6 @@ // ***************************************************************************** #include "base_tools.h" -#include <wx/app.h> #include "base/path_filter.h" using namespace zen; @@ -53,31 +52,31 @@ std::wstring fff::toTimeShiftPhrase(const std::vector<unsigned int>& ignoreTimeS } -void fff::logNonDefaultSettings(const XmlGlobalSettings& activeSettings, PhaseCallback& callback) +void fff::logNonDefaultSettings(const GlobalConfig& globalCfg, PhaseCallback& callback) { - const XmlGlobalSettings defaultSettings; + const GlobalConfig defaultSettings; std::wstring changedSettingsMsg; - if (activeSettings.failSafeFileCopy != defaultSettings.failSafeFileCopy) - changedSettingsMsg += L"\n" + (TAB_SPACE + _("Fail-safe file copy")) + L": " + (activeSettings.failSafeFileCopy ? _("Enabled") : _("Disabled")); + if (globalCfg.failSafeFileCopy != defaultSettings.failSafeFileCopy) + changedSettingsMsg += L"\n" + (TAB_SPACE + _("Fail-safe file copy")) + L": " + (globalCfg.failSafeFileCopy ? _("Enabled") : _("Disabled")); - if (activeSettings.copyLockedFiles != defaultSettings.copyLockedFiles) - changedSettingsMsg += L"\n" + (TAB_SPACE + _("Copy locked files")) + L": " + (activeSettings.copyLockedFiles ? _("Enabled") : _("Disabled")); + if (globalCfg.copyLockedFiles != defaultSettings.copyLockedFiles) + changedSettingsMsg += L"\n" + (TAB_SPACE + _("Copy locked files")) + L": " + (globalCfg.copyLockedFiles ? _("Enabled") : _("Disabled")); - if (activeSettings.copyFilePermissions != defaultSettings.copyFilePermissions) - changedSettingsMsg += L"\n" + (TAB_SPACE + _("Copy file access permissions")) + L": " + (activeSettings.copyFilePermissions ? _("Enabled") : _("Disabled")); + if (globalCfg.copyFilePermissions != defaultSettings.copyFilePermissions) + changedSettingsMsg += L"\n" + (TAB_SPACE + _("Copy file access permissions")) + L": " + (globalCfg.copyFilePermissions ? _("Enabled") : _("Disabled")); - if (activeSettings.fileTimeTolerance != defaultSettings.fileTimeTolerance) - changedSettingsMsg += L"\n" + (TAB_SPACE + _("File time tolerance")) + L": " + formatNumber(activeSettings.fileTimeTolerance); + if (globalCfg.fileTimeTolerance != defaultSettings.fileTimeTolerance) + changedSettingsMsg += L"\n" + (TAB_SPACE + _("File time tolerance")) + L": " + formatNumber(globalCfg.fileTimeTolerance); - if (activeSettings.runWithBackgroundPriority != defaultSettings.runWithBackgroundPriority) - changedSettingsMsg += L"\n" + (TAB_SPACE + _("Run with background priority")) + L": " + (activeSettings.runWithBackgroundPriority ? _("Enabled") : _("Disabled")); + if (globalCfg.runWithBackgroundPriority != defaultSettings.runWithBackgroundPriority) + changedSettingsMsg += L"\n" + (TAB_SPACE + _("Run with background priority")) + L": " + (globalCfg.runWithBackgroundPriority ? _("Enabled") : _("Disabled")); - if (activeSettings.createLockFile != defaultSettings.createLockFile) - changedSettingsMsg += L"\n" + (TAB_SPACE + _("Lock directories during sync")) + L": " + (activeSettings.createLockFile ? _("Enabled") : _("Disabled")); + if (globalCfg.createLockFile != defaultSettings.createLockFile) + changedSettingsMsg += L"\n" + (TAB_SPACE + _("Lock directories during sync")) + L": " + (globalCfg.createLockFile ? _("Enabled") : _("Disabled")); - if (activeSettings.verifyFileCopy != defaultSettings.verifyFileCopy) - changedSettingsMsg += L"\n" + (TAB_SPACE + _("Verify copied files")) + L": " + (activeSettings.verifyFileCopy ? _("Enabled") : _("Disabled")); + if (globalCfg.verifyFileCopy != defaultSettings.verifyFileCopy) + changedSettingsMsg += L"\n" + (TAB_SPACE + _("Verify copied files")) + L": " + (globalCfg.verifyFileCopy ? _("Enabled") : _("Disabled")); if (!changedSettingsMsg.empty()) callback.logMessage(_("Using non-default global settings:") + changedSettingsMsg, PhaseCallback::MsgType::info); //throw X @@ -147,26 +146,27 @@ bool effectivelyEmpty(const LocalPairConfig& lpc) } -MainConfiguration fff::merge(const std::vector<MainConfiguration>& mainCfgs) +FfsGuiConfig fff::merge(const std::vector<FfsGuiConfig>& guiCfgs) { - assert(!mainCfgs.empty()); - if (mainCfgs.empty()) - return MainConfiguration(); + assert(!guiCfgs.empty()); + if (guiCfgs.empty()) + return FfsGuiConfig(); - if (mainCfgs.size() == 1) //mergeConfigFilesImpl relies on this! - return mainCfgs[0]; // + if (guiCfgs.size() == 1) // + return guiCfgs[0]; //return "as is" //merge folder pair config std::vector<LocalPairConfig> mergedCfgs; - for (const MainConfiguration& mainCfg : mainCfgs) + + for (const FfsGuiConfig& guiCfg : guiCfgs) { std::vector<LocalPairConfig> tmpCfgs; //skip empty folder pairs - if (!effectivelyEmpty(mainCfg.firstPair)) - tmpCfgs.push_back(mainCfg.firstPair); + if (!effectivelyEmpty(guiCfg.mainCfg.firstPair)) + tmpCfgs.push_back(guiCfg.mainCfg.firstPair); - for (const LocalPairConfig& lpc : mainCfg.additionalPairs) + for (const LocalPairConfig& lpc : guiCfg.mainCfg.additionalPairs) if (!effectivelyEmpty(lpc)) tmpCfgs.push_back(lpc); @@ -174,18 +174,18 @@ MainConfiguration fff::merge(const std::vector<MainConfiguration>& mainCfgs) for (LocalPairConfig& lpc : tmpCfgs) { if (!lpc.localCmpCfg) - lpc.localCmpCfg = mainCfg.cmpCfg; + lpc.localCmpCfg = guiCfg.mainCfg.cmpCfg; if (!lpc.localSyncCfg) - lpc.localSyncCfg = mainCfg.syncCfg; + lpc.localSyncCfg = guiCfg.mainCfg.syncCfg; - lpc.localFilter = mergeFilterConfig(mainCfg.globalFilter, lpc.localFilter); + lpc.localFilter = mergeFilterConfig(guiCfg.mainCfg.globalFilter, lpc.localFilter); } append(mergedCfgs, tmpCfgs); } if (mergedCfgs.empty()) - return MainConfiguration(); + mergedCfgs.emplace_back(); //optimization: remove redundant configuration @@ -250,40 +250,51 @@ MainConfiguration fff::merge(const std::vector<MainConfiguration>& mainCfgs) } std::map<AfsDevice, size_t> mergedParallelOps; - for (const MainConfiguration& mainCfg : mainCfgs) - for (const auto& [rootPath, parallelOps] : mainCfg.deviceParallelOps) + for (const FfsGuiConfig& guiCfg : guiCfgs) + for (const auto& [rootPath, parallelOps] : guiCfg.mainCfg.deviceParallelOps) mergedParallelOps[rootPath] = std::max(mergedParallelOps[rootPath], parallelOps); //final assembly - MainConfiguration cfgOut; - cfgOut.cmpCfg = cmpCfgHead; - cfgOut.syncCfg = syncCfgHead; - cfgOut.globalFilter = globalFilter; - cfgOut.firstPair = mergedCfgs[0]; - cfgOut.additionalPairs.assign(mergedCfgs.begin() + 1, mergedCfgs.end()); - cfgOut.deviceParallelOps = mergedParallelOps; + FfsGuiConfig cfgOut + { + .mainCfg = MainConfiguration + { + .cmpCfg = cmpCfgHead, + .syncCfg = syncCfgHead, + .globalFilter = globalFilter, + .firstPair = mergedCfgs[0], + .deviceParallelOps = mergedParallelOps, - cfgOut.ignoreErrors = std::all_of(mainCfgs.begin(), mainCfgs.end(), [](const MainConfiguration& mainCfg) { return mainCfg.ignoreErrors; }); + .ignoreErrors = std::all_of(guiCfgs.begin(), guiCfgs.end(), [](const FfsGuiConfig& guiCfg) { return guiCfg.mainCfg.ignoreErrors; }), - cfgOut.autoRetryCount = std::max_element(mainCfgs.begin(), mainCfgs.end(), - [](const MainConfiguration& lhs, const MainConfiguration& rhs) { return lhs.autoRetryCount < rhs.autoRetryCount; })->autoRetryCount; + .autoRetryCount = std::max_element(guiCfgs.begin(), guiCfgs.end(), + [](const FfsGuiConfig& lhs, const FfsGuiConfig& rhs) { return lhs.mainCfg.autoRetryCount < rhs.mainCfg.autoRetryCount; })->mainCfg.autoRetryCount, + + .autoRetryDelay = std::max_element(guiCfgs.begin(), guiCfgs.end(), + [](const FfsGuiConfig& lhs, const FfsGuiConfig& rhs) { return lhs.mainCfg.autoRetryDelay < rhs.mainCfg.autoRetryDelay; })->mainCfg.autoRetryDelay, + } + }; + cfgOut.mainCfg.additionalPairs.assign(mergedCfgs.begin() + 1, mergedCfgs.end()); - cfgOut.autoRetryDelay = std::max_element(mainCfgs.begin(), mainCfgs.end(), - [](const MainConfiguration& lhs, const MainConfiguration& rhs) { return lhs.autoRetryDelay < rhs.autoRetryDelay; })->autoRetryDelay; - for (const MainConfiguration& mainCfg : mainCfgs) + for (const FfsGuiConfig& guiCfg : guiCfgs) { - if (!mainCfg.altLogFolderPathPhrase.empty()) - cfgOut.altLogFolderPathPhrase = mainCfg.altLogFolderPathPhrase; + if (cfgOut.mainCfg.altLogFolderPathPhrase.empty()) + cfgOut.mainCfg.altLogFolderPathPhrase = guiCfg.mainCfg.altLogFolderPathPhrase; - if (!mainCfg.notes.empty()) - cfgOut.notes += mainCfg.notes + L"\n\n"; - } + if (cfgOut.mainCfg.emailNotifyAddress.empty()) + { + cfgOut.mainCfg.emailNotifyAddress = guiCfg.mainCfg.emailNotifyAddress; + cfgOut.mainCfg.emailNotifyCondition = guiCfg.mainCfg.emailNotifyCondition; + } + if (!guiCfg.notes.empty()) + cfgOut.notes += guiCfg.notes + L"\n\n"; + } trim(cfgOut.notes); - //cfgOut.postSyncCommand = -> better leave at default ... !? - //cfgOut.postSyncCondition = -> - //cfgOut.emailNotifyAddress = -> better leave at default ... !? - //cfgOut.emailNotifyCondition = -> + + //cfgOut.mainCfg.postSyncCommand = -> better leave at default ... !? + //cfgOut.mainCfg.postSyncCondition = -> + //cfgOut.gridViewType -> return cfgOut; } diff --git a/FreeFileSync/Source/base_tools.h b/FreeFileSync/Source/base_tools.h index 1ea3e65e..c8d47ca0 100644 --- a/FreeFileSync/Source/base_tools.h +++ b/FreeFileSync/Source/base_tools.h @@ -19,10 +19,10 @@ std::vector<unsigned int> fromTimeShiftPhrase(const std::wstring_view timeShiftP std::wstring toTimeShiftPhrase (const std::vector<unsigned int>& ignoreTimeShiftMinutes); //inform about (important) non-default global settings related to comparison and synchronization -void logNonDefaultSettings(const XmlGlobalSettings& currentSettings, PhaseCallback& callback); +void logNonDefaultSettings(const GlobalConfig& globalCfg, PhaseCallback& callback); //facilitate drag & drop config merge: -MainConfiguration merge(const std::vector<MainConfiguration>& mainCfgs); +FfsGuiConfig merge(const std::vector<FfsGuiConfig>& guiCfgs); } #endif //STRUCTURE_TOOLS_H_7823097420397434 diff --git a/FreeFileSync/Source/config.cpp b/FreeFileSync/Source/config.cpp index 18bdca70..8e1dca79 100644 --- a/FreeFileSync/Source/config.cpp +++ b/FreeFileSync/Source/config.cpp @@ -7,14 +7,11 @@ #include "config.h" #include <zenxml/xml.h> #include <zen/file_access.h> -//#include <zen/file_io.h> #include <zen/time.h> #include <zen/process_exec.h> #include <wx/uilocale.h> #include "ffs_paths.h" #include "base_tools.h" -//#include "afs/native.h" - using namespace zen; using namespace fff; //required for correct overload resolution! @@ -41,7 +38,7 @@ const ExternalApp fff::extCommandOpenDefault -XmlGlobalSettings::XmlGlobalSettings() : +GlobalConfig::GlobalConfig() : soundFileSyncFinished(appendPath(getResourceDirPath(), Zstr("bell.wav"))), soundFileAlertPending(appendPath(getResourceDirPath(), Zstr("remind.wav"))) { @@ -104,6 +101,39 @@ bool readText(const std::string& input, wxLanguage& value) template <> inline +void writeText(const ColorTheme& value, std::string& output) +{ + switch (value) + { + case ColorTheme::System: + output = "Default"; + break; + case ColorTheme::Light: + output = "Light"; + break; + case ColorTheme::Dark: + output = "Dark"; + break; + } +} + +template <> inline +bool readText(const std::string& input, ColorTheme& value) +{ + const std::string tmp = trimCpy(input); + if (tmp == "Default") + value = ColorTheme::System; + else if (tmp == "Light") + value = ColorTheme::Light; + else if (tmp == "Dark") + value = ColorTheme::Dark; + else + return false; + return true; +} + + +template <> inline void writeText(const CompareVariant& value, std::string& output) { switch (value) @@ -1075,7 +1105,7 @@ void readConfig(const XmlIn& in, SyncConfig& syncCfg, std::map<AfsDevice, size_t } -void readConfig(const XmlIn& in, FilterConfig& filter /*int formatVer? but which one; Filter is used by XmlGlobalSettings and XmlGuiConfig! :( */) +void readConfig(const XmlIn& in, FilterConfig& filter /*int formatVer? but which one; Filter is used by GlobalConfig and FfsGuiConfig! :( */) { std::vector<Zstring> tmpIn; if (in["Include"](tmpIn)) //else: keep default value @@ -1150,11 +1180,6 @@ void readConfig(const XmlIn& in, LocalPairConfig& lpc, std::map<AfsDevice, size_ void readConfig(const XmlIn& in, MainConfiguration& mainCfg, int formatVer) { - if (formatVer < 18) //TODO: remove if parameter migration after some time! 2023-05-15 - ; - else - in["Notes"](mainCfg.notes); - readConfig(in["Compare"], mainCfg.cmpCfg); readConfig(in["Synchronize"], mainCfg.syncCfg, mainCfg.deviceParallelOps, formatVer); @@ -1272,8 +1297,13 @@ void readConfig(const XmlIn& in, MainConfiguration& mainCfg, int formatVer) } -void readConfig(const XmlIn& in, XmlGuiConfig& cfg, int formatVer) +void readConfig(const XmlIn& in, FfsGuiConfig& cfg, int formatVer) { + if (formatVer < 18) //TODO: remove if parameter migration after some time! 2023-05-15 + ; + else + in["Notes"](cfg.notes); + readConfig(in, cfg.mainCfg, formatVer); if (formatVer < 19) //TODO: remove after migration! 2023-06-09 @@ -1301,7 +1331,7 @@ void readConfig(const XmlIn& in, XmlGuiConfig& cfg, int formatVer) } -void readConfig(const XmlIn& in, XmlBatchConfig& cfg, int formatVer) +void readConfig(const XmlIn& in, FfsBatchConfig& cfg, int formatVer) { if (formatVer < 19) //TODO: remove after migration! 2023-06-09 readConfig(in, cfg.guiCfg.mainCfg, formatVer); @@ -1316,7 +1346,7 @@ void readConfig(const XmlIn& in, XmlBatchConfig& cfg, int formatVer) } -void readConfig(const XmlIn& in, XmlGlobalSettings& cfg, int formatVer) +void readConfig(const XmlIn& in, GlobalConfig& cfg, int formatVer) { assert(cfg.dpiLayouts.empty()); @@ -1349,6 +1379,8 @@ void readConfig(const XmlIn& in, XmlGlobalSettings& cfg, int formatVer) else in2["Language"].attribute("Code", cfg.programLanguage); + in2["ColorTheme"].attribute("Appearance", cfg.appColorTheme); + in2["FailSafeFileCopy" ].attribute("Enabled", cfg.failSafeFileCopy); in2["CopyLockedFiles" ].attribute("Enabled", cfg.copyLockedFiles); in2["CopyFilePermissions" ].attribute("Enabled", cfg.copyFilePermissions); @@ -1704,7 +1736,7 @@ void readConfig(const XmlIn& in, XmlGlobalSettings& cfg, int formatVer) //TODO: remove if parameter migration after some time! 2020-01-30 if (formatVer < 15) if (cfg.commandHistoryMax <= 8) - cfg.commandHistoryMax = XmlGlobalSettings().commandHistoryMax; + cfg.commandHistoryMax = GlobalConfig().commandHistoryMax; if (formatVer < 20) //TODO: remove old parameter after migration! 2020-12-03 @@ -1879,43 +1911,36 @@ std::pair<ConfigType, std::wstring /*warningMsg*/> readConfig(const Zstring& fil } -std::pair<XmlGuiConfig, std::wstring /*warningMsg*/> fff::readGuiConfig(const Zstring& filePath) +std::pair<FfsGuiConfig, std::wstring /*warningMsg*/> fff::readGuiConfig(const Zstring& filePath) { - return readConfig<XmlGuiConfig>(filePath, "GUI", XML_FORMAT_SYNC_CFG); //throw FileError + return readConfig<FfsGuiConfig>(filePath, "GUI", XML_FORMAT_SYNC_CFG); //throw FileError } -std::pair<XmlBatchConfig, std::wstring /*warningMsg*/> fff::readBatchConfig(const Zstring& filePath) +std::pair<FfsBatchConfig, std::wstring /*warningMsg*/> fff::readBatchConfig(const Zstring& filePath) { - return readConfig<XmlBatchConfig>(filePath, "BATCH", XML_FORMAT_SYNC_CFG); //throw FileError + return readConfig<FfsBatchConfig>(filePath, "BATCH", XML_FORMAT_SYNC_CFG); //throw FileError } -std::pair<XmlGlobalSettings, std::wstring /*warningMsg*/> fff::readGlobalConfig(const Zstring& filePath) +std::pair<GlobalConfig, std::wstring /*warningMsg*/> fff::readGlobalConfig(const Zstring& filePath) { - return readConfig<XmlGlobalSettings>(filePath, "GLOBAL", XML_FORMAT_GLOBAL_CFG); //throw FileError + return readConfig<GlobalConfig>(filePath, "GLOBAL", XML_FORMAT_GLOBAL_CFG); //throw FileError } -std::pair<XmlGuiConfig, std::wstring /*warningMsg*/> fff::readAnyConfig(const std::vector<Zstring>& filePaths) //throw FileError +std::pair<FfsGuiConfig, std::wstring /*warningMsg*/> fff::readAnyConfig(const std::vector<Zstring>& filePaths) //throw FileError { assert(!filePaths.empty()); - XmlGuiConfig cfg; std::wstring warningMsgAll; - std::vector<MainConfiguration> mainCfgs; - - for (auto it = filePaths.begin(); it != filePaths.end(); ++it) - { - const bool firstItem = it == filePaths.begin(); //init all non-"mainCfg" settings with first config file - const Zstring& filePath = *it; + std::vector<FfsGuiConfig> guiCfgs; + for (const Zstring& filePath : filePaths) if (endsWithAsciiNoCase(filePath, Zstr(".ffs_gui"))) { const auto& [guiCfg, warningMsg] = readGuiConfig(filePath); //throw FileError - if (firstItem) - cfg = guiCfg; - mainCfgs.push_back(guiCfg.mainCfg); + guiCfgs.push_back(guiCfg); if (!warningMsg.empty()) warningMsgAll += warningMsg + L"\n\n"; @@ -1923,9 +1948,7 @@ std::pair<XmlGuiConfig, std::wstring /*warningMsg*/> fff::readAnyConfig(const st else if (endsWithAsciiNoCase(filePath, Zstr(".ffs_batch"))) { const auto& [batchCfg, warningMsg] = readBatchConfig(filePath); //throw FileError - if (firstItem) - cfg = batchCfg.guiCfg; - mainCfgs.push_back(batchCfg.guiCfg.mainCfg); + guiCfgs.push_back(batchCfg.guiCfg); if (!warningMsg.empty()) warningMsgAll += warningMsg + L"\n\n"; @@ -1934,10 +1957,8 @@ std::pair<XmlGuiConfig, std::wstring /*warningMsg*/> fff::readAnyConfig(const st throw FileError(replaceCpy(_("Cannot open file %x."), L"%x", fmtPath(filePath)), _("Unexpected file extension:") + L' ' + fmtPath(getFileExtension(filePath)) + L'\n' + _("Expected:") + L" ffs_gui, ffs_batch"); - } - cfg.mainCfg = merge(mainCfgs); - return {cfg, trimCpy(warningMsgAll)}; + return {merge(guiCfgs), trimCpy(warningMsgAll)}; } //################################################################################################ @@ -2060,8 +2081,6 @@ void writeConfig(const LocalPairConfig& lpc, const std::map<AfsDevice, size_t>& void writeConfig(const MainConfiguration& mainCfg, XmlOut& out) { - out["Notes"](mainCfg.notes); - XmlOut outCmp = out["Compare"]; writeConfig(mainCfg.cmpCfg, outCmp); //########################################################### @@ -2095,15 +2114,17 @@ void writeConfig(const MainConfiguration& mainCfg, XmlOut& out) } -void writeConfig(const XmlGuiConfig& cfg, XmlOut& out) +void writeConfig(const FfsGuiConfig& cfg, XmlOut& out) { + out["Notes"](cfg.notes); + writeConfig(cfg.mainCfg, out); //write main config out["GridViewType"](cfg.gridViewType); } -void writeConfig(const XmlBatchConfig& cfg, XmlOut& out) +void writeConfig(const FfsBatchConfig& cfg, XmlOut& out) { writeConfig(cfg.guiCfg, out); @@ -2115,9 +2136,10 @@ void writeConfig(const XmlBatchConfig& cfg, XmlOut& out) } -void writeConfig(const XmlGlobalSettings& cfg, XmlOut& out) +void writeConfig(const GlobalConfig& cfg, XmlOut& out) { out["Language"].attribute("Code", cfg.programLanguage); + out["ColorTheme"].attribute("Appearance", cfg.appColorTheme); out["FailSafeFileCopy" ].attribute("Enabled", cfg.failSafeFileCopy); out["CopyLockedFiles" ].attribute("Enabled", cfg.copyLockedFiles); @@ -2303,19 +2325,19 @@ void writeConfig(const ConfigType& cfg, const char* cfgType, int xmlFormatVer, c } } -void fff::writeConfig(const XmlGuiConfig& cfg, const Zstring& filePath) +void fff::writeConfig(const FfsGuiConfig& cfg, const Zstring& filePath) { ::writeConfig(cfg, "GUI", XML_FORMAT_SYNC_CFG, filePath); //throw FileError } -void fff::writeConfig(const XmlBatchConfig& cfg, const Zstring& filePath) +void fff::writeConfig(const FfsBatchConfig& cfg, const Zstring& filePath) { ::writeConfig(cfg, "BATCH", XML_FORMAT_SYNC_CFG, filePath); //throw FileError } -void fff::writeConfig(const XmlGlobalSettings& cfg, const Zstring& filePath) +void fff::writeConfig(const GlobalConfig& cfg, const Zstring& filePath) { ::writeConfig(cfg, "GLOBAL", XML_FORMAT_GLOBAL_CFG, filePath); //throw FileError } diff --git a/FreeFileSync/Source/config.h b/FreeFileSync/Source/config.h index bb44015e..99d918a3 100644 --- a/FreeFileSync/Source/config.h +++ b/FreeFileSync/Source/config.h @@ -7,15 +7,15 @@ #ifndef PROCESS_XML_H_28345825704254262435 #define PROCESS_XML_H_28345825704254262435 -#include <wx/gdicmn.h> #include <zen/file_access.h> +#include <wx/gdicmn.h> +#include <wx+/darkmode.h> #include "localization.h" +#include "log_file.h" #include "base/structures.h" #include "ui/file_grid_attr.h" #include "ui/tree_grid_attr.h" //RTS: avoid tree grid's "file_hierarchy.h" dependency! #include "ui/cfg_grid.h" -#include "log_file.h" -//#include "version/version.h" namespace fff @@ -44,12 +44,15 @@ extern const ExternalApp extCommandFileManager; extern const ExternalApp extCommandOpenDefault; //--------------------------------------------------------------------- -struct XmlGuiConfig +struct FfsGuiConfig { MainConfiguration mainCfg; + + //"GuiExclusiveConfig": + std::wstring notes; GridViewType gridViewType = GridViewType::action; //keep "visual" setting out of "MainConfiguration" - bool operator==(const XmlGuiConfig&) const = default; + bool operator==(const FfsGuiConfig&) const = default; }; @@ -62,9 +65,9 @@ struct BatchExclusiveConfig }; -struct XmlBatchConfig +struct FfsBatchConfig { - XmlGuiConfig guiCfg; //batch config can be used in GUI (but not the other way round) + FfsGuiConfig guiCfg; //batch config can be used in GUI (but not the other way round) BatchExclusiveConfig batchExCfg; }; @@ -139,13 +142,14 @@ struct DpiLayout }; -struct XmlGlobalSettings +struct GlobalConfig { - XmlGlobalSettings(); + GlobalConfig(); //--------------------------------------------------------------------- //Shared (GUI/BATCH) settings wxLanguage programLanguage = getDefaultLanguage(); + zen::ColorTheme appColorTheme = zen::ColorTheme::System; bool failSafeFileCopy = true; bool copyLockedFiles = false; //safer default: avoid copies of partially written files bool copyFilePermissions = false; @@ -254,16 +258,16 @@ struct XmlGlobalSettings }; //read/write specific config types -std::pair<XmlGuiConfig, std::wstring /*warningMsg*/> readGuiConfig (const Zstring& filePath); // -std::pair<XmlBatchConfig, std::wstring /*warningMsg*/> readBatchConfig (const Zstring& filePath); //throw FileError -std::pair<XmlGlobalSettings, std::wstring /*warningMsg*/> readGlobalConfig(const Zstring& filePath); // +std::pair<FfsGuiConfig, std::wstring /*warningMsg*/> readGuiConfig (const Zstring& filePath); // +std::pair<FfsBatchConfig, std::wstring /*warningMsg*/> readBatchConfig (const Zstring& filePath); //throw FileError +std::pair<GlobalConfig, std::wstring /*warningMsg*/> readGlobalConfig(const Zstring& filePath); // -void writeConfig(const XmlGuiConfig& cfg, const Zstring& filePath); // -void writeConfig(const XmlBatchConfig& cfg, const Zstring& filePath); //throw FileError -void writeConfig(const XmlGlobalSettings& cfg, const Zstring& filePath); // +void writeConfig(const FfsGuiConfig& cfg, const Zstring& filePath); // +void writeConfig(const FfsBatchConfig& cfg, const Zstring& filePath); //throw FileError +void writeConfig(const GlobalConfig& cfg, const Zstring& filePath); // //convert (multiple) *.ffs_gui, *.ffs_batch files or combinations of both into target config structure: -std::pair<XmlGuiConfig, std::wstring /*warningMsg*/> readAnyConfig(const std::vector<Zstring>& filePaths); //throw FileError +std::pair<FfsGuiConfig, std::wstring /*warningMsg*/> readAnyConfig(const std::vector<Zstring>& filePaths); //throw FileError std::wstring extractJobName(const Zstring& cfgFilePath); diff --git a/FreeFileSync/Source/ffs_paths.cpp b/FreeFileSync/Source/ffs_paths.cpp index fb6a9032..01a9a695 100644 --- a/FreeFileSync/Source/ffs_paths.cpp +++ b/FreeFileSync/Source/ffs_paths.cpp @@ -6,7 +6,6 @@ #include "ffs_paths.h" #include <zen/file_access.h> -//#include <zen/thread.h> #include <zen/sys_info.h> #include <iostream> //std::cerr diff --git a/FreeFileSync/Source/icon_buffer.cpp b/FreeFileSync/Source/icon_buffer.cpp index 265e2f64..9502fcf7 100644 --- a/FreeFileSync/Source/icon_buffer.cpp +++ b/FreeFileSync/Source/icon_buffer.cpp @@ -6,13 +6,10 @@ #include "icon_buffer.h" #include <map> -//#include <set> #include <variant> #include <zen/thread.h> //includes <std/thread.hpp> -//#include <zen/scope_guard.h> #include <wx+/dc.h> #include <wx+/image_resources.h> -//#include <wx+/image_tools.h> #include <wx+/std_button_layout.h> #include "base/icon_loader.h" diff --git a/FreeFileSync/Source/localization.cpp b/FreeFileSync/Source/localization.cpp index c6490954..ec2d883b 100644 --- a/FreeFileSync/Source/localization.cpp +++ b/FreeFileSync/Source/localization.cpp @@ -123,7 +123,7 @@ std::vector<TranslationInfo> loadTranslations(const Zstring& zipPath) //throw Fi { if (entry->IsDir()) //e.g. translators accidentally ZIPing "Languages" directory throw FileError(replaceCpy(replaceCpy<std::wstring>(L"ZIP file %x contains unexpected sub directory %y.", - L"%x", fmtPath(zipPath)), + L"%x", fmtPath(zipPath)), L"%y", fmtPath(utfTo<std::wstring>(entry->GetName())))); if (std::string stream(entry->GetSize(), '\0'); @@ -359,12 +359,12 @@ void fff::localizationInit(const Zstring& zipPath) //throw FileError void fff::localizationCleanup() { + assert(!globalTranslations.empty()); #if 0 //good place for clean up rather than some time during static destruction: is this an actual benefit??? globalLang = wxLANGUAGE_UNKNOWN; setTranslator(nullptr); - assert(!globalTranslations.empty()); globalTranslations.clear(); #endif } @@ -421,9 +421,11 @@ void fff::setLanguage(wxLanguage lng) //throw FileError //add translation for wxWidgets-internal strings: std::map<std::string, std::wstring> transMapping = { + {"&OK", _("OK")}, //for wxTextEntryDialog + {"&Cancel", _("Cancel")}, //=> shouldn't use accelerator keys! }; wxTranslations& wxtrans = *wxTranslations::Get(); //*assert* creation by localizationInit()! - wxtrans.SetLanguage(lng); //!= wxLocale's language, which could be wxLANGUAGE_DEFAULT (see ZenLocale) + wxtrans.SetLanguage(lng); //!= wxLocale's language, which could be wxLANGUAGE_DEFAULT wxtrans.SetLoader(new MemoryTranslationLoader(lng, std::move(transMapping))); [[maybe_unused]] const bool catalogAdded = wxtrans.AddCatalog(wxString()); assert(catalogAdded || lng == wxLANGUAGE_ENGLISH_US); diff --git a/FreeFileSync/Source/localization.h b/FreeFileSync/Source/localization.h index 7a8d6f03..a7012177 100644 --- a/FreeFileSync/Source/localization.h +++ b/FreeFileSync/Source/localization.h @@ -9,7 +9,6 @@ #include <vector> #include <zen/file_error.h> -//#include <wx/intl.h> //wxLayoutDirection #include <wx/language.h> diff --git a/FreeFileSync/Source/log_file.cpp b/FreeFileSync/Source/log_file.cpp index 989579e5..a5e2b6ad 100644 --- a/FreeFileSync/Source/log_file.cpp +++ b/FreeFileSync/Source/log_file.cpp @@ -5,10 +5,8 @@ // ***************************************************************************** #include "log_file.h" -//#include <zen/file_io.h> #include <zen/http.h> #include <zen/sys_info.h> -//#include "afs/concrete.h" using namespace zen; using namespace fff; diff --git a/FreeFileSync/Source/log_file.h b/FreeFileSync/Source/log_file.h index f2e056c9..1598eac3 100644 --- a/FreeFileSync/Source/log_file.h +++ b/FreeFileSync/Source/log_file.h @@ -7,9 +7,7 @@ #ifndef GENERATE_LOGFILE_H_931726432167489732164 #define GENERATE_LOGFILE_H_931726432167489732164 -//#include <chrono> #include <zen/error_log.h> -//#include "return_codes.h" #include "status_handler.h" #include "afs/abstract.h" diff --git a/FreeFileSync/Source/parse_lng.h b/FreeFileSync/Source/parse_lng.h index 01582e17..69f7b508 100644 --- a/FreeFileSync/Source/parse_lng.h +++ b/FreeFileSync/Source/parse_lng.h @@ -147,15 +147,12 @@ private: enum class TokenType { - headerBegin, - headerEnd, - srcBegin, - srcEnd, - trgBegin, - trgEnd, + header, + source, + target, + empty, text, - pluralBegin, - pluralEnd, + plural, end, }; @@ -189,14 +186,11 @@ public: private: const TokenMap tokens_ = { - {TokenType::headerBegin, "<header>"}, - {TokenType::headerEnd, "</header>"}, - {TokenType::srcBegin, "<source>"}, - {TokenType::srcEnd, "</source>"}, - {TokenType::trgBegin, "<target>"}, - {TokenType::trgEnd, "</target>"}, - {TokenType::pluralBegin, "<pluralform>"}, - {TokenType::pluralEnd, "</pluralform>"}, + {TokenType::header, "<header>"}, + {TokenType::source, "<source>"}, + {TokenType::target, "<target>"}, + {TokenType::empty, "<empty>"}, + {TokenType::plural, "<pluralform>"}, }; }; @@ -225,7 +219,7 @@ public: return Token(tokenEnum); } - //rest must be "text" + //otherwise assume "text" auto itBegin = pos_; while (pos_ != stream_.end() && !startsWithKnownTag()) pos_ = std::find(pos_ + 1, stream_.end(), '<'); @@ -305,9 +299,8 @@ public: try { - plural::PluralFormInfo pi(header.pluralDefinition, header.pluralCount); + plural::PluralFormInfo pi(header.pluralDefinition, header.pluralCount); //throw InvalidPluralForm - //items while (token().type != TokenType::end) parseRegular(out, pluralOut, pi); //throw ParsingError } @@ -321,7 +314,7 @@ public: { using namespace zen; - consumeToken(TokenType::headerBegin); //throw ParsingError + consumeToken(TokenType::header); //throw ParsingError const std::string headerRaw = token().text; consumeToken(TokenType::text); //throw ParsingError @@ -350,65 +343,64 @@ public: header.pluralCount = stringTo<int>(getValue("plural_count")); //throw ParsingError header.pluralDefinition = getValue("plural_definition"); //throw ParsingError header.translatorName = getValue("translator"); //throw ParsingError - - consumeToken(TokenType::headerEnd); //throw ParsingError } private: void parseRegular(TranslationMap& out, TranslationPluralMap& pluralOut, const plural::PluralFormInfo& pluralInfo) //throw ParsingError { - consumeToken(TokenType::srcBegin); //throw ParsingError + consumeToken(TokenType::source); //throw ParsingError - if (token().type == TokenType::pluralBegin) + if (token().type == TokenType::plural) return parsePlural(pluralOut, pluralInfo); //throw ParsingError std::string original = token().text; - consumeToken(TokenType::text); //throw ParsingError - consumeToken(TokenType::srcEnd); // + consumeToken(TokenType::text); //throw ParsingError - consumeToken(TokenType::trgBegin); //throw ParsingError + consumeToken(TokenType::target); //throw ParsingError std::string translation; if (token().type == TokenType::text) { translation = token().text; nextToken(); } + else + consumeToken(TokenType::empty); //throw ParsingError + validateTranslation(original, translation); //throw ParsingError - consumeToken(TokenType::trgEnd); // - out.emplace(original, std::move(translation)); + out.emplace(std::move(original), std::move(translation)); } void parsePlural(TranslationPluralMap& pluralOut, const plural::PluralFormInfo& pluralInfo) //throw ParsingError { - //TokenType::srcBegin already consumed + //TokenType::source already consumed - consumeToken(TokenType::pluralBegin); //throw ParsingError + consumeToken(TokenType::plural); //throw ParsingError std::string engSingular = token().text; - consumeToken(TokenType::text); //throw ParsingError - consumeToken(TokenType::pluralEnd); // + consumeToken(TokenType::text); //throw ParsingError - consumeToken(TokenType::pluralBegin); //throw ParsingError + consumeToken(TokenType::plural); //throw ParsingError std::string engPlural = token().text; - consumeToken(TokenType::text); //throw ParsingError - consumeToken(TokenType::pluralEnd); // + consumeToken(TokenType::text); //throw ParsingError - consumeToken(TokenType::srcEnd); //throw ParsingError const SingularPluralPair original(engSingular, engPlural); - consumeToken(TokenType::trgBegin); //throw ParsingError + consumeToken(TokenType::target); //throw ParsingError PluralForms pluralList; - while (token().type == TokenType::pluralBegin) + while (token().type == TokenType::plural) { - consumeToken(TokenType::pluralBegin); //throw ParsingError + nextToken(); std::string pluralForm = token().text; - consumeToken(TokenType::text); //throw ParsingError - consumeToken(TokenType::pluralEnd); // + consumeToken(TokenType::text); //throw ParsingError + pluralList.push_back(pluralForm); } + + if (pluralList.empty()) + consumeToken(TokenType::empty); //throw ParsingError + validateTranslation(original, pluralList, pluralInfo); - consumeToken(TokenType::trgEnd); //throw ParsingError pluralOut.emplace(original, std::move(pluralList)); } @@ -683,21 +675,6 @@ TransHeader parseHeader(const std::string& byteStream) //throw ParsingError inline -void formatMultiLineText(std::string& text) -{ - assert(!zen::contains(text, "\r\n")); - - if (zen::contains(text, '\n')) //multiple lines - { - if (*text.begin() != '\n') - text = '\n' + text; - if (*text.rbegin() != '\n') - text += '\n'; - } -} - - -inline std::string generateLng(const TranslationUnorderedList& in, const TransHeader& header, bool untranslatedToTop) { using namespace zen; @@ -705,16 +682,14 @@ std::string generateLng(const TranslationUnorderedList& in, const TransHeader& h const KnownTokens tokens; //no need for static non-POD! std::string headerLines; - headerLines += tokens.text(TokenType::headerBegin) + '\n'; + headerLines += tokens.text(TokenType::header) + '\n'; headerLines += "\t" "language: " + header.languageName + '\n'; headerLines += "\t" "locale: " + header.locale + '\n'; headerLines += "\t" "image: " + header.flagFile + '\n'; headerLines += "\t" "plural_count: " + numberTo<std::string>(header.pluralCount) + '\n'; headerLines += "\t" "plural_definition: " + header.pluralDefinition + '\n'; - headerLines += "\t" "translator: " + header.translatorName + '\n'; - - headerLines += tokens.text(TokenType::headerEnd) + "\n\n"; + headerLines += "\t" "translator: " + header.translatorName; std::string topLines; //untranslated items first? @@ -727,11 +702,15 @@ std::string generateLng(const TranslationUnorderedList& in, const TransHeader& h std::string original = trans.first; std::string translation = trans.second; - formatMultiLineText(original); - formatMultiLineText(translation); + out += + "\n\n" + tokens.text(TokenType::source) + ' ' + original + '\n'; + + if (contains(original, '\n')) //multiple lines + out += + '\n'; + + out += tokens.text(TokenType::target) + ' ' + translation; - out += tokens.text(TokenType::srcBegin) + original + tokens.text(TokenType::srcEnd) + '\n'; - out += tokens.text(TokenType::trgBegin) + translation + tokens.text(TokenType::trgEnd) + "\n\n"; + if (translation.empty()) //help translators search for untranslated items + out += tokens.text(TokenType::empty); }, [&](const TranslationPluralMap::value_type& transPlural) { @@ -741,23 +720,17 @@ std::string generateLng(const TranslationUnorderedList& in, const TransHeader& h std::string engPlural = transPlural.first.second; const PluralForms& forms = transPlural.second; - formatMultiLineText(engSingular); - formatMultiLineText(engPlural); + out += "\n\n" + tokens.text(TokenType::source) + '\n'; + out += '\t' + tokens.text(TokenType::plural) + ' ' + engSingular + '\n'; + out += '\t' + tokens.text(TokenType::plural) + ' ' + engPlural + '\n'; - out += tokens.text(TokenType::srcBegin) + '\n'; - out += '\t' + tokens.text(TokenType::pluralBegin) + engSingular + tokens.text(TokenType::pluralEnd) + '\n'; - out += '\t' + tokens.text(TokenType::pluralBegin) + engPlural + tokens.text(TokenType::pluralEnd) + '\n'; - out += tokens.text(TokenType::srcEnd) + '\n'; + out += tokens.text(TokenType::target); - out += tokens.text(TokenType::trgBegin); - if (!forms.empty()) //translators will be searching for "<target></target>" - out += '\n'; for (std::string plForm : forms) - { - formatMultiLineText(plForm); - out += '\t' + tokens.text(TokenType::pluralBegin) + plForm + tokens.text(TokenType::pluralEnd) + '\n'; - } - out += tokens.text(TokenType::trgEnd) + "\n\n"; + out += + "\n\t" + tokens.text(TokenType::plural) + ' ' + plForm; + + if (forms.empty()) //help translators search for untranslated items + out += ' ' + tokens.text(TokenType::empty); }); std::string output = headerLines + topLines + mainLines; diff --git a/FreeFileSync/Source/status_handler.h b/FreeFileSync/Source/status_handler.h index 1c3aab6d..5d1729c5 100644 --- a/FreeFileSync/Source/status_handler.h +++ b/FreeFileSync/Source/status_handler.h @@ -9,7 +9,6 @@ #include <thread> #include <functional> -//#include <zen/error_log.h> #include "base/process_callback.h" #include "return_codes.h" diff --git a/FreeFileSync/Source/ui/abstract_folder_picker.h b/FreeFileSync/Source/ui/abstract_folder_picker.h index 636de2d9..aba6201f 100644 --- a/FreeFileSync/Source/ui/abstract_folder_picker.h +++ b/FreeFileSync/Source/ui/abstract_folder_picker.h @@ -7,7 +7,6 @@ #ifndef ABSTRACT_FOLDER_PICKER_HEADER_324872346895690 #define ABSTRACT_FOLDER_PICKER_HEADER_324872346895690 -//#include <wx/window.h> #include <wx+/popup_dlg.h> #include "../afs/abstract.h" diff --git a/FreeFileSync/Source/ui/batch_config.cpp b/FreeFileSync/Source/ui/batch_config.cpp index 9708e187..12d00129 100644 --- a/FreeFileSync/Source/ui/batch_config.cpp +++ b/FreeFileSync/Source/ui/batch_config.cpp @@ -6,13 +6,11 @@ #include "batch_config.h" #include <wx/wupdlock.h> -//#include <wx+/window_layout.h> #include <wx+/image_resources.h> #include <wx+/image_tools.h> #include <wx+/choice_enum.h> #include <wx+/popup_dlg.h> #include "gui_generated.h" -//#include "folder_selector.h" using namespace zen; @@ -55,7 +53,15 @@ private: //output-only parameters BatchDialogConfig& dlgCfgOut_; - EnumDescrList<PostBatchAction> enumPostBatchAction_; + EnumDescrList<PostBatchAction> enumPostBatchAction_ + { + *m_choicePostSyncAction, + { + {PostBatchAction::none, L"", {}/*tooltip*/}, + {PostBatchAction::sleep, _("System: Sleep"), {}/*tooltip*/}, + {PostBatchAction::shutdown, _("System: Shut down"), {}/*tooltip*/}, + } + }; }; //################################################################################################################################### @@ -71,11 +77,6 @@ BatchDialog::BatchDialog(wxWindow* parent, BatchDialogConfig& dlgCfg) : setImage(*m_bitmapBatchJob, loadImage("cfg_batch")); - enumPostBatchAction_. - add(PostBatchAction::none, L""). - add(PostBatchAction::sleep, _("System: Sleep")). - add(PostBatchAction::shutdown, _("System: Shut down")); - setConfig(dlgCfg); Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& event) { onLocalKeyEvent(event); }); //enable dialog-specific key events @@ -124,7 +125,7 @@ void BatchDialog::setConfig(const BatchDialogConfig& dlgCfg) m_checkBoxRunMinimized->SetValue(dlgCfg.batchExCfg.runMinimized); m_checkBoxAutoClose ->SetValue(dlgCfg.batchExCfg.autoCloseSummary); - setEnumVal(enumPostBatchAction_, *m_choicePostSyncAction, dlgCfg.batchExCfg.postBatchAction); + enumPostBatchAction_.set(dlgCfg.batchExCfg.postBatchAction); updateGui(); //re-evaluate gui after config changes } @@ -136,10 +137,10 @@ BatchDialogConfig BatchDialog::getConfig() const { .batchExCfg { - .runMinimized = m_checkBoxRunMinimized->GetValue(), - .autoCloseSummary = m_checkBoxAutoClose ->GetValue(), - .batchErrorHandling = m_radioBtnErrorDialogCancel->GetValue() ? BatchErrorHandling::cancel : BatchErrorHandling::showPopup, - .postBatchAction = getEnumVal(enumPostBatchAction_, *m_choicePostSyncAction), + .runMinimized = m_checkBoxRunMinimized->GetValue(), + .autoCloseSummary = m_checkBoxAutoClose ->GetValue(), + .batchErrorHandling = m_radioBtnErrorDialogCancel->GetValue() ? BatchErrorHandling::cancel : BatchErrorHandling::showPopup, + .postBatchAction = enumPostBatchAction_.get(), }, .ignoreErrors = m_checkBoxIgnoreErrors->GetValue(), }; diff --git a/FreeFileSync/Source/ui/batch_config.h b/FreeFileSync/Source/ui/batch_config.h index c42ca224..15e15c63 100644 --- a/FreeFileSync/Source/ui/batch_config.h +++ b/FreeFileSync/Source/ui/batch_config.h @@ -7,7 +7,6 @@ #ifndef BATCH_CONFIG_H_3921674832168945 #define BATCH_CONFIG_H_3921674832168945 -//#include <wx/window.h> #include <wx+/popup_dlg.h> #include "../config.h" diff --git a/FreeFileSync/Source/ui/cfg_grid.cpp b/FreeFileSync/Source/ui/cfg_grid.cpp index 2d5f8665..0cd3a2fc 100644 --- a/FreeFileSync/Source/ui/cfg_grid.cpp +++ b/FreeFileSync/Source/ui/cfg_grid.cpp @@ -7,14 +7,13 @@ #include "cfg_grid.h" #include <zen/time.h> #include <zen/process_exec.h> +#include <wx+/color_tools.h> #include <wx+/dc.h> #include <wx+/rtl.h> #include <wx+/image_resources.h> #include <wx+/popup_dlg.h> -//#include <wx+/image_tools.h> #include <wx+/std_button_layout.h> #include <wx/settings.h> -//#include "../icon_buffer.h" #include "../ffs_paths.h" #include "../afs/native.h" @@ -434,7 +433,8 @@ private: { rectTmp.width = rect.width * 2 / 3; clearArea(dc, rectTmp, backColor); //accessibility: always set both foreground AND background colors! - textColor.Set(*wxBLACK); // + textColor.Set(relativeContrast(backColor, *wxWHITE) > + relativeContrast(backColor, *wxBLACK) ? *wxWHITE : *wxBLACK); // rectTmp.x += rectTmp.width; rectTmp.width = rect.width - rectTmp.width; @@ -499,7 +499,7 @@ private: wxDCTextColourChanger textColor2(dc); if (syncOverdueDays_ > 0) if (getDaysPast(item->cfgItem.lastRunStats.startTime) >= syncOverdueDays_) - textColor2.Set(*wxRED); + textColor2.Set(*wxRED); //text barely readable when selected, for 4.5 contrast would need to be white :( drawCellText(dc, rect, getValue(row, colType), wxALIGN_CENTER); } @@ -531,7 +531,7 @@ private: } } - int getBestSize(wxDC& dc, size_t row, ColumnType colType) override + int getBestSize(const wxReadOnlyDC& dc, size_t row, ColumnType colType) override { // -> synchronize renderCell() <-> getBestSize() @@ -550,7 +550,7 @@ private: return 0; } - HoverArea getMouseHover(wxDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override + HoverArea getMouseHover(const wxReadOnlyDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override { if (const ConfigView::Details* item = cfgView_.getItem(row)) { @@ -668,7 +668,7 @@ private: tooltip += TAB_SPACE + _("Total time:") + L' ' + utfTo<std::wstring>(formatTimeSpan(totalTimeSec)); //non-native path won't be clickable => at least show in tooltip: - if (getNativeItemPath(item->cfgItem.lastRunStats.logFilePath).empty()) + if (getNativeItemPath(item->cfgItem.lastRunStats.logFilePath).empty()) tooltip += L"\n" + AFS::getDisplayPath(item->cfgItem.lastRunStats.logFilePath); return tooltip; diff --git a/FreeFileSync/Source/ui/command_box.cpp b/FreeFileSync/Source/ui/command_box.cpp index 80df44e7..3768f2ae 100644 --- a/FreeFileSync/Source/ui/command_box.cpp +++ b/FreeFileSync/Source/ui/command_box.cpp @@ -5,10 +5,7 @@ // ***************************************************************************** #include "command_box.h" -//#include <deque> -//#include <zen/i18n.h> #include <algorithm> -//#include <zen/stl_tools.h> #include <zen/utf.h> #include <wx+/dc.h> diff --git a/FreeFileSync/Source/ui/command_box.h b/FreeFileSync/Source/ui/command_box.h index a4193602..c3431f89 100644 --- a/FreeFileSync/Source/ui/command_box.h +++ b/FreeFileSync/Source/ui/command_box.h @@ -8,7 +8,6 @@ #define COMMAND_BOX_H_18947773210473214 #include <vector> -//#include <string> #include <wx/combobox.h> #include <zen/zstring.h> diff --git a/FreeFileSync/Source/ui/file_grid.cpp b/FreeFileSync/Source/ui/file_grid.cpp index 60ac75a6..2929003d 100644 --- a/FreeFileSync/Source/ui/file_grid.cpp +++ b/FreeFileSync/Source/ui/file_grid.cpp @@ -5,16 +5,13 @@ // ***************************************************************************** #include "file_grid.h" -//#include <set> #include <wx/dc.h> #include <wx/settings.h> #include <wx/timer.h> #include <zen/i18n.h> -//#include <zen/file_error.h> -//#include <zen/format_unit.h> -#include <zen/scope_guard.h> #include <wx+/tooltip.h> #include <wx+/rtl.h> +#include <wx+/color_tools.h> #include <wx+/dc.h> #include <wx+/image_tools.h> #include <wx+/image_resources.h> @@ -35,70 +32,60 @@ wxDEFINE_EVENT(EVENT_GRID_SYNC_DIRECTION, SyncDirectionEvent); namespace { //let's NOT create wxWidgets objects statically: -inline wxColor getColorSyncBlue (bool faint) { if (faint) return {0xed, 0xee, 0xff}; return {185, 188, 255}; } -inline wxColor getColorSyncGreen(bool faint) { if (faint) return {0xf1, 0xff, 0xed}; return {196, 255, 185}; } +wxColor getColorSyncBlue(bool faint) +{ + if (faint) return {0xed, 0xee, 0xff}; //faint blue -inline wxColor getColorConflictBackground (bool faint) { if (faint) return {0xfe, 0xfe, 0xda}; return {247, 252, 62}; } //yellow -inline wxColor getColorDifferentBackground(bool faint) { if (faint) return {0xff, 0xed, 0xee}; return {255, 185, 187}; } //red + return wxSystemSettings::GetAppearance().IsDark() ? wxColor{0x80, 0x94, 0xfe} /*medium blue*/ : + wxColor{0xb9, 0xbc, 0xff} /*light blue*/; +} -inline wxColor getColorSymlinkBackground() { return {238, 201, 0}; } //orange -//inline wxColor getColorItemMissing() { return {212, 208, 200}; } //medium grey +wxColor getColorSyncGreen(bool faint) +{ + if (faint) + return {0xf1, 0xff, 0xed}; //faint green + + return wxSystemSettings::GetAppearance().IsDark() ? wxColor{0x6c, 0xfb, 0x53} /*medium green*/ : + wxColor{0xc4, 0xff, 0xb9} /*light green*/; +} -inline wxColor getColorInactiveBack(bool faint) { if (faint) return {0xf6, 0xf6, 0xf6}; return {0xe4, 0xe4, 0xe4}; } //light grey -inline wxColor getColorInactiveText() { return {0x40, 0x40, 0x40}; } //dark grey +wxColor getColorConflictBackground (bool faint) { if (faint) return {0xfe, 0xfe, 0xda}; return {247, 252, 62}; } //yellow +wxColor getColorDifferentBackground(bool faint) { if (faint) return {0xff, 0xed, 0xee}; return {255, 185, 187}; } //red -inline wxColor getColorGridLine() { return wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW); } +wxColor getColorSymlinkBackground() { return {238, 201, 0}; } //orange + +wxColor getColorInactiveBack() { return wxSystemSettings::GetAppearance().IsDark() ? 0x6c6c6c /*medium grey*/ : 0xe4e4e4 /*light grey*/; } +wxColor getColorInactiveText() { return wxSystemSettings::GetAppearance().IsDark() ? 0xffffff /*white*/ : 0x404040 /*dark grey*/; } + +wxColor getColorGridLine() { return wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW); } const int FILE_GRID_GAP_SIZE_DIP = 2; const int FILE_GRID_GAP_SIZE_WIDE_DIP = 6; -/* class hierarchy: GridDataBase - /|\ - ________________|________________ - | | - GridDataRim | - /|\ | - __________|_________ | - | | | - GridDataLeft GridDataRight GridDataCenter */ +/* class hierarchy: GridDataBase + /|\ + ___________|____________ + | | + GridDataRim | + /|\ | + ______|_______ | + | | | + GridDataLeft GridDataRight GridDataCenter */ //accessibility, support high-contrast schemes => work with user-defined background color! -wxColor getAlternateBackgroundColor() +wxColor getGridAlternateBackgroundColor() { - const auto backCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - - auto incChannel = [](unsigned char c, int diff) { return static_cast<unsigned char>(std::max(0, std::min(255, c + diff))); }; - - auto getAdjustedColor = [&](int diff) - { - return wxColor(incChannel(backCol.Red (), diff), - incChannel(backCol.Green(), diff), - incChannel(backCol.Blue (), diff)); - }; + const wxColor backCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - auto colorDist = [](const wxColor& lhs, const wxColor& rhs) //just some metric - { - return numeric::power<2>(static_cast<int>(lhs.Red ()) - static_cast<int>(rhs.Red ())) + - numeric::power<2>(static_cast<int>(lhs.Green()) - static_cast<int>(rhs.Green())) + - numeric::power<2>(static_cast<int>(lhs.Blue ()) - static_cast<int>(rhs.Blue ())); - }; + const bool isColorLight = relativeLuminance(backCol) > 0.5; - const int signLevel = colorDist(backCol, *wxBLACK) < colorDist(backCol, *wxWHITE) ? 1 : -1; //brighten or darken + //darken or brighten: only a faint gradient to avoid visual distraction + auto liftChannel = [diff = isColorLight ? -15 : 15](unsigned char c) { return static_cast<unsigned char>(std::clamp(c + diff, 0, 255)); }; - //just some very faint gradient to avoid visual distraction - const wxColor altCol = getAdjustedColor(signLevel * 10); - return altCol; -} - - -//improve readability (while lacking cell borders) -wxColor getDefaultBackgroundColorAlternating(bool wantStandardColor) -{ - if (wantStandardColor) - return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); - else - return getAlternateBackgroundColor(); + return wxColor(liftChannel(backCol.Red ()), + liftChannel(backCol.Green()), + liftChannel(backCol.Blue ())); } @@ -156,7 +143,7 @@ wxColor getBackGroundColorSyncAction(SyncOperation so) return getColorSyncGreen(false /*faint*/); case SO_DO_NOTHING: - return getColorInactiveBack(false /*faint*/); + return getColorInactiveBack(); case SO_EQUAL: break; //usually white case SO_UNRESOLVED_CONFLICT: @@ -173,11 +160,11 @@ wxColor getBackGroundColorCmpDifference(CompareFileResult cmpResult) //*INDENT-OFF* case FILE_EQUAL: break; //usually white - case FILE_LEFT_ONLY: return getColorSyncBlue(false /*faint*/); - case FILE_LEFT_NEWER: return getColorSyncBlue(true /*faint*/); + case FILE_LEFT_ONLY: return getColorSyncBlue(false /*faint*/); + case FILE_LEFT_NEWER: return getColorSyncBlue(true /*faint*/); - case FILE_RIGHT_ONLY: return getColorSyncGreen(false /*faint*/); - case FILE_RIGHT_NEWER: return getColorSyncGreen(true /*faint*/); + case FILE_RIGHT_ONLY: return getColorSyncGreen(false /*faint*/); + case FILE_RIGHT_NEWER: return getColorSyncGreen(true /*faint*/); case FILE_DIFFERENT_CONTENT: return getColorDifferentBackground(false /*faint*/); @@ -352,7 +339,7 @@ public: const FileSystemObject* getFsObject(size_t row) const { return getDataView().getFsObject(row); } - const wxSize& getTextExtentBuffered(wxDC& dc, const std::wstring_view& text) + const wxSize& getTextExtentBuffered(const wxReadOnlyDC& dc, const std::wstring_view& text) { auto& compExtentsBuf = sharedComp_.ref().compExtentsBuf_; //- only used for parent path names and file names on view => should not grow "too big" @@ -368,7 +355,7 @@ public: //- trim while leaving path components intact //- *always* returns at least one component, even if > maxWidth - size_t getPathTrimmedSize(wxDC& dc, const std::wstring_view& itemPath, int maxWidth) + size_t getPathTrimmedSize(const wxReadOnlyDC& dc, const std::wstring_view& itemPath, int maxWidth) { if (itemPath.size() <= 1) return itemPath.size(); @@ -403,9 +390,18 @@ public: } } + //improve readability (while lacking cell borders) + const wxColor& getDefaultBackgroundColorAlternating(bool wantStandardColor) + { + return wantStandardColor ? gridBackgroundColor_ : gridBackgroundColorAlt_; + } + private: size_t getRowCount() const override { return getDataView().rowsOnView(); } + const wxColor gridBackgroundColor_ = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + const wxColor gridBackgroundColorAlt_ = getGridAlternateBackgroundColor(); + Grid& grid_; SharedRef<SharedComponents> sharedComp_; }; @@ -577,7 +573,7 @@ private: //*INDENT-OFF* case DisplayType::normal: break; case DisplayType::symlink: return getColorSymlinkBackground(); - case DisplayType::inactive: return getColorInactiveBack(false /*faint*/); + case DisplayType::inactive: return getColorInactiveBack(); //*INDENT-ON* } return getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 == 0); @@ -597,7 +593,7 @@ private: } - int getGroupItemNamesWidth(wxDC& dc, const FileView::PathDrawInfo& pdi) + int getGroupItemNamesWidth(const wxReadOnlyDC& dc, const FileView::PathDrawInfo& pdi) { //FileView::updateView() called? => invalidates group item render buffer if (pdi.viewUpdateId != viewUpdateIdLast_) @@ -651,7 +647,7 @@ private: int groupParentWidth; int groupNameWidth; }; - GroupRowLayout getGroupRowLayout(wxDC& dc, size_t row, const FileView::PathDrawInfo& pdi, int maxWidth) + GroupRowLayout getGroupRowLayout(const wxReadOnlyDC& dc, size_t row, const FileView::PathDrawInfo& pdi, int maxWidth) { assert(pdi.fsObj); @@ -1031,7 +1027,7 @@ break2: if (!pdi.folderGroupObj->isEmpty<side>() && !pdi.folderGroupObj->isActive()) { - clearArea(dc, rectGroupNameBack, getColorInactiveBack(false /*faint*/)); + clearArea(dc, rectGroupNameBack, getColorInactiveBack()); textColorGroupName.Set(getColorInactiveText()); } drawCudHighlight(rectGroupNameBack, pdi.folderGroupObj->getSyncOperation()); @@ -1051,7 +1047,7 @@ break2: //mouse highlight: group name if (static_cast<HoverAreaGroup>(rowHover) == HoverAreaGroup::groupName || (static_cast<HoverAreaGroup>(rowHover) == HoverAreaGroup::item && pdi.fsObj == pdi.folderGroupObj /*exception: extend highlight*/)) - drawRectangleBorder(dc, rectGroupNameBack, *wxBLUE, dipToWxsize(1)); + drawRectangleBorder(dc, rectGroupNameBack, mouseHighlightColor_, dipToWxsize(1)); if (!pdi.folderGroupObj->isEmpty<side>()) drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupName)); @@ -1123,7 +1119,7 @@ break2: //mouse highlight: item name if (static_cast<HoverAreaGroup>(rowHover) == HoverAreaGroup::item) - drawRectangleBorder(dc, rectItemsBack, *wxBLUE, dipToWxsize(1)); + drawRectangleBorder(dc, rectItemsBack, mouseHighlightColor_, dipToWxsize(1)); if (!pdi.fsObj->isEmpty<side>()) drawCellText(dc, rectGroupItems, itemName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, itemName)); @@ -1135,31 +1131,30 @@ break2: break; case ColumnTypeRim::size: - if (refGrid().GetLayoutDirection() != wxLayout_RightToLeft) + case ColumnTypeRim::date: + case ColumnTypeRim::extension: + { + if (refGrid().GetLayoutDirection() == wxLayout_RightToLeft || //remain left-justified for RTL languages + static_cast<ColumnTypeRim>(colType) == ColumnTypeRim::extension) { - rectTmp.width -= gapSize_; //have file size right-justified (but don't change for RTL languages) - drawCellText(dc, rectTmp, getValue(row, colType), wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + rectTmp.x += gapSize_; + rectTmp.width -= gapSize_; + drawCellText(dc, rectTmp, getValue(row, colType), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); } else { - rectTmp.x += gapSize_; rectTmp.width -= gapSize_; - drawCellText(dc, rectTmp, getValue(row, colType), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); + drawCellText(dc, rectTmp, getValue(row, colType), wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + //macOS: wxALIGN_RIGHT also helps mitigate NSDateFormatter not zero-padding dates! } - break; - - case ColumnTypeRim::date: - case ColumnTypeRim::extension: - rectTmp.x += gapSize_; - rectTmp.width -= gapSize_; - drawCellText(dc, rectTmp, getValue(row, colType), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); - break; + } + break; } } } - HoverArea getMouseHover(wxDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override + HoverArea getMouseHover(const wxReadOnlyDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override { if (static_cast<ColumnTypeRim>(colType) == ColumnTypeRim::path) if (const FileView::PathDrawInfo pdi = getDataView().getDrawInfo(row); @@ -1183,7 +1178,7 @@ break2: } - int getBestSize(wxDC& dc, size_t row, ColumnType colType) override + int getBestSize(const wxReadOnlyDC& dc, size_t row, ColumnType colType) override { if (static_cast<ColumnTypeRim>(colType) == ColumnTypeRim::path) { @@ -1215,8 +1210,9 @@ break2: } else { + const wxReadOnlyDC& infoDc = dc; const std::wstring cellValue = getValue(row, colType); - return gapSize_ + dc.GetTextExtent(cellValue).GetWidth() + gapSize_; + return gapSize_ + infoDc.GetTextExtent(cellValue).GetWidth() + gapSize_; } } @@ -1225,24 +1221,20 @@ break2: { switch (static_cast<ColumnTypeRim>(colType)) { + //*INDENT-OFF* case ColumnTypeRim::path: switch (itemPathFormat_) { - case ItemPathFormat::name: - return _("Item name"); - case ItemPathFormat::relative: - return _("Relative path"); - case ItemPathFormat::full: - return _("Full path"); + case ItemPathFormat::name: return _("Item name"); + case ItemPathFormat::relative: return _("Relative path"); + case ItemPathFormat::full: return _("Full path"); } assert(false); break; - case ColumnTypeRim::size: - return _("Size"); - case ColumnTypeRim::date: - return _("Date"); - case ColumnTypeRim::extension: - return _("Extension"); + case ColumnTypeRim::size: return _("Size"); + case ColumnTypeRim::date: return _("Date"); + case ColumnTypeRim::extension: return _("Extension"); + //*INDENT-ON* } //assert(false); may be ColumnType::none return std::wstring(); @@ -1348,8 +1340,13 @@ break2: const int gapSize_ = dipToWxsize(FILE_GRID_GAP_SIZE_DIP); const int gapSizeWide_ = dipToWxsize(FILE_GRID_GAP_SIZE_WIDE_DIP); + const wxColor mouseHighlightColor_ = enhanceContrast(*wxBLUE, //primarily needed for dark mode! + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 5 /*contrastRatioMin*/); //W3C recommends >= 4.5 + const int charHeight_ = refGrid().getMainWin().GetCharHeight(); + ItemPathFormat itemPathFormat_ = ItemPathFormat::full; std::vector<unsigned char> failedLoads_; //effectively a vector<bool> of size "number of rows" @@ -1487,7 +1484,7 @@ private: return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); if (!pdi.fsObj->isActive()) - return getColorInactiveBack(false /*faint*/); + return getColorInactiveBack(); return getDefaultBackgroundColorAlternating(pdi.groupIdx % 2 == 0); }(); @@ -1616,7 +1613,7 @@ private: } } - HoverArea getMouseHover(wxDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override + HoverArea getMouseHover(const wxReadOnlyDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override { if (const FileSystemObject* const fsObj = getFsObject(row)) switch (static_cast<ColumnTypeCenter>(colType)) @@ -1778,9 +1775,6 @@ private: //######################################################################################################## -wxDEFINE_EVENT(EVENT_ALIGN_SCROLLBARS, wxCommandEvent); - - class GridEventManager : private wxEvtHandler { public: @@ -1847,19 +1841,34 @@ public: grid.getMainWin().Bind(wxEVT_RIGHT_DOWN, handler); grid.getMainWin().Bind(wxEVT_MOUSEWHEEL, handler); }; - connectGridAccess(gridL_, [this](wxEvent& event) { scrollMaster_ = &gridL_; event.Skip(); }); // - connectGridAccess(gridC_, [this](wxEvent& event) { scrollMaster_ = &gridC_; event.Skip(); }); //connect *after* onKeyDown() in order to receive callback *before*!!! - connectGridAccess(gridR_, [this](wxEvent& event) { scrollMaster_ = &gridR_; event.Skip(); }); // - - Bind(EVENT_ALIGN_SCROLLBARS, [this](wxCommandEvent& event) { onAlignScrollBars(event); }); + connectGridAccess(gridL_, [this](wxEvent& event) { setScrollMaster(gridL_); event.Skip(); }); // + connectGridAccess(gridC_, [this](wxEvent& event) { setScrollMaster(gridC_); event.Skip(); }); //connect *after* onKeyDown() in order to receive callback *before*!!! + connectGridAccess(gridR_, [this](wxEvent& event) { setScrollMaster(gridR_); event.Skip(); }); // } ~GridEventManager() { - //assert(!scrollbarUpdatePending_); => false-positives: e.g. start ffs, right-click on grid, close dialog by clicking X + //assert(!scrollbarAlignPending_); => false-positives: e.g. start ffs, right-click on grid, close dialog by clicking X } - void setScrollMaster(const Grid& grid) { scrollMaster_ = &grid; } + void setScrollMaster(const Grid& grid) + { + if (&grid != &gridC_ && + &grid != &gridL_ && + &grid != &gridR_) + { + assert(false); //does this ever happen? + return ; + } + +#if 0 + if (const std::string& logtext = "new scroll master: " + printNumber<std::string>("%llx", reinterpret_cast<unsigned long long>(&grid)) + "\n"; + scrollMaster_ != &grid) + + std::cerr << logtext; +#endif + scrollMaster_ = &grid; + } private: void onCenterSelectBegin(GridClickEvent& event) @@ -1966,14 +1975,14 @@ private: gridL_.setGridCursor(row, GridEventPolicy::allow); gridL_.SetFocus(); //since key event is likely originating from right grid, we need to set scrollMaster manually! - scrollMaster_ = &gridL_; //onKeyDown is called *after* onGridAccessL()! + setScrollMaster(gridL_); //onKeyDown is called *after* onGridAccessL()! return; //swallow event case WXK_RIGHT: case WXK_NUMPAD_RIGHT: gridR_.setGridCursor(row, GridEventPolicy::allow); gridR_.SetFocus(); - scrollMaster_ = &gridR_; + setScrollMaster(gridR_); return; //swallow event } @@ -2003,85 +2012,103 @@ private: void onPaintGrid(const Grid& grid) { - //align scroll positions of all three grids *synchronously* during paint event! (wxGTK has visible delay when this is done asynchronously, no delay on Windows) - - //determine lead grid - const Grid* lead = nullptr; - Grid* follow1 = nullptr; - Grid* follow2 = nullptr; - auto setGrids = [&](const Grid& l, Grid& f1, Grid& f2) { lead = &l; follow1 = &f1; follow2 = &f2; }; - - if (&gridC_ == scrollMaster_) - setGrids(gridC_, gridL_, gridR_); - else if (&gridR_ == scrollMaster_) - setGrids(gridR_, gridL_, gridC_); - else //default: left panel - setGrids(gridL_, gridC_, gridR_); - - //align other grids only while repainting the lead grid to avoid scrolling and updating a grid at the same time! - if (lead == &grid) +#if 0 + const std::string& logtext = "wxEVT_PAINT: " + printNumber<std::string>("%llx", reinterpret_cast<unsigned long long>(&grid)) + "\n"; + std::cerr << logtext; +#endif + /* keep scroll positions of all three grids in sync + + wxGrid::Scroll() *during* vs *after* paint event: + ------------------------------------------------ + macOS: doesn't matter; 3 paint events per mouse scroll + + Linux: no visible perf issue, but + a) *during* paint event: 6 paint events + b) *after* paint event: 4 paint events + + Windows: a) *during* paint event: + 1. double-buffering(WS_EX_COMPOSITED) => excessive amount of additional paint events and accidental RECURSION!!! + Apparently multiple paint events sent (with clipped DC), then during wxGrid::Scroll() -> wxWindow::Update() -> onPaintGrid() for *SAME* grid! + 2. no double buffering => 4 paint events per mouse scroll + b) *after* paint event: + 1. double-buffering(WS_EX_COMPOSITED) => 6 paint events per mouse scroll + => no visible perf-difference compared to 2. but 60% higher CPU time during excessive scrolling + 2. no double buffering => 4 paint events per mouse scroll */ + if (&grid == scrollMaster_ && !scrollPosAlignPending_) { - auto scroll = [](Grid& target, int y) //support polling + scrollPosAlignPending_ = true; + + CallAfter([this] { - //scroll vertically only - scrolling horizontally becomes annoying if left and right sides have different widths; - //e.g. h-scroll on left would be undone when scrolling vertically on right which doesn't have a h-scrollbar - int yOld = 0; - target.GetViewStart(nullptr, &yOld); - if (yOld != y) - target.Scroll(-1, y); //empirical test Windows/Ubuntu: this call does NOT trigger a wxEVT_SCROLLWIN event, which would incorrectly set "scrollMaster" to "&target"! - //CAVEAT: wxScrolledWindow::Scroll() internally calls wxWindow::Update(), leading to immediate WM_PAINT handling in the target grid! - // an this while we're still in our WM_PAINT handler! => no recursion, fine (hopefully) - }; - int y = 0; - lead->GetViewStart(nullptr, &y); - scroll(*follow1, y); - scroll(*follow2, y); + auto scroll = [this](Grid& target, int y) //support polling + { + if (&target != scrollMaster_) + { + //scroll vertically only - scrolling horizontally becomes annoying if left and right sides have different widths; + //e.g. h-scroll on left would be undone when scrolling vertically on right which doesn't have a h-scrollbar + int yOld = 0; + target.GetViewStart(nullptr, &yOld); + if (yOld != y) + target.Scroll(-1, y); //empirical test Windows/Ubuntu: this call does NOT trigger a wxEVT_SCROLLWIN event, + // which would incorrectly set "scrollMaster" to "&target"! + //CAVEAT: wxScrolledWindow::Scroll() internally calls wxWindow::Update(), leading to immediate WM_PAINT handling in the target grid! + // and this while we're still in our WM_PAINT handler! => no recursion, thanks to scrollMaster_ (hopefully) + } + }; + int y = 0; + scrollMaster_->GetViewStart(nullptr, &y); + scroll(gridC_, y); + scroll(gridL_, y); + scroll(gridR_, y); + + assert(scrollPosAlignPending_); + scrollPosAlignPending_ = false; + }); } //harmonize placement of horizontal scrollbar to avoid grids getting out of sync! - //since this affects the grid that is currently repainted as well, we do work asynchronously! - if (!scrollbarUpdatePending_) //send one async event at most, else they may accumulate and create perf issues, see grid.cpp + //since this affects the grid that is currently repainted, run asynchronously! + if (!scrollbarAlignPending_) //send one async event at most, else they may accumulate and create perf issues, see grid.cpp { - scrollbarUpdatePending_ = true; - wxCommandEvent alignEvent(EVENT_ALIGN_SCROLLBARS); - AddPendingEvent(alignEvent); //waits until next idle event - may take up to a second if the app is busy on wxGTK! - } - } + scrollbarAlignPending_ = true; - void onAlignScrollBars(wxEvent& event) - { - assert(scrollbarUpdatePending_); - ZEN_ON_SCOPE_EXIT(scrollbarUpdatePending_ = false); - - auto needsHorizontalScrollbars = [](const Grid& grid) -> bool - { - const wxWindow& mainWin = grid.getMainWin(); - return mainWin.GetVirtualSize().GetWidth() > mainWin.GetClientSize().GetWidth(); - //assuming Grid::updateWindowSizes() does its job well, this should suffice! - //CAVEAT: if horizontal and vertical scrollbar are circular dependent from each other - //(h-scrollbar is shown due to v-scrollbar consuming horizontal width, etc...) - //while in fact both are NOT needed, this special case results in a bogus need for scrollbars! - //see https://sourceforge.net/tracker/?func=detail&aid=3514183&group_id=234430&atid=1093083 - // => since we're outside the Grid abstraction, we should not duplicate code to handle this special case as it seems to be insignificant - }; - - Grid::ScrollBarStatus sbStatusX = needsHorizontalScrollbars(gridL_) || - needsHorizontalScrollbars(gridR_) ? - Grid::SB_SHOW_ALWAYS : Grid::SB_SHOW_NEVER; - gridL_.showScrollBars(sbStatusX, Grid::SB_SHOW_NEVER); - gridC_.showScrollBars(sbStatusX, Grid::SB_SHOW_NEVER); - gridR_.showScrollBars(sbStatusX, Grid::SB_SHOW_AUTOMATIC); + CallAfter([this] //update *outside* of wxPaint event + { + auto needsHorizontalScrollbars = [](const Grid& target) + { + const wxWindow& mainWin = target.getMainWin(); + return mainWin.GetVirtualSize().GetWidth() > mainWin.GetClientSize().GetWidth(); + //assuming Grid::updateWindowSizes() does its job well, this should suffice! + //CAVEAT: if horizontal and vertical scrollbar are circular dependent from each other + //(h-scrollbar is shown due to v-scrollbar consuming horizontal width, etc...) + //while in fact both are NOT needed, this special case results in a bogus need for scrollbars! + //see https://sourceforge.net/tracker/?func=detail&aid=3514183&group_id=234430&atid=1093083 + // => since we're outside the Grid abstraction, we should not duplicate code to handle this special case as it seems to be insignificant + }; + + Grid::ScrollBarStatus sbStatusX = needsHorizontalScrollbars(gridL_) || + needsHorizontalScrollbars(gridR_) ? + Grid::SB_SHOW_ALWAYS : Grid::SB_SHOW_NEVER; + gridL_.showScrollBars(sbStatusX, Grid::SB_SHOW_NEVER); + gridC_.showScrollBars(sbStatusX, Grid::SB_SHOW_NEVER); + gridR_.showScrollBars(sbStatusX, Grid::SB_SHOW_AUTOMATIC); + + assert(scrollbarAlignPending_); + scrollbarAlignPending_ = false; + }); + } } Grid& gridL_; Grid& gridC_; Grid& gridR_; - const Grid* scrollMaster_ = nullptr; //for address check only; this needn't be the grid having focus! + const Grid* scrollMaster_ = &gridL_; //for address check only; this needn't be the grid having focus! //e.g. mouse wheel events should set window under cursor as scrollMaster, but *not* change focus GridDataCenter& provCenter_; - bool scrollbarUpdatePending_ = false; + bool scrollbarAlignPending_ = false; + bool scrollPosAlignPending_ = false; }; } @@ -2107,7 +2134,7 @@ void filegrid::init(Grid& gridLeft, Grid& gridCenter, Grid& gridRight) gridCenter.showRowLabel(false); gridRight .showRowLabel(false); - //gridLeft .showScrollBars(Grid::SB_SHOW_AUTOMATIC, Grid::SB_SHOW_NEVER); -> redundant: configuration happens in GridEventManager::onAlignScrollBars() + //gridLeft .showScrollBars(Grid::SB_SHOW_AUTOMATIC, Grid::SB_SHOW_NEVER); -> redundant: configuration happens in GridEventManager::onPaintGrid() //gridCenter.showScrollBars(Grid::SB_SHOW_NEVER, Grid::SB_SHOW_NEVER); const int widthCheckbox = screenToWxsize( loadImage("checkbox_true").GetWidth() + dipToScreen(3)); diff --git a/FreeFileSync/Source/ui/file_grid_attr.h b/FreeFileSync/Source/ui/file_grid_attr.h index 4f5f6386..fbf83418 100644 --- a/FreeFileSync/Source/ui/file_grid_attr.h +++ b/FreeFileSync/Source/ui/file_grid_attr.h @@ -44,8 +44,8 @@ std::vector<ColAttributesRim> getFileGridDefaultColAttribsLeft() { {ColumnTypeRim::path, -dipToWxsize(100), 1, true }, {ColumnTypeRim::extension, dipToWxsize( 60), 0, false}, - {ColumnTypeRim::date, dipToWxsize(140), 0, false}, - {ColumnTypeRim::size, dipToWxsize(100), 0, true }, + {ColumnTypeRim::date, dipToWxsize(140), 0, false}, //optimal: Ubuntu: 138, macOS: 121 + {ColumnTypeRim::size, dipToWxsize(100), 0, true }, //optimal: Ubuntu: 96, macOS: 94 for 2GB size }; } diff --git a/FreeFileSync/Source/ui/file_view.cpp b/FreeFileSync/Source/ui/file_view.cpp index 2be385a1..33acb702 100644 --- a/FreeFileSync/Source/ui/file_view.cpp +++ b/FreeFileSync/Source/ui/file_view.cpp @@ -7,9 +7,7 @@ #include "file_view.h" #include <span> #include <zen/stl_tools.h> -//#include <zen/perf.h> #include <zen/thread.h> -//#include "../base/synchronization.h" using namespace zen; using namespace fff; @@ -17,17 +15,17 @@ using namespace fff; namespace { -void serializeHierarchy(ContainerObject& conObj, std::vector<FileSystemObject::ObjectId>& output) +void serializeHierarchy(ContainerObject& conObj, std::vector<std::weak_ptr<FileSystemObject>>& output) { - for (FilePair& file : conObj.refSubFiles()) - output.push_back(file.getId()); + for (FilePair& file : conObj.files()) + output.push_back(file.weak_from_this()); - for (SymlinkPair& symlink : conObj.refSubLinks()) - output.push_back(symlink.getId()); + for (SymlinkPair& symlink : conObj.symlinks()) + output.push_back(symlink.weak_from_this()); - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) { - output.push_back(folder.getId()); + output.push_back(folder.weak_from_this()); serializeHierarchy(folder, output); //add recursion here to list sub-objects directly below parent! } @@ -58,14 +56,17 @@ void serializeHierarchy(ContainerObject& conObj, std::vector<FileSystemObject::O FileView::FileView(FolderComparison& folderCmp) { - std::for_each(begin(folderCmp), end(folderCmp), [&](BaseFolderPair& baseObj) - { - serializeHierarchy(baseObj, sortedRef_); + for (BaseFolderPair& baseObj : asRange(folderCmp)) + //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderPairs_" + if (!AFS::isNullPath(baseObj.getAbstractPath<SelectSide::left >()) || + !AFS::isNullPath(baseObj.getAbstractPath<SelectSide::right>())) + { + serializeHierarchy(baseObj, sortedRef_); - folderPairs_.emplace_back(&baseObj, - baseObj.getAbstractPath<SelectSide::left >(), - baseObj.getAbstractPath<SelectSide::right>()); - }); + folderPairs_.emplace_back(&baseObj, + baseObj.getAbstractPath<SelectSide::left >(), + baseObj.getAbstractPath<SelectSide::right>()); + } } @@ -84,14 +85,14 @@ void FileView::updateView(Predicate pred) std::vector<const ContainerObject*> parentsBuf; //from bottom to top of hierarchy const ContainerObject* groupStartObj = nullptr; - for (const FileSystemObject::ObjectId& objId : sortedRef_) - if (const FileSystemObject* const fsObj = FileSystemObject::retrieve(objId)) + for (const std::weak_ptr<FileSystemObject>& objRef : sortedRef_) + if (const FileSystemObject* fsObj = objRef.lock().get()) if (pred(*fsObj)) { const size_t row = viewRef_.size(); //save row position for direct random access to FilePair or FolderPair - rowPositions_.emplace(objId, row); //costs: 0.28 µs per call - MSVC based on std::set + rowPositions_.emplace(fsObj, row); //costs: 0.28 µs per call - MSVC based on std::set parentsBuf.clear(); for (const FileSystemObject* fsObj2 = fsObj;;) @@ -124,14 +125,14 @@ void FileView::updateView(Predicate pred) assert(!groupDetails_.empty()); const size_t groupIdx = groupDetails_.size() - 1; //----------------------------------------------------------- - viewRef_.push_back({objId, groupIdx}); + viewRef_.push_back({objRef, groupIdx}); } } -ptrdiff_t FileView::findRowDirect(FileSystemObject::ObjectIdConst objId) const +ptrdiff_t FileView::findRowDirect(const FileSystemObject* fsObj) const { - auto it = rowPositions_.find(objId); + auto it = rowPositions_.find(fsObj); return it != rowPositions_.end() ? it->second : -1; } @@ -322,8 +323,8 @@ std::vector<FileSystemObject*> FileView::getAllFileRef(const std::vector<size_t> for (size_t pos : rows) if (pos < viewSize) - if (FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef_[pos].objId)) - output.push_back(fsObj); + if (const std::shared_ptr<FileSystemObject> fsObj = viewRef_[pos].objRef.lock()) + output.push_back(fsObj.get()); return output; } @@ -341,7 +342,7 @@ FileView::PathDrawInfo FileView::getDrawInfo(size_t row) const size_t groupLastRow = groupIdx + 1 < groupDetails_.size() ? groupDetails_[groupIdx + 1].groupFirstRow : viewRef_.size(); - FileSystemObject* fsObj = FileSystemObject::retrieve(viewRef_[row].objId); + FileSystemObject* fsObj = viewRef_[row].objRef.lock().get(); FolderPair* folderGroupObj = dynamic_cast<FolderPair*>(fsObj); if (fsObj && !folderGroupObj) @@ -357,7 +358,7 @@ FileView::PathDrawInfo FileView::getDrawInfo(size_t row) void FileView::removeInvalidRows() { //remove rows that have been deleted meanwhile - std::erase_if(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); + std::erase_if(sortedRef_, [&](const std::weak_ptr<FileSystemObject>& objRef) { return objRef.expired(); }); viewRef_ .clear(); groupDetails_ .clear(); @@ -366,18 +367,6 @@ void FileView::removeInvalidRows() } -size_t FileView::getEffectiveFolderPairCount() const -{ - return std::count_if(folderPairs_.begin(), folderPairs_.end(), [](const auto& folderPair) - { - const auto& [baseObj, basePathL, basePathR] = folderPair; - - return !AFS::isNullPath(basePathL) || - !AFS::isNullPath(basePathR); - }); -} - - //------------------------------------ SORTING ----------------------------------------- namespace { @@ -421,12 +410,12 @@ bool lessFileName(const FileSystemObject& lhs, const FileSystemObject& rhs) template <bool ascending, SelectSide side> inline -bool lessFilePath(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs, +bool lessFilePath(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs, const std::unordered_map<const void* /*BaseFolderPair*/, size_t /*position*/>& sortedPos, std::vector<const FolderPair*>& tempBuf) { - const FileSystemObject* fsObjL = FileSystemObject::retrieve(lhs); - const FileSystemObject* fsObjR = FileSystemObject::retrieve(rhs); + const FileSystemObject* fsObjL = lhs.lock().get(); + const FileSystemObject* fsObjR = rhs.lock().get(); if (!fsObjL) //invalid rows shall appear at the end return false; else if (!fsObjR) @@ -632,23 +621,27 @@ struct LessFullPath const AbstractPath& basePathA = selectParam<side>(basePathLA, basePathRA); const AbstractPath& basePathB = selectParam<side>(basePathLB, basePathRB); - return LessNaturalSort()/*even on Linux*/(zen::utfTo<Zstring>(AFS::getDisplayPath(basePathA)), - zen::utfTo<Zstring>(AFS::getDisplayPath(basePathB))); + return LessNaturalSort()/*even on Linux*/(utfTo<Zstring>(AFS::getDisplayPath(basePathA)), + utfTo<Zstring>(AFS::getDisplayPath(basePathB))); }); size_t pos = 0; for (const auto& [baseObj, basePathL, basePathR] : folderPairs) - sortedPos_.ref().emplace(baseObj, pos++); + shared_.ref().sortedPos.emplace(baseObj, pos++); } - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - return lessFilePath<ascending, side>(lhs, rhs, sortedPos_.ref(), tempBuf_); + return lessFilePath<ascending, side>(lhs, rhs, shared_.ref().sortedPos, shared_.ref().tempBuf); } private: - SharedRef<std::unordered_map<const void* /*BaseFolderPair*/, size_t /*position*/>> sortedPos_ = makeSharedRef<std::unordered_map<const void*, size_t>>(); - mutable std::vector<const FolderPair*> tempBuf_; //avoid repeated memory allocation in lessFilePath() + struct Shared + { + std::unordered_map<const void* /*BaseFolderPair*/, size_t /*position*/> sortedPos; + mutable std::vector<const FolderPair*> tempBuf; //avoid repeated memory allocation in lessFilePath() + }; + SharedRef<Shared> shared_ = makeSharedRef<Shared>(); //std::sort makes lots of predicate copies during its "divide and conquer" }; @@ -657,36 +650,39 @@ struct LessRelativeFolder { LessRelativeFolder(const std::vector<std::tuple<const void* /*BaseFolderPair*/, AbstractPath, AbstractPath>>& folderPairs) { - //take over positions of base folders as set up by user - size_t pos = 0; + size_t pos = 0; //take over positions of base folders as set up by user for (const auto& [baseObj, basePathL, basePathR] : folderPairs) - sortedPos_.ref().emplace(baseObj, pos++); + shared_.ref().sortedPos.emplace(baseObj, pos++); } - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - return lessFilePath<ascending, side>(lhs, rhs, sortedPos_.ref(), tempBuf_); + return lessFilePath<ascending, side>(lhs, rhs, shared_.ref().sortedPos, shared_.ref().tempBuf); } private: - SharedRef<std::unordered_map<const void* /*BaseFolderPair*/, size_t /*position*/>> sortedPos_ = makeSharedRef<std::unordered_map<const void*, size_t>>(); - mutable std::vector<const FolderPair*> tempBuf_; //avoid repeated memory allocation in lessFilePath() + struct Shared + { + std::unordered_map<const void* /*BaseFolderPair*/, size_t /*position*/> sortedPos; + mutable std::vector<const FolderPair*> tempBuf; //avoid repeated memory allocation in lessFilePath() + }; + SharedRef<Shared> shared_ = makeSharedRef<Shared>(); //std::sort makes lots of predicate copies during its "divide and conquer" }; template <bool ascending, SelectSide side> struct LessFileName { - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - const FileSystemObject* fsObjA = FileSystemObject::retrieve(lhs); - const FileSystemObject* fsObjB = FileSystemObject::retrieve(rhs); - if (!fsObjA) //invalid rows shall appear at the end + const std::shared_ptr<FileSystemObject> fsObjL = lhs.lock(); + const std::shared_ptr<FileSystemObject> fsObjR = rhs.lock(); + if (!fsObjL) //invalid rows shall appear at the end return false; - else if (!fsObjB) + else if (!fsObjR) return true; - return lessFileName<ascending, side>(*fsObjA, *fsObjB); + return lessFileName<ascending, side>(*fsObjL, *fsObjR); } }; @@ -694,16 +690,16 @@ struct LessFileName template <bool ascending, SelectSide side> struct LessFilesize { - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - const FileSystemObject* fsObjA = FileSystemObject::retrieve(lhs); - const FileSystemObject* fsObjB = FileSystemObject::retrieve(rhs); - if (!fsObjA) //invalid rows shall appear at the end + const std::shared_ptr<FileSystemObject> fsObjL = lhs.lock(); + const std::shared_ptr<FileSystemObject> fsObjR = rhs.lock(); + if (!fsObjL) //invalid rows shall appear at the end return false; - else if (!fsObjB) + else if (!fsObjR) return true; - return lessFilesize<ascending, side>(*fsObjA, *fsObjB); + return lessFilesize<ascending, side>(*fsObjL, *fsObjR); } }; @@ -711,16 +707,16 @@ struct LessFilesize template <bool ascending, SelectSide side> struct LessFiletime { - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - const FileSystemObject* fsObjA = FileSystemObject::retrieve(lhs); - const FileSystemObject* fsObjB = FileSystemObject::retrieve(rhs); - if (!fsObjA) //invalid rows shall appear at the end + const std::shared_ptr<FileSystemObject> fsObjL = lhs.lock(); + const std::shared_ptr<FileSystemObject> fsObjR = rhs.lock(); + if (!fsObjL) //invalid rows shall appear at the end return false; - else if (!fsObjB) + else if (!fsObjR) return true; - return lessFiletime<ascending, side>(*fsObjA, *fsObjB); + return lessFiletime<ascending, side>(*fsObjL, *fsObjR); } }; @@ -728,16 +724,16 @@ struct LessFiletime template <bool ascending, SelectSide side> struct LessExtension { - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - const FileSystemObject* fsObjA = FileSystemObject::retrieve(lhs); - const FileSystemObject* fsObjB = FileSystemObject::retrieve(rhs); - if (!fsObjA) //invalid rows shall appear at the end + const std::shared_ptr<FileSystemObject> fsObjL = lhs.lock(); + const std::shared_ptr<FileSystemObject> fsObjR = rhs.lock(); + if (!fsObjL) //invalid rows shall appear at the end return false; - else if (!fsObjB) + else if (!fsObjR) return true; - return lessExtension<ascending, side>(*fsObjA, *fsObjB); + return lessExtension<ascending, side>(*fsObjL, *fsObjR); } }; @@ -745,16 +741,16 @@ struct LessExtension template <bool ascending> struct LessCmpResult { - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - const FileSystemObject* fsObjA = FileSystemObject::retrieve(lhs); - const FileSystemObject* fsObjB = FileSystemObject::retrieve(rhs); - if (!fsObjA) //invalid rows shall appear at the end + const std::shared_ptr<FileSystemObject> fsObjL = lhs.lock(); + const std::shared_ptr<FileSystemObject> fsObjR = rhs.lock(); + if (!fsObjL) //invalid rows shall appear at the end return false; - else if (!fsObjB) + else if (!fsObjR) return true; - return lessCmpResult<ascending>(*fsObjA, *fsObjB); + return lessCmpResult<ascending>(*fsObjL, *fsObjR); } }; @@ -762,16 +758,16 @@ struct LessCmpResult template <bool ascending> struct LessSyncDirection { - bool operator()(const FileSystemObject::ObjectId& lhs, const FileSystemObject::ObjectId& rhs) const + bool operator()(const std::weak_ptr<FileSystemObject>& lhs, const std::weak_ptr<FileSystemObject>& rhs) const { - const FileSystemObject* fsObjA = FileSystemObject::retrieve(lhs); - const FileSystemObject* fsObjB = FileSystemObject::retrieve(rhs); - if (!fsObjA) //invalid rows shall appear at the end + const std::shared_ptr<FileSystemObject> fsObjL = lhs.lock(); + const std::shared_ptr<FileSystemObject> fsObjR = rhs.lock(); + if (!fsObjL) //invalid rows shall appear at the end return false; - else if (!fsObjB) + else if (!fsObjR) return true; - return lessSyncDirection<ascending>(*fsObjA, *fsObjB); + return lessSyncDirection<ascending>(*fsObjL, *fsObjR); } }; } diff --git a/FreeFileSync/Source/ui/file_view.h b/FreeFileSync/Source/ui/file_view.h index 2f823bea..fd05c33a 100644 --- a/FreeFileSync/Source/ui/file_view.h +++ b/FreeFileSync/Source/ui/file_view.h @@ -27,7 +27,7 @@ public: size_t rowsTotal () const { return sortedRef_.size(); } //total rows available //returns nullptr if object is not found; complexity: constant! - const FileSystemObject* getFsObject(size_t row) const { return row < viewRef_.size() ? FileSystemObject::retrieve(viewRef_[row].objId) : nullptr; } + const FileSystemObject* getFsObject(size_t row) const { return row < viewRef_.size() ? viewRef_[row].objRef.lock().get() : nullptr; } /**/ FileSystemObject* getFsObject(size_t row) { return const_cast<FileSystemObject*>(static_cast<const FileView&>(*this).getFsObject(row)); } //see Meyers Effective C++ //references to FileSystemObject: no nullptr-check needed! everything is bound @@ -74,7 +74,6 @@ public: bool showDifferent, bool showEqual, bool showConflict); - struct ActionViewStats { int excluded = 0; @@ -117,12 +116,12 @@ public: }; const SortInfo* getSortConfig() const { return zen::get(currentSort_); } //return nullptr if currently not sorted - ptrdiff_t findRowDirect(FileSystemObject::ObjectIdConst objId) const; //find an object's row position on view list directly, return < 0 if not found - ptrdiff_t findRowFirstChild(const ContainerObject* conObj) const; //find first child of FolderPair or BaseFolderPair *on sorted sub view* + ptrdiff_t findRowDirect (const FileSystemObject* fsObj) const; //find an object's row position on view list directly, return < 0 if not found + ptrdiff_t findRowFirstChild(const ContainerObject* conObj) const; //find first child of FolderPair or BaseFolderPair *on sorted sub view* //"conObj" may be invalid, it is NOT dereferenced, return < 0 if not found //count non-empty pairs to distinguish single/multiple folder pair cases - size_t getEffectiveFolderPairCount() const; + size_t getEffectiveFolderPairCount() const { return folderPairs_.size(); } private: FileView (const FileView&) = delete; @@ -131,9 +130,9 @@ private: template <class Predicate> void updateView(Predicate pred); - std::unordered_map<FileSystemObject::ObjectIdConst, size_t> rowPositions_; //find row positions on viewRef_ directly - std::unordered_map<const void* /*ContainerObject*/, size_t> rowPositionsFirstChild_; //find first child on sortedRef of a hierarchy object - //void* instead of ContainerObject*: these are weak pointers and should *never be dereferenced*! + std::unordered_map<const void* /*FileSystemObject*/, size_t> rowPositions_; //find row positions on viewRef_ directly + std::unordered_map<const void* /*ContainerObject*/, size_t> rowPositionsFirstChild_; //find first child on sortedRef of a container object + //void* instead of ContainerObject*: these pointers should *never be dereferenced*! struct GroupDetail { @@ -145,17 +144,16 @@ private: struct ViewRow { - FileSystemObject::ObjectId objId = nullptr; + std::weak_ptr<FileSystemObject> objRef; size_t groupIdx = 0; //...into groupDetails_ }; std::vector<ViewRow> viewRef_; //partial view on sortedRef_ /* /|\ | (applyFilterBy...) */ - std::vector<FileSystemObject::ObjectId> sortedRef_; //flat view of weak pointers on folderCmp; may be sorted + std::vector<std::weak_ptr<FileSystemObject>> sortedRef_; //flat view of weak pointers on folderCmp; may be sorted /* /|\ | (constructor) FolderComparison folderCmp */ - std::vector<std::tuple<const void* /*BaseFolderPair*/, AbstractPath, AbstractPath>> folderPairs_; std::optional<SortInfo> currentSort_; diff --git a/FreeFileSync/Source/ui/folder_history_box.h b/FreeFileSync/Source/ui/folder_history_box.h index 33d970fc..a47c70cc 100644 --- a/FreeFileSync/Source/ui/folder_history_box.h +++ b/FreeFileSync/Source/ui/folder_history_box.h @@ -10,7 +10,6 @@ #include <wx/combobox.h> #include <memory> #include <zen/zstring.h> -//#include <zen/stl_tools.h> #include <zen/utf.h> diff --git a/FreeFileSync/Source/ui/folder_pair.h b/FreeFileSync/Source/ui/folder_pair.h index 73ace920..4f2a46a2 100644 --- a/FreeFileSync/Source/ui/folder_pair.h +++ b/FreeFileSync/Source/ui/folder_pair.h @@ -8,17 +8,10 @@ #define FOLDER_PAIR_H_89341750847252345 #include <wx/event.h> -//#include <wx/menu.h> #include <wx+/context_menu.h> -//#include <wx+/bitmap_button.h> #include <wx+/image_tools.h> #include <wx+/image_resources.h> -//#include <wx+/std_button_layout.h> -//#include "folder_selector.h" -//#include "small_dlgs.h" -//#include "sync_cfg.h" #include "../base/norm_filter.h" -//#include "../base_tools.h" namespace fff diff --git a/FreeFileSync/Source/ui/folder_selector.cpp b/FreeFileSync/Source/ui/folder_selector.cpp index 10565033..69319d16 100644 --- a/FreeFileSync/Source/ui/folder_selector.cpp +++ b/FreeFileSync/Source/ui/folder_selector.cpp @@ -6,17 +6,14 @@ #include "folder_selector.h" #include <zen/thread.h> -//#include <zen/file_access.h> #include <zen/process_exec.h> #include <wx/scrolwin.h> #include <wx+/bitmap_button.h> #include <wx+/popup_dlg.h> -//#include <wx+/context_menu.h> #include <wx+/image_resources.h> #include "small_dlgs.h" //includes structures.h, which defines "AFS" #include "../afs/concrete.h" #include "../afs/native.h" -//#include "../icon_buffer.h" #include "../afs/gdrive.h" #include <wx/dirdlg.h> diff --git a/FreeFileSync/Source/ui/gui_generated.cpp b/FreeFileSync/Source/ui/gui_generated.cpp index b552f0eb..27a4841d 100644 --- a/FreeFileSync/Source/ui/gui_generated.cpp +++ b/FreeFileSync/Source/ui/gui_generated.cpp @@ -11,1178 +11,1157 @@ MainDialogGenerated::MainDialogGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - m_menubar = new wxMenuBar( 0 ); - m_menuFile = new wxMenu(); - m_menuItemNew = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemNew ); + m_menubar = new wxMenuBar( 0 ); + m_menuFile = new wxMenu(); + m_menuItemNew = new wxMenuItem( m_menuFile, wxID_NEW, wxString( _("&New") ) + wxT('\t') + wxT("Ctrl+N"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemNew ); - m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemLoad ); + m_menuItemLoad = new wxMenuItem( m_menuFile, wxID_OPEN, wxString( _("&Open...") ) + wxT('\t') + wxT("Ctrl+O"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemLoad ); - m_menuFile->AppendSeparator(); + m_menuFile->AppendSeparator(); - m_menuItemSave = new wxMenuItem( m_menuFile, wxID_SAVE, wxString( _("&Save") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSave ); + m_menuItemSave = new wxMenuItem( m_menuFile, wxID_SAVE, wxString( _("&Save") ) + wxT('\t') + wxT("Ctrl+S"), wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemSave ); - m_menuItemSaveAs = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &as...") ), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSaveAs ); + m_menuItemSaveAs = new wxMenuItem( m_menuFile, wxID_SAVEAS, wxString( _("Save &as...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemSaveAs ); - m_menuItemSaveAsBatch = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("Save as &batch job...") ), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemSaveAsBatch ); + m_menuItemSaveAsBatch = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("Save as &batch job...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemSaveAsBatch ); - m_menuFile->AppendSeparator(); + m_menuFile->AppendSeparator(); - m_menuItemQuit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ), wxEmptyString, wxITEM_NORMAL ); - m_menuFile->Append( m_menuItemQuit ); + m_menuItemQuit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemQuit ); - m_menubar->Append( m_menuFile, _("&File") ); + m_menubar->Append( m_menuFile, _("&File") ); - m_menuActions = new wxMenu(); - m_menuItemShowLog = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("Show &log") ) + wxT('\t') + wxT("F4"), wxEmptyString, wxITEM_NORMAL ); - m_menuActions->Append( m_menuItemShowLog ); + m_menuActions = new wxMenu(); + m_menuItemShowLog = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("Show &log") ) + wxT('\t') + wxT("F4"), wxEmptyString, wxITEM_NORMAL ); + m_menuActions->Append( m_menuItemShowLog ); - m_menuActions->AppendSeparator(); + m_menuActions->AppendSeparator(); - m_menuItemCompare = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("Start &comparison") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL ); - m_menuActions->Append( m_menuItemCompare ); + m_menuItemCompare = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("Start &comparison") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL ); + m_menuActions->Append( m_menuItemCompare ); - m_menuActions->AppendSeparator(); + m_menuActions->AppendSeparator(); - m_menuItemCompSettings = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("C&omparison settings") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); - m_menuActions->Append( m_menuItemCompSettings ); + m_menuItemCompSettings = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("C&omparison settings") ) + wxT('\t') + wxT("F6"), wxEmptyString, wxITEM_NORMAL ); + m_menuActions->Append( m_menuItemCompSettings ); - m_menuItemFilter = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("&Filter settings") ) + wxT('\t') + wxT("F7"), wxEmptyString, wxITEM_NORMAL ); - m_menuActions->Append( m_menuItemFilter ); + m_menuItemFilter = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("&Filter settings") ) + wxT('\t') + wxT("F7"), wxEmptyString, wxITEM_NORMAL ); + m_menuActions->Append( m_menuItemFilter ); - m_menuItemSyncSettings = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("S&ynchronization settings") ) + wxT('\t') + wxT("F8"), wxEmptyString, wxITEM_NORMAL ); - m_menuActions->Append( m_menuItemSyncSettings ); + m_menuItemSyncSettings = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("S&ynchronization settings") ) + wxT('\t') + wxT("F8"), wxEmptyString, wxITEM_NORMAL ); + m_menuActions->Append( m_menuItemSyncSettings ); - m_menuActions->AppendSeparator(); + m_menuActions->AppendSeparator(); - m_menuItemSynchronize = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("Start &synchronization") ) + wxT('\t') + wxT("F9"), wxEmptyString, wxITEM_NORMAL ); - m_menuActions->Append( m_menuItemSynchronize ); + m_menuItemSynchronize = new wxMenuItem( m_menuActions, wxID_ANY, wxString( _("Start &synchronization") ) + wxT('\t') + wxT("F9"), wxEmptyString, wxITEM_NORMAL ); + m_menuActions->Append( m_menuItemSynchronize ); - m_menubar->Append( m_menuActions, _("&Actions") ); + m_menubar->Append( m_menuActions, _("&Actions") ); - m_menuTools = new wxMenu(); - m_menuItemOptions = new wxMenuItem( m_menuTools, wxID_PREFERENCES, wxString( _("&Preferences") ) + wxT('\t') + wxT("Ctrl+,"), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemOptions ); + m_menuTools = new wxMenu(); + m_menuItemOptions = new wxMenuItem( m_menuTools, wxID_PREFERENCES, wxString( _("&Preferences") ) + wxT('\t') + wxT("Ctrl+,"), wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemOptions ); - m_menuLanguages = new wxMenu(); - wxMenuItem* m_menuLanguagesItem = new wxMenuItem( m_menuTools, wxID_ANY, _("&Language"), wxEmptyString, wxITEM_NORMAL, m_menuLanguages ); - m_menuTools->Append( m_menuLanguagesItem ); + m_menuLanguages = new wxMenu(); + wxMenuItem* m_menuLanguagesItem = new wxMenuItem( m_menuTools, wxID_ANY, _("&Language"), wxEmptyString, wxITEM_NORMAL, m_menuLanguages ); + m_menuTools->Append( m_menuLanguagesItem ); - m_menuTools->AppendSeparator(); + m_menuTools->AppendSeparator(); - m_menuItemFind = new wxMenuItem( m_menuTools, wxID_FIND, wxString( _("&Find...") ) + wxT('\t') + wxT("Ctrl+F"), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemFind ); + m_menuItemFind = new wxMenuItem( m_menuTools, wxID_FIND, wxString( _("&Find...") ) + wxT('\t') + wxT("Ctrl+F"), wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemFind ); - m_menuItemExportList = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Export file list") ), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemExportList ); + m_menuItemExportList = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Export file list") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemExportList ); - m_menuTools->AppendSeparator(); + m_menuTools->AppendSeparator(); - m_menuItemResetLayout = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Reset layout") ), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemResetLayout ); + m_menuItemResetLayout = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("&Reset layout") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemResetLayout ); - m_menuItemShowMain = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemShowMain ); + m_menuItemShowMain = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemShowMain ); - m_menuItemShowFolders = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemShowFolders ); + m_menuItemShowFolders = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemShowFolders ); - m_menuItemShowViewFilter = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemShowViewFilter ); + m_menuItemShowViewFilter = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemShowViewFilter ); - m_menuItemShowConfig = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemShowConfig ); + m_menuItemShowConfig = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemShowConfig ); - m_menuItemShowOverview = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ), wxEmptyString, wxITEM_NORMAL ); - m_menuTools->Append( m_menuItemShowOverview ); + m_menuItemShowOverview = new wxMenuItem( m_menuTools, wxID_ANY, wxString( _("dummy") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuTools->Append( m_menuItemShowOverview ); - m_menubar->Append( m_menuTools, _("&Tools") ); + m_menubar->Append( m_menuTools, _("&Tools") ); - m_menuHelp = new wxMenu(); - m_menuItemHelp = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemHelp ); + m_menuHelp = new wxMenu(); + m_menuItemHelp = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemHelp ); - m_menuHelp->AppendSeparator(); + m_menuHelp->AppendSeparator(); - m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ), wxEmptyString, wxITEM_NORMAL ); - m_menuHelp->Append( m_menuItemCheckVersionNow ); + m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemCheckVersionNow ); - m_menuHelp->AppendSeparator(); + 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_menuItemAbout = new wxMenuItem( m_menuHelp, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("Shift+F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemAbout ); - m_menubar->Append( m_menuHelp, _("&Help") ); + m_menubar->Append( m_menuHelp, _("&Help") ); - this->SetMenuBar( m_menubar ); + this->SetMenuBar( m_menubar ); - bSizerPanelHolder = new wxBoxSizer( wxVERTICAL ); + bSizerPanelHolder = new wxBoxSizer( wxVERTICAL ); - m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelTopButtons->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelTopButtons = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelTopButtons->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer1791; - bSizer1791 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer1791; + bSizer1791 = new wxBoxSizer( wxHORIZONTAL ); - bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerTopButtons = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer261; - bSizer261 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer261; + bSizer261 = new wxBoxSizer( wxHORIZONTAL ); - bSizer261->Add( 0, 0, 1, 0, 5 ); + bSizer261->Add( 0, 0, 1, 0, 5 ); - m_buttonCancel = new wxButton( m_panelTopButtons, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonCancel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonCancel->Enable( false ); - m_buttonCancel->Hide(); + m_buttonCancel = new wxButton( m_panelTopButtons, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCancel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonCancel->Enable( false ); + m_buttonCancel->Hide(); - bSizer261->Add( m_buttonCancel, 0, wxEXPAND, 5 ); + bSizer261->Add( m_buttonCancel, 0, wxEXPAND, 5 ); - m_buttonCompare = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Compare"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonCompare->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonCompare->SetToolTip( _("dummy") ); + m_buttonCompare = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Compare"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCompare->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonCompare->SetToolTip( _("dummy") ); - bSizer261->Add( m_buttonCompare, 0, wxEXPAND, 5 ); + bSizer261->Add( m_buttonCompare, 0, wxEXPAND, 5 ); - bSizerTopButtons->Add( bSizer261, 1, wxEXPAND, 5 ); + bSizerTopButtons->Add( bSizer261, 1, wxEXPAND, 5 ); - bSizerTopButtons->Add( 8, 8, 0, 0, 5 ); + bSizerTopButtons->Add( 8, 8, 0, 0, 5 ); - wxBoxSizer* bSizer2942; - bSizer2942 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2942; + bSizer2942 = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonCmpConfig->SetToolTip( _("dummy") ); + m_bpButtonCmpConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonCmpConfig->SetToolTip( _("dummy") ); - bSizer2942->Add( m_bpButtonCmpConfig, 0, wxEXPAND, 5 ); + bSizer2942->Add( m_bpButtonCmpConfig, 0, wxEXPAND, 5 ); - m_bpButtonCmpContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer2942->Add( m_bpButtonCmpContext, 0, wxEXPAND, 5 ); + m_bpButtonCmpContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer2942->Add( m_bpButtonCmpContext, 0, wxEXPAND, 5 ); - bSizer2942->Add( 0, 0, 1, 0, 5 ); + bSizer2942->Add( 0, 0, 1, 0, 5 ); - bSizer2942->Add( 8, 0, 0, 0, 5 ); + bSizer2942->Add( 8, 0, 0, 0, 5 ); - m_bpButtonFilter = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0|wxFULL_REPAINT_ON_RESIZE ); - m_bpButtonFilter->SetToolTip( _("dummy") ); + m_bpButtonFilter = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonFilter->SetToolTip( _("dummy") ); - bSizer2942->Add( m_bpButtonFilter, 0, wxEXPAND, 5 ); + bSizer2942->Add( m_bpButtonFilter, 0, wxEXPAND, 5 ); - m_bpButtonFilterContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer2942->Add( m_bpButtonFilterContext, 0, wxEXPAND, 5 ); + m_bpButtonFilterContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer2942->Add( m_bpButtonFilterContext, 0, wxEXPAND, 5 ); - bSizer2942->Add( 8, 0, 0, 0, 5 ); + bSizer2942->Add( 8, 0, 0, 0, 5 ); - bSizer2942->Add( 0, 0, 1, 0, 5 ); + bSizer2942->Add( 0, 0, 1, 0, 5 ); - m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSyncConfig->SetToolTip( _("dummy") ); + m_bpButtonSyncConfig = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSyncConfig->SetToolTip( _("dummy") ); - bSizer2942->Add( m_bpButtonSyncConfig, 0, wxEXPAND, 5 ); + bSizer2942->Add( m_bpButtonSyncConfig, 0, wxEXPAND, 5 ); - m_bpButtonSyncContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer2942->Add( m_bpButtonSyncContext, 0, wxEXPAND, 5 ); + m_bpButtonSyncContext = new wxBitmapButton( m_panelTopButtons, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer2942->Add( m_bpButtonSyncContext, 0, wxEXPAND, 5 ); - bSizerTopButtons->Add( bSizer2942, 1, wxEXPAND, 5 ); + bSizerTopButtons->Add( bSizer2942, 1, wxEXPAND, 5 ); - bSizerTopButtons->Add( 8, 8, 0, 0, 5 ); + bSizerTopButtons->Add( 8, 8, 0, 0, 5 ); - wxBoxSizer* bSizer262; - bSizer262 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer262; + bSizer262 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonSync = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Synchronize"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonSync->SetToolTip( _("dummy") ); + m_buttonSync = new zen::BitmapTextButton( m_panelTopButtons, wxID_ANY, _("Synchronize"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonSync->SetToolTip( _("dummy") ); - bSizer262->Add( m_buttonSync, 0, wxEXPAND, 5 ); + bSizer262->Add( m_buttonSync, 0, wxEXPAND, 5 ); - bSizerTopButtons->Add( bSizer262, 1, wxEXPAND, 5 ); + bSizerTopButtons->Add( bSizer262, 1, wxEXPAND, 5 ); - bSizer1791->Add( bSizerTopButtons, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer1791->Add( bSizerTopButtons, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_panelTopButtons->SetSizer( bSizer1791 ); - m_panelTopButtons->Layout(); - bSizer1791->Fit( m_panelTopButtons ); - bSizerPanelHolder->Add( m_panelTopButtons, 0, wxEXPAND, 5 ); + m_panelTopButtons->SetSizer( bSizer1791 ); + m_panelTopButtons->Layout(); + bSizer1791->Fit( m_panelTopButtons ); + bSizerPanelHolder->Add( m_panelTopButtons, 0, wxEXPAND, 5 ); - m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC ); - wxBoxSizer* bSizer1601; - bSizer1601 = new wxBoxSizer( wxVERTICAL ); + m_panelDirectoryPairs = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC ); + wxBoxSizer* bSizer1601; + bSizer1601 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer91; - bSizer91 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer91; + bSizer91 = new wxBoxSizer( wxHORIZONTAL ); - m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelTopLeft->SetMinSize( wxSize( 1, -1 ) ); + m_panelTopLeft = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelTopLeft->SetMinSize( wxSize( 1,-1 ) ); - wxFlexGridSizer* fgSizer8; - fgSizer8 = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer8->AddGrowableCol( 1 ); - fgSizer8->SetFlexibleDirection( wxBOTH ); - fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL ); + wxFlexGridSizer* fgSizer8; + fgSizer8 = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizer8->AddGrowableCol( 1 ); + fgSizer8->SetFlexibleDirection( wxBOTH ); + fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL ); - fgSizer8->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizer8->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticTextResolvedPathL = new wxStaticText( m_panelTopLeft, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextResolvedPathL->Wrap( -1 ); - fgSizer8->Add( m_staticTextResolvedPathL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 ); + m_staticTextResolvedPathL = new wxStaticText( m_panelTopLeft, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextResolvedPathL->Wrap( -1 ); + fgSizer8->Add( m_staticTextResolvedPathL, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 ); - wxBoxSizer* bSizer159; - bSizer159 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer159; + bSizer159 = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); + m_bpButtonAddPair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonAddPair->SetToolTip( _("Add folder pair") ); - bSizer159->Add( m_bpButtonAddPair, 0, wxEXPAND, 5 ); + bSizer159->Add( m_bpButtonAddPair, 0, wxEXPAND, 5 ); - m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + m_bpButtonRemovePair = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - bSizer159->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 ); + bSizer159->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 ); - fgSizer8->Add( bSizer159, 0, wxEXPAND, 5 ); + fgSizer8->Add( bSizer159, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer182; - bSizer182 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer182; + bSizer182 = new wxBoxSizer( wxHORIZONTAL ); - m_folderPathLeft = new fff::FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer182->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_folderPathLeft = new fff::FolderHistoryBox( m_panelTopLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer182->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectFolderLeft = new wxButton( m_panelTopLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") ); + m_buttonSelectFolderLeft = new wxButton( m_panelTopLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") ); - bSizer182->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 ); + bSizer182->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 ); - m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") ); + m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelTopLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") ); - bSizer182->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 ); + bSizer182->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 ); - fgSizer8->Add( bSizer182, 0, wxEXPAND, 5 ); + fgSizer8->Add( bSizer182, 0, wxEXPAND, 5 ); - m_panelTopLeft->SetSizer( fgSizer8 ); - m_panelTopLeft->Layout(); - fgSizer8->Fit( m_panelTopLeft ); - bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_BOTTOM, 5 ); + m_panelTopLeft->SetSizer( fgSizer8 ); + m_panelTopLeft->Layout(); + fgSizer8->Fit( m_panelTopLeft ); + bSizer91->Add( m_panelTopLeft, 1, wxLEFT|wxALIGN_BOTTOM, 5 ); - m_panelTopCenter = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1771; - bSizer1771 = new wxBoxSizer( wxVERTICAL ); + m_panelTopCenter = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1771; + bSizer1771 = new wxBoxSizer( wxVERTICAL ); - m_bpButtonSwapSides = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSwapSides->SetToolTip( _("dummy") ); + m_bpButtonSwapSides = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSwapSides->SetToolTip( _("dummy") ); - bSizer1771->Add( m_bpButtonSwapSides, 0, wxEXPAND, 5 ); + bSizer1771->Add( m_bpButtonSwapSides, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer160; - bSizer160 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer160; + bSizer160 = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonLocalCompCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonLocalCompCfg->SetToolTip( _("dummy") ); + m_bpButtonLocalCompCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonLocalCompCfg->SetToolTip( _("dummy") ); - bSizer160->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 ); + bSizer160->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 ); - m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonLocalFilter->SetToolTip( _("dummy") ); + m_bpButtonLocalFilter = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonLocalFilter->SetToolTip( _("dummy") ); - bSizer160->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 ); + bSizer160->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 ); - m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") ); + m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panelTopCenter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") ); - bSizer160->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 ); + bSizer160->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 ); - bSizer1771->Add( bSizer160, 1, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer1771->Add( bSizer160, 1, wxALIGN_CENTER_HORIZONTAL, 5 ); - m_panelTopCenter->SetSizer( bSizer1771 ); - m_panelTopCenter->Layout(); - bSizer1771->Fit( m_panelTopCenter ); - bSizer91->Add( m_panelTopCenter, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_panelTopCenter->SetSizer( bSizer1771 ); + m_panelTopCenter->Layout(); + bSizer1771->Fit( m_panelTopCenter ); + bSizer91->Add( m_panelTopCenter, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelTopRight->SetMinSize( wxSize( 1, -1 ) ); + m_panelTopRight = new wxPanel( m_panelDirectoryPairs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelTopRight->SetMinSize( wxSize( 1,-1 ) ); - wxBoxSizer* bSizer183; - bSizer183 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer183; + bSizer183 = new wxBoxSizer( wxVERTICAL ); - m_staticTextResolvedPathR = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextResolvedPathR->Wrap( -1 ); - bSizer183->Add( m_staticTextResolvedPathR, 0, wxALL, 2 ); + m_staticTextResolvedPathR = new wxStaticText( m_panelTopRight, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextResolvedPathR->Wrap( -1 ); + bSizer183->Add( m_staticTextResolvedPathR, 0, wxALL, 2 ); - wxBoxSizer* bSizer179; - bSizer179 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer179; + bSizer179 = new wxBoxSizer( wxHORIZONTAL ); - m_folderPathRight = new fff::FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer179->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_folderPathRight = new fff::FolderHistoryBox( m_panelTopRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer179->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectFolderRight = new wxButton( m_panelTopRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectFolderRight->SetToolTip( _("Select a folder") ); + m_buttonSelectFolderRight = new wxButton( m_panelTopRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectFolderRight->SetToolTip( _("Select a folder") ); - bSizer179->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 ); + bSizer179->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 ); - m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") ); + m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelTopRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") ); - bSizer179->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 ); + bSizer179->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 ); - bSizer183->Add( bSizer179, 0, wxEXPAND, 5 ); + bSizer183->Add( bSizer179, 0, wxEXPAND, 5 ); - m_panelTopRight->SetSizer( bSizer183 ); - m_panelTopRight->Layout(); - bSizer183->Fit( m_panelTopRight ); - bSizer91->Add( m_panelTopRight, 1, wxRIGHT|wxALIGN_BOTTOM, 5 ); + m_panelTopRight->SetSizer( bSizer183 ); + m_panelTopRight->Layout(); + bSizer183->Fit( m_panelTopRight ); + bSizer91->Add( m_panelTopRight, 1, wxRIGHT|wxALIGN_BOTTOM, 5 ); - bSizer1601->Add( bSizer91, 0, 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 ) ); + 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 ); + bSizerAddFolderPairs = new wxBoxSizer( wxVERTICAL ); - m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs ); - m_scrolledWindowFolderPairs->Layout(); - bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs ); - bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxEXPAND, 5 ); + m_scrolledWindowFolderPairs->SetSizer( bSizerAddFolderPairs ); + m_scrolledWindowFolderPairs->Layout(); + bSizerAddFolderPairs->Fit( m_scrolledWindowFolderPairs ); + bSizer1601->Add( m_scrolledWindowFolderPairs, 1, wxEXPAND, 5 ); - m_panelDirectoryPairs->SetSizer( bSizer1601 ); - m_panelDirectoryPairs->Layout(); - bSizer1601->Fit( m_panelDirectoryPairs ); - bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxEXPAND, 5 ); + m_panelDirectoryPairs->SetSizer( bSizer1601 ); + m_panelDirectoryPairs->Layout(); + bSizer1601->Fit( m_panelDirectoryPairs ); + bSizerPanelHolder->Add( m_panelDirectoryPairs, 0, wxEXPAND, 5 ); - m_gridOverview = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_gridOverview->SetScrollRate( 5, 5 ); - bSizerPanelHolder->Add( m_gridOverview, 0, 0, 5 ); + m_gridOverview = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridOverview->SetScrollRate( 5, 5 ); + bSizerPanelHolder->Add( m_gridOverview, 0, 0, 5 ); - m_panelCenter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1711; - bSizer1711 = new wxBoxSizer( wxVERTICAL ); + m_panelCenter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1711; + bSizer1711 = new wxBoxSizer( wxVERTICAL ); - m_splitterMain = new fff::TripleSplitter( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1781; - bSizer1781 = new wxBoxSizer( wxHORIZONTAL ); + m_splitterMain = new fff::TripleSplitter( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1781; + bSizer1781 = new wxBoxSizer( wxHORIZONTAL ); - m_gridMainL = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_gridMainL->SetScrollRate( 5, 5 ); - bSizer1781->Add( m_gridMainL, 1, wxEXPAND, 5 ); + m_gridMainL = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridMainL->SetScrollRate( 5, 5 ); + bSizer1781->Add( m_gridMainL, 1, wxEXPAND, 5 ); - m_gridMainC = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_gridMainC->SetScrollRate( 5, 5 ); - bSizer1781->Add( m_gridMainC, 0, wxEXPAND, 5 ); + m_gridMainC = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridMainC->SetScrollRate( 5, 5 ); + bSizer1781->Add( m_gridMainC, 0, wxEXPAND, 5 ); - m_gridMainR = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_gridMainR->SetScrollRate( 5, 5 ); - bSizer1781->Add( m_gridMainR, 1, wxEXPAND, 5 ); + m_gridMainR = new zen::Grid( m_splitterMain, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridMainR->SetScrollRate( 5, 5 ); + bSizer1781->Add( m_gridMainR, 1, wxEXPAND, 5 ); - m_splitterMain->SetSizer( bSizer1781 ); - m_splitterMain->Layout(); - bSizer1781->Fit( m_splitterMain ); - bSizer1711->Add( m_splitterMain, 1, wxEXPAND, 5 ); + m_splitterMain->SetSizer( bSizer1781 ); + m_splitterMain->Layout(); + bSizer1781->Fit( m_splitterMain ); + bSizer1711->Add( m_splitterMain, 1, wxEXPAND, 5 ); - m_panelStatusBar = new wxPanel( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC ); - wxBoxSizer* bSizer451; - bSizer451 = new wxBoxSizer( wxHORIZONTAL ); + m_panelStatusBar = new wxPanel( m_panelCenter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_STATIC ); + wxBoxSizer* bSizer451; + bSizer451 = new wxBoxSizer( wxHORIZONTAL ); - bSizerFileStatus = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer314; + bSizer314 = new wxBoxSizer( wxHORIZONTAL ); - bSizerStatusLeft = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer53; - bSizer53 = new wxBoxSizer( wxHORIZONTAL ); + bSizer314->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL ); - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftDirectories = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapSmallDirectoryLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusLeftDirectories->Add( m_bitmapSmallDirectoryLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 ); + m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftDirs->Wrap( -1 ); + bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerStatusLeftDirectories->Add( 2, 0, 0, 0, 5 ); - m_staticTextStatusLeftDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftDirs->Wrap( -1 ); - bSizerStatusLeftDirectories->Add( m_staticTextStatusLeftDirs, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer314->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL ); - bSizer53->Add( bSizerStatusLeftDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftFiles = new wxBoxSizer( wxHORIZONTAL ); + bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); + m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftFiles->Add( 10, 0, 0, 0, 5 ); - m_bitmapSmallFileLeft = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusLeftFiles->Add( m_bitmapSmallFileLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 ); + m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftFiles->Wrap( -1 ); + bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftFiles->Add( 2, 0, 0, 0, 5 ); - m_staticTextStatusLeftFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftFiles->Wrap( -1 ); - bSizerStatusLeftFiles->Add( m_staticTextStatusLeftFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusLeftFiles->Add( 4, 0, 0, 0, 5 ); + m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusLeftBytes->Wrap( -1 ); + bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusLeftFiles->Add( 4, 0, 0, 0, 5 ); - m_staticTextStatusLeftBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusLeftBytes->Wrap( -1 ); - bSizerStatusLeftFiles->Add( m_staticTextStatusLeftBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer314->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer53->Add( bSizerStatusLeftFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer314->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer314->Add( m_staticline9, 0, wxEXPAND|wxTOP, 2 ); - bSizer53->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer451->Add( bSizer314, 1, wxEXPAND, 5 ); - bSizerStatusLeft->Add( bSizer53, 1, wxEXPAND, 5 ); - m_staticline9 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizerStatusLeft->Add( m_staticline9, 0, wxEXPAND|wxTOP, 2 ); + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextStatusCenter = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusCenter->Wrap( -1 ); + bSizer451->Add( m_staticTextStatusCenter, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerFileStatus->Add( bSizerStatusLeft, 1, wxEXPAND, 5 ); + bSizer451->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer315; + bSizer315 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextStatusCenter = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusCenter->Wrap( -1 ); - bSizerFileStatus->Add( m_staticTextStatusCenter, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer315->Add( m_staticline10, 0, wxEXPAND|wxTOP, 2 ); - bSizerFileStatus->Add( 26, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer315->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRight = new wxBoxSizer( wxHORIZONTAL ); + bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL ); - m_staticline10 = new wxStaticLine( m_panelStatusBar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizerStatusRight->Add( m_staticline10, 0, wxEXPAND|wxTOP, 2 ); + m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer52; - bSizer52 = new wxBoxSizer( wxHORIZONTAL ); + bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 ); - bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightDirs->Wrap( -1 ); + bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRightDirectories = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapSmallDirectoryRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusRightDirectories->Add( m_bitmapSmallDirectoryRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer315->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL ); - bSizerStatusRightDirectories->Add( 2, 0, 0, 0, 5 ); - m_staticTextStatusRightDirs = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightDirs->Wrap( -1 ); - bSizerStatusRightDirectories->Add( m_staticTextStatusRightDirs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); + m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer52->Add( bSizerStatusRightDirectories, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRightFiles = new wxBoxSizer( wxHORIZONTAL ); + bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 ); + m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightFiles->Wrap( -1 ); + bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRightFiles->Add( 10, 0, 0, 0, 5 ); - m_bitmapSmallFileRight = new wxStaticBitmap( m_panelStatusBar, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStatusRightFiles->Add( m_bitmapSmallFileRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStatusRightFiles->Add( 4, 0, 0, 0, 5 ); + m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatusRightBytes->Wrap( -1 ); + bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRightFiles->Add( 2, 0, 0, 0, 5 ); - m_staticTextStatusRightFiles = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightFiles->Wrap( -1 ); - bSizerStatusRightFiles->Add( m_staticTextStatusRightFiles, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer315->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatusRightFiles->Add( 4, 0, 0, 0, 5 ); + bSizer315->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextStatusRightBytes = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatusRightBytes->Wrap( -1 ); - bSizerStatusRightFiles->Add( m_staticTextStatusRightBytes, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer451->Add( bSizer315, 1, wxEXPAND, 5 ); - bSizer52->Add( bSizerStatusRightFiles, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_panelStatusBar->SetSizer( bSizer451 ); + m_panelStatusBar->Layout(); + bSizer451->Fit( m_panelStatusBar ); + bSizer1711->Add( m_panelStatusBar, 0, wxEXPAND, 5 ); - bSizer52->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_panelCenter->SetSizer( bSizer1711 ); + m_panelCenter->Layout(); + bSizer1711->Fit( m_panelCenter ); + bSizerPanelHolder->Add( m_panelCenter, 1, wxEXPAND, 5 ); - bSizerStatusRight->Add( bSizer52, 1, wxEXPAND, 5 ); + m_panelSearch = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer1713; + bSizer1713 = new wxBoxSizer( wxHORIZONTAL ); + m_bpButtonHideSearch = new wxBitmapButton( m_panelSearch, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonHideSearch->SetToolTip( _("Close search bar") ); - bSizerFileStatus->Add( bSizerStatusRight, 1, wxEXPAND, 5 ); + bSizer1713->Add( m_bpButtonHideSearch, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText101 = new wxStaticText( m_panelSearch, wxID_ANY, _("Find:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( -1 ); + bSizer1713->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer451->Add( bSizerFileStatus, 1, wxEXPAND, 5 ); + m_textCtrlSearchTxt = new wxTextCtrl( m_panelSearch, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_PROCESS_ENTER|wxWANTS_CHARS ); + bSizer1713->Add( m_textCtrlSearchTxt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_staticTextFullStatus = new wxStaticText( m_panelStatusBar, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextFullStatus->Wrap( -1 ); - m_staticTextFullStatus->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_checkBoxMatchCase = new wxCheckBox( m_panelSearch, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1713->Add( m_checkBoxMatchCase, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer451->Add( m_staticTextFullStatus, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_panelSearch->SetSizer( bSizer1713 ); + m_panelSearch->Layout(); + bSizer1713->Fit( m_panelSearch ); + bSizerPanelHolder->Add( m_panelSearch, 0, 0, 5 ); - m_panelStatusBar->SetSizer( bSizer451 ); - m_panelStatusBar->Layout(); - bSizer451->Fit( m_panelStatusBar ); - bSizer1711->Add( m_panelStatusBar, 0, wxEXPAND, 5 ); + m_panelLog = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelLog->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + bSizerLog = new wxBoxSizer( wxVERTICAL ); - m_panelCenter->SetSizer( bSizer1711 ); - m_panelCenter->Layout(); - bSizer1711->Fit( m_panelCenter ); - bSizerPanelHolder->Add( m_panelCenter, 1, wxEXPAND, 5 ); + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - m_panelSearch = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer1713; - bSizer1713 = new wxBoxSizer( wxHORIZONTAL ); + m_bitmapSyncResult = new wxStaticBitmap( m_panelLog, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer42->Add( m_bitmapSyncResult, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_bpButtonHideSearch = new wxBitmapButton( m_panelSearch, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonHideSearch->SetToolTip( _("Close search bar") ); + m_staticTextSyncResult = new wxStaticText( m_panelLog, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSyncResult->Wrap( -1 ); + m_staticTextSyncResult->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer1713->Add( m_bpButtonHideSearch, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer42->Add( m_staticTextSyncResult, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - m_staticText101 = new wxStaticText( m_panelSearch, wxID_ANY, _("Find:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( -1 ); - bSizer1713->Add( m_staticText101, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlSearchTxt = new wxTextCtrl( m_panelSearch, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_PROCESS_ENTER|wxWANTS_CHARS ); - bSizer1713->Add( m_textCtrlSearchTxt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + bSizer42->Add( 10, 0, 0, 0, 5 ); - m_checkBoxMatchCase = new wxCheckBox( m_panelSearch, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer1713->Add( m_checkBoxMatchCase, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer11->SetFlexibleDirection( wxBOTH ); + ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + m_staticTextProcessed = new wxStaticText( m_panelLog, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextProcessed->Wrap( -1 ); + ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_RIGHT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelSearch->SetSizer( bSizer1713 ); - m_panelSearch->Layout(); - bSizer1713->Fit( m_panelSearch ); - bSizerPanelHolder->Add( m_panelSearch, 0, 0, 5 ); + m_staticTextRemaining = new wxStaticText( m_panelLog, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRemaining->Wrap( -1 ); + ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelLog = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelLog->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - bSizerLog = new wxBoxSizer( wxVERTICAL ); + bSizer42->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + m_panelItemStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - m_bitmapSyncResult = new wxStaticBitmap( m_panelLog, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer42->Add( m_bitmapSyncResult, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxVERTICAL ); - m_staticTextSyncResult = new wxStaticText( m_panelLog, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSyncResult->Wrap( -1 ); - m_staticTextSyncResult->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 ); + ffgSizer111->SetFlexibleDirection( wxBOTH ); + ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - bSizer42->Add( m_staticTextSyncResult, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + wxBoxSizer* bSizer293; + bSizer293 = new wxBoxSizer( wxHORIZONTAL ); + m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer293->Add( m_bitmapItemStat, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer42->Add( 10, 0, 0, 0, 5 ); + m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextItemsProcessed->Wrap( -1 ); + m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer11->SetFlexibleDirection( wxBOTH ); - ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_BOTTOM, 5 ); - m_staticTextProcessed = new wxStaticText( m_panelLog, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextProcessed->Wrap( -1 ); - ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_RIGHT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextRemaining = new wxStaticText( m_panelLog, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRemaining->Wrap( -1 ); - ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + ffgSizer111->Add( bSizer293, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); + m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBytesProcessed->Wrap( -1 ); + ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - bSizer42->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); + m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextItemsRemaining->Wrap( -1 ); + m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_panelItemStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - wxBoxSizer* bSizer291; - bSizer291 = new wxBoxSizer( wxVERTICAL ); + m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBytesRemaining->Wrap( -1 ); + ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 ); - ffgSizer111->SetFlexibleDirection( wxBOTH ); - ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxBoxSizer* bSizer293; - bSizer293 = new wxBoxSizer( wxHORIZONTAL ); + bSizer291->Add( ffgSizer111, 0, wxALL, 5 ); - m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer293->Add( m_bitmapItemStat, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextItemsProcessed->Wrap( -1 ); - m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_panelItemStats->SetSizer( bSizer291 ); + m_panelItemStats->Layout(); + bSizer291->Fit( m_panelItemStats ); + bSizer42->Add( m_panelItemStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_BOTTOM, 5 ); + m_panelTimeStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + wxBoxSizer* bSizer292; + bSizer292 = new wxBoxSizer( wxVERTICAL ); - ffgSizer111->Add( bSizer293, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); + ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 ); + ffgSizer112->SetFlexibleDirection( wxBOTH ); + ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextBytesProcessed->Wrap( -1 ); - ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + wxBoxSizer* bSizer294; + bSizer294 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextItemsRemaining->Wrap( -1 ); - m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextBytesRemaining->Wrap( -1 ); - ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); - bSizer291->Add( ffgSizer111, 0, wxALL, 5 ); + ffgSizer112->Add( bSizer294, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); - m_panelItemStats->SetSizer( bSizer291 ); - m_panelItemStats->Layout(); - bSizer291->Fit( m_panelItemStats ); - bSizer42->Add( m_panelItemStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + bSizer292->Add( ffgSizer112, 0, wxALL, 5 ); - m_panelTimeStats = new wxPanel( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer292; - bSizer292 = new wxBoxSizer( wxVERTICAL ); + m_panelTimeStats->SetSizer( bSizer292 ); + m_panelTimeStats->Layout(); + bSizer292->Fit( m_panelTimeStats ); + bSizer42->Add( m_panelTimeStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 ); - ffgSizer112->SetFlexibleDirection( wxBOTH ); - ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxBoxSizer* bSizer294; - bSizer294 = new wxBoxSizer( wxHORIZONTAL ); + bSizerLog->Add( bSizer42, 0, wxLEFT, 5 ); - m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticline70 = new wxStaticLine( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerLog->Add( m_staticline70, 0, wxEXPAND, 5 ); - m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); + m_panelLog->SetSizer( bSizerLog ); + m_panelLog->Layout(); + bSizerLog->Fit( m_panelLog ); + bSizerPanelHolder->Add( m_panelLog, 0, 0, 5 ); + m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelConfig->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - ffgSizer112->Add( bSizer294, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); + bSizerConfig = new wxBoxSizer( wxVERTICAL ); + bSizerCfgHistoryButtons = new wxBoxSizer( wxHORIZONTAL ); - bSizer292->Add( ffgSizer112, 0, wxALL, 5 ); + wxBoxSizer* bSizer17611; + bSizer17611 = new wxBoxSizer( wxVERTICAL ); + m_bpButtonNew = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonNew->SetToolTip( _("dummy") ); - m_panelTimeStats->SetSizer( bSizer292 ); - m_panelTimeStats->Layout(); - bSizer292->Fit( m_panelTimeStats ); - bSizer42->Add( m_panelTimeStats, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + bSizer17611->Add( m_bpButtonNew, 0, wxEXPAND, 5 ); + m_staticText951 = new wxStaticText( m_panelConfig, wxID_ANY, _("New"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText951->Wrap( -1 ); + bSizer17611->Add( m_staticText951, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); - bSizerLog->Add( bSizer42, 0, wxLEFT, 5 ); - m_staticline70 = new wxStaticLine( m_panelLog, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerLog->Add( m_staticline70, 0, wxEXPAND, 5 ); + bSizerCfgHistoryButtons->Add( bSizer17611, 0, 0, 5 ); + wxBoxSizer* bSizer1761; + bSizer1761 = new wxBoxSizer( wxVERTICAL ); - m_panelLog->SetSizer( bSizerLog ); - m_panelLog->Layout(); - bSizerLog->Fit( m_panelLog ); - bSizerPanelHolder->Add( m_panelLog, 0, 0, 5 ); + m_bpButtonOpen = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonOpen->SetToolTip( _("dummy") ); - m_panelConfig = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelConfig->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + bSizer1761->Add( m_bpButtonOpen, 0, wxEXPAND, 5 ); - bSizerConfig = new wxBoxSizer( wxVERTICAL ); + m_staticText95 = new wxStaticText( m_panelConfig, wxID_ANY, _("Open..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText95->Wrap( -1 ); + bSizer1761->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); - bSizerCfgHistoryButtons = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer17611; - bSizer17611 = new wxBoxSizer( wxVERTICAL ); + bSizerCfgHistoryButtons->Add( bSizer1761, 0, 0, 5 ); - m_bpButtonNew = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonNew->SetToolTip( _("dummy") ); + wxBoxSizer* bSizer175; + bSizer175 = new wxBoxSizer( wxVERTICAL ); - bSizer17611->Add( m_bpButtonNew, 0, wxEXPAND, 5 ); + m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSave->SetToolTip( _("dummy") ); - m_staticText951 = new wxStaticText( m_panelConfig, wxID_ANY, _("New"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText951->Wrap( -1 ); - bSizer17611->Add( m_staticText951, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); + bSizer175->Add( m_bpButtonSave, 0, wxEXPAND, 5 ); + m_staticText961 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText961->Wrap( -1 ); + bSizer175->Add( m_staticText961, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); - bSizerCfgHistoryButtons->Add( bSizer17611, 0, 0, 5 ); - wxBoxSizer* bSizer1761; - bSizer1761 = new wxBoxSizer( wxVERTICAL ); + bSizerCfgHistoryButtons->Add( bSizer175, 0, 0, 5 ); - m_bpButtonOpen = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonOpen->SetToolTip( _("dummy") ); + wxBoxSizer* bSizer174; + bSizer174 = new wxBoxSizer( wxVERTICAL ); - bSizer1761->Add( m_bpButtonOpen, 0, wxEXPAND, 5 ); + bSizerSaveAs = new wxBoxSizer( wxHORIZONTAL ); - m_staticText95 = new wxStaticText( m_panelConfig, wxID_ANY, _("Open..."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText95->Wrap( -1 ); - bSizer1761->Add( m_staticText95, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); + m_bpButtonSaveAs = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSaveAs->SetToolTip( _("dummy") ); + bSizerSaveAs->Add( m_bpButtonSaveAs, 1, 0, 5 ); - bSizerCfgHistoryButtons->Add( bSizer1761, 0, 0, 5 ); + m_bpButtonSaveAsBatch = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSaveAsBatch->SetToolTip( _("dummy") ); - wxBoxSizer* bSizer175; - bSizer175 = new wxBoxSizer( wxVERTICAL ); + bSizerSaveAs->Add( m_bpButtonSaveAsBatch, 1, 0, 5 ); - m_bpButtonSave = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSave->SetToolTip( _("dummy") ); - bSizer175->Add( m_bpButtonSave, 0, wxEXPAND, 5 ); + bSizer174->Add( bSizerSaveAs, 0, wxEXPAND, 5 ); - m_staticText961 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText961->Wrap( -1 ); - bSizer175->Add( m_staticText961, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); + m_staticText97 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save as..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText97->Wrap( -1 ); + bSizer174->Add( m_staticText97, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); - bSizerCfgHistoryButtons->Add( bSizer175, 0, 0, 5 ); + bSizerCfgHistoryButtons->Add( bSizer174, 0, 0, 5 ); - wxBoxSizer* bSizer174; - bSizer174 = new wxBoxSizer( wxVERTICAL ); - bSizerSaveAs = new wxBoxSizer( wxHORIZONTAL ); + bSizerConfig->Add( bSizerCfgHistoryButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonSaveAs = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSaveAs->SetToolTip( _("dummy") ); + m_staticline81 = new wxStaticLine( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerConfig->Add( m_staticline81, 0, wxEXPAND|wxTOP, 5 ); - bSizerSaveAs->Add( m_bpButtonSaveAs, 1, 0, 5 ); - m_bpButtonSaveAsBatch = new wxBitmapButton( m_panelConfig, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSaveAsBatch->SetToolTip( _("dummy") ); + bSizerConfig->Add( 10, 0, 0, 0, 5 ); - bSizerSaveAs->Add( m_bpButtonSaveAsBatch, 1, 0, 5 ); + m_gridCfgHistory = new zen::Grid( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridCfgHistory->SetScrollRate( 5, 5 ); + bSizerConfig->Add( m_gridCfgHistory, 1, wxEXPAND, 5 ); - bSizer174->Add( bSizerSaveAs, 0, wxEXPAND, 5 ); + m_panelConfig->SetSizer( bSizerConfig ); + m_panelConfig->Layout(); + bSizerConfig->Fit( m_panelConfig ); + bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 ); - m_staticText97 = new wxStaticText( m_panelConfig, wxID_ANY, _("Save as..."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText97->Wrap( -1 ); - bSizer174->Add( m_staticText97, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 2 ); + m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelViewFilter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL ); - bSizerCfgHistoryButtons->Add( bSizer174, 0, 0, 5 ); + m_bpButtonToggleLog = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizerViewFilter->Add( m_bpButtonToggleLog, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerConfig->Add( bSizerCfgHistoryButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticline81 = new wxStaticLine( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerConfig->Add( m_staticline81, 0, wxEXPAND|wxTOP, 5 ); + bSizerViewButtons = new wxBoxSizer( wxHORIZONTAL ); + m_bpButtonViewType = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonViewType, 0, wxEXPAND, 5 ); - bSizerConfig->Add( 10, 0, 0, 0, 5 ); - m_gridCfgHistory = new zen::Grid( m_panelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_gridCfgHistory->SetScrollRate( 5, 5 ); - bSizerConfig->Add( m_gridCfgHistory, 1, wxEXPAND, 5 ); + bSizerViewButtons->Add( 10, 10, 0, 0, 5 ); + m_bpButtonShowExcluded = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowExcluded, 0, wxEXPAND, 5 ); - m_panelConfig->SetSizer( bSizerConfig ); - m_panelConfig->Layout(); - bSizerConfig->Fit( m_panelConfig ); - bSizerPanelHolder->Add( m_panelConfig, 0, 0, 5 ); - m_panelViewFilter = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelViewFilter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + bSizerViewButtons->Add( 10, 10, 0, 0, 5 ); - bSizerViewFilter = new wxBoxSizer( wxHORIZONTAL ); + m_bpButtonShowDeleteLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowDeleteLeft, 0, wxEXPAND, 5 ); - m_bpButtonToggleLog = new wxBitmapButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizerViewFilter->Add( m_bpButtonToggleLog, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bpButtonShowUpdateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowUpdateLeft, 0, wxEXPAND, 5 ); + m_bpButtonShowCreateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowCreateLeft, 0, wxEXPAND, 5 ); - bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + m_bpButtonShowLeftOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowLeftOnly, 0, wxEXPAND, 5 ); - bSizerViewButtons = new wxBoxSizer( wxHORIZONTAL ); + m_bpButtonShowLeftNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowLeftNewer, 0, wxEXPAND, 5 ); - m_bpButtonViewType = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonViewType, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonShowEqual = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowEqual, 0, wxEXPAND, 5 ); + m_bpButtonShowDoNothing = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowDoNothing, 0, wxEXPAND, 5 ); - bSizerViewButtons->Add( 10, 10, 0, 0, 5 ); + m_bpButtonShowDifferent = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowDifferent, 0, wxEXPAND, 5 ); - m_bpButtonShowExcluded = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowExcluded, 0, wxEXPAND, 5 ); + m_bpButtonShowRightNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowRightNewer, 0, wxEXPAND, 5 ); + m_bpButtonShowRightOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowRightOnly, 0, wxEXPAND, 5 ); - bSizerViewButtons->Add( 10, 10, 0, 0, 5 ); + m_bpButtonShowCreateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowCreateRight, 0, wxEXPAND, 5 ); - m_bpButtonShowDeleteLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowDeleteLeft, 0, wxEXPAND, 5 ); + m_bpButtonShowUpdateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowUpdateRight, 0, wxEXPAND, 5 ); - m_bpButtonShowUpdateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowUpdateLeft, 0, wxEXPAND, 5 ); + m_bpButtonShowDeleteRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowDeleteRight, 0, wxEXPAND, 5 ); - m_bpButtonShowCreateLeft = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowCreateLeft, 0, wxEXPAND, 5 ); + m_bpButtonShowConflict = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonShowConflict, 0, wxEXPAND, 5 ); - m_bpButtonShowLeftOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowLeftOnly, 0, wxEXPAND, 5 ); + m_bpButtonViewFilterContext = new wxBitmapButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerViewButtons->Add( m_bpButtonViewFilterContext, 0, wxEXPAND, 5 ); - m_bpButtonShowLeftNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowLeftNewer, 0, wxEXPAND, 5 ); - m_bpButtonShowEqual = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowEqual, 0, wxEXPAND, 5 ); + bSizerViewFilter->Add( bSizerViewButtons, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonShowDoNothing = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowDoNothing, 0, wxEXPAND, 5 ); - m_bpButtonShowDifferent = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowDifferent, 0, wxEXPAND, 5 ); + bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); - m_bpButtonShowRightNewer = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowRightNewer, 0, wxEXPAND, 5 ); + m_staticText96 = new wxStaticText( m_panelViewFilter, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText96->Wrap( -1 ); + bSizerViewFilter->Add( m_staticText96, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonShowRightOnly = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowRightOnly, 0, wxEXPAND, 5 ); + m_panelStatistics = new wxPanel( m_panelViewFilter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_SUNKEN ); + m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - m_bpButtonShowCreateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowCreateRight, 0, wxEXPAND, 5 ); + bSizer1801 = new wxBoxSizer( wxVERTICAL ); - m_bpButtonShowUpdateRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowUpdateRight, 0, wxEXPAND, 5 ); + bSizerStatistics = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonShowDeleteRight = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowDeleteRight, 0, wxEXPAND, 5 ); + wxBoxSizer* bSizer173; + bSizer173 = new wxBoxSizer( wxVERTICAL ); - m_bpButtonShowConflict = new zen::ToggleButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonShowConflict, 0, wxEXPAND, 5 ); + m_bitmapDeleteLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - m_bpButtonViewFilterContext = new wxBitmapButton( m_panelViewFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizerViewButtons->Add( m_bpButtonViewFilterContext, 0, wxEXPAND, 5 ); + bSizer173->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerViewFilter->Add( bSizerViewButtons, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer173->Add( 5, 2, 0, 0, 5 ); - bSizerViewFilter->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer173->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticText96 = new wxStaticText( m_panelViewFilter, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText96->Wrap( -1 ); - bSizerViewFilter->Add( m_staticText96, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticTextDeleteLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteLeft->Wrap( -1 ); + m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - m_panelStatistics = new wxPanel( m_panelViewFilter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxBORDER_SUNKEN ); - m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + bSizer173->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer1801 = new wxBoxSizer( wxVERTICAL ); - bSizerStatistics = new wxBoxSizer( wxHORIZONTAL ); + bSizerStatistics->Add( bSizer173, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer173; - bSizer173 = new wxBoxSizer( wxVERTICAL ); - m_bitmapDeleteLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); + bSizerStatistics->Add( 10, 10, 0, 0, 5 ); - bSizer173->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer172; + bSizer172 = new wxBoxSizer( wxVERTICAL ); + m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") ); - bSizer173->Add( 5, 2, 0, 0, 5 ); + bSizer172->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer173->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer172->Add( 5, 2, 0, 0, 5 ); - m_staticTextDeleteLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDeleteLeft->Wrap( -1 ); - m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - bSizer173->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer172->Add( 0, 0, 1, wxEXPAND, 5 ); + m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateLeft->Wrap( -1 ); + m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") ); - bSizerStatistics->Add( bSizer173, 0, wxEXPAND, 5 ); + bSizer172->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerStatistics->Add( 10, 10, 0, 0, 5 ); + bSizerStatistics->Add( bSizer172, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer172; - bSizer172 = new wxBoxSizer( wxVERTICAL ); - m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") ); + bSizerStatistics->Add( 10, 5, 0, 0, 5 ); - bSizer172->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer1712; + bSizer1712 = new wxBoxSizer( wxVERTICAL ); + m_bitmapCreateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - bSizer172->Add( 5, 2, 0, 0, 5 ); + bSizer1712->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer172->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer1712->Add( 5, 2, 0, 0, 5 ); - m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextUpdateLeft->Wrap( -1 ); - m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") ); - bSizer172->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer1712->Add( 0, 0, 1, wxEXPAND, 5 ); + m_staticTextCreateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateLeft->Wrap( -1 ); + m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - bSizerStatistics->Add( bSizer172, 0, wxEXPAND, 5 ); + bSizer1712->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerStatistics->Add( 10, 5, 0, 0, 5 ); + bSizerStatistics->Add( bSizer1712, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer1712; - bSizer1712 = new wxBoxSizer( wxVERTICAL ); - m_bitmapCreateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); + bSizerStatistics->Add( 10, 5, 0, 0, 5 ); - bSizer1712->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizerData = new wxBoxSizer( wxVERTICAL ); + m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapData->SetToolTip( _("Total bytes to copy") ); - bSizer1712->Add( 5, 2, 0, 0, 5 ); + bSizerData->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer1712->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerData->Add( 5, 2, 0, 0, 5 ); - m_staticTextCreateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCreateLeft->Wrap( -1 ); - m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - bSizer1712->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizerData->Add( 0, 0, 1, wxEXPAND, 5 ); + m_staticTextData = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextData->Wrap( -1 ); + m_staticTextData->SetToolTip( _("Total bytes to copy") ); - bSizerStatistics->Add( bSizer1712, 0, wxEXPAND, 5 ); + bSizerData->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatistics->Add( 10, 5, 0, 0, 5 ); + bSizerStatistics->Add( bSizerData, 0, wxEXPAND, 5 ); - bSizerData = new wxBoxSizer( wxVERTICAL ); - m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapData->SetToolTip( _("Total bytes to copy") ); + bSizerStatistics->Add( 10, 5, 0, 0, 5 ); - bSizerData->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + wxBoxSizer* bSizer178; + bSizer178 = new wxBoxSizer( wxVERTICAL ); + m_bitmapCreateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - bSizerData->Add( 5, 2, 0, 0, 5 ); + bSizer178->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerData->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer178->Add( 5, 2, 0, 0, 5 ); - m_staticTextData = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextData->Wrap( -1 ); - m_staticTextData->SetToolTip( _("Total bytes to copy") ); - bSizerData->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer178->Add( 0, 0, 1, wxEXPAND, 5 ); + m_staticTextCreateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateRight->Wrap( -1 ); + m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - bSizerStatistics->Add( bSizerData, 0, wxEXPAND, 5 ); + bSizer178->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatistics->Add( 10, 5, 0, 0, 5 ); + bSizerStatistics->Add( bSizer178, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer178; - bSizer178 = new wxBoxSizer( wxVERTICAL ); - m_bitmapCreateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") ); + bSizerStatistics->Add( 10, 5, 0, 0, 5 ); - bSizer178->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + wxBoxSizer* bSizer177; + bSizer177 = new wxBoxSizer( wxVERTICAL ); + m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") ); - bSizer178->Add( 5, 2, 0, 0, 5 ); + bSizer177->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer178->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer177->Add( 5, 2, 0, 0, 5 ); - m_staticTextCreateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCreateRight->Wrap( -1 ); - m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - bSizer178->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer177->Add( 0, 0, 1, wxEXPAND, 5 ); + m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateRight->Wrap( -1 ); + m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") ); - bSizerStatistics->Add( bSizer178, 0, wxEXPAND, 5 ); + bSizer177->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatistics->Add( 10, 5, 0, 0, 5 ); + bSizerStatistics->Add( bSizer177, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer177; - bSizer177 = new wxBoxSizer( wxVERTICAL ); - m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") ); + bSizerStatistics->Add( 10, 10, 0, 0, 5 ); - bSizer177->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + wxBoxSizer* bSizer176; + bSizer176 = new wxBoxSizer( wxVERTICAL ); + m_bitmapDeleteRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); - bSizer177->Add( 5, 2, 0, 0, 5 ); + bSizer176->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer177->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer176->Add( 5, 2, 0, 0, 5 ); - m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextUpdateRight->Wrap( -1 ); - m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") ); - bSizer177->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer176->Add( 0, 0, 1, wxEXPAND, 5 ); + m_staticTextDeleteRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteRight->Wrap( -1 ); + m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); - bSizerStatistics->Add( bSizer177, 0, wxEXPAND, 5 ); + bSizer176->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStatistics->Add( 10, 10, 0, 0, 5 ); + bSizerStatistics->Add( bSizer176, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer176; - bSizer176 = new wxBoxSizer( wxVERTICAL ); - m_bitmapDeleteRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); + bSizer1801->Add( bSizerStatistics, 0, wxALL, 4 ); - bSizer176->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_panelStatistics->SetSizer( bSizer1801 ); + m_panelStatistics->Layout(); + bSizer1801->Fit( m_panelStatistics ); + bSizerViewFilter->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer176->Add( 5, 2, 0, 0, 5 ); + m_panelViewFilter->SetSizer( bSizerViewFilter ); + m_panelViewFilter->Layout(); + bSizerViewFilter->Fit( m_panelViewFilter ); + bSizerPanelHolder->Add( m_panelViewFilter, 0, 0, 5 ); - bSizer176->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticTextDeleteRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDeleteRight->Wrap( -1 ); - m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); + this->SetSizer( bSizerPanelHolder ); + this->Layout(); + bSizerPanelHolder->Fit( this ); - bSizer176->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - - - bSizerStatistics->Add( bSizer176, 0, wxEXPAND, 5 ); - - - bSizer1801->Add( bSizerStatistics, 0, wxALL, 4 ); - - - m_panelStatistics->SetSizer( bSizer1801 ); - m_panelStatistics->Layout(); - bSizer1801->Fit( m_panelStatistics ); - bSizerViewFilter->Add( m_panelStatistics, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - m_panelViewFilter->SetSizer( bSizerViewFilter ); - m_panelViewFilter->Layout(); - bSizerViewFilter->Fit( m_panelViewFilter ); - bSizerPanelHolder->Add( m_panelViewFilter, 0, 0, 5 ); - - - this->SetSizer( bSizerPanelHolder ); - this->Layout(); - bSizerPanelHolder->Fit( this ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::onClose ) ); - m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigNew ), this, m_menuItemNew->GetId()); - m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigLoad ), this, m_menuItemLoad->GetId()); - m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigSave ), this, m_menuItemSave->GetId()); - m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigSaveAs ), this, m_menuItemSaveAs->GetId()); - m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onSaveAsBatchJob ), this, m_menuItemSaveAsBatch->GetId()); - m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuQuit ), this, m_menuItemQuit->GetId()); - m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onToggleLog ), this, m_menuItemShowLog->GetId()); - m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onCompare ), this, m_menuItemCompare->GetId()); - m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onCmpSettings ), this, m_menuItemCompSettings->GetId()); - m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigureFilter ), this, m_menuItemFilter->GetId()); - m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onSyncSettings ), this, m_menuItemSyncSettings->GetId()); - m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onStartSync ), this, m_menuItemSynchronize->GetId()); - m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuOptions ), this, m_menuItemOptions->GetId()); - m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuFindItem ), this, m_menuItemFind->GetId()); - m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuExportFileList ), this, m_menuItemExportList->GetId()); - m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuResetLayout ), this, m_menuItemResetLayout->GetId()); - m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onShowHelp ), this, m_menuItemHelp->GetId()); - m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersion ), this, m_menuItemCheckVersionNow->GetId()); - m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuAbout ), this, m_menuItemAbout->GetId()); - 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_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); - m_bpButtonCmpContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCompSettingsContext ), NULL, this ); - m_bpButtonCmpContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigureFilter ), NULL, this ); - m_bpButtonFilter->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onGlobalFilterContextMouse ), NULL, this ); - m_bpButtonFilterContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onGlobalFilterContext ), NULL, this ); - m_bpButtonFilterContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onGlobalFilterContextMouse ), NULL, this ); - m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSyncSettings ), NULL, this ); - m_bpButtonSyncConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onSyncSettingsContextMouse ), NULL, this ); - m_bpButtonSyncContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSyncSettingsContext ), NULL, this ); - m_bpButtonSyncContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onSyncSettingsContextMouse ), NULL, this ); - m_buttonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onStartSync ), NULL, this ); - m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopFolderPairAdd ), NULL, this ); - m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopFolderPairRemove ), NULL, this ); - m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSwapSides ), NULL, this ); - m_bpButtonLocalCompCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopLocalCompCfg ), NULL, this ); - m_bpButtonLocalFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopLocalFilterCfg ), NULL, this ); - m_bpButtonLocalSyncCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopLocalSyncCfg ), NULL, this ); - m_bpButtonHideSearch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onHideSearchPanel ), NULL, this ); - m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogGenerated::onSearchGridEnter ), NULL, this ); - m_bpButtonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigNew ), NULL, this ); - m_bpButtonOpen->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigLoad ), NULL, this ); - m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigSave ), NULL, this ); - m_bpButtonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigSaveAs ), NULL, this ); - m_bpButtonSaveAsBatch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSaveAsBatchJob ), NULL, this ); - m_bpButtonToggleLog->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleLog ), NULL, this ); - m_bpButtonViewType->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewType ), NULL, this ); - m_bpButtonViewType->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewTypeContextMouse ), NULL, this ); - m_bpButtonShowExcluded->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowExcluded->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowDeleteLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowUpdateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowUpdateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowCreateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowLeftOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowLeftNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowEqual->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowDoNothing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowDoNothing->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowDifferent->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowRightNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowRightOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowCreateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowUpdateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowUpdateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowDeleteRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonShowConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); - m_bpButtonShowConflict->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); - m_bpButtonViewFilterContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onViewFilterContext ), NULL, this ); - m_bpButtonViewFilterContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogGenerated::onClose ) ); + m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigNew ), this, m_menuItemNew->GetId()); + m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigLoad ), this, m_menuItemLoad->GetId()); + m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigSave ), this, m_menuItemSave->GetId()); + m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigSaveAs ), this, m_menuItemSaveAs->GetId()); + m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onSaveAsBatchJob ), this, m_menuItemSaveAsBatch->GetId()); + m_menuFile->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuQuit ), this, m_menuItemQuit->GetId()); + m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onToggleLog ), this, m_menuItemShowLog->GetId()); + m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onCompare ), this, m_menuItemCompare->GetId()); + m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onCmpSettings ), this, m_menuItemCompSettings->GetId()); + m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onConfigureFilter ), this, m_menuItemFilter->GetId()); + m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onSyncSettings ), this, m_menuItemSyncSettings->GetId()); + m_menuActions->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onStartSync ), this, m_menuItemSynchronize->GetId()); + m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuOptions ), this, m_menuItemOptions->GetId()); + m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuFindItem ), this, m_menuItemFind->GetId()); + m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuExportFileList ), this, m_menuItemExportList->GetId()); + m_menuTools->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuResetLayout ), this, m_menuItemResetLayout->GetId()); + m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onShowHelp ), this, m_menuItemHelp->GetId()); + m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuCheckVersion ), this, m_menuItemCheckVersionNow->GetId()); + m_menuHelp->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogGenerated::onMenuAbout ), this, m_menuItemAbout->GetId()); + 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_bpButtonCmpConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); + m_bpButtonCmpContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onCompSettingsContext ), NULL, this ); + m_bpButtonCmpContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onCompSettingsContextMouse ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigureFilter ), NULL, this ); + m_bpButtonFilter->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onGlobalFilterContextMouse ), NULL, this ); + m_bpButtonFilterContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onGlobalFilterContext ), NULL, this ); + m_bpButtonFilterContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onGlobalFilterContextMouse ), NULL, this ); + m_bpButtonSyncConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSyncSettings ), NULL, this ); + m_bpButtonSyncConfig->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onSyncSettingsContextMouse ), NULL, this ); + m_bpButtonSyncContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSyncSettingsContext ), NULL, this ); + m_bpButtonSyncContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onSyncSettingsContextMouse ), NULL, this ); + m_buttonSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onStartSync ), NULL, this ); + m_bpButtonAddPair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopFolderPairAdd ), NULL, this ); + m_bpButtonRemovePair->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopFolderPairRemove ), NULL, this ); + m_bpButtonSwapSides->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSwapSides ), NULL, this ); + m_bpButtonLocalCompCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopLocalCompCfg ), NULL, this ); + m_bpButtonLocalFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopLocalFilterCfg ), NULL, this ); + m_bpButtonLocalSyncCfg->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onTopLocalSyncCfg ), NULL, this ); + m_bpButtonHideSearch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onHideSearchPanel ), NULL, this ); + m_textCtrlSearchTxt->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogGenerated::onSearchGridEnter ), NULL, this ); + m_bpButtonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigNew ), NULL, this ); + m_bpButtonOpen->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigLoad ), NULL, this ); + m_bpButtonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigSave ), NULL, this ); + m_bpButtonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onConfigSaveAs ), NULL, this ); + m_bpButtonSaveAsBatch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onSaveAsBatchJob ), NULL, this ); + m_bpButtonToggleLog->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleLog ), NULL, this ); + m_bpButtonViewType->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewType ), NULL, this ); + m_bpButtonViewType->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewTypeContextMouse ), NULL, this ); + m_bpButtonShowExcluded->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowExcluded->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowDeleteLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowDeleteLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowUpdateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowUpdateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowCreateLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowCreateLeft->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowLeftOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowLeftNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowEqual->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowEqual->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowDoNothing->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowDoNothing->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowDifferent->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowRightNewer->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowRightOnly->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowCreateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowCreateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowUpdateRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowUpdateRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowDeleteRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowDeleteRight->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonShowConflict->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onToggleViewButton ), NULL, this ); + m_bpButtonShowConflict->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); + m_bpButtonViewFilterContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogGenerated::onViewFilterContext ), NULL, this ); + m_bpButtonViewFilterContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainDialogGenerated::onViewFilterContextMouse ), NULL, this ); } MainDialogGenerated::~MainDialogGenerated() @@ -1191,97 +1170,97 @@ MainDialogGenerated::~MainDialogGenerated() FolderPairPanelGenerated::FolderPairPanelGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) { - wxBoxSizer* bSizer74; - bSizer74 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer74; + bSizer74 = new wxBoxSizer( wxHORIZONTAL ); - m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelLeft->SetMinSize( wxSize( 1, -1 ) ); + m_panelLeft = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelLeft->SetMinSize( wxSize( 1,-1 ) ); - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonFolderPairOptions = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonFolderPairOptions->SetToolTip( _("Arrange folder pair") ); + m_bpButtonFolderPairOptions = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonFolderPairOptions->SetToolTip( _("Arrange folder pair") ); - bSizer134->Add( m_bpButtonFolderPairOptions, 0, wxEXPAND, 5 ); + bSizer134->Add( m_bpButtonFolderPairOptions, 0, wxEXPAND, 5 ); - m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); + m_bpButtonRemovePair = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonRemovePair->SetToolTip( _("Remove folder pair") ); - bSizer134->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 ); + bSizer134->Add( m_bpButtonRemovePair, 0, wxEXPAND, 5 ); - m_folderPathLeft = new fff::FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer134->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_folderPathLeft = new fff::FolderHistoryBox( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer134->Add( m_folderPathLeft, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectFolderLeft = new wxButton( m_panelLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") ); + m_buttonSelectFolderLeft = new wxButton( m_panelLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonSelectFolderLeft->SetToolTip( _("Select a folder") ); - bSizer134->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 ); + bSizer134->Add( m_buttonSelectFolderLeft, 0, wxEXPAND, 5 ); - m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") ); + m_bpButtonSelectAltFolderLeft = new wxBitmapButton( m_panelLeft, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectAltFolderLeft->SetToolTip( _("Access online storage") ); - bSizer134->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 ); + bSizer134->Add( m_bpButtonSelectAltFolderLeft, 0, wxEXPAND, 5 ); - m_panelLeft->SetSizer( bSizer134 ); - m_panelLeft->Layout(); - bSizer134->Fit( m_panelLeft ); - bSizer74->Add( m_panelLeft, 0, wxLEFT|wxEXPAND, 5 ); + m_panelLeft->SetSizer( bSizer134 ); + m_panelLeft->Layout(); + bSizer134->Fit( m_panelLeft ); + bSizer74->Add( m_panelLeft, 0, wxLEFT|wxEXPAND, 5 ); - m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer95; - bSizer95 = new wxBoxSizer( wxHORIZONTAL ); + m_panel20 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer95; + bSizer95 = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonLocalCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonLocalCompCfg->SetToolTip( _("dummy") ); + m_bpButtonLocalCompCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonLocalCompCfg->SetToolTip( _("dummy") ); - bSizer95->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 ); + bSizer95->Add( m_bpButtonLocalCompCfg, 0, wxEXPAND, 5 ); - m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonLocalFilter->SetToolTip( _("dummy") ); + m_bpButtonLocalFilter = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonLocalFilter->SetToolTip( _("dummy") ); - bSizer95->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 ); + bSizer95->Add( m_bpButtonLocalFilter, 0, wxEXPAND, 5 ); - m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") ); + m_bpButtonLocalSyncCfg = new wxBitmapButton( m_panel20, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonLocalSyncCfg->SetToolTip( _("dummy") ); - bSizer95->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 ); + bSizer95->Add( m_bpButtonLocalSyncCfg, 0, wxEXPAND, 5 ); - m_panel20->SetSizer( bSizer95 ); - m_panel20->Layout(); - bSizer95->Fit( m_panel20 ); - bSizer74->Add( m_panel20, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_panel20->SetSizer( bSizer95 ); + m_panel20->Layout(); + bSizer95->Fit( m_panel20 ); + bSizer74->Add( m_panel20, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelRight->SetMinSize( wxSize( 1, -1 ) ); + m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelRight->SetMinSize( wxSize( 1,-1 ) ); - wxBoxSizer* bSizer135; - bSizer135 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer135; + bSizer135 = new wxBoxSizer( wxHORIZONTAL ); - m_folderPathRight = new fff::FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer135->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_folderPathRight = new fff::FolderHistoryBox( m_panelRight, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer135->Add( m_folderPathRight, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectFolderRight = new wxButton( m_panelRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectFolderRight->SetToolTip( _("Select a folder") ); + m_buttonSelectFolderRight = new wxButton( m_panelRight, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectFolderRight->SetToolTip( _("Select a folder") ); - bSizer135->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 ); + bSizer135->Add( m_buttonSelectFolderRight, 0, wxEXPAND, 5 ); - m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") ); + m_bpButtonSelectAltFolderRight = new wxBitmapButton( m_panelRight, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectAltFolderRight->SetToolTip( _("Access online storage") ); - bSizer135->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 ); + bSizer135->Add( m_bpButtonSelectAltFolderRight, 0, wxEXPAND, 5 ); - m_panelRight->SetSizer( bSizer135 ); - m_panelRight->Layout(); - bSizer135->Fit( m_panelRight ); - bSizer74->Add( m_panelRight, 1, wxRIGHT|wxEXPAND, 5 ); + m_panelRight->SetSizer( bSizer135 ); + m_panelRight->Layout(); + bSizer135->Fit( m_panelRight ); + bSizer74->Add( m_panelRight, 1, wxRIGHT|wxEXPAND, 5 ); - this->SetSizer( bSizer74 ); - this->Layout(); + this->SetSizer( bSizer74 ); + this->Layout(); } FolderPairPanelGenerated::~FolderPairPanelGenerated() @@ -1290,1379 +1269,1379 @@ FolderPairPanelGenerated::~FolderPairPanelGenerated() ConfigDlgGenerated::ConfigDlgGenerated( 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 ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer190; - bSizer190 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer190; + bSizer190 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer1911; - bSizer1911 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1911; + bSizer1911 = new wxBoxSizer( wxVERTICAL ); - m_staticTextFolderPairLabel = new wxStaticText( this, wxID_ANY, _("Folder pair:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextFolderPairLabel->Wrap( -1 ); - bSizer1911->Add( m_staticTextFolderPairLabel, 0, wxALL, 5 ); + m_staticTextFolderPairLabel = new wxStaticText( this, wxID_ANY, _("Folder pair:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFolderPairLabel->Wrap( -1 ); + bSizer1911->Add( m_staticTextFolderPairLabel, 0, wxALL, 5 ); - m_listBoxFolderPair = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB ); - bSizer1911->Add( m_listBoxFolderPair, 1, 0, 5 ); + m_listBoxFolderPair = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB ); + bSizer1911->Add( m_listBoxFolderPair, 1, 0, 5 ); - bSizer190->Add( bSizer1911, 0, wxEXPAND, 5 ); + bSizer190->Add( bSizer1911, 0, wxEXPAND, 5 ); - m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_NOPAGETHEME ); - m_panelCompSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelCompSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_NOPAGETHEME ); + m_panelCompSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelCompSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer275; - bSizer275 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer275; + bSizer275 = new wxBoxSizer( wxVERTICAL ); - bSizerHeaderCompSettings = new wxBoxSizer( wxVERTICAL ); + bSizerHeaderCompSettings = new wxBoxSizer( wxVERTICAL ); - m_staticTextMainCompSettings = new wxStaticText( m_panelCompSettingsTab, wxID_ANY, _("Common settings:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMainCompSettings->Wrap( -1 ); - bSizerHeaderCompSettings->Add( m_staticTextMainCompSettings, 0, wxALL, 10 ); + m_staticTextMainCompSettings = new wxStaticText( m_panelCompSettingsTab, wxID_ANY, _("Common settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMainCompSettings->Wrap( -1 ); + bSizerHeaderCompSettings->Add( m_staticTextMainCompSettings, 0, wxALL, 10 ); - m_checkBoxUseLocalCmpOptions = new wxCheckBox( m_panelCompSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxUseLocalCmpOptions->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_checkBoxUseLocalCmpOptions = new wxCheckBox( m_panelCompSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxUseLocalCmpOptions->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - bSizerHeaderCompSettings->Add( m_checkBoxUseLocalCmpOptions, 0, wxALL|wxEXPAND, 10 ); + bSizerHeaderCompSettings->Add( m_checkBoxUseLocalCmpOptions, 0, wxALL|wxEXPAND, 10 ); - m_staticlineCompHeader = new wxStaticLine( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerHeaderCompSettings->Add( m_staticlineCompHeader, 0, wxEXPAND, 5 ); + m_staticlineCompHeader = new wxStaticLine( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerHeaderCompSettings->Add( m_staticlineCompHeader, 0, wxEXPAND, 5 ); - bSizer275->Add( bSizerHeaderCompSettings, 0, wxEXPAND, 5 ); + bSizer275->Add( bSizerHeaderCompSettings, 0, wxEXPAND, 5 ); - m_panelComparisonSettings = new wxPanel( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelComparisonSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelComparisonSettings = new wxPanel( m_panelCompSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelComparisonSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer2561; - bSizer2561 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2561; + bSizer2561 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer159; - bSizer159 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer159; + bSizer159 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer178; - bSizer178 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer178; + bSizer178 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer182; - bSizer182 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer182; + bSizer182 = new wxBoxSizer( wxVERTICAL ); - m_staticText91 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText91->Wrap( -1 ); - bSizer182->Add( m_staticText91, 0, wxALL, 5 ); + m_staticText91 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText91->Wrap( -1 ); + bSizer182->Add( m_staticText91, 0, wxALL, 5 ); - wxGridSizer* gSizer2; - gSizer2 = new wxGridSizer( 0, 1, 0, 0 ); + wxGridSizer* gSizer2; + gSizer2 = new wxGridSizer( 0, 1, 0, 0 ); - m_buttonByTimeSize = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonByTimeSize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonByTimeSize->SetToolTip( _("dummy") ); + m_buttonByTimeSize = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File time and size"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonByTimeSize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonByTimeSize->SetToolTip( _("dummy") ); - gSizer2->Add( m_buttonByTimeSize, 0, wxEXPAND, 5 ); + gSizer2->Add( m_buttonByTimeSize, 0, wxEXPAND, 5 ); - m_buttonByContent = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonByContent->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonByContent->SetToolTip( _("dummy") ); + m_buttonByContent = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File content"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonByContent->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonByContent->SetToolTip( _("dummy") ); - gSizer2->Add( m_buttonByContent, 0, wxEXPAND, 5 ); + gSizer2->Add( m_buttonByContent, 0, wxEXPAND, 5 ); - m_buttonBySize = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File size"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonBySize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonBySize->SetToolTip( _("dummy") ); + m_buttonBySize = new zen::ToggleButton( m_panelComparisonSettings, wxID_ANY, _("File size"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonBySize->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonBySize->SetToolTip( _("dummy") ); - gSizer2->Add( m_buttonBySize, 0, wxEXPAND, 5 ); + gSizer2->Add( m_buttonBySize, 0, wxEXPAND, 5 ); - bSizer182->Add( gSizer2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer182->Add( gSizer2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer178->Add( bSizer182, 0, wxALL, 5 ); + bSizer178->Add( bSizer182, 0, wxALL, 5 ); - wxBoxSizer* bSizer2371; - bSizer2371 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2371; + bSizer2371 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapCompVariant = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer2371->Add( m_bitmapCompVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapCompVariant = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer2371->Add( m_bitmapCompVariant, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextCompVarDescription = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCompVarDescription->Wrap( -1 ); - m_staticTextCompVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextCompVarDescription = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCompVarDescription->Wrap( -1 ); + m_staticTextCompVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer2371->Add( m_staticTextCompVarDescription, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer2371->Add( m_staticTextCompVarDescription, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer178->Add( bSizer2371, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizer178->Add( bSizer2371, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer159->Add( bSizer178, 0, wxEXPAND, 5 ); + bSizer159->Add( bSizer178, 0, wxEXPAND, 5 ); - m_staticline33 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer159->Add( m_staticline33, 0, wxEXPAND, 5 ); + m_staticline33 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer159->Add( m_staticline33, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer1734; - bSizer1734 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer1734; + bSizer1734 = new wxBoxSizer( wxHORIZONTAL ); - bSizer1734->Add( 0, 0, 1, 0, 5 ); + bSizer1734->Add( 0, 0, 1, 0, 5 ); - wxBoxSizer* bSizer1721; - bSizer1721 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1721; + bSizer1721 = new wxBoxSizer( wxVERTICAL ); - m_checkBoxSymlinksInclude = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Include &symbolic links:"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer1721->Add( m_checkBoxSymlinksInclude, 0, wxALL, 5 ); + m_checkBoxSymlinksInclude = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Include &symbolic links:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1721->Add( m_checkBoxSymlinksInclude, 0, wxALL, 5 ); - wxBoxSizer* bSizer176; - bSizer176 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer176; + bSizer176 = new wxBoxSizer( wxVERTICAL ); - m_radioBtnSymlinksFollow = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("&Follow"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnSymlinksFollow->SetValue( true ); - bSizer176->Add( m_radioBtnSymlinksFollow, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_radioBtnSymlinksFollow = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("&Follow"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnSymlinksFollow->SetValue( true ); + bSizer176->Add( m_radioBtnSymlinksFollow, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_radioBtnSymlinksDirect = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("As &link"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer176->Add( m_radioBtnSymlinksDirect, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_radioBtnSymlinksDirect = new wxRadioButton( m_panelComparisonSettings, wxID_ANY, _("As &link"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer176->Add( m_radioBtnSymlinksDirect, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer1721->Add( bSizer176, 0, wxLEFT|wxEXPAND, 15 ); + bSizer1721->Add( bSizer176, 0, wxLEFT|wxEXPAND, 15 ); - bSizer1721->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer1721->Add( 0, 0, 1, wxEXPAND, 5 ); - m_hyperlink24 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("More information"), wxT("https://freefilesync.org/manual.php?topic=comparison-settings"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink24->SetToolTip( _("https://freefilesync.org/manual.php?topic=comparison-settings") ); + m_hyperlink24 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("More information"), wxT("https://freefilesync.org/manual.php?topic=comparison-settings"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink24->SetToolTip( _("https://freefilesync.org/manual.php?topic=comparison-settings") ); - bSizer1721->Add( m_hyperlink24, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer1721->Add( m_hyperlink24, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer1734->Add( bSizer1721, 0, wxALL|wxEXPAND, 5 ); + bSizer1734->Add( bSizer1721, 0, wxALL|wxEXPAND, 5 ); - bSizer1734->Add( 0, 0, 1, 0, 5 ); + bSizer1734->Add( 0, 0, 1, 0, 5 ); - m_staticline44 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer1734->Add( m_staticline44, 0, wxEXPAND, 5 ); + m_staticline44 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer1734->Add( m_staticline44, 0, wxEXPAND, 5 ); - bSizer1734->Add( 0, 0, 1, 0, 5 ); + bSizer1734->Add( 0, 0, 1, 0, 5 ); - wxBoxSizer* bSizer1733; - bSizer1733 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1733; + bSizer1733 = new wxBoxSizer( wxVERTICAL ); - m_staticText112 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("&Ignore exact time shift [hh:mm]"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText112->Wrap( -1 ); - bSizer1733->Add( m_staticText112, 0, wxALL, 5 ); + m_staticText112 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("&Ignore exact time shift [hh:mm]"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText112->Wrap( -1 ); + bSizer1733->Add( m_staticText112, 0, wxALL, 5 ); - m_textCtrlTimeShift = new wxTextCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlTimeShift->SetToolTip( _("List of file time offsets to ignore") ); + m_textCtrlTimeShift = new wxTextCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textCtrlTimeShift->SetToolTip( _("List of file time offsets to ignore") ); - bSizer1733->Add( m_textCtrlTimeShift, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + bSizer1733->Add( m_textCtrlTimeShift, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - wxBoxSizer* bSizer197; - bSizer197 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer197; + bSizer197 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText1381 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Example:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1381->Wrap( -1 ); - m_staticText1381->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText1381 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Example:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1381->Wrap( -1 ); + m_staticText1381->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer197->Add( m_staticText1381, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer197->Add( m_staticText1381, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticText13811 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("1, 2, 4:30"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13811->Wrap( -1 ); - m_staticText13811->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText13811 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("1, 2, 4:30"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13811->Wrap( -1 ); + m_staticText13811->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer197->Add( m_staticText13811, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer197->Add( m_staticText13811, 0, wxBOTTOM|wxRIGHT, 5 ); - bSizer1733->Add( bSizer197, 0, 0, 5 ); + bSizer1733->Add( bSizer197, 0, 0, 5 ); - bSizer1733->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer1733->Add( 0, 0, 1, wxEXPAND, 5 ); - m_hyperlink241 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("Handle daylight saving time"), wxT("https://freefilesync.org/manual.php?topic=daylight-saving-time"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink241->SetToolTip( _("https://freefilesync.org/manual.php?topic=daylight-saving-time") ); + m_hyperlink241 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("Handle daylight saving time"), wxT("https://freefilesync.org/manual.php?topic=daylight-saving-time"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink241->SetToolTip( _("https://freefilesync.org/manual.php?topic=daylight-saving-time") ); - bSizer1733->Add( m_hyperlink241, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer1733->Add( m_hyperlink241, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer1734->Add( bSizer1733, 0, wxALL|wxEXPAND, 5 ); + bSizer1734->Add( bSizer1733, 0, wxALL|wxEXPAND, 5 ); - bSizer1734->Add( 0, 0, 1, 0, 5 ); + bSizer1734->Add( 0, 0, 1, 0, 5 ); - bSizer159->Add( bSizer1734, 0, wxEXPAND, 5 ); + bSizer159->Add( bSizer1734, 0, wxEXPAND, 5 ); - m_staticline331 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer159->Add( m_staticline331, 0, wxEXPAND, 5 ); + m_staticline331 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer159->Add( m_staticline331, 0, wxEXPAND, 5 ); - bSizer159->Add( 0, 0, 1, 0, 5 ); + bSizer159->Add( 0, 0, 1, 0, 5 ); - bSizerCompMisc = new wxBoxSizer( wxVERTICAL ); + bSizerCompMisc = new wxBoxSizer( wxVERTICAL ); - m_staticline3311 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerCompMisc->Add( m_staticline3311, 0, wxEXPAND, 5 ); + m_staticline3311 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerCompMisc->Add( m_staticline3311, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer2781; - bSizer2781 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2781; + bSizer2781 = new wxBoxSizer( wxHORIZONTAL ); - wxFlexGridSizer* fgSizer61; - fgSizer61 = new wxFlexGridSizer( 0, 2, 5, 5 ); - fgSizer61->SetFlexibleDirection( wxBOTH ); - fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + wxFlexGridSizer* fgSizer61; + fgSizer61 = new wxFlexGridSizer( 0, 2, 5, 5 ); + fgSizer61->SetFlexibleDirection( wxBOTH ); + fgSizer61->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer61->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer61->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxIgnoreErrors = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - fgSizer61->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_checkBoxIgnoreErrors = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + fgSizer61->Add( m_checkBoxIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_bitmapRetryErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer61->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bitmapRetryErrors = new wxStaticBitmap( m_panelComparisonSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer61->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_checkBoxAutoRetry = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer61->Add( m_checkBoxAutoRetry, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_checkBoxAutoRetry = new wxCheckBox( m_panelComparisonSettings, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer61->Add( m_checkBoxAutoRetry, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - bSizer2781->Add( fgSizer61, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + bSizer2781->Add( fgSizer61, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - fgSizerAutoRetry = new wxFlexGridSizer( 0, 2, 5, 10 ); - fgSizerAutoRetry->SetFlexibleDirection( wxBOTH ); - fgSizerAutoRetry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + fgSizerAutoRetry = new wxFlexGridSizer( 0, 2, 5, 10 ); + fgSizerAutoRetry->SetFlexibleDirection( wxBOTH ); + fgSizerAutoRetry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText96 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Retry count:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText96->Wrap( -1 ); - fgSizerAutoRetry->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText96 = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Retry count:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText96->Wrap( -1 ); + fgSizerAutoRetry->Add( m_staticText96, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextAutoRetryDelay = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Delay (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAutoRetryDelay->Wrap( -1 ); - fgSizerAutoRetry->Add( m_staticTextAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextAutoRetryDelay = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Delay (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextAutoRetryDelay->Wrap( -1 ); + fgSizerAutoRetry->Add( m_staticTextAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_spinCtrlAutoRetryCount = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - fgSizerAutoRetry->Add( m_spinCtrlAutoRetryCount, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlAutoRetryCount = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + fgSizerAutoRetry->Add( m_spinCtrlAutoRetryCount, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_spinCtrlAutoRetryDelay = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - fgSizerAutoRetry->Add( m_spinCtrlAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlAutoRetryDelay = new wxSpinCtrl( m_panelComparisonSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + fgSizerAutoRetry->Add( m_spinCtrlAutoRetryDelay, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer2781->Add( fgSizerAutoRetry, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 ); + bSizer2781->Add( fgSizerAutoRetry, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 ); - bSizerCompMisc->Add( bSizer2781, 0, wxEXPAND, 5 ); + bSizerCompMisc->Add( bSizer2781, 0, wxEXPAND, 5 ); - bSizer159->Add( bSizerCompMisc, 0, wxEXPAND, 5 ); + bSizer159->Add( bSizerCompMisc, 0, wxEXPAND, 5 ); - bSizer2561->Add( bSizer159, 0, wxEXPAND, 5 ); + bSizer2561->Add( bSizer159, 0, wxEXPAND, 5 ); - m_staticline751 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer2561->Add( m_staticline751, 0, wxEXPAND, 5 ); + m_staticline751 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer2561->Add( m_staticline751, 0, wxEXPAND, 5 ); - bSizerPerformance = new wxBoxSizer( wxVERTICAL ); + bSizerPerformance = new wxBoxSizer( wxVERTICAL ); - m_panel57 = new wxPanel( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel57->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panel57 = new wxPanel( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel57->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer2191; - bSizer2191 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2191; + bSizer2191 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapPerf = new wxStaticBitmap( m_panel57, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2191->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_bitmapPerf = new wxStaticBitmap( m_panel57, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2191->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticText13611 = new wxStaticText( m_panel57, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13611->Wrap( -1 ); - bSizer2191->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + m_staticText13611 = new wxStaticText( m_panel57, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13611->Wrap( -1 ); + bSizer2191->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - m_panel57->SetSizer( bSizer2191 ); - m_panel57->Layout(); - bSizer2191->Fit( m_panel57 ); - bSizerPerformance->Add( m_panel57, 0, wxEXPAND, 5 ); + m_panel57->SetSizer( bSizer2191 ); + m_panel57->Layout(); + bSizer2191->Fit( m_panel57 ); + bSizerPerformance->Add( m_panel57, 0, wxEXPAND, 5 ); - wxStaticLine* m_staticline75; - m_staticline75 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerPerformance->Add( m_staticline75, 0, wxEXPAND, 5 ); + wxStaticLine* m_staticline75; + m_staticline75 = new wxStaticLine( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerPerformance->Add( m_staticline75, 0, wxEXPAND, 5 ); - m_hyperlinkPerfDeRequired = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxT("https://freefilesync.org/faq.php#donation-edition"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlinkPerfDeRequired->SetToolTip( _("https://freefilesync.org/faq.php#donation-edition") ); + m_hyperlinkPerfDeRequired = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxT("https://freefilesync.org/faq.php#donation-edition"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlinkPerfDeRequired->SetToolTip( _("https://freefilesync.org/faq.php#donation-edition") ); - bSizerPerformance->Add( m_hyperlinkPerfDeRequired, 0, wxALL, 10 ); + bSizerPerformance->Add( m_hyperlinkPerfDeRequired, 0, wxALL, 10 ); - bSizer260 = new wxBoxSizer( wxVERTICAL ); + bSizer260 = new wxBoxSizer( wxVERTICAL ); - m_staticTextPerfParallelOps = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPerfParallelOps->Wrap( -1 ); - bSizer260->Add( m_staticTextPerfParallelOps, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticTextPerfParallelOps = new wxStaticText( m_panelComparisonSettings, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPerfParallelOps->Wrap( -1 ); + bSizer260->Add( m_staticTextPerfParallelOps, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_scrolledWindowPerf = new wxScrolledWindow( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_scrolledWindowPerf->SetScrollRate( 5, 5 ); - m_scrolledWindowPerf->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_scrolledWindowPerf = new wxScrolledWindow( m_panelComparisonSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWindowPerf->SetScrollRate( 5, 5 ); + m_scrolledWindowPerf->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - fgSizerPerf = new wxFlexGridSizer( 0, 2, 5, 5 ); - fgSizerPerf->SetFlexibleDirection( wxBOTH ); - fgSizerPerf->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + fgSizerPerf = new wxFlexGridSizer( 0, 2, 5, 5 ); + fgSizerPerf->SetFlexibleDirection( wxBOTH ); + fgSizerPerf->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_scrolledWindowPerf->SetSizer( fgSizerPerf ); - m_scrolledWindowPerf->Layout(); - fgSizerPerf->Fit( m_scrolledWindowPerf ); - bSizer260->Add( m_scrolledWindowPerf, 1, wxALL|wxEXPAND, 5 ); + m_scrolledWindowPerf->SetSizer( fgSizerPerf ); + m_scrolledWindowPerf->Layout(); + fgSizerPerf->Fit( m_scrolledWindowPerf ); + bSizer260->Add( m_scrolledWindowPerf, 1, wxALL|wxEXPAND, 5 ); - bSizerPerformance->Add( bSizer260, 1, wxALL|wxEXPAND, 5 ); + bSizerPerformance->Add( bSizer260, 1, wxALL|wxEXPAND, 5 ); - m_hyperlink1711 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("How to get the best performance?"), wxT("https://freefilesync.org/manual.php?topic=performance"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink1711->SetToolTip( _("https://freefilesync.org/manual.php?topic=performance") ); + m_hyperlink1711 = new wxHyperlinkCtrl( m_panelComparisonSettings, wxID_ANY, _("How to get the best performance?"), wxT("https://freefilesync.org/manual.php?topic=performance"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink1711->SetToolTip( _("https://freefilesync.org/manual.php?topic=performance") ); - bSizerPerformance->Add( m_hyperlink1711, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + bSizerPerformance->Add( m_hyperlink1711, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); - bSizer2561->Add( bSizerPerformance, 1, wxEXPAND, 5 ); + bSizer2561->Add( bSizerPerformance, 1, wxEXPAND, 5 ); - m_panelComparisonSettings->SetSizer( bSizer2561 ); - m_panelComparisonSettings->Layout(); - bSizer2561->Fit( m_panelComparisonSettings ); - bSizer275->Add( m_panelComparisonSettings, 1, wxEXPAND, 5 ); + m_panelComparisonSettings->SetSizer( bSizer2561 ); + m_panelComparisonSettings->Layout(); + bSizer2561->Fit( m_panelComparisonSettings ); + bSizer275->Add( m_panelComparisonSettings, 1, wxEXPAND, 5 ); - m_panelCompSettingsTab->SetSizer( bSizer275 ); - m_panelCompSettingsTab->Layout(); - bSizer275->Fit( m_panelCompSettingsTab ); - m_notebook->AddPage( m_panelCompSettingsTab, _("dummy"), false ); - m_panelFilterSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelFilterSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelCompSettingsTab->SetSizer( bSizer275 ); + m_panelCompSettingsTab->Layout(); + bSizer275->Fit( m_panelCompSettingsTab ); + m_notebook->AddPage( m_panelCompSettingsTab, _("dummy"), false ); + m_panelFilterSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelFilterSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer278; - bSizer278 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer278; + bSizer278 = new wxBoxSizer( wxVERTICAL ); - bSizerHeaderFilterSettings = new wxBoxSizer( wxVERTICAL ); + bSizerHeaderFilterSettings = new wxBoxSizer( wxVERTICAL ); - m_staticTextMainFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Common settings:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMainFilterSettings->Wrap( -1 ); - bSizerHeaderFilterSettings->Add( m_staticTextMainFilterSettings, 0, wxALL, 10 ); + m_staticTextMainFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Common settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMainFilterSettings->Wrap( -1 ); + bSizerHeaderFilterSettings->Add( m_staticTextMainFilterSettings, 0, wxALL, 10 ); - m_staticTextLocalFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Local settings:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextLocalFilterSettings->Wrap( -1 ); - bSizerHeaderFilterSettings->Add( m_staticTextLocalFilterSettings, 0, wxALL, 10 ); + m_staticTextLocalFilterSettings = new wxStaticText( m_panelFilterSettingsTab, wxID_ANY, _("Local settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLocalFilterSettings->Wrap( -1 ); + bSizerHeaderFilterSettings->Add( m_staticTextLocalFilterSettings, 0, wxALL, 10 ); - m_staticlineFilterHeader = new wxStaticLine( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerHeaderFilterSettings->Add( m_staticlineFilterHeader, 0, wxEXPAND, 5 ); + m_staticlineFilterHeader = new wxStaticLine( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerHeaderFilterSettings->Add( m_staticlineFilterHeader, 0, wxEXPAND, 5 ); - bSizer278->Add( bSizerHeaderFilterSettings, 0, wxEXPAND, 5 ); + bSizer278->Add( bSizerHeaderFilterSettings, 0, wxEXPAND, 5 ); - m_panel571 = new wxPanel( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel571->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel571 = new wxPanel( m_panelFilterSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel571->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer307; - bSizer307 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer307; + bSizer307 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer301; - bSizer301 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer301; + bSizer301 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer166; - bSizer166 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer166; + bSizer166 = new wxBoxSizer( wxVERTICAL ); - bSizer166->Add( 0, 10, 0, 0, 5 ); + bSizer166->Add( 0, 10, 0, 0, 5 ); - wxBoxSizer* bSizer1661; - bSizer1661 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer1661; + bSizer1661 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapInclude = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer1661->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + m_bitmapInclude = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer1661->Add( m_bitmapInclude, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - wxBoxSizer* bSizer1731; - bSizer1731 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1731; + bSizer1731 = new wxBoxSizer( wxVERTICAL ); - m_staticText78 = new wxStaticText( m_panel571, wxID_ANY, _("Include:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText78->Wrap( -1 ); - bSizer1731->Add( m_staticText78, 0, 0, 5 ); + m_staticText78 = new wxStaticText( m_panel571, wxID_ANY, _("Include:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText78->Wrap( -1 ); + bSizer1731->Add( m_staticText78, 0, 0, 5 ); - m_textCtrlInclude = new wxTextCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_MULTILINE ); - bSizer1731->Add( m_textCtrlInclude, 1, wxEXPAND|wxTOP, 5 ); + m_textCtrlInclude = new wxTextCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + bSizer1731->Add( m_textCtrlInclude, 1, wxEXPAND|wxTOP, 5 ); - bSizer1661->Add( bSizer1731, 1, wxEXPAND, 5 ); + bSizer1661->Add( bSizer1731, 1, wxEXPAND, 5 ); - bSizer166->Add( bSizer1661, 3, wxEXPAND|wxLEFT, 5 ); + bSizer166->Add( bSizer1661, 3, wxEXPAND|wxLEFT, 5 ); - bSizer166->Add( 0, 10, 0, 0, 5 ); + bSizer166->Add( 0, 10, 0, 0, 5 ); - wxBoxSizer* bSizer1651; - bSizer1651 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer1651; + bSizer1651 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapExclude = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer1651->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_bitmapExclude = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer1651->Add( m_bitmapExclude, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - wxBoxSizer* bSizer1742; - bSizer1742 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1742; + bSizer1742 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer189; - bSizer189 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer189; + bSizer189 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText77 = new wxStaticText( m_panel571, wxID_ANY, _("Exclude:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText77->Wrap( -1 ); - bSizer189->Add( m_staticText77, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText77 = new wxStaticText( m_panel571, wxID_ANY, _("Exclude:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText77->Wrap( -1 ); + bSizer189->Add( m_staticText77, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer189->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer189->Add( 0, 0, 1, wxEXPAND, 5 ); - m_hyperlink171 = new wxHyperlinkCtrl( m_panel571, wxID_ANY, _("Show examples"), wxT("https://freefilesync.org/manual.php?topic=exclude-files"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink171->SetToolTip( _("https://freefilesync.org/manual.php?topic=exclude-files") ); + m_hyperlink171 = new wxHyperlinkCtrl( m_panel571, wxID_ANY, _("Show examples"), wxT("https://freefilesync.org/manual.php?topic=exclude-files"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink171->SetToolTip( _("https://freefilesync.org/manual.php?topic=exclude-files") ); - bSizer189->Add( m_hyperlink171, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + bSizer189->Add( m_hyperlink171, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - bSizer1742->Add( bSizer189, 0, wxEXPAND, 5 ); + bSizer1742->Add( bSizer189, 0, wxEXPAND, 5 ); - m_textCtrlExclude = new wxTextCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_MULTILINE ); - bSizer1742->Add( m_textCtrlExclude, 1, wxEXPAND|wxTOP, 5 ); + m_textCtrlExclude = new wxTextCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + bSizer1742->Add( m_textCtrlExclude, 1, wxEXPAND|wxTOP, 5 ); - bSizer1651->Add( bSizer1742, 1, wxEXPAND, 5 ); + bSizer1651->Add( bSizer1742, 1, wxEXPAND, 5 ); - bSizer166->Add( bSizer1651, 5, wxEXPAND|wxLEFT, 5 ); + bSizer166->Add( bSizer1651, 5, wxEXPAND|wxLEFT, 5 ); - bSizer301->Add( bSizer166, 1, wxEXPAND, 5 ); + bSizer301->Add( bSizer166, 1, wxEXPAND, 5 ); - m_staticline24 = new wxStaticLine( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer301->Add( m_staticline24, 0, wxEXPAND, 5 ); + m_staticline24 = new wxStaticLine( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer301->Add( m_staticline24, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer160; - bSizer160 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer160; + bSizer160 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer168; - bSizer168 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer168; + bSizer168 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapFilterSize = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer168->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + m_bitmapFilterSize = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer168->Add( m_bitmapFilterSize, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - wxBoxSizer* bSizer158; - bSizer158 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer158; + bSizer158 = new wxBoxSizer( wxVERTICAL ); - m_staticText80 = new wxStaticText( m_panel571, wxID_ANY, _("File size:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText80->Wrap( -1 ); - bSizer158->Add( m_staticText80, 0, wxBOTTOM, 5 ); + m_staticText80 = new wxStaticText( m_panel571, wxID_ANY, _("File size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText80->Wrap( -1 ); + bSizer158->Add( m_staticText80, 0, wxBOTTOM, 5 ); - wxBoxSizer* bSizer162; - bSizer162 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer162; + bSizer162 = new wxBoxSizer( wxVERTICAL ); - m_staticText101 = new wxStaticText( m_panel571, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText101->Wrap( -1 ); - bSizer162->Add( m_staticText101, 0, wxBOTTOM, 2 ); + m_staticText101 = new wxStaticText( m_panel571, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( -1 ); + bSizer162->Add( m_staticText101, 0, wxBOTTOM, 2 ); - m_spinCtrlMinSize = new wxSpinCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer162->Add( m_spinCtrlMinSize, 0, wxEXPAND, 5 ); + m_spinCtrlMinSize = new wxSpinCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer162->Add( m_spinCtrlMinSize, 0, wxEXPAND, 5 ); - wxArrayString m_choiceUnitMinSizeChoices; - m_choiceUnitMinSize = new wxChoice( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 ); - m_choiceUnitMinSize->SetSelection( 0 ); - bSizer162->Add( m_choiceUnitMinSize, 0, wxEXPAND, 5 ); + wxArrayString m_choiceUnitMinSizeChoices; + m_choiceUnitMinSize = new wxChoice( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMinSizeChoices, 0 ); + m_choiceUnitMinSize->SetSelection( 0 ); + bSizer162->Add( m_choiceUnitMinSize, 0, wxEXPAND, 5 ); - bSizer158->Add( bSizer162, 0, wxEXPAND, 5 ); + bSizer158->Add( bSizer162, 0, wxEXPAND, 5 ); - bSizer158->Add( 0, 10, 0, 0, 5 ); + bSizer158->Add( 0, 10, 0, 0, 5 ); - wxBoxSizer* bSizer163; - bSizer163 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer163; + bSizer163 = new wxBoxSizer( wxVERTICAL ); - m_staticText102 = new wxStaticText( m_panel571, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText102->Wrap( -1 ); - bSizer163->Add( m_staticText102, 0, wxBOTTOM, 2 ); + m_staticText102 = new wxStaticText( m_panel571, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText102->Wrap( -1 ); + bSizer163->Add( m_staticText102, 0, wxBOTTOM, 2 ); - m_spinCtrlMaxSize = new wxSpinCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer163->Add( m_spinCtrlMaxSize, 0, wxEXPAND, 5 ); + m_spinCtrlMaxSize = new wxSpinCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer163->Add( m_spinCtrlMaxSize, 0, wxEXPAND, 5 ); - wxArrayString m_choiceUnitMaxSizeChoices; - m_choiceUnitMaxSize = new wxChoice( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 ); - m_choiceUnitMaxSize->SetSelection( 0 ); - bSizer163->Add( m_choiceUnitMaxSize, 0, wxEXPAND, 5 ); + wxArrayString m_choiceUnitMaxSizeChoices; + m_choiceUnitMaxSize = new wxChoice( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitMaxSizeChoices, 0 ); + m_choiceUnitMaxSize->SetSelection( 0 ); + bSizer163->Add( m_choiceUnitMaxSize, 0, wxEXPAND, 5 ); - bSizer158->Add( bSizer163, 0, wxEXPAND, 5 ); + bSizer158->Add( bSizer163, 0, wxEXPAND, 5 ); - bSizer168->Add( bSizer158, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizer168->Add( bSizer158, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer160->Add( bSizer168, 2, wxEXPAND|wxALL, 5 ); + bSizer160->Add( bSizer168, 2, wxEXPAND|wxALL, 5 ); - m_staticline23 = new wxStaticLine( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer160->Add( m_staticline23, 0, wxEXPAND, 5 ); + m_staticline23 = new wxStaticLine( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer160->Add( m_staticline23, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer167; - bSizer167 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer167; + bSizer167 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapFilterDate = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer167->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_bitmapFilterDate = new wxStaticBitmap( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer167->Add( m_bitmapFilterDate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - wxBoxSizer* bSizer165; - bSizer165 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer165; + bSizer165 = new wxBoxSizer( wxVERTICAL ); - m_staticText79 = new wxStaticText( m_panel571, wxID_ANY, _("Time span:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText79->Wrap( -1 ); - bSizer165->Add( m_staticText79, 0, wxBOTTOM, 5 ); + m_staticText79 = new wxStaticText( m_panel571, wxID_ANY, _("Time span:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText79->Wrap( -1 ); + bSizer165->Add( m_staticText79, 0, wxBOTTOM, 5 ); - wxArrayString m_choiceUnitTimespanChoices; - m_choiceUnitTimespan = new wxChoice( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 ); - m_choiceUnitTimespan->SetSelection( 0 ); - bSizer165->Add( m_choiceUnitTimespan, 0, wxEXPAND, 5 ); + wxArrayString m_choiceUnitTimespanChoices; + m_choiceUnitTimespan = new wxChoice( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitTimespanChoices, 0 ); + m_choiceUnitTimespan->SetSelection( 0 ); + bSizer165->Add( m_choiceUnitTimespan, 0, wxEXPAND, 5 ); - m_spinCtrlTimespan = new wxSpinCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer165->Add( m_spinCtrlTimespan, 0, wxEXPAND, 5 ); + m_spinCtrlTimespan = new wxSpinCtrl( m_panel571, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer165->Add( m_spinCtrlTimespan, 0, wxEXPAND, 5 ); - bSizer167->Add( bSizer165, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizer167->Add( bSizer165, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer160->Add( bSizer167, 1, wxEXPAND|wxALL, 5 ); + bSizer160->Add( bSizer167, 1, wxEXPAND|wxALL, 5 ); - m_staticline231 = new wxStaticLine( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer160->Add( m_staticline231, 0, wxEXPAND, 5 ); + m_staticline231 = new wxStaticLine( m_panel571, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer160->Add( m_staticline231, 0, wxEXPAND, 5 ); - bSizer301->Add( bSizer160, 0, wxEXPAND, 5 ); + bSizer301->Add( bSizer160, 0, wxEXPAND, 5 ); - bSizer307->Add( bSizer301, 1, wxEXPAND, 5 ); + bSizer307->Add( bSizer301, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizer302; - bSizer302 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer302; + bSizer302 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextFilterDescr = new wxStaticText( m_panel571, wxID_ANY, _("Select filter rules to exclude certain files from synchronization.\nEnter file paths relative to their corresponding folder pair."), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextFilterDescr->Wrap( -1 ); - m_staticTextFilterDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextFilterDescr = new wxStaticText( m_panel571, wxID_ANY, _("Select filter rules to exclude certain files from synchronization.\nEnter file paths relative to their corresponding folder pair."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextFilterDescr->Wrap( -1 ); + m_staticTextFilterDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer302->Add( m_staticTextFilterDescr, 1, wxALL|wxALIGN_CENTER_VERTICAL, 10 ); + bSizer302->Add( m_staticTextFilterDescr, 1, wxALL|wxALIGN_CENTER_VERTICAL, 10 ); - wxBoxSizer* bSizer303; - bSizer303 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer303; + bSizer303 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonDefault = new wxButton( m_panel571, wxID_ANY, _("&Default"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer303->Add( m_buttonDefault, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonDefault = new wxButton( m_panel571, wxID_ANY, _("&Default"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer303->Add( m_buttonDefault, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonDefaultContext = new wxBitmapButton( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer303->Add( m_bpButtonDefaultContext, 0, wxEXPAND, 5 ); + m_bpButtonDefaultContext = new wxBitmapButton( m_panel571, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer303->Add( m_bpButtonDefaultContext, 0, wxEXPAND, 5 ); - bSizer302->Add( bSizer303, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 10 ); + bSizer302->Add( bSizer303, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 10 ); - m_buttonClear = new wxButton( m_panel571, wxID_ANY, _("C&lear"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer302->Add( m_buttonClear, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 ); + m_buttonClear = new wxButton( m_panel571, wxID_ANY, _("C&lear"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer302->Add( m_buttonClear, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 ); - bSizer307->Add( bSizer302, 0, wxEXPAND, 5 ); + bSizer307->Add( bSizer302, 0, wxEXPAND, 5 ); - m_panel571->SetSizer( bSizer307 ); - m_panel571->Layout(); - bSizer307->Fit( m_panel571 ); - bSizer278->Add( m_panel571, 1, wxEXPAND, 5 ); + m_panel571->SetSizer( bSizer307 ); + m_panel571->Layout(); + bSizer307->Fit( m_panel571 ); + bSizer278->Add( m_panel571, 1, wxEXPAND, 5 ); - m_panelFilterSettingsTab->SetSizer( bSizer278 ); - m_panelFilterSettingsTab->Layout(); - bSizer278->Fit( m_panelFilterSettingsTab ); - m_notebook->AddPage( m_panelFilterSettingsTab, _("dummy"), false ); - m_panelSyncSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelSyncSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelFilterSettingsTab->SetSizer( bSizer278 ); + m_panelFilterSettingsTab->Layout(); + bSizer278->Fit( m_panelFilterSettingsTab ); + m_notebook->AddPage( m_panelFilterSettingsTab, _("dummy"), false ); + m_panelSyncSettingsTab = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelSyncSettingsTab->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer276; - bSizer276 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer276; + bSizer276 = new wxBoxSizer( wxVERTICAL ); - bSizerHeaderSyncSettings = new wxBoxSizer( wxVERTICAL ); + bSizerHeaderSyncSettings = new wxBoxSizer( wxVERTICAL ); - m_staticTextMainSyncSettings = new wxStaticText( m_panelSyncSettingsTab, wxID_ANY, _("Common settings:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMainSyncSettings->Wrap( -1 ); - bSizerHeaderSyncSettings->Add( m_staticTextMainSyncSettings, 0, wxALL, 10 ); + m_staticTextMainSyncSettings = new wxStaticText( m_panelSyncSettingsTab, wxID_ANY, _("Common settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMainSyncSettings->Wrap( -1 ); + bSizerHeaderSyncSettings->Add( m_staticTextMainSyncSettings, 0, wxALL, 10 ); - m_checkBoxUseLocalSyncOptions = new wxCheckBox( m_panelSyncSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerHeaderSyncSettings->Add( m_checkBoxUseLocalSyncOptions, 0, wxALL|wxEXPAND, 10 ); + m_checkBoxUseLocalSyncOptions = new wxCheckBox( m_panelSyncSettingsTab, wxID_ANY, _("Use local settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerHeaderSyncSettings->Add( m_checkBoxUseLocalSyncOptions, 0, wxALL|wxEXPAND, 10 ); - m_staticlineSyncHeader = new wxStaticLine( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerHeaderSyncSettings->Add( m_staticlineSyncHeader, 0, wxEXPAND, 5 ); + m_staticlineSyncHeader = new wxStaticLine( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerHeaderSyncSettings->Add( m_staticlineSyncHeader, 0, wxEXPAND, 5 ); - bSizer276->Add( bSizerHeaderSyncSettings, 0, wxEXPAND, 5 ); + bSizer276->Add( bSizerHeaderSyncSettings, 0, wxEXPAND, 5 ); - m_panelSyncSettings = new wxPanel( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelSyncSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelSyncSettings = new wxPanel( m_panelSyncSettingsTab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelSyncSettings->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer232; - bSizer232 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer232; + bSizer232 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer237; - bSizer237 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer237; + bSizer237 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer235; - bSizer235 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer235; + bSizer235 = new wxBoxSizer( wxVERTICAL ); - m_staticText86 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText86->Wrap( -1 ); - bSizer235->Add( m_staticText86, 0, wxALL, 5 ); + m_staticText86 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Select a variant:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText86->Wrap( -1 ); + bSizer235->Add( m_staticText86, 0, wxALL, 5 ); - wxGridSizer* gSizer1; - gSizer1 = new wxGridSizer( 0, 1, 0, 0 ); + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 0, 1, 0, 0 ); - m_buttonTwoWay = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Two way"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonTwoWay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonTwoWay->SetToolTip( _("dummy") ); + m_buttonTwoWay = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Two way"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonTwoWay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonTwoWay->SetToolTip( _("dummy") ); - gSizer1->Add( m_buttonTwoWay, 0, wxEXPAND, 5 ); + gSizer1->Add( m_buttonTwoWay, 0, wxEXPAND, 5 ); - m_buttonMirror = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Mirror"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonMirror->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonMirror->SetToolTip( _("dummy") ); + m_buttonMirror = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Mirror"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonMirror->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonMirror->SetToolTip( _("dummy") ); - gSizer1->Add( m_buttonMirror, 0, wxEXPAND, 5 ); + gSizer1->Add( m_buttonMirror, 0, wxEXPAND, 5 ); - m_buttonUpdate = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Update"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonUpdate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonUpdate->SetToolTip( _("dummy") ); + m_buttonUpdate = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Update"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonUpdate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonUpdate->SetToolTip( _("dummy") ); - gSizer1->Add( m_buttonUpdate, 0, wxEXPAND, 5 ); + gSizer1->Add( m_buttonUpdate, 0, wxEXPAND, 5 ); - m_buttonCustom = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonCustom->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonCustom->SetToolTip( _("dummy") ); + m_buttonCustom = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("Custom"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCustom->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonCustom->SetToolTip( _("dummy") ); - gSizer1->Add( m_buttonCustom, 0, wxEXPAND, 5 ); + gSizer1->Add( m_buttonCustom, 0, wxEXPAND, 5 ); - bSizer235->Add( gSizer1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer235->Add( gSizer1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer237->Add( bSizer235, 0, wxALL, 5 ); + bSizer237->Add( bSizer235, 0, wxALL, 5 ); - bSizer237->Add( 10, 0, 0, 0, 5 ); + bSizer237->Add( 10, 0, 0, 0, 5 ); - wxBoxSizer* bSizer312; - bSizer312 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer312; + bSizer312 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer311; - bSizer311 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer311; + bSizer311 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapDatabase = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapDatabase->SetToolTip( _("sync.ffs_db") ); + m_bitmapDatabase = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapDatabase->SetToolTip( _("sync.ffs_db") ); - bSizer311->Add( m_bitmapDatabase, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer311->Add( m_bitmapDatabase, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxUseDatabase = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Use database file to detect changes"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer311->Add( m_checkBoxUseDatabase, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_checkBoxUseDatabase = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Use database file to detect changes"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer311->Add( m_checkBoxUseDatabase, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer312->Add( bSizer311, 0, wxTOP|wxRIGHT|wxLEFT, 10 ); + bSizer312->Add( bSizer311, 0, wxTOP|wxRIGHT|wxLEFT, 10 ); - bSizer312->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer312->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticTextSyncVarDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextSyncVarDescription->Wrap( -1 ); - m_staticTextSyncVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextSyncVarDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextSyncVarDescription->Wrap( -1 ); + m_staticTextSyncVarDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer312->Add( m_staticTextSyncVarDescription, 0, wxALL, 10 ); + bSizer312->Add( m_staticTextSyncVarDescription, 0, wxALL, 10 ); - bSizer312->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer312->Add( 0, 0, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizer310; - bSizer310 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer310; + bSizer310 = new wxBoxSizer( wxVERTICAL ); - m_staticline431 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer310->Add( m_staticline431, 0, wxEXPAND, 5 ); + m_staticline431 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer310->Add( m_staticline431, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer201; - bSizer201 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer201; + bSizer201 = new wxBoxSizer( wxHORIZONTAL ); - m_staticline72 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer201->Add( m_staticline72, 0, wxEXPAND, 5 ); + m_staticline72 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer201->Add( m_staticline72, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer3121; - bSizer3121 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer3121; + bSizer3121 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapMoveLeft = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapMoveLeft->SetToolTip( _("- Available not before the *second* synchronization\n- Not supported by all file systems") ); + m_bitmapMoveLeft = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapMoveLeft->SetToolTip( _("- Available not before the *second* synchronization\n- Not supported by all file systems") ); - bSizer3121->Add( m_bitmapMoveLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer3121->Add( m_bitmapMoveLeft, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapMoveRight = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapMoveRight->SetToolTip( _("- Available not before the *second* synchronization\n- Not supported by all file systems") ); + m_bitmapMoveRight = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapMoveRight->SetToolTip( _("- Available not before the *second* synchronization\n- Not supported by all file systems") ); - bSizer3121->Add( m_bitmapMoveRight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizer3121->Add( m_bitmapMoveRight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticTextDetectMove = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Detect moved files"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDetectMove->Wrap( -1 ); - m_staticTextDetectMove->SetToolTip( _("- Available not before the *second* synchronization\n- Not supported by all file systems") ); + m_staticTextDetectMove = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Detect moved files"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDetectMove->Wrap( -1 ); + m_staticTextDetectMove->SetToolTip( _("- Available not before the *second* synchronization\n- Not supported by all file systems") ); - bSizer3121->Add( m_staticTextDetectMove, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer3121->Add( m_staticTextDetectMove, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer201->Add( bSizer3121, 0, wxALL, 10 ); + bSizer201->Add( bSizer3121, 0, wxALL, 10 ); - m_hyperlink242 = new wxHyperlinkCtrl( m_panelSyncSettings, wxID_ANY, _("More information"), wxT("https://freefilesync.org/manual.php?topic=synchronization-settings"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink242->SetToolTip( _("https://freefilesync.org/manual.php?topic=synchronization-settings") ); + m_hyperlink242 = new wxHyperlinkCtrl( m_panelSyncSettings, wxID_ANY, _("More information"), wxT("https://freefilesync.org/manual.php?topic=synchronization-settings"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink242->SetToolTip( _("https://freefilesync.org/manual.php?topic=synchronization-settings") ); - bSizer201->Add( m_hyperlink242, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 ); + bSizer201->Add( m_hyperlink242, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 ); - m_staticline721 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer201->Add( m_staticline721, 0, wxEXPAND, 5 ); + m_staticline721 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer201->Add( m_staticline721, 0, wxEXPAND, 5 ); - bSizer310->Add( bSizer201, 0, 0, 5 ); + bSizer310->Add( bSizer201, 0, 0, 5 ); - bSizer312->Add( bSizer310, 0, 0, 5 ); + bSizer312->Add( bSizer310, 0, 0, 5 ); - bSizer237->Add( bSizer312, 0, wxEXPAND, 5 ); + bSizer237->Add( bSizer312, 0, wxEXPAND, 5 ); - bSizerSyncDirHolder = new wxBoxSizer( wxHORIZONTAL ); + bSizerSyncDirHolder = new wxBoxSizer( wxHORIZONTAL ); - bSizerSyncDirsDiff = new wxBoxSizer( wxVERTICAL ); + bSizerSyncDirsDiff = new wxBoxSizer( wxVERTICAL ); - m_staticText184 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Difference"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText184->Wrap( -1 ); - bSizerSyncDirsDiff->Add( m_staticText184, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticText184 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Difference"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText184->Wrap( -1 ); + bSizerSyncDirsDiff->Add( m_staticText184, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer11->SetFlexibleDirection( wxBOTH ); - ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer11->SetFlexibleDirection( wxBOTH ); + ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapLeftOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapLeftOnly->SetToolTip( _("Item exists on left side only") ); + m_bitmapLeftOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapLeftOnly->SetToolTip( _("Item exists on left side only") ); - ffgSizer11->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + ffgSizer11->Add( m_bitmapLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapLeftNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapLeftNewer->SetToolTip( _("Left side is newer") ); + m_bitmapLeftNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapLeftNewer->SetToolTip( _("Left side is newer") ); - ffgSizer11->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + ffgSizer11->Add( m_bitmapLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapDifferent = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapDifferent->SetToolTip( _("Items have different content") ); + m_bitmapDifferent = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapDifferent->SetToolTip( _("Items have different content") ); - ffgSizer11->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + ffgSizer11->Add( m_bitmapDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapRightNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapRightNewer->SetToolTip( _("Right side is newer") ); + m_bitmapRightNewer = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapRightNewer->SetToolTip( _("Right side is newer") ); - ffgSizer11->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + ffgSizer11->Add( m_bitmapRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapRightOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_bitmapRightOnly->SetToolTip( _("Item exists on right side only") ); + m_bitmapRightOnly = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_bitmapRightOnly->SetToolTip( _("Item exists on right side only") ); - ffgSizer11->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + ffgSizer11->Add( m_bitmapRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonLeftOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer11->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonLeftOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer11->Add( m_bpButtonLeftOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonLeftNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer11->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonLeftNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer11->Add( m_bpButtonLeftNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonDifferent = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer11->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonDifferent = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer11->Add( m_bpButtonDifferent, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonRightNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer11->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonRightNewer = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer11->Add( m_bpButtonRightNewer, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonRightOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer11->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonRightOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer11->Add( m_bpButtonRightOnly, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerSyncDirsDiff->Add( ffgSizer11, 0, 0, 5 ); + bSizerSyncDirsDiff->Add( ffgSizer11, 0, 0, 5 ); - m_staticText120 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText120->Wrap( -1 ); - bSizerSyncDirsDiff->Add( m_staticText120, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); + m_staticText120 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText120->Wrap( -1 ); + bSizerSyncDirsDiff->Add( m_staticText120, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP, 5 ); - bSizerSyncDirHolder->Add( bSizerSyncDirsDiff, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerSyncDirHolder->Add( bSizerSyncDirsDiff, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerSyncDirsChanges = new wxBoxSizer( wxVERTICAL ); + bSizerSyncDirsChanges = new wxBoxSizer( wxVERTICAL ); - ffgSizer111 = new wxFlexGridSizer( 0, 3, 5, 5 ); - ffgSizer111->SetFlexibleDirection( wxBOTH ); - ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer111 = new wxFlexGridSizer( 0, 3, 5, 5 ); + ffgSizer111->SetFlexibleDirection( wxBOTH ); + ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText12011 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Create:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12011->Wrap( -1 ); - ffgSizer111->Add( m_staticText12011, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + m_staticText12011 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Create:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12011->Wrap( -1 ); + ffgSizer111->Add( m_staticText12011, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); - m_bpButtonLeftCreate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer111->Add( m_bpButtonLeftCreate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonLeftCreate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer111->Add( m_bpButtonLeftCreate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonRightCreate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer111->Add( m_bpButtonRightCreate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonRightCreate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer111->Add( m_bpButtonRightCreate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText12012 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Update:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12012->Wrap( -1 ); - ffgSizer111->Add( m_staticText12012, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText12012 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Update:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12012->Wrap( -1 ); + ffgSizer111->Add( m_staticText12012, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonLeftUpdate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer111->Add( m_bpButtonLeftUpdate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonLeftUpdate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer111->Add( m_bpButtonLeftUpdate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonRightUpdate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer111->Add( m_bpButtonRightUpdate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonRightUpdate = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer111->Add( m_bpButtonRightUpdate, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText12013 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Delete:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12013->Wrap( -1 ); - ffgSizer111->Add( m_staticText12013, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + m_staticText12013 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Delete:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12013->Wrap( -1 ); + ffgSizer111->Add( m_staticText12013, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); - m_bpButtonLeftDelete = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer111->Add( m_bpButtonLeftDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonLeftDelete = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer111->Add( m_bpButtonLeftDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonRightDelete = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - ffgSizer111->Add( m_bpButtonRightDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonRightDelete = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + ffgSizer111->Add( m_bpButtonRightDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - ffgSizer111->Add( 0, 0, 0, 0, 5 ); + ffgSizer111->Add( 0, 0, 0, 0, 5 ); - m_staticText1201 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1201->Wrap( -1 ); - ffgSizer111->Add( m_staticText1201, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticText1201 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1201->Wrap( -1 ); + ffgSizer111->Add( m_staticText1201, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - m_staticText1202 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1202->Wrap( -1 ); - ffgSizer111->Add( m_staticText1202, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText1202 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1202->Wrap( -1 ); + ffgSizer111->Add( m_staticText1202, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerSyncDirsChanges->Add( ffgSizer111, 0, 0, 5 ); + bSizerSyncDirsChanges->Add( ffgSizer111, 0, 0, 5 ); - bSizerSyncDirHolder->Add( bSizerSyncDirsChanges, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerSyncDirHolder->Add( bSizerSyncDirsChanges, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer237->Add( bSizerSyncDirHolder, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizer237->Add( bSizerSyncDirHolder, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - bSizer237->Add( 0, 0, 1, 0, 5 ); + bSizer237->Add( 0, 0, 1, 0, 5 ); - bSizer232->Add( bSizer237, 0, wxEXPAND, 5 ); + bSizer232->Add( bSizer237, 0, wxEXPAND, 5 ); - m_staticline54 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer232->Add( m_staticline54, 0, wxEXPAND, 5 ); + m_staticline54 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer232->Add( m_staticline54, 0, wxEXPAND, 5 ); - bSizer2361 = new wxBoxSizer( wxHORIZONTAL ); + bSizer2361 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer202; - bSizer202 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer202; + bSizer202 = new wxBoxSizer( wxVERTICAL ); - m_staticText87 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Delete and overwrite:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText87->Wrap( -1 ); - bSizer202->Add( m_staticText87, 0, wxALL, 5 ); + m_staticText87 = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Delete and overwrite:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText87->Wrap( -1 ); + bSizer202->Add( m_staticText87, 0, wxALL, 5 ); - wxBoxSizer* bSizer234; - bSizer234 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer234; + bSizer234 = new wxBoxSizer( wxVERTICAL ); - m_buttonRecycler = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonRecycler->SetToolTip( _("dummy") ); + m_buttonRecycler = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonRecycler->SetToolTip( _("dummy") ); - bSizer234->Add( m_buttonRecycler, 0, wxEXPAND, 5 ); + bSizer234->Add( m_buttonRecycler, 0, wxEXPAND, 5 ); - m_buttonPermanent = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Permanent"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonPermanent->SetToolTip( _("dummy") ); + m_buttonPermanent = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Permanent"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonPermanent->SetToolTip( _("dummy") ); - bSizer234->Add( m_buttonPermanent, 0, wxEXPAND, 5 ); + bSizer234->Add( m_buttonPermanent, 0, wxEXPAND, 5 ); - m_buttonVersioning = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Versioning"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonVersioning->SetToolTip( _("dummy") ); + m_buttonVersioning = new zen::ToggleButton( m_panelSyncSettings, wxID_ANY, _("&Versioning"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonVersioning->SetToolTip( _("dummy") ); - bSizer234->Add( m_buttonVersioning, 0, wxEXPAND, 5 ); + bSizer234->Add( m_buttonVersioning, 0, wxEXPAND, 5 ); - bSizer202->Add( bSizer234, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer202->Add( bSizer234, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer2361->Add( bSizer202, 0, wxALL, 5 ); + bSizer2361->Add( bSizer202, 0, wxALL, 5 ); - bSizerVersioningHolder = new wxBoxSizer( wxVERTICAL ); + bSizerVersioningHolder = new wxBoxSizer( wxVERTICAL ); - bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizer2331; - bSizer2331 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2331; + bSizer2331 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapDeletionType = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2331->Add( m_bitmapDeletionType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_bitmapDeletionType = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2331->Add( m_bitmapDeletionType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticTextDeletionTypeDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDeletionTypeDescription->Wrap( -1 ); - m_staticTextDeletionTypeDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextDeletionTypeDescription = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeletionTypeDescription->Wrap( -1 ); + m_staticTextDeletionTypeDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer2331->Add( m_staticTextDeletionTypeDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizer2331->Add( m_staticTextDeletionTypeDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizerVersioningHolder->Add( bSizer2331, 0, wxALL|wxEXPAND, 5 ); + bSizerVersioningHolder->Add( bSizer2331, 0, wxALL|wxEXPAND, 5 ); - m_panelVersioning = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelVersioning->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelVersioning = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelVersioning->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer191; - bSizer191 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer191; + bSizer191 = new wxBoxSizer( wxVERTICAL ); - bSizer191->Add( 0, 5, 0, 0, 5 ); + bSizer191->Add( 0, 5, 0, 0, 5 ); - wxBoxSizer* bSizer252; - bSizer252 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer252; + bSizer252 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapVersioning = new wxStaticBitmap( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer252->Add( m_bitmapVersioning, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_bitmapVersioning = new wxStaticBitmap( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer252->Add( m_bitmapVersioning, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - wxBoxSizer* bSizer253; - bSizer253 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer253; + bSizer253 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer254; - bSizer254 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer254; + bSizer254 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText155 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Move files to a user-defined folder"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText155->Wrap( -1 ); - m_staticText155->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText155 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Move files to a user-defined folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText155->Wrap( -1 ); + m_staticText155->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer254->Add( m_staticText155, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizer254->Add( m_staticText155, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizer254->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer254->Add( 0, 0, 1, wxEXPAND, 5 ); - m_hyperlink243 = new wxHyperlinkCtrl( m_panelVersioning, wxID_ANY, _("Show examples"), wxT("https://freefilesync.org/manual.php?topic=versioning"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink243->SetToolTip( _("https://freefilesync.org/manual.php?topic=versioning") ); + m_hyperlink243 = new wxHyperlinkCtrl( m_panelVersioning, wxID_ANY, _("Show examples"), wxT("https://freefilesync.org/manual.php?topic=versioning"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink243->SetToolTip( _("https://freefilesync.org/manual.php?topic=versioning") ); - bSizer254->Add( m_hyperlink243, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + bSizer254->Add( m_hyperlink243, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - bSizer253->Add( bSizer254, 0, wxEXPAND|wxBOTTOM, 5 ); + bSizer253->Add( bSizer254, 0, wxEXPAND|wxBOTTOM, 5 ); - wxBoxSizer* bSizer156; - bSizer156 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer156; + bSizer156 = new wxBoxSizer( wxHORIZONTAL ); - m_versioningFolderPath = new fff::FolderHistoryBox( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer156->Add( m_versioningFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_versioningFolderPath = new fff::FolderHistoryBox( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer156->Add( m_versioningFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectVersioningFolder = new wxButton( m_panelVersioning, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectVersioningFolder->SetToolTip( _("Select a folder") ); + m_buttonSelectVersioningFolder = new wxButton( m_panelVersioning, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectVersioningFolder->SetToolTip( _("Select a folder") ); - bSizer156->Add( m_buttonSelectVersioningFolder, 0, wxEXPAND, 5 ); + bSizer156->Add( m_buttonSelectVersioningFolder, 0, wxEXPAND, 5 ); - m_bpButtonSelectVersioningAltFolder = new wxBitmapButton( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectVersioningAltFolder->SetToolTip( _("Access online storage") ); + m_bpButtonSelectVersioningAltFolder = new wxBitmapButton( m_panelVersioning, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectVersioningAltFolder->SetToolTip( _("Access online storage") ); - bSizer156->Add( m_bpButtonSelectVersioningAltFolder, 0, wxEXPAND, 5 ); + bSizer156->Add( m_bpButtonSelectVersioningAltFolder, 0, wxEXPAND, 5 ); - bSizer253->Add( bSizer156, 0, wxEXPAND, 5 ); + bSizer253->Add( bSizer156, 0, wxEXPAND, 5 ); - bSizer252->Add( bSizer253, 1, wxRIGHT, 5 ); + bSizer252->Add( bSizer253, 1, wxRIGHT, 5 ); - bSizer191->Add( bSizer252, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer191->Add( bSizer252, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer198; - bSizer198 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer198; + bSizer198 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer255; - bSizer255 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer255; + bSizer255 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer256; - bSizer256 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer256; + bSizer256 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText93 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Naming convention:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText93->Wrap( -1 ); - bSizer256->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticText93 = new wxStaticText( m_panelVersioning, wxID_ANY, _("Naming convention:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText93->Wrap( -1 ); + bSizer256->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - wxArrayString m_choiceVersioningStyleChoices; - m_choiceVersioningStyle = new wxChoice( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVersioningStyleChoices, 0 ); - m_choiceVersioningStyle->SetSelection( 0 ); - bSizer256->Add( m_choiceVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxArrayString m_choiceVersioningStyleChoices; + m_choiceVersioningStyle = new wxChoice( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVersioningStyleChoices, 0 ); + m_choiceVersioningStyle->SetSelection( 0 ); + bSizer256->Add( m_choiceVersioningStyle, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer255->Add( bSizer256, 0, wxALL, 5 ); + bSizer255->Add( bSizer256, 0, wxALL, 5 ); - wxBoxSizer* bSizer257; - bSizer257 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer257; + bSizer257 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextNamingCvtPart1 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNamingCvtPart1->Wrap( -1 ); - m_staticTextNamingCvtPart1->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextNamingCvtPart1 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextNamingCvtPart1->Wrap( -1 ); + m_staticTextNamingCvtPart1->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer257->Add( m_staticTextNamingCvtPart1, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer257->Add( m_staticTextNamingCvtPart1, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextNamingCvtPart2Bold = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNamingCvtPart2Bold->Wrap( -1 ); - m_staticTextNamingCvtPart2Bold->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_staticTextNamingCvtPart2Bold->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextNamingCvtPart2Bold = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextNamingCvtPart2Bold->Wrap( -1 ); + m_staticTextNamingCvtPart2Bold->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextNamingCvtPart2Bold->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer257->Add( m_staticTextNamingCvtPart2Bold, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer257->Add( m_staticTextNamingCvtPart2Bold, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextNamingCvtPart3 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNamingCvtPart3->Wrap( -1 ); - m_staticTextNamingCvtPart3->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextNamingCvtPart3 = new wxStaticText( m_panelVersioning, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextNamingCvtPart3->Wrap( -1 ); + m_staticTextNamingCvtPart3->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer257->Add( m_staticTextNamingCvtPart3, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer257->Add( m_staticTextNamingCvtPart3, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer255->Add( bSizer257, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer255->Add( bSizer257, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer198->Add( bSizer255, 0, wxALL, 5 ); + bSizer198->Add( bSizer255, 0, wxALL, 5 ); - m_staticline69 = new wxStaticLine( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer198->Add( m_staticline69, 0, wxEXPAND, 5 ); + m_staticline69 = new wxStaticLine( m_panelVersioning, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer198->Add( m_staticline69, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer258; - bSizer258 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer258; + bSizer258 = new wxBoxSizer( wxVERTICAL ); - m_staticTextLimitVersions = new wxStaticText( m_panelVersioning, wxID_ANY, _("Limit file versions:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextLimitVersions->Wrap( -1 ); - bSizer258->Add( m_staticTextLimitVersions, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticTextLimitVersions = new wxStaticText( m_panelVersioning, wxID_ANY, _("Limit file versions:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLimitVersions->Wrap( -1 ); + bSizer258->Add( m_staticTextLimitVersions, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - fgSizer15 = new wxFlexGridSizer( 0, 3, 5, 10 ); - fgSizer15->SetFlexibleDirection( wxBOTH ); - fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + fgSizer15 = new wxFlexGridSizer( 0, 3, 5, 10 ); + fgSizer15->SetFlexibleDirection( wxBOTH ); + fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_checkBoxVersionMaxDays = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Last x days:"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer15->Add( m_checkBoxVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_checkBoxVersionMaxDays = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Last x days:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer15->Add( m_checkBoxVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxVersionCountMin = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer15->Add( m_checkBoxVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_checkBoxVersionCountMin = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Minimum:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer15->Add( m_checkBoxVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxVersionCountMax = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer15->Add( m_checkBoxVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_checkBoxVersionCountMax = new wxCheckBox( m_panelVersioning, wxID_ANY, _("Maximum:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer15->Add( m_checkBoxVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_spinCtrlVersionMaxDays = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - fgSizer15->Add( m_spinCtrlVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlVersionMaxDays = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + fgSizer15->Add( m_spinCtrlVersionMaxDays, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_spinCtrlVersionCountMin = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - fgSizer15->Add( m_spinCtrlVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlVersionCountMin = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + fgSizer15->Add( m_spinCtrlVersionCountMin, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_spinCtrlVersionCountMax = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - fgSizer15->Add( m_spinCtrlVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlVersionCountMax = new wxSpinCtrl( m_panelVersioning, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + fgSizer15->Add( m_spinCtrlVersionCountMax, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer258->Add( fgSizer15, 0, wxALL, 5 ); + bSizer258->Add( fgSizer15, 0, wxALL, 5 ); - bSizer198->Add( bSizer258, 0, wxALL, 5 ); + bSizer198->Add( bSizer258, 0, wxALL, 5 ); - bSizer191->Add( bSizer198, 0, wxEXPAND, 5 ); + bSizer191->Add( bSizer198, 0, wxEXPAND, 5 ); - m_panelVersioning->SetSizer( bSizer191 ); - m_panelVersioning->Layout(); - bSizer191->Fit( m_panelVersioning ); - bSizerVersioningHolder->Add( m_panelVersioning, 0, wxEXPAND, 5 ); + m_panelVersioning->SetSizer( bSizer191 ); + m_panelVersioning->Layout(); + bSizer191->Fit( m_panelVersioning ); + bSizerVersioningHolder->Add( m_panelVersioning, 0, wxEXPAND, 5 ); - bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerVersioningHolder->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer2361->Add( bSizerVersioningHolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer2361->Add( bSizerVersioningHolder, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer232->Add( bSizer2361, 0, wxEXPAND, 5 ); + bSizer232->Add( bSizer2361, 0, wxEXPAND, 5 ); - m_staticline582 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer232->Add( m_staticline582, 0, wxEXPAND, 5 ); + m_staticline582 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer232->Add( m_staticline582, 0, wxEXPAND, 5 ); - bSizerSyncMisc = new wxBoxSizer( wxHORIZONTAL ); + bSizerSyncMisc = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer292; - bSizer292 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer292; + bSizer292 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer287; - bSizer287 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer287; + bSizer287 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer290; - bSizer290 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer290; + bSizer290 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer291; - bSizer291 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapEmail = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer291->Add( m_bitmapEmail, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapEmail = new wxStaticBitmap( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer291->Add( m_bitmapEmail, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxSendEmail = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Send email notification:"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer291->Add( m_checkBoxSendEmail, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_checkBoxSendEmail = new wxCheckBox( m_panelSyncSettings, wxID_ANY, _("Send email notification:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer291->Add( m_checkBoxSendEmail, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - bSizer290->Add( bSizer291, 0, 0, 5 ); + bSizer290->Add( bSizer291, 0, 0, 5 ); - m_comboBoxEmail = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer290->Add( m_comboBoxEmail, 0, wxEXPAND|wxTOP, 5 ); + m_comboBoxEmail = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer290->Add( m_comboBoxEmail, 0, wxEXPAND|wxTOP, 5 ); - bSizer287->Add( bSizer290, 1, wxRIGHT, 5 ); + bSizer287->Add( bSizer290, 1, wxRIGHT, 5 ); - wxBoxSizer* bSizer289; - bSizer289 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer289; + bSizer289 = new wxBoxSizer( wxVERTICAL ); - m_bpButtonEmailAlways = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer289->Add( m_bpButtonEmailAlways, 0, 0, 5 ); + m_bpButtonEmailAlways = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer289->Add( m_bpButtonEmailAlways, 0, 0, 5 ); - m_bpButtonEmailErrorWarning = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer289->Add( m_bpButtonEmailErrorWarning, 0, 0, 5 ); + m_bpButtonEmailErrorWarning = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer289->Add( m_bpButtonEmailErrorWarning, 0, 0, 5 ); - m_bpButtonEmailErrorOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer289->Add( m_bpButtonEmailErrorOnly, 0, 0, 5 ); + m_bpButtonEmailErrorOnly = new wxBitmapButton( m_panelSyncSettings, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer289->Add( m_bpButtonEmailErrorOnly, 0, 0, 5 ); - bSizer287->Add( bSizer289, 0, wxLEFT, 5 ); + bSizer287->Add( bSizer289, 0, wxLEFT, 5 ); - bSizer292->Add( bSizer287, 0, wxEXPAND, 5 ); + bSizer292->Add( bSizer287, 0, wxEXPAND, 5 ); - m_hyperlinkPerfDeRequired2 = new wxHyperlinkCtrl( m_panelSyncSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxT("https://freefilesync.org/faq.php#donation-edition"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlinkPerfDeRequired2->SetToolTip( _("https://freefilesync.org/faq.php#donation-edition") ); + m_hyperlinkPerfDeRequired2 = new wxHyperlinkCtrl( m_panelSyncSettings, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxT("https://freefilesync.org/faq.php#donation-edition"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlinkPerfDeRequired2->SetToolTip( _("https://freefilesync.org/faq.php#donation-edition") ); - bSizer292->Add( m_hyperlinkPerfDeRequired2, 0, wxALL, 5 ); + bSizer292->Add( m_hyperlinkPerfDeRequired2, 0, wxALL, 5 ); - bSizerSyncMisc->Add( bSizer292, 0, wxEXPAND|wxALL, 10 ); + bSizerSyncMisc->Add( bSizer292, 0, wxEXPAND|wxALL, 10 ); - m_staticline57 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizerSyncMisc->Add( m_staticline57, 0, wxEXPAND, 5 ); + m_staticline57 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizerSyncMisc->Add( m_staticline57, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer293; - bSizer293 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer293; + bSizer293 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer2372; - bSizer2372 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2372; + bSizer2372 = new wxBoxSizer( wxHORIZONTAL ); - m_panelLogfile = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelLogfile->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelLogfile = new wxPanel( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelLogfile->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer1912; - bSizer1912 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1912; + bSizer1912 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer279; - bSizer279 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer279; + bSizer279 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapLogFile = new wxStaticBitmap( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer279->Add( m_bitmapLogFile, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapLogFile = new wxStaticBitmap( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer279->Add( m_bitmapLogFile, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxOverrideLogPath = new wxCheckBox( m_panelLogfile, wxID_ANY, _("&Change log folder:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxOverrideLogPath->SetValue(true); - bSizer279->Add( m_checkBoxOverrideLogPath, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_checkBoxOverrideLogPath = new wxCheckBox( m_panelLogfile, wxID_ANY, _("&Change log folder:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxOverrideLogPath->SetValue(true); + bSizer279->Add( m_checkBoxOverrideLogPath, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - bSizer279->Add( 0, 0, 1, 0, 5 ); + bSizer279->Add( 0, 0, 1, 0, 5 ); - m_bpButtonShowLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonShowLogFolder->SetToolTip( _("dummy") ); + m_bpButtonShowLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonShowLogFolder->SetToolTip( _("dummy") ); - bSizer279->Add( m_bpButtonShowLogFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer279->Add( m_bpButtonShowLogFolder, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer1912->Add( bSizer279, 0, wxEXPAND, 5 ); + bSizer1912->Add( bSizer279, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer297; - bSizer297 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer297; + bSizer297 = new wxBoxSizer( wxHORIZONTAL ); - m_logFolderPath = new fff::FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer297->Add( m_logFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_logFolderPath = new fff::FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer297->Add( m_logFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectLogFolder = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectLogFolder->SetToolTip( _("Select a folder") ); + m_buttonSelectLogFolder = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectLogFolder->SetToolTip( _("Select a folder") ); - bSizer297->Add( m_buttonSelectLogFolder, 0, wxEXPAND, 5 ); + bSizer297->Add( m_buttonSelectLogFolder, 0, wxEXPAND, 5 ); - m_bpButtonSelectAltLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectAltLogFolder->SetToolTip( _("Access online storage") ); + m_bpButtonSelectAltLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectAltLogFolder->SetToolTip( _("Access online storage") ); - bSizer297->Add( m_bpButtonSelectAltLogFolder, 0, wxEXPAND, 5 ); + bSizer297->Add( m_bpButtonSelectAltLogFolder, 0, wxEXPAND, 5 ); - bSizer1912->Add( bSizer297, 0, wxEXPAND|wxTOP, 5 ); + bSizer1912->Add( bSizer297, 0, wxEXPAND|wxTOP, 5 ); - m_panelLogfile->SetSizer( bSizer1912 ); - m_panelLogfile->Layout(); - bSizer1912->Fit( m_panelLogfile ); - bSizer2372->Add( m_panelLogfile, 1, 0, 5 ); + m_panelLogfile->SetSizer( bSizer1912 ); + m_panelLogfile->Layout(); + bSizer1912->Fit( m_panelLogfile ); + bSizer2372->Add( m_panelLogfile, 1, 0, 5 ); - bSizer293->Add( bSizer2372, 0, wxALL|wxEXPAND, 10 ); + bSizer293->Add( bSizer2372, 0, wxALL|wxEXPAND, 10 ); - m_staticline80 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer293->Add( m_staticline80, 0, wxEXPAND, 5 ); + m_staticline80 = new wxStaticLine( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer293->Add( m_staticline80, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer247; - bSizer247 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer247; + bSizer247 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextPostSync = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Run a command:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPostSync->Wrap( -1 ); - bSizer247->Add( m_staticTextPostSync, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextPostSync = new wxStaticText( m_panelSyncSettings, wxID_ANY, _("Run a command:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPostSync->Wrap( -1 ); + bSizer247->Add( m_staticTextPostSync, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - wxArrayString m_choicePostSyncConditionChoices; - m_choicePostSyncCondition = new wxChoice( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncConditionChoices, 0 ); - m_choicePostSyncCondition->SetSelection( 0 ); - bSizer247->Add( m_choicePostSyncCondition, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxArrayString m_choicePostSyncConditionChoices; + m_choicePostSyncCondition = new wxChoice( m_panelSyncSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncConditionChoices, 0 ); + m_choicePostSyncCondition->SetSelection( 0 ); + bSizer247->Add( m_choicePostSyncCondition, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_comboBoxPostSyncCommand = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer247->Add( m_comboBoxPostSyncCommand, 1, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_comboBoxPostSyncCommand = new fff::CommandBox( m_panelSyncSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer247->Add( m_comboBoxPostSyncCommand, 1, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer293->Add( bSizer247, 0, wxALL|wxEXPAND, 10 ); + bSizer293->Add( bSizer247, 0, wxALL|wxEXPAND, 10 ); - bSizerSyncMisc->Add( bSizer293, 1, 0, 5 ); + bSizerSyncMisc->Add( bSizer293, 1, 0, 5 ); - bSizer232->Add( bSizerSyncMisc, 1, wxEXPAND, 5 ); + bSizer232->Add( bSizerSyncMisc, 1, wxEXPAND, 5 ); - m_panelSyncSettings->SetSizer( bSizer232 ); - m_panelSyncSettings->Layout(); - bSizer232->Fit( m_panelSyncSettings ); - bSizer276->Add( m_panelSyncSettings, 1, wxEXPAND, 5 ); + m_panelSyncSettings->SetSizer( bSizer232 ); + m_panelSyncSettings->Layout(); + bSizer232->Fit( m_panelSyncSettings ); + bSizer276->Add( m_panelSyncSettings, 1, wxEXPAND, 5 ); - m_panelSyncSettingsTab->SetSizer( bSizer276 ); - m_panelSyncSettingsTab->Layout(); - bSizer276->Fit( m_panelSyncSettingsTab ); - m_notebook->AddPage( m_panelSyncSettingsTab, _("dummy"), true ); + m_panelSyncSettingsTab->SetSizer( bSizer276 ); + m_panelSyncSettingsTab->Layout(); + bSizer276->Fit( m_panelSyncSettingsTab ); + m_notebook->AddPage( m_panelSyncSettingsTab, _("dummy"), true ); - bSizer190->Add( m_notebook, 1, wxEXPAND, 5 ); + bSizer190->Add( m_notebook, 1, wxEXPAND, 5 ); - bSizer7->Add( bSizer190, 1, wxEXPAND, 5 ); + bSizer7->Add( bSizer190, 1, wxEXPAND, 5 ); - m_panelNotes = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelNotes->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelNotes = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelNotes->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer3021; - bSizer3021 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer3021; + bSizer3021 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer17311; - bSizer17311 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer17311; + bSizer17311 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapNotes = new wxStaticBitmap( m_panelNotes, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer17311->Add( m_bitmapNotes, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapNotes = new wxStaticBitmap( m_panelNotes, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer17311->Add( m_bitmapNotes, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticText781 = new wxStaticText( m_panelNotes, wxID_ANY, _("Notes:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText781->Wrap( -1 ); - bSizer17311->Add( m_staticText781, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_staticText781 = new wxStaticText( m_panelNotes, wxID_ANY, _("Notes:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText781->Wrap( -1 ); + bSizer17311->Add( m_staticText781, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_textCtrNotes = new wxTextCtrl( m_panelNotes, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_MULTILINE ); - bSizer17311->Add( m_textCtrNotes, 1, wxEXPAND, 5 ); + m_textCtrNotes = new wxTextCtrl( m_panelNotes, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE ); + bSizer17311->Add( m_textCtrNotes, 1, wxEXPAND, 5 ); - bSizer3021->Add( bSizer17311, 1, wxEXPAND, 5 ); + bSizer3021->Add( bSizer17311, 1, wxEXPAND, 5 ); - m_staticline83 = new wxStaticLine( m_panelNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer3021->Add( m_staticline83, 0, wxEXPAND, 5 ); + m_staticline83 = new wxStaticLine( m_panelNotes, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer3021->Add( m_staticline83, 0, wxEXPAND, 5 ); - m_panelNotes->SetSizer( bSizer3021 ); - m_panelNotes->Layout(); - bSizer3021->Fit( m_panelNotes ); - bSizer7->Add( m_panelNotes, 0, wxEXPAND, 5 ); + m_panelNotes->SetSizer( bSizer3021 ); + m_panelNotes->Layout(); + bSizer3021->Fit( m_panelNotes ); + bSizer7->Add( m_panelNotes, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonAddNotes = new zen::BitmapTextButton( this, wxID_ANY, _("Add ¬es"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonAddNotes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonAddNotes = new zen::BitmapTextButton( this, wxID_ANY, _("Add ¬es"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonAddNotes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer7->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); + bSizer7->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); - this->SetSizer( bSizer7 ); - this->Layout(); - bSizer7->Fit( this ); + this->SetSizer( bSizer7 ); + this->Layout(); + bSizer7->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ConfigDlgGenerated::onClose ) ); - m_listBoxFolderPair->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( ConfigDlgGenerated::onListBoxKeyEvent ), NULL, this ); - m_listBoxFolderPair->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onSelectFolderPair ), NULL, this ); - m_checkBoxUseLocalCmpOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleLocalCompSettings ), NULL, this ); - m_buttonByTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCompByTimeSize ), NULL, this ); - m_buttonByTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onCompByTimeSizeDouble ), NULL, this ); - m_buttonByContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCompByContent ), NULL, this ); - m_buttonByContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onCompByContentDouble ), NULL, this ); - m_buttonBySize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCompBySize ), NULL, this ); - m_buttonBySize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onCompBySizeDouble ), NULL, this ); - m_checkBoxSymlinksInclude->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onChangeCompOption ), NULL, this ); - m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleIgnoreErrors ), NULL, this ); - m_checkBoxAutoRetry->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleAutoRetry ), NULL, this ); - m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); - m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); - m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); - m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); - m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); - m_buttonDefault->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onFilterDefault ), NULL, this ); - m_buttonDefault->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( ConfigDlgGenerated::onFilterDefaultContextMouse ), NULL, this ); - m_bpButtonDefaultContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onFilterDefaultContext ), NULL, this ); - m_bpButtonDefaultContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( ConfigDlgGenerated::onFilterDefaultContextMouse ), NULL, this ); - m_buttonClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onFilterClear ), NULL, this ); - m_checkBoxUseLocalSyncOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleLocalSyncSettings ), NULL, this ); - m_buttonTwoWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncTwoWay ), NULL, this ); - m_buttonTwoWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncTwoWayDouble ), NULL, this ); - m_buttonMirror->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncMirror ), NULL, this ); - m_buttonMirror->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncMirrorDouble ), NULL, this ); - m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncUpdate ), NULL, this ); - m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncUpdateDouble ), NULL, this ); - m_buttonCustom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncCustom ), NULL, this ); - m_buttonCustom->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncCustomDouble ), NULL, this ); - m_checkBoxUseDatabase->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleUseDatabase ), NULL, this ); - m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftOnly ), NULL, this ); - m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftNewer ), NULL, this ); - m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDifferent ), NULL, this ); - m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightNewer ), NULL, this ); - m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightOnly ), NULL, this ); - m_bpButtonLeftCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftCreate ), NULL, this ); - m_bpButtonRightCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightCreate ), NULL, this ); - m_bpButtonLeftUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftUpdate ), NULL, this ); - m_bpButtonRightUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightUpdate ), NULL, this ); - m_bpButtonLeftDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftDelete ), NULL, this ); - m_bpButtonRightDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightDelete ), NULL, this ); - m_buttonRecycler->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDeletionRecycler ), NULL, this ); - m_buttonPermanent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDeletionPermanent ), NULL, this ); - m_buttonVersioning->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDeletionVersioning ), NULL, this ); - m_choiceVersioningStyle->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChanegVersioningStyle ), NULL, this ); - m_checkBoxVersionMaxDays->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleVersioningLimit ), NULL, this ); - m_checkBoxVersionCountMin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleVersioningLimit ), NULL, this ); - m_checkBoxVersionCountMax->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleVersioningLimit ), NULL, this ); - m_checkBoxSendEmail->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleMiscEmail ), NULL, this ); - m_bpButtonEmailAlways->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onEmailAlways ), NULL, this ); - m_bpButtonEmailErrorWarning->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onEmailErrorWarning ), NULL, this ); - m_bpButtonEmailErrorOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onEmailErrorOnly ), NULL, this ); - m_checkBoxOverrideLogPath->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleMiscOption ), NULL, this ); - m_bpButtonShowLogFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onShowLogFolder ), NULL, this ); - m_buttonAddNotes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onAddNotes ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ConfigDlgGenerated::onClose ) ); + m_listBoxFolderPair->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( ConfigDlgGenerated::onListBoxKeyEvent ), NULL, this ); + m_listBoxFolderPair->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onSelectFolderPair ), NULL, this ); + m_checkBoxUseLocalCmpOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleLocalCompSettings ), NULL, this ); + m_buttonByTimeSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCompByTimeSize ), NULL, this ); + m_buttonByTimeSize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onCompByTimeSizeDouble ), NULL, this ); + m_buttonByContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCompByContent ), NULL, this ); + m_buttonByContent->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onCompByContentDouble ), NULL, this ); + m_buttonBySize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCompBySize ), NULL, this ); + m_buttonBySize->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onCompBySizeDouble ), NULL, this ); + m_checkBoxSymlinksInclude->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onChangeCompOption ), NULL, this ); + m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleIgnoreErrors ), NULL, this ); + m_checkBoxAutoRetry->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleAutoRetry ), NULL, this ); + m_textCtrlInclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); + m_textCtrlExclude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); + m_choiceUnitMinSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); + m_choiceUnitMaxSize->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); + m_choiceUnitTimespan->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChangeFilterOption ), NULL, this ); + m_buttonDefault->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onFilterDefault ), NULL, this ); + m_buttonDefault->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( ConfigDlgGenerated::onFilterDefaultContextMouse ), NULL, this ); + m_bpButtonDefaultContext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onFilterDefaultContext ), NULL, this ); + m_bpButtonDefaultContext->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( ConfigDlgGenerated::onFilterDefaultContextMouse ), NULL, this ); + m_buttonClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onFilterClear ), NULL, this ); + m_checkBoxUseLocalSyncOptions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleLocalSyncSettings ), NULL, this ); + m_buttonTwoWay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncTwoWay ), NULL, this ); + m_buttonTwoWay->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncTwoWayDouble ), NULL, this ); + m_buttonMirror->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncMirror ), NULL, this ); + m_buttonMirror->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncMirrorDouble ), NULL, this ); + m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncUpdate ), NULL, this ); + m_buttonUpdate->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncUpdateDouble ), NULL, this ); + m_buttonCustom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onSyncCustom ), NULL, this ); + m_buttonCustom->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigDlgGenerated::onSyncCustomDouble ), NULL, this ); + m_checkBoxUseDatabase->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleUseDatabase ), NULL, this ); + m_bpButtonLeftOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftOnly ), NULL, this ); + m_bpButtonLeftNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftNewer ), NULL, this ); + m_bpButtonDifferent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDifferent ), NULL, this ); + m_bpButtonRightNewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightNewer ), NULL, this ); + m_bpButtonRightOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightOnly ), NULL, this ); + m_bpButtonLeftCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftCreate ), NULL, this ); + m_bpButtonRightCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightCreate ), NULL, this ); + m_bpButtonLeftUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftUpdate ), NULL, this ); + m_bpButtonRightUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightUpdate ), NULL, this ); + m_bpButtonLeftDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onLeftDelete ), NULL, this ); + m_bpButtonRightDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onRightDelete ), NULL, this ); + m_buttonRecycler->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDeletionRecycler ), NULL, this ); + m_buttonPermanent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDeletionPermanent ), NULL, this ); + m_buttonVersioning->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onDeletionVersioning ), NULL, this ); + m_choiceVersioningStyle->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConfigDlgGenerated::onChangeVersioningStyle ), NULL, this ); + m_checkBoxVersionMaxDays->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleVersioningLimit ), NULL, this ); + m_checkBoxVersionCountMin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleVersioningLimit ), NULL, this ); + m_checkBoxVersionCountMax->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleVersioningLimit ), NULL, this ); + m_checkBoxSendEmail->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleMiscEmail ), NULL, this ); + m_bpButtonEmailAlways->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onEmailAlways ), NULL, this ); + m_bpButtonEmailErrorWarning->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onEmailErrorWarning ), NULL, this ); + m_bpButtonEmailErrorOnly->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onEmailErrorOnly ), NULL, this ); + m_checkBoxOverrideLogPath->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onToggleMiscOption ), NULL, this ); + m_bpButtonShowLogFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onShowLogFolder ), NULL, this ); + m_buttonAddNotes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onAddNotes ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigDlgGenerated::onCancel ), NULL, this ); } ConfigDlgGenerated::~ConfigDlgGenerated() @@ -2671,543 +2650,543 @@ ConfigDlgGenerated::~ConfigDlgGenerated() CloudSetupDlgGenerated::CloudSetupDlgGenerated( 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 ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapCloud = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer72->Add( m_bitmapCloud, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapCloud = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer72->Add( m_bitmapCloud, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - wxBoxSizer* bSizer272; - bSizer272 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer272; + bSizer272 = new wxBoxSizer( wxVERTICAL ); - m_staticText136 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText136->Wrap( -1 ); - bSizer272->Add( m_staticText136, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticText136 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText136->Wrap( -1 ); + bSizer272->Add( m_staticText136, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer231; - bSizer231 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer231; + bSizer231 = new wxBoxSizer( wxHORIZONTAL ); - m_toggleBtnGdrive = new wxToggleButton( this, wxID_ANY, _("Google Drive"), wxDefaultPosition, wxDefaultSize, 0 ); - m_toggleBtnGdrive->SetValue( true ); - m_toggleBtnGdrive->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_toggleBtnGdrive = new wxToggleButton( this, wxID_ANY, _("Google Drive"), wxDefaultPosition, wxDefaultSize, 0 ); + m_toggleBtnGdrive->SetValue( true ); + m_toggleBtnGdrive->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer231->Add( m_toggleBtnGdrive, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 ); + bSizer231->Add( m_toggleBtnGdrive, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 ); - m_toggleBtnSftp = new wxToggleButton( this, wxID_ANY, _("SFTP"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_toggleBtnSftp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_toggleBtnSftp = new wxToggleButton( this, wxID_ANY, _("SFTP"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_toggleBtnSftp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer231->Add( m_toggleBtnSftp, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 ); + bSizer231->Add( m_toggleBtnSftp, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 ); - m_toggleBtnFtp = new wxToggleButton( this, wxID_ANY, _("FTP"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_toggleBtnFtp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_toggleBtnFtp = new wxToggleButton( this, wxID_ANY, _("FTP"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_toggleBtnFtp->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer231->Add( m_toggleBtnFtp, 0, wxALL|wxEXPAND, 5 ); + bSizer231->Add( m_toggleBtnFtp, 0, wxALL|wxEXPAND, 5 ); - bSizer272->Add( bSizer231, 0, 0, 5 ); + bSizer272->Add( bSizer231, 0, 0, 5 ); - bSizer72->Add( bSizer272, 0, wxALL, 5 ); + bSizer72->Add( bSizer272, 0, wxALL, 5 ); - bSizer134->Add( bSizer72, 0, wxEXPAND, 5 ); + bSizer134->Add( bSizer72, 0, wxEXPAND, 5 ); - m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 ); + m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 ); - m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer185; - bSizer185 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer185; + bSizer185 = new wxBoxSizer( wxVERTICAL ); - bSizerGdrive = new wxBoxSizer( wxVERTICAL ); + bSizerGdrive = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer284; - bSizer284 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer284; + bSizer284 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer307; - bSizer307 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer307; + bSizer307 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer306; - bSizer306 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer306; + bSizer306 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapGdriveUser = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer306->Add( m_bitmapGdriveUser, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_bitmapGdriveUser = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer306->Add( m_bitmapGdriveUser, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticText166 = new wxStaticText( m_panel41, wxID_ANY, _("Connected user accounts:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText166->Wrap( -1 ); - bSizer306->Add( m_staticText166, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText166 = new wxStaticText( m_panel41, wxID_ANY, _("Connected user accounts:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText166->Wrap( -1 ); + bSizer306->Add( m_staticText166, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer307->Add( bSizer306, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer307->Add( bSizer306, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_listBoxGdriveUsers = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_SORT ); - bSizer307->Add( m_listBoxGdriveUsers, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_listBoxGdriveUsers = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE|wxLB_SORT ); + bSizer307->Add( m_listBoxGdriveUsers, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - wxBoxSizer* bSizer3002; - bSizer3002 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer3002; + bSizer3002 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonGdriveAddUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Add connection"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer3002->Add( m_buttonGdriveAddUser, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonGdriveAddUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Add connection"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer3002->Add( m_buttonGdriveAddUser, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonGdriveRemoveUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Disconnect"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer3002->Add( m_buttonGdriveRemoveUser, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_buttonGdriveRemoveUser = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("&Disconnect"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer3002->Add( m_buttonGdriveRemoveUser, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - bSizer307->Add( bSizer3002, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer307->Add( bSizer3002, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer284->Add( bSizer307, 0, wxALL|wxEXPAND, 5 ); + bSizer284->Add( bSizer307, 0, wxALL|wxEXPAND, 5 ); - m_staticline841 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer284->Add( m_staticline841, 0, wxEXPAND, 5 ); + m_staticline841 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer284->Add( m_staticline841, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer3041; - bSizer3041 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer3041; + bSizer3041 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer305; - bSizer305 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer305; + bSizer305 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapGdriveDrive = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer305->Add( m_bitmapGdriveDrive, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapGdriveDrive = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer305->Add( m_bitmapGdriveDrive, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText186 = new wxStaticText( m_panel41, wxID_ANY, _("Select drive:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText186->Wrap( -1 ); - bSizer305->Add( m_staticText186, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText186 = new wxStaticText( m_panel41, wxID_ANY, _("Select drive:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText186->Wrap( -1 ); + bSizer305->Add( m_staticText186, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer3041->Add( bSizer305, 0, wxALL, 5 ); + bSizer3041->Add( bSizer305, 0, wxALL, 5 ); - m_listBoxGdriveDrives = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE ); - bSizer3041->Add( m_listBoxGdriveDrives, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_listBoxGdriveDrives = new wxListBox( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE ); + bSizer3041->Add( m_listBoxGdriveDrives, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizer284->Add( bSizer3041, 1, wxALL|wxEXPAND, 5 ); + bSizer284->Add( bSizer3041, 1, wxALL|wxEXPAND, 5 ); - bSizerGdrive->Add( bSizer284, 1, wxEXPAND, 5 ); + bSizerGdrive->Add( bSizer284, 1, wxEXPAND, 5 ); - m_staticline73 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerGdrive->Add( m_staticline73, 0, wxEXPAND, 5 ); + m_staticline73 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerGdrive->Add( m_staticline73, 0, wxEXPAND, 5 ); - bSizer185->Add( bSizerGdrive, 1, wxEXPAND, 5 ); + bSizer185->Add( bSizerGdrive, 1, wxEXPAND, 5 ); - bSizerServer = new wxBoxSizer( wxVERTICAL ); + bSizerServer = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer276; - bSizer276 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer276; + bSizer276 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapServer = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer276->Add( m_bitmapServer, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapServer = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer276->Add( m_bitmapServer, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText12311 = new wxStaticText( m_panel41, wxID_ANY, _("Server name or IP address:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12311->Wrap( -1 ); - bSizer276->Add( m_staticText12311, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_staticText12311 = new wxStaticText( m_panel41, wxID_ANY, _("Server name or IP address:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12311->Wrap( -1 ); + bSizer276->Add( m_staticText12311, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_textCtrlServer = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer276->Add( m_textCtrlServer, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_textCtrlServer = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer276->Add( m_textCtrlServer, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText1233 = new wxStaticText( m_panel41, wxID_ANY, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1233->Wrap( -1 ); - bSizer276->Add( m_staticText1233, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_staticText1233 = new wxStaticText( m_panel41, wxID_ANY, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1233->Wrap( -1 ); + bSizer276->Add( m_staticText1233, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_textCtrlPort = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer276->Add( m_textCtrlPort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_textCtrlPort = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer276->Add( m_textCtrlPort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerServer->Add( bSizer276, 0, wxALL|wxEXPAND, 5 ); + bSizerServer->Add( bSizer276, 0, wxALL|wxEXPAND, 5 ); - m_staticline58 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerServer->Add( m_staticline58, 0, wxEXPAND, 5 ); + m_staticline58 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerServer->Add( m_staticline58, 0, wxEXPAND, 5 ); - bSizer185->Add( bSizerServer, 0, wxEXPAND, 5 ); + bSizer185->Add( bSizerServer, 0, wxEXPAND, 5 ); - bSizerAuth = new wxBoxSizer( wxVERTICAL ); + bSizerAuth = new wxBoxSizer( wxVERTICAL ); - bSizerAuthInner = new wxBoxSizer( wxHORIZONTAL ); + bSizerAuthInner = new wxBoxSizer( wxHORIZONTAL ); - bSizerFtpEncrypt = new wxBoxSizer( wxHORIZONTAL ); + bSizerFtpEncrypt = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer2181; - bSizer2181 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer2181; + bSizer2181 = new wxBoxSizer( wxVERTICAL ); - m_staticText1251 = new wxStaticText( m_panel41, wxID_ANY, _("Encryption:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1251->Wrap( -1 ); - bSizer2181->Add( m_staticText1251, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticText1251 = new wxStaticText( m_panel41, wxID_ANY, _("Encryption:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1251->Wrap( -1 ); + bSizer2181->Add( m_staticText1251, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_radioBtnEncryptNone = new wxRadioButton( m_panel41, wxID_ANY, _("&Disabled"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnEncryptNone->SetValue( true ); - bSizer2181->Add( m_radioBtnEncryptNone, 0, wxEXPAND|wxALL, 5 ); + m_radioBtnEncryptNone = new wxRadioButton( m_panel41, wxID_ANY, _("&Disabled"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnEncryptNone->SetValue( true ); + bSizer2181->Add( m_radioBtnEncryptNone, 0, wxEXPAND|wxALL, 5 ); - m_radioBtnEncryptSsl = new wxRadioButton( m_panel41, wxID_ANY, _("&Explicit SSL/TLS"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2181->Add( m_radioBtnEncryptSsl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_radioBtnEncryptSsl = new wxRadioButton( m_panel41, wxID_ANY, _("&Explicit SSL/TLS"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2181->Add( m_radioBtnEncryptSsl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizerFtpEncrypt->Add( bSizer2181, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerFtpEncrypt->Add( bSizer2181, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticline5721 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizerFtpEncrypt->Add( m_staticline5721, 0, wxEXPAND, 5 ); + m_staticline5721 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizerFtpEncrypt->Add( m_staticline5721, 0, wxEXPAND, 5 ); - bSizerAuthInner->Add( bSizerFtpEncrypt, 0, wxEXPAND, 5 ); + bSizerAuthInner->Add( bSizerFtpEncrypt, 0, wxEXPAND, 5 ); - bSizerSftpAuth = new wxBoxSizer( wxHORIZONTAL ); + bSizerSftpAuth = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer218; - bSizer218 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer218; + bSizer218 = new wxBoxSizer( wxVERTICAL ); - m_staticText125 = new wxStaticText( m_panel41, wxID_ANY, _("Authentication:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText125->Wrap( -1 ); - bSizer218->Add( m_staticText125, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticText125 = new wxStaticText( m_panel41, wxID_ANY, _("Authentication:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText125->Wrap( -1 ); + bSizer218->Add( m_staticText125, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_radioBtnPassword = new wxRadioButton( m_panel41, wxID_ANY, _("&Password"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnPassword->SetValue( true ); - bSizer218->Add( m_radioBtnPassword, 0, wxEXPAND|wxALL, 5 ); + m_radioBtnPassword = new wxRadioButton( m_panel41, wxID_ANY, _("&Password"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnPassword->SetValue( true ); + bSizer218->Add( m_radioBtnPassword, 0, wxEXPAND|wxALL, 5 ); - m_radioBtnKeyfile = new wxRadioButton( m_panel41, wxID_ANY, _("&Key file"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer218->Add( m_radioBtnKeyfile, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_radioBtnKeyfile = new wxRadioButton( m_panel41, wxID_ANY, _("&Key file"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer218->Add( m_radioBtnKeyfile, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_radioBtnAgent = new wxRadioButton( m_panel41, wxID_ANY, _("&SSH agent"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer218->Add( m_radioBtnAgent, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_radioBtnAgent = new wxRadioButton( m_panel41, wxID_ANY, _("&SSH agent"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer218->Add( m_radioBtnAgent, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bSizerSftpAuth->Add( bSizer218, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerSftpAuth->Add( bSizer218, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticline572 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizerSftpAuth->Add( m_staticline572, 0, wxEXPAND, 5 ); + m_staticline572 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizerSftpAuth->Add( m_staticline572, 0, wxEXPAND, 5 ); - bSizerAuthInner->Add( bSizerSftpAuth, 0, wxEXPAND, 5 ); + bSizerAuthInner->Add( bSizerSftpAuth, 0, wxEXPAND, 5 ); - m_panelAuth = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelAuth->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelAuth = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelAuth->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer221; - bSizer221 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer221; + bSizer221 = new wxBoxSizer( wxVERTICAL ); - wxFlexGridSizer* fgSizer161; - fgSizer161 = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer161->AddGrowableCol( 1 ); - fgSizer161->SetFlexibleDirection( wxBOTH ); - fgSizer161->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + wxFlexGridSizer* fgSizer161; + fgSizer161 = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizer161->AddGrowableCol( 1 ); + fgSizer161->SetFlexibleDirection( wxBOTH ); + fgSizer161->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText123 = new wxStaticText( m_panelAuth, wxID_ANY, _("Username:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText123->Wrap( -1 ); - fgSizer161->Add( m_staticText123, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText123 = new wxStaticText( m_panelAuth, wxID_ANY, _("Username:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText123->Wrap( -1 ); + fgSizer161->Add( m_staticText123, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlUserName = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer161->Add( m_textCtrlUserName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + m_textCtrlUserName = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer161->Add( m_textCtrlUserName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextKeyfile = new wxStaticText( m_panelAuth, wxID_ANY, _("Private key file:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextKeyfile->Wrap( -1 ); - fgSizer161->Add( m_staticTextKeyfile, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + m_staticTextKeyfile = new wxStaticText( m_panelAuth, wxID_ANY, _("Private key file:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextKeyfile->Wrap( -1 ); + fgSizer161->Add( m_staticTextKeyfile, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); - bSizerKeyFile = new wxBoxSizer( wxHORIZONTAL ); + bSizerKeyFile = new wxBoxSizer( wxHORIZONTAL ); - m_textCtrlKeyfilePath = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerKeyFile->Add( m_textCtrlKeyfilePath, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_textCtrlKeyfilePath = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerKeyFile->Add( m_textCtrlKeyfilePath, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectKeyfile = new wxButton( m_panelAuth, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectKeyfile->SetToolTip( _("Select a folder") ); + m_buttonSelectKeyfile = new wxButton( m_panelAuth, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectKeyfile->SetToolTip( _("Select a folder") ); - bSizerKeyFile->Add( m_buttonSelectKeyfile, 0, wxEXPAND, 5 ); + bSizerKeyFile->Add( m_buttonSelectKeyfile, 0, wxEXPAND, 5 ); - fgSizer161->Add( bSizerKeyFile, 0, wxALL|wxEXPAND, 5 ); + fgSizer161->Add( bSizerKeyFile, 0, wxALL|wxEXPAND, 5 ); - m_staticTextPassword = new wxStaticText( m_panelAuth, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPassword->Wrap( -1 ); - fgSizer161->Add( m_staticTextPassword, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_staticTextPassword = new wxStaticText( m_panelAuth, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPassword->Wrap( -1 ); + fgSizer161->Add( m_staticTextPassword, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - bSizerPassword = new wxBoxSizer( wxHORIZONTAL ); + bSizerPassword = new wxBoxSizer( wxHORIZONTAL ); - m_textCtrlPasswordVisible = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerPassword->Add( m_textCtrlPasswordVisible, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_textCtrlPasswordVisible = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerPassword->Add( m_textCtrlPasswordVisible, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_textCtrlPasswordHidden = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD ); - bSizerPassword->Add( m_textCtrlPasswordHidden, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_textCtrlPasswordHidden = new wxTextCtrl( m_panelAuth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD ); + bSizerPassword->Add( m_textCtrlPasswordHidden, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_checkBoxShowPassword = new wxCheckBox( m_panelAuth, wxID_ANY, _("&Show password"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerPassword->Add( m_checkBoxShowPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_checkBoxShowPassword = new wxCheckBox( m_panelAuth, wxID_ANY, _("&Show password"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerPassword->Add( m_checkBoxShowPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_checkBoxPasswordPrompt = new wxCheckBox( m_panelAuth, wxID_ANY, _("Prompt during login"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerPassword->Add( m_checkBoxPasswordPrompt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_checkBoxPasswordPrompt = new wxCheckBox( m_panelAuth, wxID_ANY, _("Prompt during login"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerPassword->Add( m_checkBoxPasswordPrompt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer161->Add( bSizerPassword, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + fgSizer161->Add( bSizerPassword, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - bSizer221->Add( fgSizer161, 0, wxALL|wxEXPAND, 5 ); + bSizer221->Add( fgSizer161, 0, wxALL|wxEXPAND, 5 ); - m_panelAuth->SetSizer( bSizer221 ); - m_panelAuth->Layout(); - bSizer221->Fit( m_panelAuth ); - bSizerAuthInner->Add( m_panelAuth, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_panelAuth->SetSizer( bSizer221 ); + m_panelAuth->Layout(); + bSizer221->Fit( m_panelAuth ); + bSizerAuthInner->Add( m_panelAuth, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerAuth->Add( bSizerAuthInner, 0, wxEXPAND, 5 ); + bSizerAuth->Add( bSizerAuthInner, 0, wxEXPAND, 5 ); - m_staticline581 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerAuth->Add( m_staticline581, 0, wxEXPAND, 5 ); + m_staticline581 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerAuth->Add( m_staticline581, 0, wxEXPAND, 5 ); - bSizer185->Add( bSizerAuth, 0, wxEXPAND, 5 ); + bSizer185->Add( bSizerAuth, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer269; - bSizer269 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer269; + bSizer269 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer3051; - bSizer3051 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer3051; + bSizer3051 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer270; - bSizer270 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer270; + bSizer270 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapServerDir = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer270->Add( m_bitmapServerDir, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapServerDir = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer270->Add( m_bitmapServerDir, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText1232 = new wxStaticText( m_panel41, wxID_ANY, _("Directory on server:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1232->Wrap( -1 ); - bSizer270->Add( m_staticText1232, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText1232 = new wxStaticText( m_panel41, wxID_ANY, _("Directory on server:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1232->Wrap( -1 ); + bSizer270->Add( m_staticText1232, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer3051->Add( bSizer270, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_BOTTOM, 5 ); + bSizer3051->Add( bSizer270, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_BOTTOM, 5 ); - bSizer3051->Add( 0, 0, 1, 0, 5 ); + bSizer3051->Add( 0, 0, 1, 0, 5 ); - wxBoxSizer* bSizer3031; - bSizer3031 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer3031; + bSizer3031 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer303; - bSizer303 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer303; + bSizer303 = new wxBoxSizer( wxHORIZONTAL ); - m_staticline83 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer303->Add( m_staticline83, 0, wxEXPAND, 5 ); + m_staticline83 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer303->Add( m_staticline83, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer3042; - bSizer3042 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer3042; + bSizer3042 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextTimeout = new wxStaticText( m_panel41, wxID_ANY, _("Access timeout (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeout->Wrap( -1 ); - bSizer3042->Add( m_staticTextTimeout, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_staticTextTimeout = new wxStaticText( m_panel41, wxID_ANY, _("Access timeout (in seconds):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeout->Wrap( -1 ); + bSizer3042->Add( m_staticTextTimeout, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_spinCtrlTimeout = new wxSpinCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - bSizer3042->Add( m_spinCtrlTimeout, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlTimeout = new wxSpinCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + bSizer3042->Add( m_spinCtrlTimeout, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer303->Add( bSizer3042, 0, wxALL, 5 ); + bSizer303->Add( bSizer3042, 0, wxALL, 5 ); - bSizer3031->Add( bSizer303, 0, wxALIGN_RIGHT, 5 ); + bSizer3031->Add( bSizer303, 0, wxALIGN_RIGHT, 5 ); - m_staticline82 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer3031->Add( m_staticline82, 0, wxEXPAND, 5 ); + m_staticline82 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer3031->Add( m_staticline82, 0, wxEXPAND, 5 ); - bSizer3051->Add( bSizer3031, 0, wxBOTTOM, 10 ); + bSizer3051->Add( bSizer3031, 0, wxBOTTOM, 10 ); - bSizer269->Add( bSizer3051, 0, wxEXPAND, 5 ); + bSizer269->Add( bSizer3051, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer217; - bSizer217 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer217; + bSizer217 = new wxBoxSizer( wxHORIZONTAL ); - m_textCtrlServerPath = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer217->Add( m_textCtrlServerPath, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_textCtrlServerPath = new wxTextCtrl( m_panel41, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer217->Add( m_textCtrlServerPath, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_buttonSelectFolder = new wxButton( m_panel41, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectFolder->SetToolTip( _("Select a folder") ); + m_buttonSelectFolder = new wxButton( m_panel41, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectFolder->SetToolTip( _("Select a folder") ); - bSizer217->Add( m_buttonSelectFolder, 0, wxRIGHT|wxEXPAND, 5 ); + bSizer217->Add( m_buttonSelectFolder, 0, wxRIGHT|wxEXPAND, 5 ); - bSizer269->Add( bSizer217, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); + bSizer269->Add( bSizer217, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizer269->Add( 0, 10, 0, 0, 5 ); + bSizer269->Add( 0, 10, 0, 0, 5 ); - bSizer185->Add( bSizer269, 0, wxEXPAND, 5 ); + bSizer185->Add( bSizer269, 0, wxEXPAND, 5 ); - m_panel41->SetSizer( bSizer185 ); - m_panel41->Layout(); - bSizer185->Fit( m_panel41 ); - bSizer134->Add( m_panel41, 1, wxEXPAND, 5 ); + m_panel41->SetSizer( bSizer185 ); + m_panel41->Layout(); + bSizer185->Fit( m_panel41 ); + bSizer134->Add( m_panel41, 1, wxEXPAND, 5 ); - m_staticline571 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline571, 0, wxEXPAND, 5 ); + m_staticline571 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline571, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer219; - bSizer219 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer219; + bSizer219 = new wxBoxSizer( wxHORIZONTAL ); - bSizer219->Add( 5, 0, 0, 0, 5 ); + bSizer219->Add( 5, 0, 0, 0, 5 ); - m_bitmapPerf = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer219->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_bitmapPerf = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer219->Add( m_bitmapPerf, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticText1361 = new wxStaticText( this, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1361->Wrap( -1 ); - bSizer219->Add( m_staticText1361, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + m_staticText1361 = new wxStaticText( this, wxID_ANY, _("Performance improvements:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1361->Wrap( -1 ); + bSizer219->Add( m_staticText1361, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - bSizer219->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer219->Add( 0, 0, 1, wxEXPAND, 5 ); - m_hyperlink171 = new wxHyperlinkCtrl( this, wxID_ANY, _("How to get the best performance?"), wxT("https://freefilesync.org/manual.php?topic=ftp-setup"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink171->SetToolTip( _("https://freefilesync.org/manual.php?topic=ftp-setup") ); + m_hyperlink171 = new wxHyperlinkCtrl( this, wxID_ANY, _("How to get the best performance?"), wxT("https://freefilesync.org/manual.php?topic=ftp-setup"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink171->SetToolTip( _("https://freefilesync.org/manual.php?topic=ftp-setup") ); - bSizer219->Add( m_hyperlink171, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 ); + bSizer219->Add( m_hyperlink171, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10 ); - bSizer134->Add( bSizer219, 0, wxEXPAND, 5 ); + bSizer134->Add( bSizer219, 0, wxEXPAND, 5 ); - m_staticline57 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline57, 0, wxEXPAND, 5 ); + m_staticline57 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline57, 0, wxEXPAND, 5 ); - m_panel411 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel411->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel411 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel411->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer1851; - bSizer1851 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1851; + bSizer1851 = new wxBoxSizer( wxVERTICAL ); - wxFlexGridSizer* fgSizer1611; - fgSizer1611 = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer1611->AddGrowableCol( 1 ); - fgSizer1611->SetFlexibleDirection( wxBOTH ); - fgSizer1611->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + wxFlexGridSizer* fgSizer1611; + fgSizer1611 = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizer1611->AddGrowableCol( 1 ); + fgSizer1611->SetFlexibleDirection( wxBOTH ); + fgSizer1611->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - bSizerConnectionsLabel = new wxBoxSizer( wxVERTICAL ); + bSizerConnectionsLabel = new wxBoxSizer( wxVERTICAL ); - m_staticTextConnectionsLabel = new wxStaticText( m_panel411, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextConnectionsLabel->Wrap( -1 ); - bSizerConnectionsLabel->Add( m_staticTextConnectionsLabel, 0, 0, 5 ); + m_staticTextConnectionsLabel = new wxStaticText( m_panel411, wxID_ANY, _("Parallel file operations:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextConnectionsLabel->Wrap( -1 ); + bSizerConnectionsLabel->Add( m_staticTextConnectionsLabel, 0, 0, 5 ); - m_staticTextConnectionsLabelSub = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextConnectionsLabelSub->Wrap( -1 ); - bSizerConnectionsLabel->Add( m_staticTextConnectionsLabelSub, 0, wxALIGN_RIGHT, 5 ); + m_staticTextConnectionsLabelSub = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextConnectionsLabelSub->Wrap( -1 ); + bSizerConnectionsLabel->Add( m_staticTextConnectionsLabelSub, 0, wxALIGN_RIGHT, 5 ); - fgSizer1611->Add( bSizerConnectionsLabel, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer1611->Add( bSizerConnectionsLabel, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer300; - bSizer300 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer300; + bSizer300 = new wxBoxSizer( wxHORIZONTAL ); - m_spinCtrlConnectionCount = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - bSizer300->Add( m_spinCtrlConnectionCount, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlConnectionCount = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + bSizer300->Add( m_spinCtrlConnectionCount, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextConnectionCountDescr = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextConnectionCountDescr->Wrap( -1 ); - m_staticTextConnectionCountDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextConnectionCountDescr = new wxStaticText( m_panel411, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextConnectionCountDescr->Wrap( -1 ); + m_staticTextConnectionCountDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer300->Add( m_staticTextConnectionCountDescr, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizer300->Add( m_staticTextConnectionCountDescr, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_hyperlinkDeRequired = new wxHyperlinkCtrl( m_panel411, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxT("https://freefilesync.org/faq.php#donation-edition"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlinkDeRequired->SetToolTip( _("https://freefilesync.org/faq.php#donation-edition") ); + m_hyperlinkDeRequired = new wxHyperlinkCtrl( m_panel411, wxID_ANY, _("Requires FreeFileSync Donation Edition"), wxT("https://freefilesync.org/faq.php#donation-edition"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlinkDeRequired->SetToolTip( _("https://freefilesync.org/faq.php#donation-edition") ); - bSizer300->Add( m_hyperlinkDeRequired, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer300->Add( m_hyperlinkDeRequired, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer1611->Add( bSizer300, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer1611->Add( bSizer300, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextChannelCountSftp = new wxStaticText( m_panel411, wxID_ANY, _("SFTP channels per connection:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextChannelCountSftp->Wrap( -1 ); - fgSizer1611->Add( m_staticTextChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_staticTextChannelCountSftp = new wxStaticText( m_panel411, wxID_ANY, _("SFTP channels per connection:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextChannelCountSftp->Wrap( -1 ); + fgSizer1611->Add( m_staticTextChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); - wxBoxSizer* bSizer3001; - bSizer3001 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer3001; + bSizer3001 = new wxBoxSizer( wxHORIZONTAL ); - m_spinCtrlChannelCountSftp = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - bSizer3001->Add( m_spinCtrlChannelCountSftp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_spinCtrlChannelCountSftp = new wxSpinCtrl( m_panel411, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + bSizer3001->Add( m_spinCtrlChannelCountSftp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonChannelCountSftp = new wxButton( m_panel411, wxID_ANY, _("Detect server limit"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3001->Add( m_buttonChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_buttonChannelCountSftp = new wxButton( m_panel411, wxID_ANY, _("Detect server limit"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3001->Add( m_buttonChannelCountSftp, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - fgSizer1611->Add( bSizer3001, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer1611->Add( bSizer3001, 0, wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer1611->Add( 0, 0, 0, 0, 5 ); + fgSizer1611->Add( 0, 0, 0, 0, 5 ); - wxBoxSizer* bSizer304; - bSizer304 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer304; + bSizer304 = new wxBoxSizer( wxHORIZONTAL ); - m_checkBoxAllowZlib = new wxCheckBox( m_panel411, wxID_ANY, _("Enable &compression"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer304->Add( m_checkBoxAllowZlib, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_checkBoxAllowZlib = new wxCheckBox( m_panel411, wxID_ANY, _("Enable &compression"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer304->Add( m_checkBoxAllowZlib, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticTextZlibDescr = new wxStaticText( m_panel411, wxID_ANY, _("(zlib)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextZlibDescr->Wrap( -1 ); - m_staticTextZlibDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextZlibDescr = new wxStaticText( m_panel411, wxID_ANY, _("(zlib)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextZlibDescr->Wrap( -1 ); + m_staticTextZlibDescr->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer304->Add( m_staticTextZlibDescr, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizer304->Add( m_staticTextZlibDescr, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - fgSizer1611->Add( bSizer304, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer1611->Add( bSizer304, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer1851->Add( fgSizer1611, 0, wxALL, 5 ); + bSizer1851->Add( fgSizer1611, 0, wxALL, 5 ); - m_panel411->SetSizer( bSizer1851 ); - m_panel411->Layout(); - bSizer1851->Fit( m_panel411 ); - bSizer134->Add( m_panel411, 0, wxEXPAND, 5 ); + m_panel411->SetSizer( bSizer1851 ); + m_panel411->Layout(); + bSizer1851->Fit( m_panel411 ); + bSizer134->Add( m_panel411, 0, wxEXPAND, 5 ); - m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 ); + m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer134 ); - this->Layout(); - bSizer134->Fit( this ); + this->SetSizer( bSizer134 ); + this->Layout(); + bSizer134->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CloudSetupDlgGenerated::onClose ) ); - m_toggleBtnGdrive->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onConnectionGdrive ), NULL, this ); - m_toggleBtnSftp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onConnectionSftp ), NULL, this ); - m_toggleBtnFtp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onConnectionFtp ), NULL, this ); - m_listBoxGdriveUsers->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onGdriveUserSelect ), NULL, this ); - m_buttonGdriveAddUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onGdriveUserAdd ), NULL, this ); - m_buttonGdriveRemoveUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onGdriveUserRemove ), NULL, this ); - m_radioBtnPassword->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onAuthPassword ), NULL, this ); - m_radioBtnKeyfile->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onAuthKeyfile ), NULL, this ); - m_radioBtnAgent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onAuthAgent ), NULL, this ); - m_buttonSelectKeyfile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onSelectKeyfile ), NULL, this ); - m_textCtrlPasswordVisible->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CloudSetupDlgGenerated::onTypingPassword ), NULL, this ); - m_textCtrlPasswordHidden->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CloudSetupDlgGenerated::onTypingPassword ), NULL, this ); - m_checkBoxShowPassword->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onToggleShowPassword ), NULL, this ); - m_checkBoxPasswordPrompt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onTogglePasswordPrompt ), NULL, this ); - m_buttonSelectFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onBrowseCloudFolder ), NULL, this ); - m_buttonChannelCountSftp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onDetectServerChannelLimit ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CloudSetupDlgGenerated::onClose ) ); + m_toggleBtnGdrive->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onConnectionGdrive ), NULL, this ); + m_toggleBtnSftp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onConnectionSftp ), NULL, this ); + m_toggleBtnFtp->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onConnectionFtp ), NULL, this ); + m_listBoxGdriveUsers->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onGdriveUserSelect ), NULL, this ); + m_buttonGdriveAddUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onGdriveUserAdd ), NULL, this ); + m_buttonGdriveRemoveUser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onGdriveUserRemove ), NULL, this ); + m_radioBtnPassword->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onAuthPassword ), NULL, this ); + m_radioBtnKeyfile->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onAuthKeyfile ), NULL, this ); + m_radioBtnAgent->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( CloudSetupDlgGenerated::onAuthAgent ), NULL, this ); + m_buttonSelectKeyfile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onSelectKeyfile ), NULL, this ); + m_textCtrlPasswordVisible->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CloudSetupDlgGenerated::onTypingPassword ), NULL, this ); + m_textCtrlPasswordHidden->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CloudSetupDlgGenerated::onTypingPassword ), NULL, this ); + m_checkBoxShowPassword->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onToggleShowPassword ), NULL, this ); + m_checkBoxPasswordPrompt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onTogglePasswordPrompt ), NULL, this ); + m_buttonSelectFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onBrowseCloudFolder ), NULL, this ); + m_buttonChannelCountSftp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onDetectServerChannelLimit ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CloudSetupDlgGenerated::onCancel ), NULL, this ); } CloudSetupDlgGenerated::~CloudSetupDlgGenerated() @@ -3216,61 +3195,61 @@ CloudSetupDlgGenerated::~CloudSetupDlgGenerated() AbstractFolderPickerGenerated::AbstractFolderPickerGenerated( 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 ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxVERTICAL ); - m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer185; - bSizer185 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer185; + bSizer185 = new wxBoxSizer( wxVERTICAL ); - m_staticTextStatus = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatus->Wrap( -1 ); - bSizer185->Add( m_staticTextStatus, 0, wxALL, 5 ); + m_staticTextStatus = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatus->Wrap( -1 ); + bSizer185->Add( m_staticTextStatus, 0, wxALL, 5 ); - m_treeCtrlFileSystem = new wxTreeCtrl( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), wxTR_FULL_ROW_HIGHLIGHT|wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxTR_NO_LINES|wxBORDER_NONE ); - bSizer185->Add( m_treeCtrlFileSystem, 1, wxEXPAND, 5 ); + m_treeCtrlFileSystem = new wxTreeCtrl( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTR_FULL_ROW_HIGHLIGHT|wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxTR_NO_LINES|wxBORDER_NONE ); + bSizer185->Add( m_treeCtrlFileSystem, 1, wxEXPAND, 5 ); - m_panel41->SetSizer( bSizer185 ); - m_panel41->Layout(); - bSizer185->Fit( m_panel41 ); - bSizer134->Add( m_panel41, 1, wxEXPAND, 5 ); + m_panel41->SetSizer( bSizer185 ); + m_panel41->Layout(); + bSizer185->Fit( m_panel41 ); + bSizer134->Add( m_panel41, 1, wxEXPAND, 5 ); - m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 ); + m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOkay = new wxButton( this, wxID_OK, _("Select Folder"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOkay = new wxButton( this, wxID_OK, _("Select Folder"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStdButtons->Add( m_buttonOkay, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer134->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer134 ); - this->Layout(); - bSizer134->Fit( this ); + this->SetSizer( bSizer134 ); + this->Layout(); + bSizer134->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AbstractFolderPickerGenerated::onClose ) ); - m_treeCtrlFileSystem->Connect( wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEventHandler( AbstractFolderPickerGenerated::onExpandNode ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AbstractFolderPickerGenerated::onClose ) ); + m_treeCtrlFileSystem->Connect( wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEventHandler( AbstractFolderPickerGenerated::onExpandNode ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AbstractFolderPickerGenerated::onCancel ), NULL, this ); } AbstractFolderPickerGenerated::~AbstractFolderPickerGenerated() @@ -3279,225 +3258,225 @@ AbstractFolderPickerGenerated::~AbstractFolderPickerGenerated() SyncConfirmationDlgGenerated::SyncConfirmationDlgGenerated( 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 ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer134; - bSizer134 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer134; + bSizer134 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapSync = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer72->Add( m_bitmapSync, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapSync = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer72->Add( m_bitmapSync, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticTextCaption = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCaption->Wrap( -1 ); - bSizer72->Add( m_staticTextCaption, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_staticTextCaption = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCaption->Wrap( -1 ); + bSizer72->Add( m_staticTextCaption, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - bSizer134->Add( bSizer72, 0, 0, 5 ); + bSizer134->Add( bSizer72, 0, 0, 5 ); - m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 ); + m_staticline371 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline371, 0, wxEXPAND, 5 ); - m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelStatistics = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelStatistics->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer185; - bSizer185 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer185; + bSizer185 = new wxBoxSizer( wxHORIZONTAL ); - bSizer185->Add( 40, 0, 0, 0, 5 ); + bSizer185->Add( 40, 0, 0, 0, 5 ); - bSizer185->Add( 0, 0, 1, 0, 5 ); + bSizer185->Add( 0, 0, 1, 0, 5 ); - m_staticline38 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer185->Add( m_staticline38, 0, wxEXPAND, 5 ); + m_staticline38 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer185->Add( m_staticline38, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer162; - bSizer162 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer162; + bSizer162 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer182; - bSizer182 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer182; + bSizer182 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText84 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Variant:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText84->Wrap( -1 ); - bSizer182->Add( m_staticText84, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_staticText84 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Variant:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText84->Wrap( -1 ); + bSizer182->Add( m_staticText84, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - bSizer182->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer182->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticTextSyncVar = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSyncVar->Wrap( -1 ); - m_staticTextSyncVar->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextSyncVar = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSyncVar->Wrap( -1 ); + m_staticTextSyncVar->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer182->Add( m_staticTextSyncVar, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizer182->Add( m_staticTextSyncVar, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_bitmapSyncVar = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer182->Add( m_bitmapSyncVar, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_bitmapSyncVar = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer182->Add( m_bitmapSyncVar, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer182->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer182->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer162->Add( bSizer182, 0, wxALL|wxEXPAND, 5 ); + bSizer162->Add( bSizer182, 0, wxALL|wxEXPAND, 5 ); - m_staticline14 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer162->Add( m_staticline14, 0, wxEXPAND, 5 ); + m_staticline14 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer162->Add( m_staticline14, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer181; - bSizer181 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxVERTICAL ); - m_staticText83 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText83->Wrap( -1 ); - bSizer181->Add( m_staticText83, 0, wxALL, 5 ); + m_staticText83 = new wxStaticText( m_panelStatistics, wxID_ANY, _("Statistics:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText83->Wrap( -1 ); + bSizer181->Add( m_staticText83, 0, wxALL, 5 ); - wxFlexGridSizer* fgSizer11; - fgSizer11 = new wxFlexGridSizer( 2, 7, 2, 10 ); - fgSizer11->SetFlexibleDirection( wxBOTH ); - fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + wxFlexGridSizer* fgSizer11; + fgSizer11 = new wxFlexGridSizer( 2, 7, 2, 10 ); + fgSizer11->SetFlexibleDirection( wxBOTH ); + fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapDeleteLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); + m_bitmapDeleteLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - fgSizer11->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_bitmapDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") ); + m_bitmapUpdateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateLeft->SetToolTip( _("Number of files that will be updated") ); - fgSizer11->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_bitmapUpdateLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapCreateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); + m_bitmapCreateLeft = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - fgSizer11->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_bitmapCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapData->SetToolTip( _("Total bytes to copy") ); + m_bitmapData = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapData->SetToolTip( _("Total bytes to copy") ); - fgSizer11->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_bitmapData, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bitmapCreateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") ); + m_bitmapCreateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - fgSizer11->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_bitmapCreateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") ); + m_bitmapUpdateRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapUpdateRight->SetToolTip( _("Number of files that will be updated") ); - fgSizer11->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_bitmapUpdateRight, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bitmapDeleteRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); + m_bitmapDeleteRight = new wxStaticBitmap( m_panelStatistics, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmapDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); - fgSizer11->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_bitmapDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextDeleteLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDeleteLeft->Wrap( -1 ); - m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); + m_staticTextDeleteLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteLeft->Wrap( -1 ); + m_staticTextDeleteLeft->SetToolTip( _("Number of files and folders that will be deleted") ); - fgSizer11->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_staticTextDeleteLeft, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextUpdateLeft->Wrap( -1 ); - m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") ); + m_staticTextUpdateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateLeft->Wrap( -1 ); + m_staticTextUpdateLeft->SetToolTip( _("Number of files that will be updated") ); - fgSizer11->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_staticTextUpdateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_staticTextCreateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCreateLeft->Wrap( -1 ); - m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); + m_staticTextCreateLeft = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateLeft->Wrap( -1 ); + m_staticTextCreateLeft->SetToolTip( _("Number of files and folders that will be created") ); - fgSizer11->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + fgSizer11->Add( m_staticTextCreateLeft, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_staticTextData = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextData->Wrap( -1 ); - m_staticTextData->SetToolTip( _("Total bytes to copy") ); + m_staticTextData = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextData->Wrap( -1 ); + m_staticTextData->SetToolTip( _("Total bytes to copy") ); - fgSizer11->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_staticTextData, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextCreateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCreateRight->Wrap( -1 ); - m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") ); + m_staticTextCreateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextCreateRight->Wrap( -1 ); + m_staticTextCreateRight->SetToolTip( _("Number of files and folders that will be created") ); - fgSizer11->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_staticTextCreateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextUpdateRight->Wrap( -1 ); - m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") ); + m_staticTextUpdateRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextUpdateRight->Wrap( -1 ); + m_staticTextUpdateRight->SetToolTip( _("Number of files that will be updated") ); - fgSizer11->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_staticTextUpdateRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextDeleteRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDeleteRight->Wrap( -1 ); - m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); + m_staticTextDeleteRight = new wxStaticText( m_panelStatistics, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDeleteRight->Wrap( -1 ); + m_staticTextDeleteRight->SetToolTip( _("Number of files and folders that will be deleted") ); - fgSizer11->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer11->Add( m_staticTextDeleteRight, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer181->Add( fgSizer11, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + bSizer181->Add( fgSizer11, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizer162->Add( bSizer181, 0, wxEXPAND|wxALL, 5 ); + bSizer162->Add( bSizer181, 0, wxEXPAND|wxALL, 5 ); - bSizer185->Add( bSizer162, 0, 0, 5 ); + bSizer185->Add( bSizer162, 0, 0, 5 ); - m_staticline381 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer185->Add( m_staticline381, 0, wxEXPAND, 5 ); + m_staticline381 = new wxStaticLine( m_panelStatistics, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer185->Add( m_staticline381, 0, wxEXPAND, 5 ); - bSizer185->Add( 0, 0, 1, 0, 5 ); + bSizer185->Add( 0, 0, 1, 0, 5 ); - bSizer185->Add( 40, 0, 0, 0, 5 ); + bSizer185->Add( 40, 0, 0, 0, 5 ); - m_panelStatistics->SetSizer( bSizer185 ); - m_panelStatistics->Layout(); - bSizer185->Fit( m_panelStatistics ); - bSizer134->Add( m_panelStatistics, 0, wxEXPAND, 5 ); + m_panelStatistics->SetSizer( bSizer185 ); + m_panelStatistics->Layout(); + bSizer185->Fit( m_panelStatistics ); + bSizer134->Add( m_panelStatistics, 0, wxEXPAND, 5 ); - m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 ); + m_staticline12 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer134->Add( m_staticline12, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer164; - bSizer164 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer164; + bSizer164 = new wxBoxSizer( wxVERTICAL ); - m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer164->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer164->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonStartSync = new wxButton( this, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonStartSync = new wxButton( this, wxID_OK, _("Start"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonStartSync->SetDefault(); - m_buttonStartSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonStartSync->SetDefault(); + m_buttonStartSync->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizerStdButtons->Add( m_buttonStartSync, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - bSizer164->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer164->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - bSizer134->Add( bSizer164, 1, wxEXPAND, 5 ); + bSizer134->Add( bSizer164, 1, wxEXPAND, 5 ); - this->SetSizer( bSizer134 ); - this->Layout(); - bSizer134->Fit( this ); + this->SetSizer( bSizer134 ); + this->Layout(); + bSizer134->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncConfirmationDlgGenerated::onClose ) ); - m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::onStartSync ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SyncConfirmationDlgGenerated::onClose ) ); + m_buttonStartSync->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::onStartSync ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SyncConfirmationDlgGenerated::onCancel ), NULL, this ); } SyncConfirmationDlgGenerated::~SyncConfirmationDlgGenerated() @@ -3506,251 +3485,251 @@ SyncConfirmationDlgGenerated::~SyncConfirmationDlgGenerated() CompareProgressDlgGenerated::CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) { - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer1811; - bSizer1811 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer1811; + bSizer1811 = new wxBoxSizer( wxVERTICAL ); - bSizer1811->Add( 0, 0, 1, 0, 5 ); + bSizer1811->Add( 0, 0, 1, 0, 5 ); - m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatus->Wrap( -1 ); - bSizer1811->Add( m_staticTextStatus, 0, wxTOP|wxRIGHT|wxLEFT, 10 ); + m_staticTextStatus = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatus->Wrap( -1 ); + bSizer1811->Add( m_staticTextStatus, 0, wxTOP|wxRIGHT|wxLEFT, 10 ); - wxBoxSizer* bSizer199; - bSizer199 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer199; + bSizer199 = new wxBoxSizer( wxHORIZONTAL ); - bSizer199->Add( 10, 0, 0, 0, 5 ); + bSizer199->Add( 10, 0, 0, 0, 5 ); - ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer11->SetFlexibleDirection( wxBOTH ); - ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer11->SetFlexibleDirection( wxBOTH ); + ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextProcessed = new wxStaticText( this, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextProcessed->Wrap( -1 ); - ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); + m_staticTextProcessed = new wxStaticText( this, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextProcessed->Wrap( -1 ); + ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); - m_staticTextRemaining = new wxStaticText( this, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRemaining->Wrap( -1 ); - ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticTextRemaining = new wxStaticText( this, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRemaining->Wrap( -1 ); + ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizer199->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); + bSizer199->Add( ffgSizer11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); - m_panelItemStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panelItemStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer291; - bSizer291 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 ); - ffgSizer111->SetFlexibleDirection( wxBOTH ); - ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer111 = new wxFlexGridSizer( 0, 2, 5, 5 ); + ffgSizer111->SetFlexibleDirection( wxBOTH ); + ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxBoxSizer* bSizer293; - bSizer293 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer293; + bSizer293 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextItemsProcessed->Wrap( -1 ); - m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextItemsProcessed->Wrap( -1 ); + m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_BOTTOM, 5 ); + bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_BOTTOM, 5 ); - ffgSizer111->Add( bSizer293, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); + ffgSizer111->Add( bSizer293, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); - m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextBytesProcessed->Wrap( -1 ); - ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBytesProcessed->Wrap( -1 ); + ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextItemsRemaining->Wrap( -1 ); - m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextItemsRemaining->Wrap( -1 ); + m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextBytesRemaining->Wrap( -1 ); - ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBytesRemaining->Wrap( -1 ); + ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - bSizer291->Add( ffgSizer111, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer291->Add( ffgSizer111, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelItemStats->SetSizer( bSizer291 ); - m_panelItemStats->Layout(); - bSizer291->Fit( m_panelItemStats ); - bSizer199->Add( m_panelItemStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); + m_panelItemStats->SetSizer( bSizer291 ); + m_panelItemStats->Layout(); + bSizer291->Fit( m_panelItemStats ); + bSizer199->Add( m_panelItemStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); - m_panelTimeStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panelTimeStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer292; - bSizer292 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer292; + bSizer292 = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 ); - ffgSizer112->SetFlexibleDirection( wxBOTH ); - ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer112 = new wxFlexGridSizer( 0, 1, 5, 5 ); + ffgSizer112->SetFlexibleDirection( wxBOTH ); + ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxBoxSizer* bSizer294; - bSizer294 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer294; + bSizer294 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); + bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); - ffgSizer112->Add( bSizer294, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); + ffgSizer112->Add( bSizer294, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); - m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemaining->Wrap( -1 ); - m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemaining->Wrap( -1 ); + m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - bSizer292->Add( ffgSizer112, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer292->Add( ffgSizer112, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelTimeStats->SetSizer( bSizer292 ); - m_panelTimeStats->Layout(); - bSizer292->Fit( m_panelTimeStats ); - bSizer199->Add( m_panelTimeStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); + m_panelTimeStats->SetSizer( bSizer292 ); + m_panelTimeStats->Layout(); + bSizer292->Fit( m_panelTimeStats ); + bSizer199->Add( m_panelTimeStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); - ffgSizer114 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer114->SetFlexibleDirection( wxBOTH ); - ffgSizer114->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer114 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer114->SetFlexibleDirection( wxBOTH ); + ffgSizer114->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextErrors = new wxStaticText( this, wxID_ANY, _("Errors:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextErrors->Wrap( -1 ); - ffgSizer114->Add( m_staticTextErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); + m_staticTextErrors = new wxStaticText( this, wxID_ANY, _("Errors:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextErrors->Wrap( -1 ); + ffgSizer114->Add( m_staticTextErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); - m_staticTextWarnings = new wxStaticText( this, wxID_ANY, _("Warnings:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextWarnings->Wrap( -1 ); - ffgSizer114->Add( m_staticTextWarnings, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticTextWarnings = new wxStaticText( this, wxID_ANY, _("Warnings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextWarnings->Wrap( -1 ); + ffgSizer114->Add( m_staticTextWarnings, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizer199->Add( ffgSizer114, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); + bSizer199->Add( ffgSizer114, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); - m_panelErrorStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelErrorStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panelErrorStats = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelErrorStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer2921; - bSizer2921 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2921; + bSizer2921 = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer1121 = new wxFlexGridSizer( 0, 2, 5, 5 ); - ffgSizer1121->SetFlexibleDirection( wxBOTH ); - ffgSizer1121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer1121 = new wxFlexGridSizer( 0, 2, 5, 5 ); + ffgSizer1121->SetFlexibleDirection( wxBOTH ); + ffgSizer1121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapErrors = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer1121->Add( m_bitmapErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapErrors = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer1121->Add( m_bitmapErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextErrorCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextErrorCount->Wrap( -1 ); - m_staticTextErrorCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextErrorCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextErrorCount->Wrap( -1 ); + m_staticTextErrorCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer1121->Add( m_staticTextErrorCount, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + ffgSizer1121->Add( m_staticTextErrorCount, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - m_bitmapWarnings = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer1121->Add( m_bitmapWarnings, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapWarnings = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer1121->Add( m_bitmapWarnings, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextWarningCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextWarningCount->Wrap( -1 ); - m_staticTextWarningCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextWarningCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextWarningCount->Wrap( -1 ); + m_staticTextWarningCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer1121->Add( m_staticTextWarningCount, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT, 5 ); + ffgSizer1121->Add( m_staticTextWarningCount, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT, 5 ); - bSizer2921->Add( ffgSizer1121, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer2921->Add( ffgSizer1121, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelErrorStats->SetSizer( bSizer2921 ); - m_panelErrorStats->Layout(); - bSizer2921->Fit( m_panelErrorStats ); - bSizer199->Add( m_panelErrorStats, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + m_panelErrorStats->SetSizer( bSizer2921 ); + m_panelErrorStats->Layout(); + bSizer2921->Fit( m_panelErrorStats ); + bSizer199->Add( m_panelErrorStats, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - ffgSizer1141 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer1141->SetFlexibleDirection( wxBOTH ); - ffgSizer1141->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer1141 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer1141->SetFlexibleDirection( wxBOTH ); + ffgSizer1141->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL ); + bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapRetryErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapRetryErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText1461 = new wxStaticText( this, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1461->Wrap( -1 ); - bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticText1461 = new wxStaticText( this, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1461->Wrap( -1 ); + bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticTextRetryCount = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRetryCount->Wrap( -1 ); - bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticTextRetryCount = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRetryCount->Wrap( -1 ); + bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - ffgSizer1141->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL, 10 ); + ffgSizer1141->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL, 10 ); - bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL ); + bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapIgnoreErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapIgnoreErrors = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText146 = new wxStaticText( this, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText146->Wrap( -1 ); - bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticText146 = new wxStaticText( this, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText146->Wrap( -1 ); + bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - ffgSizer1141->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL, 10 ); + ffgSizer1141->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL, 10 ); - bSizer199->Add( ffgSizer1141, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + bSizer199->Add( ffgSizer1141, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - bSizerProgressGraph = new wxBoxSizer( wxHORIZONTAL ); + bSizerProgressGraph = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer113 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer113->SetFlexibleDirection( wxBOTH ); - ffgSizer113->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer113 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer113->SetFlexibleDirection( wxBOTH ); + ffgSizer113->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxStaticText* m_staticText99; - m_staticText99 = new wxStaticText( this, wxID_ANY, _("Bytes:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText99->Wrap( -1 ); - ffgSizer113->Add( m_staticText99, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + wxStaticText* m_staticText99; + m_staticText99 = new wxStaticText( this, wxID_ANY, _("Bytes:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText99->Wrap( -1 ); + ffgSizer113->Add( m_staticText99, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - wxStaticText* m_staticText100; - m_staticText100 = new wxStaticText( this, wxID_ANY, _("Items:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText100->Wrap( -1 ); - ffgSizer113->Add( m_staticText100, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + wxStaticText* m_staticText100; + m_staticText100 = new wxStaticText( this, wxID_ANY, _("Items:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText100->Wrap( -1 ); + ffgSizer113->Add( m_staticText100, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizerProgressGraph->Add( ffgSizer113, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizerProgressGraph->Add( ffgSizer113, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_panelProgressGraph = new zen::Graph2D( this, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_panelProgressGraph->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panelProgressGraph = new zen::Graph2D( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_panelProgressGraph->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - bSizerProgressGraph->Add( m_panelProgressGraph, 1, wxEXPAND, 5 ); + bSizerProgressGraph->Add( m_panelProgressGraph, 1, wxEXPAND, 5 ); - bSizer199->Add( bSizerProgressGraph, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + bSizer199->Add( bSizerProgressGraph, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 10 ); - bSizer1811->Add( bSizer199, 0, wxEXPAND, 5 ); + bSizer1811->Add( bSizer199, 0, wxEXPAND, 5 ); - bSizer1811->Add( 0, 0, 1, 0, 5 ); + bSizer1811->Add( 0, 0, 1, 0, 5 ); - this->SetSizer( bSizer1811 ); - this->Layout(); - bSizer1811->Fit( this ); + this->SetSizer( bSizer1811 ); + this->Layout(); + bSizer1811->Fit( this ); } CompareProgressDlgGenerated::~CompareProgressDlgGenerated() @@ -3759,396 +3738,396 @@ CompareProgressDlgGenerated::~CompareProgressDlgGenerated() SyncProgressPanelGenerated::SyncProgressPanelGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) { - bSizerRoot = new wxBoxSizer( wxVERTICAL ); + bSizerRoot = new wxBoxSizer( wxVERTICAL ); - m_panel53 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel53->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel53 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel53->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer301; - bSizer301 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer301; + bSizer301 = new wxBoxSizer( wxVERTICAL ); - bSizer42 = new wxBoxSizer( wxHORIZONTAL ); + bSizer42 = new wxBoxSizer( wxHORIZONTAL ); - bSizer42->Add( 0, 0, 1, 0, 5 ); + bSizer42->Add( 0, 0, 1, 0, 5 ); - m_bitmapStatus = new wxStaticBitmap( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapStatus = new wxStaticBitmap( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer42->Add( m_bitmapStatus, 0, wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer305; - bSizer305 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer305; + bSizer305 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextPhase = new wxStaticText( m_panel53, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPhase->Wrap( -1 ); - m_staticTextPhase->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextPhase = new wxStaticText( m_panel53, wxID_ANY, _("Synchronizing..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPhase->Wrap( -1 ); + m_staticTextPhase->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer305->Add( m_staticTextPhase, 0, wxALIGN_BOTTOM, 5 ); + bSizer305->Add( m_staticTextPhase, 0, wxALIGN_BOTTOM, 5 ); - m_staticTextPercentTotal = new wxStaticText( m_panel53, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPercentTotal->Wrap( -1 ); - bSizer305->Add( m_staticTextPercentTotal, 0, wxALIGN_BOTTOM, 5 ); + m_staticTextPercentTotal = new wxStaticText( m_panel53, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPercentTotal->Wrap( -1 ); + bSizer305->Add( m_staticTextPercentTotal, 0, wxALIGN_BOTTOM, 5 ); - bSizer42->Add( bSizer305, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + bSizer42->Add( bSizer305, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - wxBoxSizer* bSizer247; - bSizer247 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer247; + bSizer247 = new wxBoxSizer( wxHORIZONTAL ); - bSizer247->Add( 0, 0, 1, 0, 5 ); + bSizer247->Add( 0, 0, 1, 0, 5 ); - m_bpButtonMinimizeToTray = new wxBitmapButton( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonMinimizeToTray->SetToolTip( _("Minimize to notification area") ); + m_bpButtonMinimizeToTray = new wxBitmapButton( m_panel53, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonMinimizeToTray->SetToolTip( _("Minimize to notification area") ); - bSizer247->Add( m_bpButtonMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer247->Add( m_bpButtonMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer42->Add( bSizer247, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer42->Add( bSizer247, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer301->Add( bSizer42, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + bSizer301->Add( bSizer42, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - bSizerStatusText = new wxBoxSizer( wxVERTICAL ); + bSizerStatusText = new wxBoxSizer( wxVERTICAL ); - m_staticTextStatus = new wxStaticText( m_panel53, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStatus->Wrap( -1 ); - bSizerStatusText->Add( m_staticTextStatus, 0, wxEXPAND|wxLEFT, 15 ); + m_staticTextStatus = new wxStaticText( m_panel53, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStatus->Wrap( -1 ); + bSizerStatusText->Add( m_staticTextStatus, 0, wxEXPAND|wxLEFT, 15 ); - bSizerStatusText->Add( 0, 10, 0, 0, 5 ); + bSizerStatusText->Add( 0, 10, 0, 0, 5 ); - bSizer301->Add( bSizerStatusText, 0, wxEXPAND, 5 ); + bSizer301->Add( bSizerStatusText, 0, wxEXPAND, 5 ); - m_panel53->SetSizer( bSizer301 ); - m_panel53->Layout(); - bSizer301->Fit( m_panel53 ); - bSizerRoot->Add( m_panel53, 0, wxEXPAND, 5 ); + m_panel53->SetSizer( bSizer301 ); + m_panel53->Layout(); + bSizer301->Fit( m_panel53 ); + bSizerRoot->Add( m_panel53, 0, wxEXPAND, 5 ); - m_panelProgress = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelProgress->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelProgress = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelProgress->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer173; - bSizer173 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer173; + bSizer173 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer161; - bSizer161 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer161; + bSizer161 = new wxBoxSizer( wxVERTICAL ); - m_panelGraphBytes = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_panelGraphBytes->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelGraphBytes = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_panelGraphBytes->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - bSizer161->Add( m_panelGraphBytes, 1, wxEXPAND|wxLEFT, 10 ); + bSizer161->Add( m_panelGraphBytes, 1, wxEXPAND|wxLEFT, 10 ); - wxBoxSizer* bSizer232; - bSizer232 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer232; + bSizer232 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer233; - bSizer233 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer233; + bSizer233 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer175; - bSizer175 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer175; + bSizer175 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapGraphKeyBytes = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer175->Add( m_bitmapGraphKeyBytes, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_bitmapGraphKeyBytes = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer175->Add( m_bitmapGraphKeyBytes, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - wxStaticText* m_staticText99; - m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _("Bytes"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText99->Wrap( -1 ); - bSizer175->Add( m_staticText99, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxStaticText* m_staticText99; + m_staticText99 = new wxStaticText( m_panelProgress, wxID_ANY, _("Bytes"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText99->Wrap( -1 ); + bSizer175->Add( m_staticText99, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer233->Add( bSizer175, 0, wxALL, 5 ); + bSizer233->Add( bSizer175, 0, wxALL, 5 ); - bSizer233->Add( 0, 0, 1, 0, 5 ); + bSizer233->Add( 0, 0, 1, 0, 5 ); - wxBoxSizer* bSizer174; - bSizer174 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer174; + bSizer174 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapGraphKeyItems = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer174->Add( m_bitmapGraphKeyItems, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_bitmapGraphKeyItems = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer174->Add( m_bitmapGraphKeyItems, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - wxStaticText* m_staticText100; - m_staticText100 = new wxStaticText( m_panelProgress, wxID_ANY, _("Items"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText100->Wrap( -1 ); - bSizer174->Add( m_staticText100, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxStaticText* m_staticText100; + m_staticText100 = new wxStaticText( m_panelProgress, wxID_ANY, _("Items"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText100->Wrap( -1 ); + bSizer174->Add( m_staticText100, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer233->Add( bSizer174, 0, wxALL, 5 ); + bSizer233->Add( bSizer174, 0, wxALL, 5 ); - bSizer232->Add( bSizer233, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + bSizer232->Add( bSizer233, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer304; - bSizer304 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer304; + bSizer304 = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer11->SetFlexibleDirection( wxBOTH ); - ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer11 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer11->SetFlexibleDirection( wxBOTH ); + ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextProcessed->Wrap( -1 ); - ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); + m_staticTextProcessed = new wxStaticText( m_panelProgress, wxID_ANY, _("Processed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextProcessed->Wrap( -1 ); + ffgSizer11->Add( m_staticTextProcessed, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); - m_staticTextRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRemaining->Wrap( -1 ); - ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticTextRemaining = new wxStaticText( m_panelProgress, wxID_ANY, _("Remaining:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRemaining->Wrap( -1 ); + ffgSizer11->Add( m_staticTextRemaining, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizer304->Add( ffgSizer11, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 10 ); + bSizer304->Add( ffgSizer11, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 10 ); - m_panelItemStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panelItemStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelItemStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer291; - bSizer291 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer291; + bSizer291 = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer111 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer111->SetFlexibleDirection( wxBOTH ); - ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer111 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer111->SetFlexibleDirection( wxBOTH ); + ffgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxBoxSizer* bSizer293; - bSizer293 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer293; + bSizer293 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_bitmapItemStat = new wxStaticBitmap( m_panelItemStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer293->Add( m_bitmapItemStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextItemsProcessed->Wrap( -1 ); - m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextItemsProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextItemsProcessed->Wrap( -1 ); + m_staticTextItemsProcessed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_BOTTOM, 5 ); + bSizer293->Add( m_staticTextItemsProcessed, 0, wxALIGN_BOTTOM, 5 ); - ffgSizer111->Add( bSizer293, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); + ffgSizer111->Add( bSizer293, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); - m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextBytesProcessed->Wrap( -1 ); - ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + m_staticTextBytesProcessed = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBytesProcessed->Wrap( -1 ); + ffgSizer111->Add( m_staticTextBytesProcessed, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextItemsRemaining->Wrap( -1 ); - m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextItemsRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextItemsRemaining->Wrap( -1 ); + m_staticTextItemsRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + ffgSizer111->Add( m_staticTextItemsRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextBytesRemaining->Wrap( -1 ); - ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + m_staticTextBytesRemaining = new wxStaticText( m_panelItemStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBytesRemaining->Wrap( -1 ); + ffgSizer111->Add( m_staticTextBytesRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - bSizer291->Add( ffgSizer111, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer291->Add( ffgSizer111, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelItemStats->SetSizer( bSizer291 ); - m_panelItemStats->Layout(); - bSizer291->Fit( m_panelItemStats ); - bSizer304->Add( m_panelItemStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); + m_panelItemStats->SetSizer( bSizer291 ); + m_panelItemStats->Layout(); + bSizer291->Fit( m_panelItemStats ); + bSizer304->Add( m_panelItemStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); - m_panelTimeStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panelTimeStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelTimeStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer292; - bSizer292 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer292; + bSizer292 = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer112 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer112->SetFlexibleDirection( wxBOTH ); - ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer112 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer112->SetFlexibleDirection( wxBOTH ); + ffgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxBoxSizer* bSizer294; - bSizer294 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer294; + bSizer294 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_bitmapTimeStat = new wxStaticBitmap( m_panelTimeStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer294->Add( m_bitmapTimeStat, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeElapsed->Wrap( -1 ); - m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextTimeElapsed = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeElapsed->Wrap( -1 ); + m_staticTextTimeElapsed->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); + bSizer294->Add( m_staticTextTimeElapsed, 0, wxALIGN_BOTTOM, 5 ); - ffgSizer112->Add( bSizer294, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); + ffgSizer112->Add( bSizer294, 0, wxEXPAND|wxALIGN_RIGHT, 5 ); - m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextTimeRemaining->Wrap( -1 ); - m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextTimeRemaining = new wxStaticText( m_panelTimeStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextTimeRemaining->Wrap( -1 ); + m_staticTextTimeRemaining->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + ffgSizer112->Add( m_staticTextTimeRemaining, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - bSizer292->Add( ffgSizer112, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer292->Add( ffgSizer112, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelTimeStats->SetSizer( bSizer292 ); - m_panelTimeStats->Layout(); - bSizer292->Fit( m_panelTimeStats ); - bSizer304->Add( m_panelTimeStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); + m_panelTimeStats->SetSizer( bSizer292 ); + m_panelTimeStats->Layout(); + bSizer292->Fit( m_panelTimeStats ); + bSizer304->Add( m_panelTimeStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); - ffgSizer114 = new wxFlexGridSizer( 2, 0, 5, 5 ); - ffgSizer114->SetFlexibleDirection( wxBOTH ); - ffgSizer114->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer114 = new wxFlexGridSizer( 2, 0, 5, 5 ); + ffgSizer114->SetFlexibleDirection( wxBOTH ); + ffgSizer114->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextErrors = new wxStaticText( m_panelProgress, wxID_ANY, _("Errors:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextErrors->Wrap( -1 ); - ffgSizer114->Add( m_staticTextErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); + m_staticTextErrors = new wxStaticText( m_panelProgress, wxID_ANY, _("Errors:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextErrors->Wrap( -1 ); + ffgSizer114->Add( m_staticTextErrors, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 ); - m_staticTextWarnings = new wxStaticText( m_panelProgress, wxID_ANY, _("Warnings:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextWarnings->Wrap( -1 ); - ffgSizer114->Add( m_staticTextWarnings, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticTextWarnings = new wxStaticText( m_panelProgress, wxID_ANY, _("Warnings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextWarnings->Wrap( -1 ); + ffgSizer114->Add( m_staticTextWarnings, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizer304->Add( ffgSizer114, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); + bSizer304->Add( ffgSizer114, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 10 ); - m_panelErrorStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panelErrorStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + m_panelErrorStats = new wxPanel( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panelErrorStats->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer2921; - bSizer2921 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer2921; + bSizer2921 = new wxBoxSizer( wxHORIZONTAL ); - ffgSizer1121 = new wxFlexGridSizer( 0, 2, 5, 5 ); - ffgSizer1121->SetFlexibleDirection( wxBOTH ); - ffgSizer1121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer1121 = new wxFlexGridSizer( 0, 2, 5, 5 ); + ffgSizer1121->SetFlexibleDirection( wxBOTH ); + ffgSizer1121->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapErrors = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer1121->Add( m_bitmapErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapErrors = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer1121->Add( m_bitmapErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextErrorCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextErrorCount->Wrap( -1 ); - m_staticTextErrorCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextErrorCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextErrorCount->Wrap( -1 ); + m_staticTextErrorCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer1121->Add( m_staticTextErrorCount, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT, 5 ); + ffgSizer1121->Add( m_staticTextErrorCount, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT, 5 ); - m_bitmapWarnings = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer1121->Add( m_bitmapWarnings, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapWarnings = new wxStaticBitmap( m_panelErrorStats, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer1121->Add( m_bitmapWarnings, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextWarningCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextWarningCount->Wrap( -1 ); - m_staticTextWarningCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextWarningCount = new wxStaticText( m_panelErrorStats, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextWarningCount->Wrap( -1 ); + m_staticTextWarningCount->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - ffgSizer1121->Add( m_staticTextWarningCount, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); + ffgSizer1121->Add( m_staticTextWarningCount, 0, wxALIGN_RIGHT|wxALIGN_BOTTOM, 5 ); - bSizer2921->Add( ffgSizer1121, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer2921->Add( ffgSizer1121, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_panelErrorStats->SetSizer( bSizer2921 ); - m_panelErrorStats->Layout(); - bSizer2921->Fit( m_panelErrorStats ); - bSizer304->Add( m_panelErrorStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); + m_panelErrorStats->SetSizer( bSizer2921 ); + m_panelErrorStats->Layout(); + bSizer2921->Fit( m_panelErrorStats ); + bSizer304->Add( m_panelErrorStats, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 10 ); - bSizer232->Add( bSizer304, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer232->Add( bSizer304, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer232->Add( 0, 0, 1, 0, 5 ); + bSizer232->Add( 0, 0, 1, 0, 5 ); - bSizerDynSpace = new wxBoxSizer( wxVERTICAL ); + bSizerDynSpace = new wxBoxSizer( wxVERTICAL ); - bSizerDynSpace->Add( 0, 0, 0, 0, 5 ); + bSizerDynSpace->Add( 0, 0, 0, 0, 5 ); - bSizer232->Add( bSizerDynSpace, 0, 0, 5 ); + bSizer232->Add( bSizerDynSpace, 0, 0, 5 ); - bSizer161->Add( bSizer232, 0, wxEXPAND, 5 ); + bSizer161->Add( bSizer232, 0, wxEXPAND, 5 ); - m_panelGraphItems = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_panelGraphItems->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panelGraphItems = new zen::Graph2D( m_panelProgress, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_panelGraphItems->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - bSizer161->Add( m_panelGraphItems, 1, wxEXPAND|wxLEFT, 10 ); + bSizer161->Add( m_panelGraphItems, 1, wxEXPAND|wxLEFT, 10 ); - bSizerProgressFooter = new wxBoxSizer( wxHORIZONTAL ); + bSizerProgressFooter = new wxBoxSizer( wxHORIZONTAL ); - bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL ); + bSizerErrorsRetry = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapRetryErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapRetryErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerErrorsRetry->Add( m_bitmapRetryErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText1461 = new wxStaticText( m_panelProgress, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1461->Wrap( -1 ); - bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_staticText1461 = new wxStaticText( m_panelProgress, wxID_ANY, _("Automatic retry"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1461->Wrap( -1 ); + bSizerErrorsRetry->Add( m_staticText1461, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticTextRetryCount = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRetryCount->Wrap( -1 ); - bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_staticTextRetryCount = new wxStaticText( m_panelProgress, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRetryCount->Wrap( -1 ); + bSizerErrorsRetry->Add( m_staticTextRetryCount, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - bSizerProgressFooter->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizerProgressFooter->Add( bSizerErrorsRetry, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL ); + bSizerErrorsIgnore = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapIgnoreErrors = new wxStaticBitmap( m_panelProgress, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerErrorsIgnore->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText146 = new wxStaticText( m_panelProgress, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText146->Wrap( -1 ); - bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_staticText146 = new wxStaticText( m_panelProgress, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText146->Wrap( -1 ); + bSizerErrorsIgnore->Add( m_staticText146, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - bSizerProgressFooter->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizerProgressFooter->Add( bSizerErrorsIgnore, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - bSizerProgressFooter->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerProgressFooter->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticText137 = new wxStaticText( m_panelProgress, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText137->Wrap( -1 ); - bSizerProgressFooter->Add( m_staticText137, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticText137 = new wxStaticText( m_panelProgress, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText137->Wrap( -1 ); + bSizerProgressFooter->Add( m_staticText137, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - wxArrayString m_choicePostSyncActionChoices; - m_choicePostSyncAction = new wxChoice( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 ); - m_choicePostSyncAction->SetSelection( 0 ); - bSizerProgressFooter->Add( m_choicePostSyncAction, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxArrayString m_choicePostSyncActionChoices; + m_choicePostSyncAction = new wxChoice( m_panelProgress, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 ); + m_choicePostSyncAction->SetSelection( 0 ); + bSizerProgressFooter->Add( m_choicePostSyncAction, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer161->Add( bSizerProgressFooter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + bSizer161->Add( bSizerProgressFooter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); - bSizer173->Add( bSizer161, 1, wxEXPAND|wxLEFT, 5 ); + bSizer173->Add( bSizer161, 1, wxEXPAND|wxLEFT, 5 ); - m_panelProgress->SetSizer( bSizer173 ); - m_panelProgress->Layout(); - bSizer173->Fit( m_panelProgress ); - bSizerRoot->Add( m_panelProgress, 1, wxEXPAND, 5 ); + m_panelProgress->SetSizer( bSizer173 ); + m_panelProgress->Layout(); + bSizer173->Fit( m_panelProgress ); + bSizerRoot->Add( m_panelProgress, 1, wxEXPAND, 5 ); - m_notebookResult = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_FIXEDWIDTH ); - m_notebookResult->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_notebookResult = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_FIXEDWIDTH ); + m_notebookResult->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - bSizerRoot->Add( m_notebookResult, 1, wxEXPAND, 5 ); + bSizerRoot->Add( m_notebookResult, 1, wxEXPAND, 5 ); - m_staticlineFooter = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerRoot->Add( m_staticlineFooter, 0, wxEXPAND, 5 ); + m_staticlineFooter = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerRoot->Add( m_staticlineFooter, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); - m_checkBoxAutoClose = new wxCheckBox( this, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStdButtons->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_checkBoxAutoClose = new wxCheckBox( this, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStdButtons->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonClose->Enable( false ); + m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonClose->Enable( false ); - bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonPause = new wxButton( this, wxID_ANY, _("&Pause"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonPause, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_buttonStop = new wxButton( this, wxID_CANCEL, _("Stop"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonStop, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonStop = new wxButton( this, wxID_CANCEL, _("Stop"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonStop, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizerRoot->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); + bSizerRoot->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); - this->SetSizer( bSizerRoot ); - this->Layout(); - bSizerRoot->Fit( this ); + this->SetSizer( bSizerRoot ); + this->Layout(); + bSizerRoot->Fit( this ); } SyncProgressPanelGenerated::~SyncProgressPanelGenerated() @@ -4157,42 +4136,42 @@ SyncProgressPanelGenerated::~SyncProgressPanelGenerated() LogPanelGenerated::LogPanelGenerated( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) { - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer153; - bSizer153 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer153; + bSizer153 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer154; - bSizer154 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer154; + bSizer154 = new wxBoxSizer( wxVERTICAL ); - m_bpButtonErrors = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bpButtonErrors = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer154->Add( m_bpButtonErrors, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonWarnings = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bpButtonWarnings = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer154->Add( m_bpButtonWarnings, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - m_bpButtonInfo = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bpButtonInfo = new zen::ToggleButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer154->Add( m_bpButtonInfo, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + bSizer153->Add( bSizer154, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer153->Add( m_staticline13, 0, wxEXPAND, 5 ); + m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer153->Add( m_staticline13, 0, wxEXPAND, 5 ); - m_gridMessages = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_gridMessages->SetScrollRate( 5, 5 ); - bSizer153->Add( m_gridMessages, 1, wxEXPAND, 5 ); + m_gridMessages = new zen::Grid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridMessages->SetScrollRate( 5, 5 ); + bSizer153->Add( m_gridMessages, 1, wxEXPAND, 5 ); - this->SetSizer( bSizer153 ); - this->Layout(); - bSizer153->Fit( this ); + this->SetSizer( bSizer153 ); + this->Layout(); + bSizer153->Fit( this ); - // Connect Events - m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::onErrors ), NULL, this ); - m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::onWarnings ), NULL, this ); - m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::onInfo ), NULL, this ); + // Connect Events + m_bpButtonErrors->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::onErrors ), NULL, this ); + m_bpButtonWarnings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::onWarnings ), NULL, this ); + m_bpButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LogPanelGenerated::onInfo ), NULL, this ); } LogPanelGenerated::~LogPanelGenerated() @@ -4201,173 +4180,173 @@ LogPanelGenerated::~LogPanelGenerated() 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( -1, -1 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer54; - bSizer54 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer54; + bSizer54 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapBatchJob = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer72->Add( m_bitmapBatchJob, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapBatchJob = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer72->Add( m_bitmapBatchJob, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("Create a batch file for unattended synchronization. To start, double-click this file or schedule in a task planner: %x"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("Create a batch file for unattended synchronization. To start, double-click this file or schedule in a task planner: %x"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - bSizer54->Add( bSizer72, 0, 0, 5 ); + bSizer54->Add( bSizer72, 0, 0, 5 ); - m_staticline18 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer54->Add( m_staticline18, 0, wxEXPAND, 5 ); + m_staticline18 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer54->Add( m_staticline18, 0, wxEXPAND, 5 ); - m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer172; - bSizer172 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer172; + bSizer172 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer180; - bSizer180 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer180; + bSizer180 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer2361; - bSizer2361 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer2361; + bSizer2361 = new wxBoxSizer( wxVERTICAL ); - m_staticText146 = new wxStaticText( m_panel35, wxID_ANY, _("Progress dialog:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText146->Wrap( -1 ); - bSizer2361->Add( m_staticText146, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticText146 = new wxStaticText( m_panel35, wxID_ANY, _("Progress dialog:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText146->Wrap( -1 ); + bSizer2361->Add( m_staticText146, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 ); - ffgSizer11->SetFlexibleDirection( wxBOTH ); - ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 ); + ffgSizer11->SetFlexibleDirection( wxBOTH ); + ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bitmapMinimizeToTray = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_bitmapMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapMinimizeToTray = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_bitmapMinimizeToTray, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxRunMinimized = new wxCheckBox( m_panel35, wxID_ANY, _("Run minimized"), wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_checkBoxRunMinimized, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + m_checkBoxRunMinimized = new wxCheckBox( m_panel35, wxID_ANY, _("Run minimized"), wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_checkBoxRunMinimized, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - ffgSizer11->Add( 0, 0, 1, wxEXPAND, 5 ); + ffgSizer11->Add( 0, 0, 1, wxEXPAND, 5 ); - m_checkBoxAutoClose = new wxCheckBox( m_panel35, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_checkBoxAutoClose = new wxCheckBox( m_panel35, wxID_ANY, _("Auto-close"), wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_checkBoxAutoClose, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - bSizer2361->Add( ffgSizer11, 0, wxEXPAND|wxALL, 5 ); + bSizer2361->Add( ffgSizer11, 0, wxEXPAND|wxALL, 5 ); - bSizer180->Add( bSizer2361, 0, wxALL, 5 ); + bSizer180->Add( bSizer2361, 0, wxALL, 5 ); - m_staticline26 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer180->Add( m_staticline26, 0, wxEXPAND, 5 ); + m_staticline26 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer180->Add( m_staticline26, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer242; - bSizer242 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer242; + bSizer242 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer243; - bSizer243 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer243; + bSizer243 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapIgnoreErrors = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer243->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapIgnoreErrors = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer243->Add( m_bitmapIgnoreErrors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxIgnoreErrors = new wxCheckBox( m_panel35, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer243->Add( m_checkBoxIgnoreErrors, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_checkBoxIgnoreErrors = new wxCheckBox( m_panel35, wxID_ANY, _("Ignore errors"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer243->Add( m_checkBoxIgnoreErrors, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - bSizer242->Add( bSizer243, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer242->Add( bSizer243, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer246; - bSizer246 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer246; + bSizer246 = new wxBoxSizer( wxVERTICAL ); - m_radioBtnErrorDialogShow = new wxRadioButton( m_panel35, wxID_ANY, _("&Show error message"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnErrorDialogShow->SetValue( true ); - m_radioBtnErrorDialogShow->SetToolTip( _("Show pop-up on errors or warnings") ); + m_radioBtnErrorDialogShow = new wxRadioButton( m_panel35, wxID_ANY, _("&Show error message"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnErrorDialogShow->SetValue( true ); + m_radioBtnErrorDialogShow->SetToolTip( _("Show pop-up on errors or warnings") ); - bSizer246->Add( m_radioBtnErrorDialogShow, 0, wxALL|wxEXPAND, 5 ); + bSizer246->Add( m_radioBtnErrorDialogShow, 0, wxALL|wxEXPAND, 5 ); - m_radioBtnErrorDialogCancel = new wxRadioButton( m_panel35, wxID_ANY, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtnErrorDialogCancel->SetToolTip( _("Stop synchronization at first error") ); + m_radioBtnErrorDialogCancel = new wxRadioButton( m_panel35, wxID_ANY, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtnErrorDialogCancel->SetToolTip( _("Stop synchronization at first error") ); - bSizer246->Add( m_radioBtnErrorDialogCancel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + bSizer246->Add( m_radioBtnErrorDialogCancel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizer242->Add( bSizer246, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT, 15 ); + bSizer242->Add( bSizer246, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT, 15 ); - bSizer180->Add( bSizer242, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer180->Add( bSizer242, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticline261 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer180->Add( m_staticline261, 0, wxEXPAND, 5 ); + m_staticline261 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer180->Add( m_staticline261, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer247; - bSizer247 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer247; + bSizer247 = new wxBoxSizer( wxVERTICAL ); - m_staticText137 = new wxStaticText( m_panel35, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText137->Wrap( -1 ); - bSizer247->Add( m_staticText137, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticText137 = new wxStaticText( m_panel35, wxID_ANY, _("When finished:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText137->Wrap( -1 ); + bSizer247->Add( m_staticText137, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - wxArrayString m_choicePostSyncActionChoices; - m_choicePostSyncAction = new wxChoice( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 ); - m_choicePostSyncAction->SetSelection( 0 ); - bSizer247->Add( m_choicePostSyncAction, 0, wxALL, 5 ); + wxArrayString m_choicePostSyncActionChoices; + m_choicePostSyncAction = new wxChoice( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePostSyncActionChoices, 0 ); + m_choicePostSyncAction->SetSelection( 0 ); + bSizer247->Add( m_choicePostSyncAction, 0, wxALL, 5 ); - bSizer180->Add( bSizer247, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer180->Add( bSizer247, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticline262 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer180->Add( m_staticline262, 0, wxEXPAND, 5 ); + m_staticline262 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer180->Add( m_staticline262, 0, wxEXPAND, 5 ); - bSizer172->Add( bSizer180, 0, 0, 5 ); + bSizer172->Add( bSizer180, 0, 0, 5 ); - m_staticline25 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer172->Add( m_staticline25, 0, wxEXPAND, 5 ); + m_staticline25 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer172->Add( m_staticline25, 0, wxEXPAND, 5 ); - m_hyperlink17 = new wxHyperlinkCtrl( m_panel35, wxID_ANY, _("How can I schedule a batch job?"), wxT("https://freefilesync.org/manual.php?topic=schedule-a-batch-job"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink17->SetToolTip( _("https://freefilesync.org/manual.php?topic=schedule-a-batch-job") ); + m_hyperlink17 = new wxHyperlinkCtrl( m_panel35, wxID_ANY, _("How can I schedule a batch job?"), wxT("https://freefilesync.org/manual.php?topic=schedule-a-batch-job"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink17->SetToolTip( _("https://freefilesync.org/manual.php?topic=schedule-a-batch-job") ); - bSizer172->Add( m_hyperlink17, 0, wxALL, 10 ); + bSizer172->Add( m_hyperlink17, 0, wxALL, 10 ); - m_panel35->SetSizer( bSizer172 ); - m_panel35->Layout(); - bSizer172->Fit( m_panel35 ); - bSizer54->Add( m_panel35, 1, wxEXPAND, 5 ); + m_panel35->SetSizer( bSizer172 ); + m_panel35->Layout(); + bSizer172->Fit( m_panel35 ); + bSizer54->Add( m_panel35, 1, wxEXPAND, 5 ); - m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 ); + m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonSaveAs = new wxButton( this, wxID_SAVE, _("Save &as..."), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonSaveAs = new wxButton( this, wxID_SAVE, _("Save &as..."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonSaveAs->SetDefault(); - m_buttonSaveAs->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonSaveAs->SetDefault(); + m_buttonSaveAs->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonSaveAs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizerStdButtons->Add( m_buttonSaveAs, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer54 ); - this->Layout(); - bSizer54->Fit( this ); + this->SetSizer( bSizer54 ); + this->Layout(); + bSizer54->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::onClose ) ); - m_checkBoxRunMinimized->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onToggleRunMinimized ), NULL, this ); - m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onToggleIgnoreErrors ), NULL, this ); - m_buttonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onSaveBatchJob ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( BatchDlgGenerated::onClose ) ); + m_checkBoxRunMinimized->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onToggleRunMinimized ), NULL, this ); + m_checkBoxIgnoreErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onToggleIgnoreErrors ), NULL, this ); + m_buttonSaveAs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onSaveBatchJob ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BatchDlgGenerated::onCancel ), NULL, this ); } BatchDlgGenerated::~BatchDlgGenerated() @@ -4376,85 +4355,85 @@ BatchDlgGenerated::~BatchDlgGenerated() 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( wxSize( -1, -1 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapDeleteType = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer72->Add( m_bitmapDeleteType, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapDeleteType = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer72->Add( m_bitmapDeleteType, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - bSizer24->Add( bSizer72, 0, 0, 5 ); + bSizer24->Add( bSizer72, 0, 0, 5 ); - m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 ); + m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 ); - m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer185; - bSizer185 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer185; + bSizer185 = new wxBoxSizer( wxHORIZONTAL ); - bSizer185->Add( 60, 0, 0, 0, 5 ); + bSizer185->Add( 60, 0, 0, 0, 5 ); - m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 ); + m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 ); - m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE ); - bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 ); + m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE ); + bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 ); - m_panel31->SetSizer( bSizer185 ); - m_panel31->Layout(); - bSizer185->Fit( m_panel31 ); - bSizer24->Add( m_panel31, 1, wxEXPAND, 5 ); + m_panel31->SetSizer( bSizer185 ); + m_panel31->Layout(); + bSizer185->Fit( m_panel31 ); + bSizer24->Add( m_panel31, 1, wxEXPAND, 5 ); - m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStdButtons->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_checkBoxUseRecycler = new wxCheckBox( this, wxID_ANY, _("&Recycle bin"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStdButtons->Add( m_checkBoxUseRecycler, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonOK = new wxButton( this, wxID_OK, _("dummy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("dummy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); + bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); - this->SetSizer( bSizer24 ); - this->Layout(); - bSizer24->Fit( this ); + this->SetSizer( bSizer24 ); + this->Layout(); + bSizer24->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::onClose ) ); - m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::onUseRecycler ), NULL, this ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DeleteDlgGenerated::onClose ) ); + m_checkBoxUseRecycler->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::onUseRecycler ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DeleteDlgGenerated::onCancel ), NULL, this ); } DeleteDlgGenerated::~DeleteDlgGenerated() @@ -4463,120 +4442,120 @@ DeleteDlgGenerated::~DeleteDlgGenerated() CopyToDlgGenerated::CopyToDlgGenerated( 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( -1, -1 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapCopyTo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer72->Add( m_bitmapCopyTo, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapCopyTo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer72->Add( m_bitmapCopyTo, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - bSizer24->Add( bSizer72, 0, 0, 5 ); + bSizer24->Add( bSizer72, 0, 0, 5 ); - m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 ); + m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 ); - m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer242; - bSizer242 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer242; + bSizer242 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer185; - bSizer185 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer185; + bSizer185 = new wxBoxSizer( wxHORIZONTAL ); - bSizer185->Add( 60, 0, 0, 0, 5 ); + bSizer185->Add( 60, 0, 0, 0, 5 ); - m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 ); + m_staticline42 = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer185->Add( m_staticline42, 0, wxEXPAND, 5 ); - m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE ); - bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 ); + m_textCtrlFileList = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxBORDER_NONE ); + bSizer185->Add( m_textCtrlFileList, 1, wxEXPAND, 5 ); - bSizer242->Add( bSizer185, 1, wxEXPAND, 5 ); + bSizer242->Add( bSizer185, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizer182; - bSizer182 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer182; + bSizer182 = new wxBoxSizer( wxHORIZONTAL ); - m_targetFolderPath = new fff::FolderHistoryBox( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer182->Add( m_targetFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_targetFolderPath = new fff::FolderHistoryBox( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer182->Add( m_targetFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectTargetFolder = new wxButton( m_panel31, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectTargetFolder->SetToolTip( _("Select a folder") ); + m_buttonSelectTargetFolder = new wxButton( m_panel31, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectTargetFolder->SetToolTip( _("Select a folder") ); - bSizer182->Add( m_buttonSelectTargetFolder, 0, wxEXPAND, 5 ); + bSizer182->Add( m_buttonSelectTargetFolder, 0, wxEXPAND, 5 ); - m_bpButtonSelectAltTargetFolder = new wxBitmapButton( m_panel31, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectAltTargetFolder->SetToolTip( _("Access online storage") ); + m_bpButtonSelectAltTargetFolder = new wxBitmapButton( m_panel31, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectAltTargetFolder->SetToolTip( _("Access online storage") ); - bSizer182->Add( m_bpButtonSelectAltTargetFolder, 0, wxEXPAND, 5 ); + bSizer182->Add( m_bpButtonSelectAltTargetFolder, 0, wxEXPAND, 5 ); - bSizer242->Add( bSizer182, 0, wxALL|wxEXPAND, 10 ); + bSizer242->Add( bSizer182, 0, wxALL|wxEXPAND, 10 ); - m_panel31->SetSizer( bSizer242 ); - m_panel31->Layout(); - bSizer242->Fit( m_panel31 ); - bSizer24->Add( m_panel31, 1, wxEXPAND, 5 ); + m_panel31->SetSizer( bSizer242 ); + m_panel31->Layout(); + bSizer242->Fit( m_panel31 ); + bSizer24->Add( m_panel31, 1, wxEXPAND, 5 ); - m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer189; - bSizer189 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer189; + bSizer189 = new wxBoxSizer( wxVERTICAL ); - m_checkBoxKeepRelPath = new wxCheckBox( this, wxID_ANY, _("&Keep relative paths"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxKeepRelPath->SetValue(true); - bSizer189->Add( m_checkBoxKeepRelPath, 0, wxALL|wxEXPAND, 5 ); + m_checkBoxKeepRelPath = new wxCheckBox( this, wxID_ANY, _("&Keep relative paths"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxKeepRelPath->SetValue(true); + bSizer189->Add( m_checkBoxKeepRelPath, 0, wxALL|wxEXPAND, 5 ); - m_checkBoxOverwriteIfExists = new wxCheckBox( this, wxID_ANY, _("&Overwrite existing files"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxOverwriteIfExists->SetValue(true); - bSizer189->Add( m_checkBoxOverwriteIfExists, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_checkBoxOverwriteIfExists = new wxCheckBox( this, wxID_ANY, _("&Overwrite existing files"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxOverwriteIfExists->SetValue(true); + bSizer189->Add( m_checkBoxOverwriteIfExists, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizerStdButtons->Add( bSizer189, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizerStdButtons->Add( bSizer189, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizerStdButtons->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonOK = new wxButton( this, wxID_OK, _("Copy"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("Copy"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); + bSizer24->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); - this->SetSizer( bSizer24 ); - this->Layout(); - bSizer24->Fit( this ); + this->SetSizer( bSizer24 ); + this->Layout(); + bSizer24->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CopyToDlgGenerated::onClose ) ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CopyToDlgGenerated::onClose ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyToDlgGenerated::onCancel ), NULL, this ); } CopyToDlgGenerated::~CopyToDlgGenerated() @@ -4585,85 +4564,85 @@ CopyToDlgGenerated::~CopyToDlgGenerated() RenameDlgGenerated::RenameDlgGenerated( 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( -1, -1 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapRename = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer72->Add( m_bitmapRename, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapRename = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer72->Add( m_bitmapRename, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - bSizer24->Add( bSizer72, 0, 0, 5 ); + bSizer24->Add( bSizer72, 0, 0, 5 ); - m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 ); + m_staticline91 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline91, 0, wxEXPAND, 5 ); - m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel31 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel31->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer242; - bSizer242 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer242; + bSizer242 = new wxBoxSizer( wxVERTICAL ); - m_gridRenamePreview = new zen::Grid( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); - m_gridRenamePreview->SetScrollRate( 5, 5 ); - bSizer242->Add( m_gridRenamePreview, 1, wxEXPAND, 5 ); + m_gridRenamePreview = new zen::Grid( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gridRenamePreview->SetScrollRate( 5, 5 ); + bSizer242->Add( m_gridRenamePreview, 1, wxEXPAND, 5 ); - m_staticlinePreview = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer242->Add( m_staticlinePreview, 0, wxEXPAND, 5 ); + m_staticlinePreview = new wxStaticLine( m_panel31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer242->Add( m_staticlinePreview, 0, wxEXPAND, 5 ); - m_staticTextPlaceholderDescription = new wxStaticText( m_panel31, wxID_ANY, _("Placeholders represent differences between the names."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPlaceholderDescription->Wrap( -1 ); - m_staticTextPlaceholderDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticTextPlaceholderDescription = new wxStaticText( m_panel31, wxID_ANY, _("Placeholders represent differences between the names."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPlaceholderDescription->Wrap( -1 ); + m_staticTextPlaceholderDescription->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer242->Add( m_staticTextPlaceholderDescription, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 10 ); + bSizer242->Add( m_staticTextPlaceholderDescription, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 10 ); - m_textCtrlNewName = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer242->Add( m_textCtrlNewName, 0, wxEXPAND|wxALL, 10 ); + m_textCtrlNewName = new wxTextCtrl( m_panel31, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer242->Add( m_textCtrlNewName, 0, wxEXPAND|wxALL, 10 ); - m_panel31->SetSizer( bSizer242 ); - m_panel31->Layout(); - bSizer242->Fit( m_panel31 ); - bSizer24->Add( m_panel31, 1, wxEXPAND, 5 ); + m_panel31->SetSizer( bSizer242 ); + m_panel31->Layout(); + bSizer242->Fit( m_panel31 ); + bSizer24->Add( m_panel31, 1, wxEXPAND, 5 ); - m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOK = new wxButton( this, wxID_OK, _("&Rename"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("&Rename"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOK->SetDefault(); - m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOK->SetDefault(); + m_buttonOK->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizerStdButtons->Add( m_buttonOK, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer24->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer24->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer24 ); - this->Layout(); - bSizer24->Fit( this ); + this->SetSizer( bSizer24 ); + this->Layout(); + bSizer24->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( RenameDlgGenerated::onClose ) ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( RenameDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( RenameDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( RenameDlgGenerated::onClose ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( RenameDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( RenameDlgGenerated::onCancel ), NULL, this ); } RenameDlgGenerated::~RenameDlgGenerated() @@ -4672,583 +4651,607 @@ RenameDlgGenerated::~RenameDlgGenerated() OptionsDlgGenerated::OptionsDlgGenerated( 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( -1, -1 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer95; - bSizer95 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer95; + bSizer95 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer72->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapSettings = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer72->Add( m_bitmapSettings, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticText44 = new wxStaticText( this, wxID_ANY, _("The following settings are used for all synchronization jobs."), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticText44->Wrap( -1 ); - bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_staticText44 = new wxStaticText( this, wxID_ANY, _("The following settings are used for all synchronization jobs."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticText44->Wrap( -1 ); + bSizer72->Add( m_staticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - bSizer95->Add( bSizer72, 0, 0, 5 ); + bSizer95->Add( bSizer72, 0, 0, 5 ); - m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 ); + m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 ); - m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer166; - bSizer166 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer166; + bSizer166 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer186; - bSizer186 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer186; + bSizer186 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer160; - bSizer160 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer160; + bSizer160 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer176; - bSizer176 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer176; + bSizer176 = new wxBoxSizer( wxHORIZONTAL ); - m_checkBoxFailSafe = new wxCheckBox( m_panel39, wxID_ANY, _("Fail-safe file copy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxFailSafe->SetValue(true); - m_checkBoxFailSafe->SetToolTip( _("Copy to a temporary file (*.ffs_tmp) before overwriting target.\nThis guarantees a consistent state even in case of a serious error.") ); + m_checkBoxFailSafe = new wxCheckBox( m_panel39, wxID_ANY, _("Fail-safe file copy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxFailSafe->SetValue(true); + m_checkBoxFailSafe->SetToolTip( _("Copy to a temporary file (*.ffs_tmp) before overwriting target.\nThis guarantees a consistent state even in case of a serious error.") ); - bSizer176->Add( m_checkBoxFailSafe, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer176->Add( m_checkBoxFailSafe, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText911 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText911->Wrap( -1 ); - m_staticText911->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText911 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText911->Wrap( -1 ); + m_staticText911->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer176->Add( m_staticText911, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizer176->Add( m_staticText911, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_staticText91 = new wxStaticText( m_panel39, wxID_ANY, _("recommended"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText91->Wrap( -1 ); - m_staticText91->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText91 = new wxStaticText( m_panel39, wxID_ANY, _("recommended"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText91->Wrap( -1 ); + m_staticText91->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer176->Add( m_staticText91, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizer176->Add( m_staticText91, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_staticText9111 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText9111->Wrap( -1 ); - m_staticText9111->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText9111 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9111->Wrap( -1 ); + m_staticText9111->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer176->Add( m_staticText9111, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizer176->Add( m_staticText9111, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer160->Add( bSizer176, 0, wxEXPAND, 5 ); + bSizer160->Add( bSizer176, 0, wxEXPAND, 5 ); - bSizerLockedFiles = new wxBoxSizer( wxHORIZONTAL ); + bSizerLockedFiles = new wxBoxSizer( wxHORIZONTAL ); - m_checkBoxCopyLocked = new wxCheckBox( m_panel39, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxCopyLocked->SetValue(true); - m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using the Volume Shadow Copy Service.") ); + m_checkBoxCopyLocked = new wxCheckBox( m_panel39, wxID_ANY, _("Copy locked files"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxCopyLocked->SetValue(true); + m_checkBoxCopyLocked->SetToolTip( _("Copy shared or locked files using the Volume Shadow Copy Service.") ); - bSizerLockedFiles->Add( m_checkBoxCopyLocked, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerLockedFiles->Add( m_checkBoxCopyLocked, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText921 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText921->Wrap( -1 ); - m_staticText921->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText921 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText921->Wrap( -1 ); + m_staticText921->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizerLockedFiles->Add( m_staticText921, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizerLockedFiles->Add( m_staticText921, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_staticText92 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText92->Wrap( -1 ); - m_staticText92->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText92 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText92->Wrap( -1 ); + m_staticText92->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizerLockedFiles->Add( m_staticText92, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizerLockedFiles->Add( m_staticText92, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_staticText922 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText922->Wrap( -1 ); - m_staticText922->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText922 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText922->Wrap( -1 ); + m_staticText922->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizerLockedFiles->Add( m_staticText922, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerLockedFiles->Add( m_staticText922, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer160->Add( bSizerLockedFiles, 0, wxEXPAND, 5 ); + bSizer160->Add( bSizerLockedFiles, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer178; - bSizer178 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer178; + bSizer178 = new wxBoxSizer( wxHORIZONTAL ); - m_checkBoxCopyPermissions = new wxCheckBox( m_panel39, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxCopyPermissions->SetValue(true); - m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and folder permissions.") ); + m_checkBoxCopyPermissions = new wxCheckBox( m_panel39, wxID_ANY, _("Copy file access permissions"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxCopyPermissions->SetValue(true); + m_checkBoxCopyPermissions->SetToolTip( _("Transfer file and folder permissions.") ); - bSizer178->Add( m_checkBoxCopyPermissions, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizer178->Add( m_checkBoxCopyPermissions, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticText931 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText931->Wrap( -1 ); - m_staticText931->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText931 = new wxStaticText( m_panel39, wxID_ANY, _("("), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText931->Wrap( -1 ); + m_staticText931->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer178->Add( m_staticText931, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizer178->Add( m_staticText931, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_staticText93 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText93->Wrap( -1 ); - m_staticText93->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText93 = new wxStaticText( m_panel39, wxID_ANY, _("requires administrator rights"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText93->Wrap( -1 ); + m_staticText93->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer178->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + bSizer178->Add( m_staticText93, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_staticText932 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText932->Wrap( -1 ); - m_staticText932->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText932 = new wxStaticText( m_panel39, wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText932->Wrap( -1 ); + m_staticText932->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer178->Add( m_staticText932, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizer178->Add( m_staticText932, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer160->Add( bSizer178, 0, wxEXPAND, 5 ); + bSizer160->Add( bSizer178, 0, wxEXPAND, 5 ); - bSizer186->Add( bSizer160, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizer186->Add( bSizer160, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticline39 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer186->Add( m_staticline39, 0, wxEXPAND, 5 ); + m_staticline39 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer186->Add( m_staticline39, 0, wxEXPAND, 5 ); + wxBoxSizer* bSizer310; + bSizer310 = new wxBoxSizer( wxHORIZONTAL ); - bSizer166->Add( bSizer186, 0, wxEXPAND, 5 ); + m_bitmapColorTheme = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer310->Add( m_bitmapColorTheme, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_staticline191 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer166->Add( m_staticline191, 0, wxEXPAND, 5 ); + bSizerColorTheme = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer292; - bSizer292 = new wxBoxSizer( wxHORIZONTAL ); + m_staticText198 = new wxStaticText( m_panel39, wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText198->Wrap( -1 ); + bSizerColorTheme->Add( m_staticText198, 0, wxBOTTOM, 5 ); - m_bitmapWarnings = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer292->Add( m_bitmapWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + wxArrayString m_choiceColorThemeChoices; + m_choiceColorTheme = new wxChoice( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceColorThemeChoices, 0 ); + m_choiceColorTheme->SetSelection( 0 ); + bSizerColorTheme->Add( m_choiceColorTheme, 0, 0, 5 ); - m_staticText182 = new wxStaticText( m_panel39, wxID_ANY, _("Show hidden dialogs and warning messages again:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText182->Wrap( -1 ); - bSizer292->Add( m_staticText182, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextHiddenDialogsCount = new wxStaticText( m_panel39, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHiddenDialogsCount->Wrap( -1 ); - m_staticTextHiddenDialogsCount->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + bSizer310->Add( bSizerColorTheme, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer292->Add( m_staticTextHiddenDialogsCount, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonShowHiddenDialogs = new wxButton( m_panel39, wxID_ANY, _("&Show details"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer292->Add( m_buttonShowHiddenDialogs, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + bSizer186->Add( bSizer310, 0, wxEXPAND|wxALL, 5 ); - bSizer166->Add( bSizer292, 0, wxALL, 10 ); + bSizer166->Add( bSizer186, 0, wxEXPAND, 5 ); - wxArrayString m_checkListHiddenDialogsChoices; - m_checkListHiddenDialogs = new wxCheckListBox( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListHiddenDialogsChoices, wxLB_EXTENDED ); - bSizer166->Add( m_checkListHiddenDialogs, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + m_staticline191 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer166->Add( m_staticline191, 0, wxEXPAND, 5 ); - m_staticline1911 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer166->Add( m_staticline1911, 0, wxEXPAND, 5 ); + wxBoxSizer* bSizer292; + bSizer292 = new wxBoxSizer( wxHORIZONTAL ); - wxFlexGridSizer* fgSizer25111; - fgSizer25111 = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer25111->AddGrowableCol( 1 ); - fgSizer25111->AddGrowableRow( 0 ); - fgSizer25111->SetFlexibleDirection( wxBOTH ); - fgSizer25111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + m_bitmapWarnings = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer292->Add( m_bitmapWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bitmapLogFile = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer25111->Add( m_bitmapLogFile, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText182 = new wxStaticText( m_panel39, wxID_ANY, _("Show hidden dialogs and warning messages again:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText182->Wrap( -1 ); + bSizer292->Add( m_staticText182, 0, wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer296; - bSizer296 = new wxBoxSizer( wxHORIZONTAL ); + m_staticTextHiddenDialogsCount = new wxStaticText( m_panel39, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHiddenDialogsCount->Wrap( -1 ); + m_staticTextHiddenDialogsCount->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - m_staticText163 = new wxStaticText( m_panel39, wxID_ANY, _("Default log folder:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText163->Wrap( -1 ); - bSizer296->Add( m_staticText163, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer292->Add( m_staticTextHiddenDialogsCount, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonShowLogFolder = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonShowLogFolder->SetToolTip( _("dummy") ); + m_buttonShowHiddenDialogs = new wxButton( m_panel39, wxID_ANY, _("&Show details"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer292->Add( m_buttonShowHiddenDialogs, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - bSizer296->Add( m_bpButtonShowLogFolder, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer166->Add( bSizer292, 0, wxALL, 10 ); - fgSizer25111->Add( bSizer296, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + wxArrayString m_checkListHiddenDialogsChoices; + m_checkListHiddenDialogs = new wxCheckListBox( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListHiddenDialogsChoices, wxLB_EXTENDED ); + bSizer166->Add( m_checkListHiddenDialogs, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + m_staticline1911 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer166->Add( m_staticline1911, 0, wxEXPAND, 5 ); - fgSizer25111->Add( 0, 0, 0, 0, 5 ); + wxFlexGridSizer* fgSizer25111; + fgSizer25111 = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizer25111->AddGrowableCol( 1 ); + fgSizer25111->AddGrowableRow( 0 ); + fgSizer25111->SetFlexibleDirection( wxBOTH ); + fgSizer25111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_panelLogfile = new wxPanel( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelLogfile->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_bitmapLogFile = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer25111->Add( m_bitmapLogFile, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer279; - bSizer279 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer296; + bSizer296 = new wxBoxSizer( wxHORIZONTAL ); - m_logFolderPath = new fff::FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer279->Add( m_logFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText163 = new wxStaticText( m_panel39, wxID_ANY, _("Default log folder:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText163->Wrap( -1 ); + bSizer296->Add( m_staticText163, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectLogFolder = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectLogFolder->SetToolTip( _("Select a folder") ); + m_bpButtonShowLogFolder = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonShowLogFolder->SetToolTip( _("dummy") ); - bSizer279->Add( m_buttonSelectLogFolder, 0, wxEXPAND, 5 ); + bSizer296->Add( m_bpButtonShowLogFolder, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - m_bpButtonSelectAltLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - m_bpButtonSelectAltLogFolder->SetToolTip( _("Access online storage") ); - bSizer279->Add( m_bpButtonSelectAltLogFolder, 0, wxEXPAND, 5 ); + fgSizer25111->Add( bSizer296, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_panelLogfile->SetSizer( bSizer279 ); - m_panelLogfile->Layout(); - bSizer279->Fit( m_panelLogfile ); - fgSizer25111->Add( m_panelLogfile, 0, wxEXPAND, 5 ); + fgSizer25111->Add( 0, 0, 0, 0, 5 ); + m_panelLogfile = new wxPanel( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelLogfile->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - fgSizer25111->Add( 0, 0, 0, 0, 5 ); + wxBoxSizer* bSizer279; + bSizer279 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer297; - bSizer297 = new wxBoxSizer( wxHORIZONTAL ); + m_logFolderPath = new fff::FolderHistoryBox( m_panelLogfile, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer279->Add( m_logFolderPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBoxLogFilesMaxAge = new wxCheckBox( m_panel39, wxID_ANY, _("&Delete logs after x days:"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer297->Add( m_checkBoxLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonSelectLogFolder = new wxButton( m_panelLogfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectLogFolder->SetToolTip( _("Select a folder") ); - m_spinCtrlLogFilesMaxAge = new wxSpinCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); - bSizer297->Add( m_spinCtrlLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + bSizer279->Add( m_buttonSelectLogFolder, 0, wxEXPAND, 5 ); - m_staticline81 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer297->Add( m_staticline81, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_bpButtonSelectAltLogFolder = new wxBitmapButton( m_panelLogfile, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_bpButtonSelectAltLogFolder->SetToolTip( _("Access online storage") ); - m_staticText184 = new wxStaticText( m_panel39, wxID_ANY, _("Log file format:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText184->Wrap( -1 ); - bSizer297->Add( m_staticText184, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + bSizer279->Add( m_bpButtonSelectAltLogFolder, 0, wxEXPAND, 5 ); - wxFlexGridSizer* fgSizer251; - fgSizer251 = new wxFlexGridSizer( 0, 1, 5, 0 ); - fgSizer251->SetFlexibleDirection( wxBOTH ); - fgSizer251->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_radioBtnLogHtml = new wxRadioButton( m_panel39, wxID_ANY, _("&HTML"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnLogHtml->SetValue( true ); - fgSizer251->Add( m_radioBtnLogHtml, 0, wxEXPAND, 5 ); + m_panelLogfile->SetSizer( bSizer279 ); + m_panelLogfile->Layout(); + bSizer279->Fit( m_panelLogfile ); + fgSizer25111->Add( m_panelLogfile, 0, wxEXPAND, 5 ); - m_radioBtnLogText = new wxRadioButton( m_panel39, wxID_ANY, _("&Plain text"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer251->Add( m_radioBtnLogText, 0, wxEXPAND, 5 ); + fgSizer25111->Add( 0, 0, 0, 0, 5 ); - bSizer297->Add( fgSizer251, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer297; + bSizer297 = new wxBoxSizer( wxHORIZONTAL ); + m_checkBoxLogFilesMaxAge = new wxCheckBox( m_panel39, wxID_ANY, _("&Delete logs after x days:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer297->Add( m_checkBoxLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer25111->Add( bSizer297, 0, wxTOP, 5 ); + m_spinCtrlLogFilesMaxAge = new wxSpinCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 2000000000, 1 ); + bSizer297->Add( m_spinCtrlLogFilesMaxAge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + m_staticline81 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer297->Add( m_staticline81, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - bSizer166->Add( fgSizer25111, 0, wxALL|wxEXPAND, 10 ); + m_staticText184 = new wxStaticText( m_panel39, wxID_ANY, _("Log file format:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText184->Wrap( -1 ); + bSizer297->Add( m_staticText184, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticline361 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer166->Add( m_staticline361, 0, wxEXPAND, 5 ); + wxFlexGridSizer* fgSizer251; + fgSizer251 = new wxFlexGridSizer( 0, 1, 5, 0 ); + fgSizer251->SetFlexibleDirection( wxBOTH ); + fgSizer251->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - wxFlexGridSizer* fgSizer251111; - fgSizer251111 = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer251111->AddGrowableCol( 1 ); - fgSizer251111->AddGrowableRow( 0 ); - fgSizer251111->SetFlexibleDirection( wxBOTH ); - fgSizer251111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + m_radioBtnLogHtml = new wxRadioButton( m_panel39, wxID_ANY, _("&HTML"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtnLogHtml->SetValue( true ); + fgSizer251->Add( m_radioBtnLogHtml, 0, wxEXPAND, 5 ); - m_bitmapNotificationSounds = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer251111->Add( m_bitmapNotificationSounds, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_radioBtnLogText = new wxRadioButton( m_panel39, wxID_ANY, _("&Plain text"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer251->Add( m_radioBtnLogText, 0, wxEXPAND, 5 ); - m_staticText851 = new wxStaticText( m_panel39, wxID_ANY, _("Notification sounds:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText851->Wrap( -1 ); - fgSizer251111->Add( m_staticText851, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer297->Add( fgSizer251, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer251111->Add( 0, 0, 0, 0, 5 ); - ffgSizer11 = new wxFlexGridSizer( 0, 3, 0, 10 ); - ffgSizer11->AddGrowableCol( 2 ); - ffgSizer11->SetFlexibleDirection( wxBOTH ); - ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + fgSizer25111->Add( bSizer297, 0, wxTOP, 5 ); - m_staticText171 = new wxStaticText( m_panel39, wxID_ANY, _("Comparison finished:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText171->Wrap( -1 ); - m_staticText171->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - ffgSizer11->Add( m_staticText171, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer166->Add( fgSizer25111, 0, wxALL|wxEXPAND, 10 ); - m_bitmapCompareDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_bitmapCompareDone, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticline361 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer166->Add( m_staticline361, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer290; - bSizer290 = new wxBoxSizer( wxHORIZONTAL ); + wxFlexGridSizer* fgSizer251111; + fgSizer251111 = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizer251111->AddGrowableCol( 1 ); + fgSizer251111->AddGrowableRow( 0 ); + fgSizer251111->SetFlexibleDirection( wxBOTH ); + fgSizer251111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_bpButtonPlayCompareDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer290->Add( m_bpButtonPlayCompareDone, 0, wxEXPAND, 5 ); + m_bitmapNotificationSounds = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer251111->Add( m_bitmapNotificationSounds, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlSoundPathCompareDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer290->Add( m_textCtrlSoundPathCompareDone, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText851 = new wxStaticText( m_panel39, wxID_ANY, _("Notification sounds:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText851->Wrap( -1 ); + fgSizer251111->Add( m_staticText851, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_buttonSelectSoundCompareDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectSoundCompareDone->SetToolTip( _("Select a folder") ); - bSizer290->Add( m_buttonSelectSoundCompareDone, 0, wxEXPAND, 5 ); + fgSizer251111->Add( 0, 0, 0, 0, 5 ); + ffgSizer11 = new wxFlexGridSizer( 0, 3, 0, 10 ); + ffgSizer11->AddGrowableCol( 2 ); + ffgSizer11->SetFlexibleDirection( wxBOTH ); + ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - ffgSizer11->Add( bSizer290, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_staticText171 = new wxStaticText( m_panel39, wxID_ANY, _("Comparison finished:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText171->Wrap( -1 ); + m_staticText171->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - m_staticText1711 = new wxStaticText( m_panel39, wxID_ANY, _("Synchronization finished:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1711->Wrap( -1 ); - m_staticText1711->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + ffgSizer11->Add( m_staticText171, 0, wxALIGN_CENTER_VERTICAL, 5 ); - ffgSizer11->Add( m_staticText1711, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapCompareDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_bitmapCompareDone, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapSyncDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_bitmapSyncDone, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer290; + bSizer290 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer2901; - bSizer2901 = new wxBoxSizer( wxHORIZONTAL ); + m_bpButtonPlayCompareDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer290->Add( m_bpButtonPlayCompareDone, 0, wxEXPAND, 5 ); - m_bpButtonPlaySyncDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer2901->Add( m_bpButtonPlaySyncDone, 0, wxEXPAND, 5 ); + m_textCtrlSoundPathCompareDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer290->Add( m_textCtrlSoundPathCompareDone, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlSoundPathSyncDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2901->Add( m_textCtrlSoundPathSyncDone, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonSelectSoundCompareDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectSoundCompareDone->SetToolTip( _("Select a folder") ); - m_buttonSelectSoundSyncDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectSoundSyncDone->SetToolTip( _("Select a folder") ); + bSizer290->Add( m_buttonSelectSoundCompareDone, 0, wxEXPAND, 5 ); - bSizer2901->Add( m_buttonSelectSoundSyncDone, 0, wxEXPAND, 5 ); + ffgSizer11->Add( bSizer290, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - ffgSizer11->Add( bSizer2901, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_staticText1711 = new wxStaticText( m_panel39, wxID_ANY, _("Synchronization finished:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1711->Wrap( -1 ); + m_staticText1711->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - m_staticText17111 = new wxStaticText( m_panel39, wxID_ANY, _("Unattended error message:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText17111->Wrap( -1 ); - m_staticText17111->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + ffgSizer11->Add( m_staticText1711, 0, wxALIGN_CENTER_VERTICAL, 5 ); - ffgSizer11->Add( m_staticText17111, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapSyncDone = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_bitmapSyncDone, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_bitmapAlertPending = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_bitmapAlertPending, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer2901; + bSizer2901 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer29011; - bSizer29011 = new wxBoxSizer( wxHORIZONTAL ); + m_bpButtonPlaySyncDone = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer2901->Add( m_bpButtonPlaySyncDone, 0, wxEXPAND, 5 ); - m_bpButtonPlayAlertPending = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer29011->Add( m_bpButtonPlayAlertPending, 0, wxEXPAND, 5 ); + m_textCtrlSoundPathSyncDone = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2901->Add( m_textCtrlSoundPathSyncDone, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_textCtrlSoundPathAlertPending = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer29011->Add( m_textCtrlSoundPathAlertPending, 1, wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonSelectSoundSyncDone = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectSoundSyncDone->SetToolTip( _("Select a folder") ); - m_buttonSelectSoundAlertPending = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSelectSoundAlertPending->SetToolTip( _("Select a folder") ); + bSizer2901->Add( m_buttonSelectSoundSyncDone, 0, wxEXPAND, 5 ); - bSizer29011->Add( m_buttonSelectSoundAlertPending, 0, wxEXPAND, 5 ); + ffgSizer11->Add( bSizer2901, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - ffgSizer11->Add( bSizer29011, 1, wxEXPAND, 5 ); + m_staticText17111 = new wxStaticText( m_panel39, wxID_ANY, _("Unattended error message:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17111->Wrap( -1 ); + m_staticText17111->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + ffgSizer11->Add( m_staticText17111, 0, wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer251111->Add( ffgSizer11, 0, wxEXPAND|wxTOP, 5 ); + m_bitmapAlertPending = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_bitmapAlertPending, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer29011; + bSizer29011 = new wxBoxSizer( wxHORIZONTAL ); - bSizer166->Add( fgSizer251111, 0, wxALL|wxEXPAND, 10 ); + m_bpButtonPlayAlertPending = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer29011->Add( m_bpButtonPlayAlertPending, 0, wxEXPAND, 5 ); - m_staticline3611 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer166->Add( m_staticline3611, 0, wxEXPAND, 5 ); + m_textCtrlSoundPathAlertPending = new wxTextCtrl( m_panel39, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer29011->Add( m_textCtrlSoundPathAlertPending, 1, wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer2971; - bSizer2971 = new wxBoxSizer( wxHORIZONTAL ); + m_buttonSelectSoundAlertPending = new wxButton( m_panel39, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSelectSoundAlertPending->SetToolTip( _("Select a folder") ); - m_bitmapConsole = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2971->Add( m_bitmapConsole, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer29011->Add( m_buttonSelectSoundAlertPending, 0, wxEXPAND, 5 ); - m_staticText85 = new wxStaticText( m_panel39, wxID_ANY, _("Customize context menu:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText85->Wrap( -1 ); - bSizer2971->Add( m_staticText85, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_buttonShowCtxCustomize = new wxButton( m_panel39, wxID_ANY, _("&Show details"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer2971->Add( m_buttonShowCtxCustomize, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + ffgSizer11->Add( bSizer29011, 1, wxEXPAND, 5 ); - bSizer166->Add( bSizer2971, 0, wxALL, 10 ); + fgSizer251111->Add( ffgSizer11, 0, wxEXPAND|wxTOP, 5 ); - bSizerContextCustomize = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer181; - bSizer181 = new wxBoxSizer( wxHORIZONTAL ); + bSizer166->Add( fgSizer251111, 0, wxALL|wxEXPAND, 10 ); - wxBoxSizer* bSizer2991; - bSizer2991 = new wxBoxSizer( wxVERTICAL ); + m_staticline3611 = new wxStaticLine( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer166->Add( m_staticline3611, 0, wxEXPAND, 5 ); + wxBoxSizer* bSizer2971; + bSizer2971 = new wxBoxSizer( wxHORIZONTAL ); - bSizer2991->Add( 0, 0, 1, 0, 5 ); + m_bitmapConsole = new wxStaticBitmap( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2971->Add( m_bitmapConsole, 0, wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer* bSizer193; - bSizer193 = new wxBoxSizer( wxHORIZONTAL ); + m_staticText85 = new wxStaticText( m_panel39, wxID_ANY, _("Customize context menu:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText85->Wrap( -1 ); + bSizer2971->Add( m_staticText85, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_bpButtonAddRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer193->Add( m_bpButtonAddRow, 0, wxALIGN_BOTTOM, 5 ); + m_buttonShowCtxCustomize = new wxButton( m_panel39, wxID_ANY, _("&Show details"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer2971->Add( m_buttonShowCtxCustomize, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_bpButtonRemoveRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), wxBU_AUTODRAW|0 ); - bSizer193->Add( m_bpButtonRemoveRow, 0, wxALIGN_BOTTOM, 5 ); + bSizer166->Add( bSizer2971, 0, wxALL, 10 ); - bSizer2991->Add( bSizer193, 0, 0, 5 ); + bSizerContextCustomize = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer181; + bSizer181 = new wxBoxSizer( wxHORIZONTAL ); - bSizer181->Add( bSizer2991, 1, wxEXPAND, 5 ); + wxBoxSizer* bSizer2991; + bSizer2991 = new wxBoxSizer( wxVERTICAL ); - wxFlexGridSizer* fgSizer37; - fgSizer37 = new wxFlexGridSizer( 0, 2, 0, 10 ); - fgSizer37->SetFlexibleDirection( wxBOTH ); - fgSizer37->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText174 = new wxStaticText( m_panel39, wxID_ANY, _("%item_path%"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText174->Wrap( -1 ); - m_staticText174->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - m_staticText174->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + bSizer2991->Add( 0, 0, 1, 0, 5 ); - fgSizer37->Add( m_staticText174, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer193; + bSizer193 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText175 = new wxStaticText( m_panel39, wxID_ANY, _("Full file or folder path"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText175->Wrap( -1 ); - m_staticText175->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_bpButtonAddRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer193->Add( m_bpButtonAddRow, 0, wxALIGN_BOTTOM, 5 ); - fgSizer37->Add( m_staticText175, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_bpButtonRemoveRow = new wxBitmapButton( m_panel39, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer193->Add( m_bpButtonRemoveRow, 0, wxALIGN_BOTTOM, 5 ); - m_staticText178 = new wxStaticText( m_panel39, wxID_ANY, _("%local_path%"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText178->Wrap( -1 ); - m_staticText178->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - m_staticText178->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - fgSizer37->Add( m_staticText178, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer2991->Add( bSizer193, 0, 0, 5 ); - m_staticText179 = new wxStaticText( m_panel39, wxID_ANY, _("Temporary local copy for SFTP and MTP storage"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText179->Wrap( -1 ); - m_staticText179->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - fgSizer37->Add( m_staticText179, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer181->Add( bSizer2991, 1, wxEXPAND, 5 ); - m_staticText189 = new wxStaticText( m_panel39, wxID_ANY, _("%item_name%"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText189->Wrap( -1 ); - m_staticText189->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - m_staticText189->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + wxFlexGridSizer* fgSizer37; + fgSizer37 = new wxFlexGridSizer( 0, 2, 0, 10 ); + fgSizer37->SetFlexibleDirection( wxBOTH ); + fgSizer37->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - fgSizer37->Add( m_staticText189, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText174 = new wxStaticText( m_panel39, wxID_ANY, _("%item_path%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText174->Wrap( -1 ); + m_staticText174->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticText174->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - m_staticText190 = new wxStaticText( m_panel39, wxID_ANY, _("File or folder name"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText190->Wrap( -1 ); - m_staticText190->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + fgSizer37->Add( m_staticText174, 0, wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer37->Add( m_staticText190, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText175 = new wxStaticText( m_panel39, wxID_ANY, _("Full file or folder path"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText175->Wrap( -1 ); + m_staticText175->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - m_staticText176 = new wxStaticText( m_panel39, wxID_ANY, _("%parent_path%"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText176->Wrap( -1 ); - m_staticText176->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - m_staticText176->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + fgSizer37->Add( m_staticText175, 0, wxALIGN_CENTER_VERTICAL, 5 ); - fgSizer37->Add( m_staticText176, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText178 = new wxStaticText( m_panel39, wxID_ANY, _("%local_path%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText178->Wrap( -1 ); + m_staticText178->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticText178->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - wxBoxSizer* bSizer298; - bSizer298 = new wxBoxSizer( wxHORIZONTAL ); + fgSizer37->Add( m_staticText178, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText177 = new wxStaticText( m_panel39, wxID_ANY, _("Parent folder path"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText177->Wrap( -1 ); - m_staticText177->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + m_staticText179 = new wxStaticText( m_panel39, wxID_ANY, _("Temporary local copy for SFTP and MTP storage"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText179->Wrap( -1 ); + m_staticText179->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer298->Add( m_staticText177, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizer37->Add( m_staticText179, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText189 = new wxStaticText( m_panel39, wxID_ANY, _("%item_name%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText189->Wrap( -1 ); + m_staticText189->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticText189->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer298->Add( 0, 0, 1, 0, 5 ); + fgSizer37->Add( m_staticText189, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_hyperlink17 = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("Show examples"), wxT("https://freefilesync.org/manual.php?topic=external-applications"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink17->SetToolTip( _("https://freefilesync.org/manual.php?topic=external-applications") ); + m_staticText190 = new wxStaticText( m_panel39, wxID_ANY, _("File or folder name"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText190->Wrap( -1 ); + m_staticText190->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - bSizer298->Add( m_hyperlink17, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); + fgSizer37->Add( m_staticText190, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticText176 = new wxStaticText( m_panel39, wxID_ANY, _("%parent_path%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText176->Wrap( -1 ); + m_staticText176->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticText176->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); - fgSizer37->Add( bSizer298, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + fgSizer37->Add( m_staticText176, 0, wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer298; + bSizer298 = new wxBoxSizer( wxHORIZONTAL ); - bSizer181->Add( fgSizer37, 0, wxBOTTOM|wxLEFT, 10 ); + m_staticText177 = new wxStaticText( m_panel39, wxID_ANY, _("Parent folder path"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText177->Wrap( -1 ); + m_staticText177->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + bSizer298->Add( m_staticText177, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - bSizerContextCustomize->Add( bSizer181, 0, wxEXPAND, 5 ); - m_gridCustomCommand = new wxGrid( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer298->Add( 0, 0, 1, 0, 5 ); - // Grid - m_gridCustomCommand->CreateGrid( 3, 2 ); - m_gridCustomCommand->EnableEditing( true ); - m_gridCustomCommand->EnableGridLines( true ); - m_gridCustomCommand->EnableDragGridSize( false ); - m_gridCustomCommand->SetMargins( 0, 0 ); + m_hyperlink17 = new wxHyperlinkCtrl( m_panel39, wxID_ANY, _("Show examples"), wxT("https://freefilesync.org/manual.php?topic=external-applications"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink17->SetToolTip( _("https://freefilesync.org/manual.php?topic=external-applications") ); - // Columns - m_gridCustomCommand->EnableDragColMove( false ); - m_gridCustomCommand->EnableDragColSize( false ); - m_gridCustomCommand->SetColLabelValue( 0, _("Description") ); - m_gridCustomCommand->SetColLabelValue( 1, _("Command line") ); - m_gridCustomCommand->SetColLabelSize( -1 ); - m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + bSizer298->Add( m_hyperlink17, 0, wxLEFT|wxALIGN_BOTTOM, 5 ); - // Rows - m_gridCustomCommand->EnableDragRowSize( false ); - m_gridCustomCommand->SetRowLabelSize( 1 ); - m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); - // Label Appearance + fgSizer37->Add( bSizer298, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - // Cell Defaults - m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - bSizerContextCustomize->Add( m_gridCustomCommand, 1, wxEXPAND, 5 ); + bSizer181->Add( fgSizer37, 0, wxBOTTOM|wxLEFT, 10 ); - bSizer166->Add( bSizerContextCustomize, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + bSizerContextCustomize->Add( bSizer181, 0, wxEXPAND, 5 ); - m_panel39->SetSizer( bSizer166 ); - m_panel39->Layout(); - bSizer166->Fit( m_panel39 ); - bSizer95->Add( m_panel39, 1, wxEXPAND, 5 ); + m_gridCustomCommand = new wxGrid( m_panel39, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 ); + // Grid + m_gridCustomCommand->CreateGrid( 3, 2 ); + m_gridCustomCommand->EnableEditing( true ); + m_gridCustomCommand->EnableGridLines( true ); + m_gridCustomCommand->EnableDragGridSize( false ); + m_gridCustomCommand->SetMargins( 0, 0 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + // Columns + m_gridCustomCommand->EnableDragColMove( false ); + m_gridCustomCommand->EnableDragColSize( false ); + m_gridCustomCommand->SetColLabelValue( 0, _("Description") ); + m_gridCustomCommand->SetColLabelValue( 1, _("Command line") ); + m_gridCustomCommand->SetColLabelSize( -1 ); + m_gridCustomCommand->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); - m_buttonDefault = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonDefault, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + // Rows + m_gridCustomCommand->EnableDragRowSize( false ); + m_gridCustomCommand->SetRowLabelSize( 1 ); + m_gridCustomCommand->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Label Appearance - bSizerStdButtons->Add( 0, 0, 1, 0, 5 ); + // Cell Defaults + m_gridCustomCommand->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); + bSizerContextCustomize->Add( m_gridCustomCommand, 1, wxEXPAND, 5 ); - m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + bSizer166->Add( bSizerContextCustomize, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); - bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_panel39->SetSizer( bSizer166 ); + m_panel39->Layout(); + bSizer166->Fit( m_panel39 ); + bSizer95->Add( m_panel39, 1, wxEXPAND, 5 ); + m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 ); - bSizer95->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + m_buttonDefault = new wxButton( this, wxID_DEFAULT, _("&Default"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonDefault, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - this->SetSizer( bSizer95 ); - this->Layout(); - bSizer95->Fit( this ); - this->Centre( wxBOTH ); + bSizerStdButtons->Add( 0, 0, 1, 0, 5 ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( OptionsDlgGenerated::onClose ) ); - m_buttonShowHiddenDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onShowHiddenDialogs ), NULL, this ); - m_checkListHiddenDialogs->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( OptionsDlgGenerated::onToggleHiddenDialog ), NULL, this ); - m_bpButtonShowLogFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onShowLogFolder ), NULL, this ); - m_checkBoxLogFilesMaxAge->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onToggleLogfilesLimit ), NULL, this ); - m_bpButtonPlayCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onPlayCompareDone ), NULL, this ); - m_textCtrlSoundPathCompareDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::onChangeSoundFilePath ), NULL, this ); - m_buttonSelectSoundCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onSelectSoundCompareDone ), NULL, this ); - m_bpButtonPlaySyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onPlaySyncDone ), NULL, this ); - m_textCtrlSoundPathSyncDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::onChangeSoundFilePath ), NULL, this ); - m_buttonSelectSoundSyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onSelectSoundSyncDone ), NULL, this ); - m_bpButtonPlayAlertPending->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onPlayAlertPending ), NULL, this ); - m_textCtrlSoundPathAlertPending->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::onChangeSoundFilePath ), NULL, this ); - m_buttonSelectSoundAlertPending->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onSelectSoundAlertPending ), NULL, this ); - m_buttonShowCtxCustomize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onShowContextCustomize ), NULL, this ); - m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onAddRow ), NULL, this ); - m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onRemoveRow ), NULL, this ); - m_buttonDefault->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onDefault ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onCancel ), NULL, this ); + m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + + bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + + bSizer95->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); + + + this->SetSizer( bSizer95 ); + this->Layout(); + bSizer95->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( OptionsDlgGenerated::onClose ) ); + m_choiceColorTheme->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( OptionsDlgGenerated::onChangeColorTheme ), NULL, this ); + m_buttonShowHiddenDialogs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onShowHiddenDialogs ), NULL, this ); + m_checkListHiddenDialogs->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( OptionsDlgGenerated::onToggleHiddenDialog ), NULL, this ); + m_bpButtonShowLogFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onShowLogFolder ), NULL, this ); + m_checkBoxLogFilesMaxAge->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onToggleLogfilesLimit ), NULL, this ); + m_bpButtonPlayCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onPlayCompareDone ), NULL, this ); + m_textCtrlSoundPathCompareDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::onChangeSoundFilePath ), NULL, this ); + m_buttonSelectSoundCompareDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onSelectSoundCompareDone ), NULL, this ); + m_bpButtonPlaySyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onPlaySyncDone ), NULL, this ); + m_textCtrlSoundPathSyncDone->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::onChangeSoundFilePath ), NULL, this ); + m_buttonSelectSoundSyncDone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onSelectSoundSyncDone ), NULL, this ); + m_bpButtonPlayAlertPending->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onPlayAlertPending ), NULL, this ); + m_textCtrlSoundPathAlertPending->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( OptionsDlgGenerated::onChangeSoundFilePath ), NULL, this ); + m_buttonSelectSoundAlertPending->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onSelectSoundAlertPending ), NULL, this ); + m_buttonShowCtxCustomize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onShowContextCustomize ), NULL, this ); + m_bpButtonAddRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onAddRow ), NULL, this ); + m_bpButtonRemoveRow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onRemoveRow ), NULL, this ); + m_buttonDefault->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onDefault ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OptionsDlgGenerated::onCancel ), NULL, this ); } OptionsDlgGenerated::~OptionsDlgGenerated() @@ -5257,61 +5260,61 @@ OptionsDlgGenerated::~OptionsDlgGenerated() SelectTimespanDlgGenerated::SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer96; - bSizer96 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer96; + bSizer96 = new wxBoxSizer( wxVERTICAL ); - m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer98; - bSizer98 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer98; + bSizer98 = new wxBoxSizer( wxHORIZONTAL ); - m_calendarFrom = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxCAL_SHOW_SURROUNDING_WEEKS|wxBORDER_NONE ); - bSizer98->Add( m_calendarFrom, 0, wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_calendarFrom = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxCAL_SHOW_SURROUNDING_WEEKS|wxBORDER_NONE ); + bSizer98->Add( m_calendarFrom, 0, wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_calendarTo = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxCAL_SHOW_SURROUNDING_WEEKS|wxBORDER_NONE ); - bSizer98->Add( m_calendarTo, 0, wxALL, 10 ); + m_calendarTo = new wxCalendarCtrl( m_panel35, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS|wxCAL_SHOW_SURROUNDING_WEEKS|wxBORDER_NONE ); + bSizer98->Add( m_calendarTo, 0, wxALL, 10 ); - m_panel35->SetSizer( bSizer98 ); - m_panel35->Layout(); - bSizer98->Fit( m_panel35 ); - bSizer96->Add( m_panel35, 0, wxEXPAND, 5 ); + m_panel35->SetSizer( bSizer98 ); + m_panel35->Layout(); + bSizer98->Fit( m_panel35 ); + bSizer96->Add( m_panel35, 0, wxEXPAND, 5 ); - m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 ); + m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer96 ); - this->Layout(); - bSizer96->Fit( this ); + this->SetSizer( bSizer96 ); + this->Layout(); + bSizer96->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::onClose ) ); - m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::onChangeSelectionFrom ), NULL, this ); - m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::onChangeSelectionTo ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( SelectTimespanDlgGenerated::onClose ) ); + m_calendarFrom->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::onChangeSelectionFrom ), NULL, this ); + m_calendarTo->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( SelectTimespanDlgGenerated::onChangeSelectionTo ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectTimespanDlgGenerated::onCancel ), NULL, this ); } SelectTimespanDlgGenerated::~SelectTimespanDlgGenerated() @@ -5320,210 +5323,210 @@ SelectTimespanDlgGenerated::~SelectTimespanDlgGenerated() 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 ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer31; - bSizer31 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer31; + bSizer31 = new wxBoxSizer( wxVERTICAL ); - m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel41 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel41->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer174; - bSizer174 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer174; + bSizer174 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapLogoLeft = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer174->Add( m_bitmapLogoLeft, 0, wxBOTTOM, 5 ); + m_bitmapLogoLeft = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer174->Add( m_bitmapLogoLeft, 0, wxBOTTOM, 5 ); - m_staticline81 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer174->Add( m_staticline81, 0, wxEXPAND, 5 ); + m_staticline81 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer174->Add( m_staticline81, 0, wxEXPAND, 5 ); - bSizerMainSection = new wxBoxSizer( wxVERTICAL ); + bSizerMainSection = new wxBoxSizer( wxVERTICAL ); - m_staticline82 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerMainSection->Add( m_staticline82, 0, wxEXPAND, 5 ); + m_staticline82 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMainSection->Add( m_staticline82, 0, wxEXPAND, 5 ); - m_bitmapLogo = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerMainSection->Add( m_bitmapLogo, 0, 0, 5 ); + m_bitmapLogo = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerMainSection->Add( m_bitmapLogo, 0, 0, 5 ); - m_staticline341 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerMainSection->Add( m_staticline341, 0, wxEXPAND, 5 ); + m_staticline341 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMainSection->Add( m_staticline341, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer298; - bSizer298 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer298; + bSizer298 = new wxBoxSizer( wxHORIZONTAL ); - m_staticFfsTextVersion = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticFfsTextVersion->Wrap( -1 ); - bSizer298->Add( m_staticFfsTextVersion, 0, wxALIGN_BOTTOM, 5 ); + m_staticFfsTextVersion = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticFfsTextVersion->Wrap( -1 ); + bSizer298->Add( m_staticFfsTextVersion, 0, wxALIGN_BOTTOM, 5 ); - m_staticTextFfsVariant = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextFfsVariant->Wrap( -1 ); - m_staticTextFfsVariant->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_staticTextFfsVariant = new wxStaticText( m_panel41, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFfsVariant->Wrap( -1 ); + m_staticTextFfsVariant->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer298->Add( m_staticTextFfsVariant, 0, wxLEFT|wxALIGN_BOTTOM, 10 ); + bSizer298->Add( m_staticTextFfsVariant, 0, wxLEFT|wxALIGN_BOTTOM, 10 ); - bSizerMainSection->Add( bSizer298, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + bSizerMainSection->Add( bSizer298, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - m_staticline3411 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerMainSection->Add( m_staticline3411, 0, wxEXPAND, 5 ); + m_staticline3411 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMainSection->Add( m_staticline3411, 0, wxEXPAND, 5 ); - bSizerDonate = new wxBoxSizer( wxVERTICAL ); + bSizerDonate = new wxBoxSizer( wxVERTICAL ); - bSizerDonate->Add( 0, 0, 1, 0, 5 ); + bSizerDonate->Add( 0, 0, 1, 0, 5 ); - m_panelDonate = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panelDonate->SetBackgroundColour( wxColour( 153, 170, 187 ) ); + m_panelDonate = new wxPanel( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelDonate->SetBackgroundColour( wxColour( 153, 170, 187 ) ); - wxBoxSizer* bSizer183; - bSizer183 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer183; + bSizer183 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapAnimalSmall = new wxStaticBitmap( m_panelDonate, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer183->Add( m_bitmapAnimalSmall, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_bitmapAnimalSmall = new wxStaticBitmap( m_panelDonate, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer183->Add( m_bitmapAnimalSmall, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_panel39 = new wxPanel( m_panelDonate, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel39->SetBackgroundColour( wxColour( 248, 248, 248 ) ); + m_panel39 = new wxPanel( m_panelDonate, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel39->SetBackgroundColour( wxColour( 248, 248, 248 ) ); - wxBoxSizer* bSizer184; - bSizer184 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer184; + bSizer184 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextDonate = new wxStaticText( m_panel39, wxID_ANY, _("Get the Donation Edition with bonus features and help keep FreeFileSync ad-free."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDonate->Wrap( -1 ); - m_staticTextDonate->SetForegroundColour( wxColour( 0, 0, 0 ) ); + m_staticTextDonate = new wxStaticText( m_panel39, wxID_ANY, _("Get the Donation Edition with bonus features and help keep FreeFileSync ad-free."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDonate->Wrap( -1 ); + m_staticTextDonate->SetForegroundColour( wxColour( 0, 0, 0 ) ); - bSizer184->Add( m_staticTextDonate, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxALIGN_CENTER_VERTICAL, 10 ); + bSizer184->Add( m_staticTextDonate, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxALIGN_CENTER_VERTICAL, 10 ); - m_panel39->SetSizer( bSizer184 ); - m_panel39->Layout(); - bSizer184->Fit( m_panel39 ); - bSizer183->Add( m_panel39, 1, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 5 ); + m_panel39->SetSizer( bSizer184 ); + m_panel39->Layout(); + bSizer184->Fit( m_panel39 ); + bSizer183->Add( m_panel39, 1, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 5 ); - m_panelDonate->SetSizer( bSizer183 ); - m_panelDonate->Layout(); - bSizer183->Fit( m_panelDonate ); - bSizerDonate->Add( m_panelDonate, 0, wxEXPAND, 5 ); + m_panelDonate->SetSizer( bSizer183 ); + m_panelDonate->Layout(); + bSizer183->Fit( m_panelDonate ); + bSizerDonate->Add( m_panelDonate, 0, wxEXPAND, 5 ); - m_buttonDonate1 = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("Support with a donation"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonDonate1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonDonate1->SetToolTip( _("https://freefilesync.org/donate") ); + m_buttonDonate1 = new zen::BitmapTextButton( m_panel41, wxID_ANY, _("Support with a donation"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonDonate1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonDonate1->SetToolTip( _("https://freefilesync.org/donate") ); - bSizerDonate->Add( m_buttonDonate1, 0, wxEXPAND|wxALL, 10 ); + bSizerDonate->Add( m_buttonDonate1, 0, wxEXPAND|wxALL, 10 ); - bSizerDonate->Add( 0, 0, 1, 0, 5 ); + bSizerDonate->Add( 0, 0, 1, 0, 5 ); - bSizerMainSection->Add( bSizerDonate, 1, wxEXPAND, 5 ); + bSizerMainSection->Add( bSizerDonate, 1, wxEXPAND, 5 ); - m_bitmapAnimalBig = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerMainSection->Add( m_bitmapAnimalBig, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + m_bitmapAnimalBig = new wxStaticBitmap( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerMainSection->Add( m_bitmapAnimalBig, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - m_staticline3412 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerMainSection->Add( m_staticline3412, 0, wxEXPAND, 5 ); + m_staticline3412 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMainSection->Add( m_staticline3412, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer186; - bSizer186 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer186; + bSizer186 = new wxBoxSizer( wxVERTICAL ); - m_staticText94 = new wxStaticText( m_panel41, wxID_ANY, _("Share your feedback and ideas:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText94->Wrap( -1 ); - bSizer186->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticText94 = new wxStaticText( m_panel41, wxID_ANY, _("Share your feedback and ideas:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText94->Wrap( -1 ); + bSizer186->Add( m_staticText94, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer289; - bSizer289 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer289; + bSizer289 = new wxBoxSizer( wxHORIZONTAL ); - m_bpButtonForum = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - m_bpButtonForum->SetToolTip( _("https://freefilesync.org/forum") ); + m_bpButtonForum = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpButtonForum->SetToolTip( _("https://freefilesync.org/forum") ); - bSizer289->Add( m_bpButtonForum, 0, wxALL|wxEXPAND, 5 ); + bSizer289->Add( m_bpButtonForum, 0, wxALL|wxEXPAND, 5 ); - m_bpButtonEmail = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer289->Add( m_bpButtonEmail, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 5 ); + m_bpButtonEmail = new wxBitmapButton( m_panel41, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer289->Add( m_bpButtonEmail, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 5 ); - bSizer186->Add( bSizer289, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer186->Add( bSizer289, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizerMainSection->Add( bSizer186, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + bSizerMainSection->Add( bSizer186, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - bSizer174->Add( bSizerMainSection, 0, wxEXPAND, 5 ); + bSizer174->Add( bSizerMainSection, 0, wxEXPAND, 5 ); - m_staticline37 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - bSizer174->Add( m_staticline37, 0, wxEXPAND, 5 ); + m_staticline37 = new wxStaticLine( m_panel41, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + bSizer174->Add( m_staticline37, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer177; - bSizer177 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer177; + bSizer177 = new wxBoxSizer( wxVERTICAL ); - m_staticTextThanksForLoc = new wxStaticText( m_panel41, wxID_ANY, _("Many thanks for translation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextThanksForLoc->Wrap( -1 ); - bSizer177->Add( m_staticTextThanksForLoc, 0, wxALL, 5 ); + m_staticTextThanksForLoc = new wxStaticText( m_panel41, wxID_ANY, _("Many thanks for translation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextThanksForLoc->Wrap( -1 ); + bSizer177->Add( m_staticTextThanksForLoc, 0, wxALL, 5 ); - m_scrolledWindowTranslators = new wxScrolledWindow( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1, -1 ), wxVSCROLL ); - m_scrolledWindowTranslators->SetScrollRate( 10, 10 ); - m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_scrolledWindowTranslators = new wxScrolledWindow( m_panel41, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxVSCROLL ); + m_scrolledWindowTranslators->SetScrollRate( 10, 10 ); + m_scrolledWindowTranslators->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - fgSizerTranslators = new wxFlexGridSizer( 0, 2, 2, 10 ); - fgSizerTranslators->SetFlexibleDirection( wxBOTH ); - fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + fgSizerTranslators = new wxFlexGridSizer( 0, 2, 2, 10 ); + fgSizerTranslators->SetFlexibleDirection( wxBOTH ); + fgSizerTranslators->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_scrolledWindowTranslators->SetSizer( fgSizerTranslators ); - m_scrolledWindowTranslators->Layout(); - fgSizerTranslators->Fit( m_scrolledWindowTranslators ); - bSizer177->Add( m_scrolledWindowTranslators, 1, wxEXPAND|wxLEFT, 5 ); + m_scrolledWindowTranslators->SetSizer( fgSizerTranslators ); + m_scrolledWindowTranslators->Layout(); + fgSizerTranslators->Fit( m_scrolledWindowTranslators ); + bSizer177->Add( m_scrolledWindowTranslators, 1, wxEXPAND|wxLEFT, 5 ); - bSizer174->Add( bSizer177, 0, wxEXPAND|wxLEFT, 5 ); + bSizer174->Add( bSizer177, 0, wxEXPAND|wxLEFT, 5 ); - m_panel41->SetSizer( bSizer174 ); - m_panel41->Layout(); - bSizer174->Fit( m_panel41 ); - bSizer31->Add( m_panel41, 0, wxEXPAND, 5 ); + m_panel41->SetSizer( bSizer174 ); + m_panel41->Layout(); + bSizer174->Fit( m_panel41 ); + bSizer31->Add( m_panel41, 0, wxEXPAND, 5 ); - m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer31->Add( m_staticline36, 0, wxEXPAND, 5 ); + m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer31->Add( m_staticline36, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonShowSupporterDetails = new wxButton( this, wxID_ANY, _("Thank you, %x, for your support!"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerStdButtons->Add( m_buttonShowSupporterDetails, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_buttonShowSupporterDetails = new wxButton( this, wxID_ANY, _("Thank you, %x, for your support!"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerStdButtons->Add( m_buttonShowSupporterDetails, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - bSizerStdButtons->Add( 0, 0, 1, 0, 5 ); + bSizerStdButtons->Add( 0, 0, 1, 0, 5 ); - m_buttonDonate2 = new zen::BitmapTextButton( this, wxID_ANY, _("&Donate"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonDonate2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_buttonDonate2->SetToolTip( _("https://freefilesync.org/donate") ); + m_buttonDonate2 = new zen::BitmapTextButton( this, wxID_ANY, _("&Donate"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonDonate2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonDonate2->SetToolTip( _("https://freefilesync.org/donate") ); - bSizerStdButtons->Add( m_buttonDonate2, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bSizerStdButtons->Add( m_buttonDonate2, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonClose->SetDefault(); - bSizerStdButtons->Add( m_buttonClose, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonClose->SetDefault(); + bSizerStdButtons->Add( m_buttonClose, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - bSizer31->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); + bSizer31->Add( bSizerStdButtons, 0, wxEXPAND, 5 ); - this->SetSizer( bSizer31 ); - this->Layout(); - bSizer31->Fit( this ); + this->SetSizer( bSizer31 ); + this->Layout(); + bSizer31->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::onClose ) ); - m_buttonDonate1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onDonate ), NULL, this ); - m_bpButtonForum->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onOpenForum ), NULL, this ); - m_bpButtonEmail->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onSendEmail ), NULL, this ); - m_buttonShowSupporterDetails->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onShowSupporterDetails ), NULL, this ); - m_buttonDonate2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onDonate ), NULL, this ); - m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onOkay ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboutDlgGenerated::onClose ) ); + m_buttonDonate1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onDonate ), NULL, this ); + m_bpButtonForum->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onOpenForum ), NULL, this ); + m_bpButtonEmail->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onSendEmail ), NULL, this ); + m_buttonShowSupporterDetails->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onShowSupporterDetails ), NULL, this ); + m_buttonDonate2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onDonate ), NULL, this ); + m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDlgGenerated::onOkay ), NULL, this ); } AboutDlgGenerated::~AboutDlgGenerated() @@ -5532,61 +5535,61 @@ AboutDlgGenerated::~AboutDlgGenerated() DownloadProgressDlgGenerated::DownloadProgressDlgGenerated( 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 ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - wxBoxSizer* bSizer24; - bSizer24 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer72; - bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapDownloading = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer72->Add( m_bitmapDownloading, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + m_bitmapDownloading = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer72->Add( m_bitmapDownloading, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHeader->Wrap( -1 ); - bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_staticTextHeader = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHeader->Wrap( -1 ); + bSizer72->Add( m_staticTextHeader, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - bSizer72->Add( 20, 0, 0, 0, 5 ); + bSizer72->Add( 20, 0, 0, 0, 5 ); - bSizer24->Add( bSizer72, 0, 0, 5 ); + bSizer24->Add( bSizer72, 0, 0, 5 ); - wxBoxSizer* bSizer212; - bSizer212 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer212; + bSizer212 = new wxBoxSizer( wxVERTICAL ); - m_gaugeProgress = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL ); - m_gaugeProgress->SetValue( 0 ); - bSizer212->Add( m_gaugeProgress, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_gaugeProgress = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL ); + m_gaugeProgress->SetValue( 0 ); + bSizer212->Add( m_gaugeProgress, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_staticTextDetails = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextDetails->Wrap( -1 ); - bSizer212->Add( m_staticTextDetails, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + m_staticTextDetails = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextDetails->Wrap( -1 ); + bSizer212->Add( m_staticTextDetails, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - bSizer24->Add( bSizer212, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizer24->Add( bSizer212, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer24->Add( m_staticline9, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonCancel->SetDefault(); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_buttonCancel->SetDefault(); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer24->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer24->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer24 ); - this->Layout(); - bSizer24->Fit( this ); + this->SetSizer( bSizer24 ); + this->Layout(); + bSizer24->Fit( this ); - // Connect Events - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DownloadProgressDlgGenerated::onCancel ), NULL, this ); + // Connect Events + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DownloadProgressDlgGenerated::onCancel ), NULL, this ); } DownloadProgressDlgGenerated::~DownloadProgressDlgGenerated() @@ -5595,66 +5598,66 @@ DownloadProgressDlgGenerated::~DownloadProgressDlgGenerated() CfgHighlightDlgGenerated::CfgHighlightDlgGenerated( 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 ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer96; - bSizer96 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer96; + bSizer96 = new wxBoxSizer( wxVERTICAL ); - m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer98; - bSizer98 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer98; + bSizer98 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer238; - bSizer238 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer238; + bSizer238 = new wxBoxSizer( wxVERTICAL ); - m_staticTextHighlight = new wxStaticText( m_panel35, wxID_ANY, _("Highlight configurations that have not been run for more than the following number of days:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextHighlight->Wrap( -1 ); - bSizer238->Add( m_staticTextHighlight, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_staticTextHighlight = new wxStaticText( m_panel35, wxID_ANY, _("Highlight configurations that have not been run for more than the following number of days:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextHighlight->Wrap( -1 ); + bSizer238->Add( m_staticTextHighlight, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_spinCtrlOverdueDays = new wxSpinCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 ); - bSizer238->Add( m_spinCtrlOverdueDays, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_spinCtrlOverdueDays = new wxSpinCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 2000000000, 0 ); + bSizer238->Add( m_spinCtrlOverdueDays, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - bSizer98->Add( bSizer238, 1, wxALL|wxEXPAND, 5 ); + bSizer98->Add( bSizer238, 1, wxALL|wxEXPAND, 5 ); - m_panel35->SetSizer( bSizer98 ); - m_panel35->Layout(); - bSizer98->Fit( m_panel35 ); - bSizer96->Add( m_panel35, 0, 0, 5 ); + m_panel35->SetSizer( bSizer98 ); + m_panel35->Layout(); + bSizer98->Fit( m_panel35 ); + bSizer96->Add( m_panel35, 0, 0, 5 ); - m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 ); + m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer96 ); - this->Layout(); - bSizer96->Fit( this ); + this->SetSizer( bSizer96 ); + this->Layout(); + bSizer96->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CfgHighlightDlgGenerated::onClose ) ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( CfgHighlightDlgGenerated::onClose ) ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CfgHighlightDlgGenerated::onCancel ), NULL, this ); } CfgHighlightDlgGenerated::~CfgHighlightDlgGenerated() @@ -5663,97 +5666,97 @@ CfgHighlightDlgGenerated::~CfgHighlightDlgGenerated() PasswordPromptDlgGenerated::PasswordPromptDlgGenerated( 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 ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer96; - bSizer96 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer96; + bSizer96 = new wxBoxSizer( wxVERTICAL ); - m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer98; - bSizer98 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer98; + bSizer98 = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer238; - bSizer238 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer238; + bSizer238 = new wxBoxSizer( wxVERTICAL ); - m_staticTextMain = new wxStaticText( m_panel35, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMain->Wrap( -1 ); - bSizer238->Add( m_staticTextMain, 1, wxALL, 5 ); + m_staticTextMain = new wxStaticText( m_panel35, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMain->Wrap( -1 ); + bSizer238->Add( m_staticTextMain, 1, wxALL, 5 ); - wxBoxSizer* bSizer305; - bSizer305 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer305; + bSizer305 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextPassword = new wxStaticText( m_panel35, wxID_ANY, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPassword->Wrap( -1 ); - bSizer305->Add( m_staticTextPassword, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_staticTextPassword = new wxStaticText( m_panel35, wxID_ANY, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPassword->Wrap( -1 ); + bSizer305->Add( m_staticTextPassword, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_textCtrlPasswordVisible = new wxTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer305->Add( m_textCtrlPasswordVisible, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_textCtrlPasswordVisible = new wxTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer305->Add( m_textCtrlPasswordVisible, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_textCtrlPasswordHidden = new wxTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD ); - bSizer305->Add( m_textCtrlPasswordHidden, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_textCtrlPasswordHidden = new wxTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD ); + bSizer305->Add( m_textCtrlPasswordHidden, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_checkBoxShowPassword = new wxCheckBox( m_panel35, wxID_ANY, _("&Show password"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer305->Add( m_checkBoxShowPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_checkBoxShowPassword = new wxCheckBox( m_panel35, wxID_ANY, _("&Show password"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer305->Add( m_checkBoxShowPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer238->Add( bSizer305, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + bSizer238->Add( bSizer305, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - bSizerError = new wxBoxSizer( wxHORIZONTAL ); + bSizerError = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapError = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerError->Add( m_bitmapError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_bitmapError = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerError->Add( m_bitmapError, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextError = new wxStaticText( m_panel35, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextError->Wrap( -1 ); - bSizerError->Add( m_staticTextError, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_staticTextError = new wxStaticText( m_panel35, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextError->Wrap( -1 ); + bSizerError->Add( m_staticTextError, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer238->Add( bSizerError, 0, 0, 5 ); + bSizer238->Add( bSizerError, 0, 0, 5 ); - bSizer98->Add( bSizer238, 1, wxALL, 5 ); + bSizer98->Add( bSizer238, 1, wxALL, 5 ); - m_panel35->SetSizer( bSizer98 ); - m_panel35->Layout(); - bSizer98->Fit( m_panel35 ); - bSizer96->Add( m_panel35, 1, wxEXPAND, 5 ); + m_panel35->SetSizer( bSizer98 ); + m_panel35->Layout(); + bSizer98->Fit( m_panel35 ); + bSizer96->Add( m_panel35, 1, wxEXPAND, 5 ); - m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 ); + m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer96->Add( m_staticline21, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonOkay = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonOkay->SetDefault(); - m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonOkay->SetDefault(); + m_buttonOkay->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + bSizerStdButtons->Add( m_buttonOkay, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer96->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer96 ); - this->Layout(); - bSizer96->Fit( this ); + this->SetSizer( bSizer96 ); + this->Layout(); + bSizer96->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PasswordPromptDlgGenerated::onClose ) ); - m_textCtrlPasswordVisible->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PasswordPromptDlgGenerated::onTypingPassword ), NULL, this ); - m_textCtrlPasswordHidden->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PasswordPromptDlgGenerated::onTypingPassword ), NULL, this ); - m_checkBoxShowPassword->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PasswordPromptDlgGenerated::onToggleShowPassword ), NULL, this ); - m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PasswordPromptDlgGenerated::onOkay ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PasswordPromptDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PasswordPromptDlgGenerated::onClose ) ); + m_textCtrlPasswordVisible->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PasswordPromptDlgGenerated::onTypingPassword ), NULL, this ); + m_textCtrlPasswordHidden->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PasswordPromptDlgGenerated::onTypingPassword ), NULL, this ); + m_checkBoxShowPassword->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PasswordPromptDlgGenerated::onToggleShowPassword ), NULL, this ); + m_buttonOkay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PasswordPromptDlgGenerated::onOkay ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PasswordPromptDlgGenerated::onCancel ), NULL, this ); } PasswordPromptDlgGenerated::~PasswordPromptDlgGenerated() @@ -5762,178 +5765,178 @@ PasswordPromptDlgGenerated::~PasswordPromptDlgGenerated() ActivationDlgGenerated::ActivationDlgGenerated( 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( -1, -1 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer54; - bSizer54 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer54; + bSizer54 = new wxBoxSizer( wxVERTICAL ); - m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel35 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel35->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer172; - bSizer172 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer172; + bSizer172 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer165; - bSizer165 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer165; + bSizer165 = new wxBoxSizer( wxHORIZONTAL ); - m_bitmapActivation = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer165->Add( m_bitmapActivation, 0, wxALL, 10 ); + m_bitmapActivation = new wxStaticBitmap( m_panel35, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer165->Add( m_bitmapActivation, 0, wxALL, 10 ); - wxBoxSizer* bSizer16; - bSizer16 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer16; + bSizer16 = new wxBoxSizer( wxVERTICAL ); - bSizer16->Add( 0, 10, 0, 0, 5 ); + bSizer16->Add( 0, 10, 0, 0, 5 ); - m_richTextLastError = new wxRichTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE|wxVSCROLL|wxWANTS_CHARS ); - bSizer16->Add( m_richTextLastError, 1, wxEXPAND, 5 ); + m_richTextLastError = new wxRichTextCtrl( m_panel35, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE|wxVSCROLL|wxWANTS_CHARS ); + bSizer16->Add( m_richTextLastError, 1, wxEXPAND, 5 ); - bSizer165->Add( bSizer16, 1, wxEXPAND, 5 ); + bSizer165->Add( bSizer16, 1, wxEXPAND, 5 ); - bSizer172->Add( bSizer165, 1, wxEXPAND, 5 ); + bSizer172->Add( bSizer165, 1, wxEXPAND, 5 ); - m_staticline82 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer172->Add( m_staticline82, 0, wxEXPAND, 5 ); + m_staticline82 = new wxStaticLine( m_panel35, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer172->Add( m_staticline82, 0, wxEXPAND, 5 ); - m_staticTextMain = new wxStaticText( m_panel35, wxID_ANY, _("Activate FreeFileSync by one of the following methods:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMain->Wrap( -1 ); - bSizer172->Add( m_staticTextMain, 0, wxALL, 10 ); + m_staticTextMain = new wxStaticText( m_panel35, wxID_ANY, _("Activate FreeFileSync by one of the following methods:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMain->Wrap( -1 ); + bSizer172->Add( m_staticTextMain, 0, wxALL, 10 ); - m_panel35->SetSizer( bSizer172 ); - m_panel35->Layout(); - bSizer172->Fit( m_panel35 ); - bSizer54->Add( m_panel35, 1, wxEXPAND, 5 ); + m_panel35->SetSizer( bSizer172 ); + m_panel35->Layout(); + bSizer172->Fit( m_panel35 ); + bSizer54->Add( m_panel35, 1, wxEXPAND, 5 ); - m_staticline181 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer54->Add( m_staticline181, 0, wxEXPAND|wxBOTTOM, 5 ); + m_staticline181 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer54->Add( m_staticline181, 0, wxEXPAND|wxBOTTOM, 5 ); - m_staticline18111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer54->Add( m_staticline18111, 0, wxEXPAND|wxTOP, 5 ); + m_staticline18111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer54->Add( m_staticline18111, 0, wxEXPAND|wxTOP, 5 ); - m_panel3511 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel3511->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel3511 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel3511->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer263; - bSizer263 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer263; + bSizer263 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer234; - bSizer234 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer234; + bSizer234 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextMain1 = new wxStaticText( m_panel3511, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMain1->Wrap( -1 ); - bSizer234->Add( m_staticTextMain1, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextMain1 = new wxStaticText( m_panel3511, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMain1->Wrap( -1 ); + bSizer234->Add( m_staticTextMain1, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText136 = new wxStaticText( m_panel3511, wxID_ANY, _("Activate via internet now:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText136->Wrap( -1 ); - bSizer234->Add( m_staticText136, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticText136 = new wxStaticText( m_panel3511, wxID_ANY, _("Activate via internet now:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText136->Wrap( -1 ); + bSizer234->Add( m_staticText136, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_buttonActivateOnline = new wxButton( m_panel3511, wxID_ANY, _("Activate online"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonActivateOnline = new wxButton( m_panel3511, wxID_ANY, _("Activate online"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonActivateOnline->SetDefault(); - m_buttonActivateOnline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonActivateOnline->SetDefault(); + m_buttonActivateOnline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer234->Add( m_buttonActivateOnline, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer234->Add( m_buttonActivateOnline, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer263->Add( bSizer234, 0, wxEXPAND|wxALL, 10 ); + bSizer263->Add( bSizer234, 0, wxEXPAND|wxALL, 10 ); - m_panel3511->SetSizer( bSizer263 ); - m_panel3511->Layout(); - bSizer263->Fit( m_panel3511 ); - bSizer54->Add( m_panel3511, 0, wxEXPAND, 5 ); + m_panel3511->SetSizer( bSizer263 ); + m_panel3511->Layout(); + bSizer263->Fit( m_panel3511 ); + bSizer54->Add( m_panel3511, 0, wxEXPAND, 5 ); - m_staticline181111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer54->Add( m_staticline181111, 0, wxEXPAND|wxBOTTOM, 5 ); + m_staticline181111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer54->Add( m_staticline181111, 0, wxEXPAND|wxBOTTOM, 5 ); - m_staticline181112 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer54->Add( m_staticline181112, 0, wxEXPAND|wxTOP, 5 ); + m_staticline181112 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer54->Add( m_staticline181112, 0, wxEXPAND|wxTOP, 5 ); - m_panel351 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel351->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_panel351 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel351->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - wxBoxSizer* bSizer266; - bSizer266 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer266; + bSizer266 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer237; - bSizer237 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer237; + bSizer237 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer236; - bSizer236 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer236; + bSizer236 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText175 = new wxStaticText( m_panel351, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText175->Wrap( -1 ); - bSizer236->Add( m_staticText175, 0, wxRIGHT|wxALIGN_BOTTOM, 5 ); + m_staticText175 = new wxStaticText( m_panel351, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText175->Wrap( -1 ); + bSizer236->Add( m_staticText175, 0, wxRIGHT|wxALIGN_BOTTOM, 5 ); - m_staticText1361 = new wxStaticText( m_panel351, wxID_ANY, _("Retrieve an offline activation key from the following URL:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1361->Wrap( -1 ); - bSizer236->Add( m_staticText1361, 1, wxRIGHT|wxALIGN_BOTTOM, 5 ); + m_staticText1361 = new wxStaticText( m_panel351, wxID_ANY, _("Retrieve an offline activation key from the following URL:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1361->Wrap( -1 ); + bSizer236->Add( m_staticText1361, 1, wxRIGHT|wxALIGN_BOTTOM, 5 ); - m_buttonCopyUrl = new wxButton( m_panel351, wxID_ANY, _("&Copy to clipboard"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizer236->Add( m_buttonCopyUrl, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonCopyUrl = new wxButton( m_panel351, wxID_ANY, _("&Copy to clipboard"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer236->Add( m_buttonCopyUrl, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer237->Add( bSizer236, 0, wxEXPAND|wxBOTTOM, 5 ); + bSizer237->Add( bSizer236, 0, wxEXPAND|wxBOTTOM, 5 ); - m_richTextManualActivationUrl = new wxRichTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE|wxVSCROLL|wxWANTS_CHARS ); - bSizer237->Add( m_richTextManualActivationUrl, 0, wxEXPAND|wxBOTTOM, 5 ); + m_richTextManualActivationUrl = new wxRichTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE|wxVSCROLL|wxWANTS_CHARS ); + bSizer237->Add( m_richTextManualActivationUrl, 0, wxEXPAND|wxBOTTOM, 5 ); - wxBoxSizer* bSizer235; - bSizer235 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer235; + bSizer235 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText13611 = new wxStaticText( m_panel351, wxID_ANY, _("Enter activation key:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13611->Wrap( -1 ); - bSizer235->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticText13611 = new wxStaticText( m_panel351, wxID_ANY, _("Enter activation key:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13611->Wrap( -1 ); + bSizer235->Add( m_staticText13611, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_textCtrlOfflineActivationKey = new wxTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1, -1 ), wxTE_PROCESS_ENTER ); - bSizer235->Add( m_textCtrlOfflineActivationKey, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_textCtrlOfflineActivationKey = new wxTextCtrl( m_panel351, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_PROCESS_ENTER ); + bSizer235->Add( m_textCtrlOfflineActivationKey, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_buttonActivateOffline = new wxButton( m_panel351, wxID_ANY, _("Activate offline"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_buttonActivateOffline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_buttonActivateOffline = new wxButton( m_panel351, wxID_ANY, _("Activate offline"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonActivateOffline->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizer235->Add( m_buttonActivateOffline, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bSizer235->Add( m_buttonActivateOffline, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer237->Add( bSizer235, 0, wxEXPAND|wxTOP, 5 ); + bSizer237->Add( bSizer235, 0, wxEXPAND|wxTOP, 5 ); - bSizer266->Add( bSizer237, 0, wxALL|wxEXPAND, 10 ); + bSizer266->Add( bSizer237, 0, wxALL|wxEXPAND, 10 ); - m_panel351->SetSizer( bSizer266 ); - m_panel351->Layout(); - bSizer266->Fit( m_panel351 ); - bSizer54->Add( m_panel351, 0, wxEXPAND, 5 ); + m_panel351->SetSizer( bSizer266 ); + m_panel351->Layout(); + bSizer266->Fit( m_panel351 ); + bSizer54->Add( m_panel351, 0, wxEXPAND, 5 ); - m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 ); + m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer54->Add( m_staticline13, 0, wxEXPAND, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizerStdButtons->Add( m_buttonCancel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer54->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - this->SetSizer( bSizer54 ); - this->Layout(); - bSizer54->Fit( this ); + this->SetSizer( bSizer54 ); + this->Layout(); + bSizer54->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ActivationDlgGenerated::onClose ) ); - m_buttonActivateOnline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onActivateOnline ), NULL, this ); - m_buttonCopyUrl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onCopyUrl ), NULL, this ); - m_textCtrlOfflineActivationKey->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ActivationDlgGenerated::onOfflineActivationEnter ), NULL, this ); - m_buttonActivateOffline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onActivateOffline ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onCancel ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ActivationDlgGenerated::onClose ) ); + m_buttonActivateOnline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onActivateOnline ), NULL, this ); + m_buttonCopyUrl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onCopyUrl ), NULL, this ); + m_textCtrlOfflineActivationKey->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ActivationDlgGenerated::onOfflineActivationEnter ), NULL, this ); + m_buttonActivateOffline->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onActivateOffline ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActivationDlgGenerated::onCancel ), NULL, this ); } ActivationDlgGenerated::~ActivationDlgGenerated() @@ -5942,106 +5945,98 @@ ActivationDlgGenerated::~ActivationDlgGenerated() WarnAccessRightsMissingDlgGenerated::WarnAccessRightsMissingDlgGenerated( 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( -1, -1 ), wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - - wxBoxSizer* bSizer330; - bSizer330 = new wxBoxSizer( wxHORIZONTAL ); - - m_bitmapGrantAccess = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer330->Add( m_bitmapGrantAccess, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - wxBoxSizer* bSizer95; - bSizer95 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer330; + bSizer330 = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextDescr = new wxStaticText( this, wxID_ANY, _("FreeFileSync requires access rights to avoid \"Operation not permitted\" errors when synchronizing your data (e.g. Mail, Messages, Calendars)."), wxDefaultPosition, wxSize( -1, -1 ), 0 ); - m_staticTextDescr->Wrap( -1 ); - bSizer95->Add( m_staticTextDescr, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); + m_bitmapGrantAccess = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer330->Add( m_bitmapGrantAccess, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 ); - m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 ); + wxBoxSizer* bSizer95; + bSizer95 = new wxBoxSizer( wxVERTICAL ); - m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_staticTextDescr = new wxStaticText( this, wxID_ANY, _("FreeFileSync requires access rights to avoid \"Operation not permitted\" errors when synchronizing your data (e.g. Mail, Messages, Calendars)."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_staticTextDescr->Wrap( -1 ); + bSizer95->Add( m_staticTextDescr, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 10 ); - wxBoxSizer* bSizer166; - bSizer166 = new wxBoxSizer( wxVERTICAL ); + m_staticline20 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer95->Add( m_staticline20, 0, wxEXPAND, 5 ); - ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 ); - ffgSizer11->SetFlexibleDirection( wxBOTH ); - ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + m_panel39 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panel39->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - m_staticTextStep1 = new wxStaticText( m_panel39, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStep1->Wrap( -1 ); - ffgSizer11->Add( m_staticTextStep1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + wxBoxSizer* bSizer166; + bSizer166 = new wxBoxSizer( wxVERTICAL ); - m_buttonLocateBundle = new wxButton( m_panel39, wxID_ANY, _("Locate the FreeFileSync app"), wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_buttonLocateBundle, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + ffgSizer11 = new wxFlexGridSizer( 0, 2, 5, 5 ); + ffgSizer11->SetFlexibleDirection( wxBOTH ); + ffgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextStep2 = new wxStaticText( m_panel39, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStep2->Wrap( -1 ); - ffgSizer11->Add( m_staticTextStep2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticTextStep1 = new wxStaticText( m_panel39, wxID_ANY, _("1."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStep1->Wrap( -1 ); + ffgSizer11->Add( m_staticTextStep1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_buttonOpenSecurity = new wxButton( m_panel39, wxID_ANY, _("Open Security && Privacy"), wxDefaultPosition, wxDefaultSize, 0 ); - ffgSizer11->Add( m_buttonOpenSecurity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_buttonLocateBundle = new wxButton( m_panel39, wxID_ANY, _("Locate the FreeFileSync app"), wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_buttonLocateBundle, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticTextStep3 = new wxStaticText( m_panel39, wxID_ANY, _("3."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStep3->Wrap( -1 ); - ffgSizer11->Add( m_staticTextStep3, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticTextStep2 = new wxStaticText( m_panel39, wxID_ANY, _("2."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStep2->Wrap( -1 ); + ffgSizer11->Add( m_staticTextStep2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_staticTextAllowChanges = new wxStaticText( m_panel39, wxID_ANY, _("Click the lock to allow changes."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAllowChanges->Wrap( -1 ); - ffgSizer11->Add( m_staticTextAllowChanges, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonOpenSecurity = new wxButton( m_panel39, wxID_ANY, _("Open Security && Privacy"), wxDefaultPosition, wxDefaultSize, 0 ); + ffgSizer11->Add( m_buttonOpenSecurity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_staticTextStep4 = new wxStaticText( m_panel39, wxID_ANY, _("4."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStep4->Wrap( -1 ); - ffgSizer11->Add( m_staticTextStep4, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); + m_staticTextStep3 = new wxStaticText( m_panel39, wxID_ANY, _("3."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextStep3->Wrap( -1 ); + ffgSizer11->Add( m_staticTextStep3, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_staticTextGrantAccess = new wxStaticText( m_panel39, wxID_ANY, _("Drag FreeFileSync into the panel."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextGrantAccess->Wrap( -1 ); - ffgSizer11->Add( m_staticTextGrantAccess, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextGrantAccess = new wxStaticText( m_panel39, wxID_ANY, _("Drag FreeFileSync into the panel."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextGrantAccess->Wrap( -1 ); + ffgSizer11->Add( m_staticTextGrantAccess, 0, wxALIGN_CENTER_VERTICAL, 5 ); - bSizer166->Add( ffgSizer11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 ); + bSizer166->Add( ffgSizer11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 ); - m_panel39->SetSizer( bSizer166 ); - m_panel39->Layout(); - bSizer166->Fit( m_panel39 ); - bSizer95->Add( m_panel39, 1, wxEXPAND, 5 ); + m_panel39->SetSizer( bSizer166 ); + m_panel39->Layout(); + bSizer166->Fit( m_panel39 ); + bSizer95->Add( m_panel39, 1, wxEXPAND, 5 ); - m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 ); + m_staticline36 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer95->Add( m_staticline36, 0, wxEXPAND, 5 ); - m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer95->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + m_checkBoxDontShowAgain = new wxCheckBox( this, wxID_ANY, _("&Don't show this dialog again"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer95->Add( m_checkBoxDontShowAgain, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); - bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); + bSizerStdButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1, -1 ), 0 ); + m_buttonClose = new wxButton( this, wxID_OK, _("Close"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_buttonClose->SetDefault(); - bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_buttonClose->SetDefault(); + bSizerStdButtons->Add( m_buttonClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - bSizer95->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); + bSizer95->Add( bSizerStdButtons, 0, wxALIGN_RIGHT, 5 ); - bSizer330->Add( bSizer95, 1, wxEXPAND, 5 ); + bSizer330->Add( bSizer95, 1, wxEXPAND, 5 ); - this->SetSizer( bSizer330 ); - this->Layout(); - bSizer330->Fit( this ); + this->SetSizer( bSizer330 ); + this->Layout(); + bSizer330->Fit( this ); - this->Centre( wxBOTH ); + this->Centre( wxBOTH ); - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarnAccessRightsMissingDlgGenerated::onClose ) ); - m_buttonLocateBundle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onShowAppBundle ), NULL, this ); - m_buttonOpenSecurity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onOpenSecuritySettings ), NULL, this ); - m_checkBoxDontShowAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onCheckBoxClick ), NULL, this ); - m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onOkay ), NULL, this ); + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WarnAccessRightsMissingDlgGenerated::onClose ) ); + m_buttonLocateBundle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onShowAppBundle ), NULL, this ); + m_buttonOpenSecurity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onOpenSecuritySettings ), NULL, this ); + m_checkBoxDontShowAgain->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onCheckBoxClick ), NULL, this ); + m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WarnAccessRightsMissingDlgGenerated::onOkay ), NULL, this ); } WarnAccessRightsMissingDlgGenerated::~WarnAccessRightsMissingDlgGenerated() diff --git a/FreeFileSync/Source/ui/gui_generated.h b/FreeFileSync/Source/ui/gui_generated.h index bdb2fca7..2f4a9abc 100644 --- a/FreeFileSync/Source/ui/gui_generated.h +++ b/FreeFileSync/Source/ui/gui_generated.h @@ -10,7 +10,8 @@ #include <wx/artprov.h> #include <wx/xrc/xmlres.h> #include <wx/intl.h> -namespace zen { class BitmapTextButton; } +namespace zen{ class BitmapTextButton; } +namespace zen{ class ToggleButton; } #include "wx+/bitmap_button.h" #include "folder_history_box.h" @@ -65,227 +66,223 @@ namespace zen { class BitmapTextButton; } /////////////////////////////////////////////////////////////////////////////// class MainDialogGenerated : public wxFrame { -private: - -protected: - wxMenuBar* m_menubar; - wxMenu* m_menuFile; - wxMenuItem* m_menuItemNew; - wxMenuItem* m_menuItemLoad; - wxMenuItem* m_menuItemSave; - wxMenuItem* m_menuItemSaveAs; - wxMenuItem* m_menuItemSaveAsBatch; - wxMenuItem* m_menuItemQuit; - wxMenu* m_menuActions; - wxMenuItem* m_menuItemShowLog; - wxMenuItem* m_menuItemCompare; - wxMenuItem* m_menuItemCompSettings; - wxMenuItem* m_menuItemFilter; - wxMenuItem* m_menuItemSyncSettings; - wxMenuItem* m_menuItemSynchronize; - wxMenu* m_menuTools; - wxMenuItem* m_menuItemOptions; - wxMenu* m_menuLanguages; - wxMenuItem* m_menuItemFind; - wxMenuItem* m_menuItemExportList; - wxMenuItem* m_menuItemResetLayout; - wxMenuItem* m_menuItemShowMain; - wxMenuItem* m_menuItemShowFolders; - wxMenuItem* m_menuItemShowViewFilter; - wxMenuItem* m_menuItemShowConfig; - wxMenuItem* m_menuItemShowOverview; - wxMenu* m_menuHelp; - wxMenuItem* m_menuItemHelp; - wxMenuItem* m_menuItemCheckVersionNow; - wxMenuItem* m_menuItemAbout; - wxBoxSizer* bSizerPanelHolder; - wxPanel* m_panelTopButtons; - wxBoxSizer* bSizerTopButtons; - wxButton* m_buttonCancel; - zen::BitmapTextButton* m_buttonCompare; - wxBitmapButton* m_bpButtonCmpConfig; - wxBitmapButton* m_bpButtonCmpContext; - wxBitmapButton* m_bpButtonFilter; - wxBitmapButton* m_bpButtonFilterContext; - wxBitmapButton* m_bpButtonSyncConfig; - wxBitmapButton* m_bpButtonSyncContext; - zen::BitmapTextButton* m_buttonSync; - wxPanel* m_panelDirectoryPairs; - wxStaticText* m_staticTextResolvedPathL; - wxBitmapButton* m_bpButtonAddPair; - wxButton* m_buttonSelectFolderLeft; - wxPanel* m_panelTopCenter; - wxBitmapButton* m_bpButtonSwapSides; - wxStaticText* m_staticTextResolvedPathR; - wxButton* m_buttonSelectFolderRight; - wxScrolledWindow* m_scrolledWindowFolderPairs; - wxBoxSizer* bSizerAddFolderPairs; - zen::Grid* m_gridOverview; - wxPanel* m_panelCenter; - fff::TripleSplitter* m_splitterMain; - zen::Grid* m_gridMainL; - zen::Grid* m_gridMainC; - zen::Grid* m_gridMainR; - wxPanel* m_panelStatusBar; - wxBoxSizer* bSizerFileStatus; - wxBoxSizer* bSizerStatusLeft; - wxBoxSizer* bSizerStatusLeftDirectories; - wxStaticBitmap* m_bitmapSmallDirectoryLeft; - wxStaticText* m_staticTextStatusLeftDirs; - wxBoxSizer* bSizerStatusLeftFiles; - wxStaticBitmap* m_bitmapSmallFileLeft; - wxStaticText* m_staticTextStatusLeftFiles; - wxStaticText* m_staticTextStatusLeftBytes; - wxStaticLine* m_staticline9; - wxStaticText* m_staticTextStatusCenter; - wxBoxSizer* bSizerStatusRight; - wxStaticLine* m_staticline10; - wxBoxSizer* bSizerStatusRightDirectories; - wxStaticBitmap* m_bitmapSmallDirectoryRight; - wxStaticText* m_staticTextStatusRightDirs; - wxBoxSizer* bSizerStatusRightFiles; - wxStaticBitmap* m_bitmapSmallFileRight; - wxStaticText* m_staticTextStatusRightFiles; - wxStaticText* m_staticTextStatusRightBytes; - wxStaticText* m_staticTextFullStatus; - wxPanel* m_panelSearch; - wxBitmapButton* m_bpButtonHideSearch; - wxStaticText* m_staticText101; - wxTextCtrl* m_textCtrlSearchTxt; - wxCheckBox* m_checkBoxMatchCase; - wxPanel* m_panelLog; - wxBoxSizer* bSizerLog; - wxBoxSizer* bSizer42; - wxFlexGridSizer* ffgSizer11; - wxFlexGridSizer* ffgSizer111; - wxFlexGridSizer* ffgSizer112; - wxStaticLine* m_staticline70; - wxPanel* m_panelConfig; - wxBoxSizer* bSizerConfig; - wxBoxSizer* bSizerCfgHistoryButtons; - wxBitmapButton* m_bpButtonNew; - wxStaticText* m_staticText951; - wxBitmapButton* m_bpButtonOpen; - wxStaticText* m_staticText95; - wxBitmapButton* m_bpButtonSave; - wxStaticText* m_staticText961; - wxBoxSizer* bSizerSaveAs; - wxBitmapButton* m_bpButtonSaveAs; - wxBitmapButton* m_bpButtonSaveAsBatch; - wxStaticText* m_staticText97; - wxStaticLine* m_staticline81; - zen::Grid* m_gridCfgHistory; - wxPanel* m_panelViewFilter; - wxBoxSizer* bSizerViewFilter; - wxBitmapButton* m_bpButtonToggleLog; - wxBoxSizer* bSizerViewButtons; - zen::ToggleButton* m_bpButtonViewType; - zen::ToggleButton* m_bpButtonShowExcluded; - zen::ToggleButton* m_bpButtonShowDeleteLeft; - zen::ToggleButton* m_bpButtonShowUpdateLeft; - zen::ToggleButton* m_bpButtonShowCreateLeft; - zen::ToggleButton* m_bpButtonShowLeftOnly; - zen::ToggleButton* m_bpButtonShowLeftNewer; - zen::ToggleButton* m_bpButtonShowEqual; - zen::ToggleButton* m_bpButtonShowDoNothing; - zen::ToggleButton* m_bpButtonShowDifferent; - zen::ToggleButton* m_bpButtonShowRightNewer; - zen::ToggleButton* m_bpButtonShowRightOnly; - zen::ToggleButton* m_bpButtonShowCreateRight; - zen::ToggleButton* m_bpButtonShowUpdateRight; - zen::ToggleButton* m_bpButtonShowDeleteRight; - zen::ToggleButton* m_bpButtonShowConflict; - wxBitmapButton* m_bpButtonViewFilterContext; - wxStaticText* m_staticText96; - wxPanel* m_panelStatistics; - wxBoxSizer* bSizer1801; - wxStaticBitmap* m_bitmapDeleteLeft; - wxStaticText* m_staticTextDeleteLeft; - wxStaticBitmap* m_bitmapUpdateLeft; - wxStaticText* m_staticTextUpdateLeft; - wxStaticBitmap* m_bitmapCreateLeft; - wxStaticText* m_staticTextCreateLeft; - wxStaticBitmap* m_bitmapData; - wxStaticText* m_staticTextData; - wxStaticBitmap* m_bitmapCreateRight; - wxStaticText* m_staticTextCreateRight; - wxStaticBitmap* m_bitmapUpdateRight; - wxStaticText* m_staticTextUpdateRight; - wxStaticBitmap* m_bitmapDeleteRight; - wxStaticText* m_staticTextDeleteRight; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onConfigNew( wxCommandEvent& event ) { event.Skip(); } - virtual void onConfigLoad( wxCommandEvent& event ) { event.Skip(); } - virtual void onConfigSave( wxCommandEvent& event ) { event.Skip(); } - virtual void onConfigSaveAs( wxCommandEvent& event ) { event.Skip(); } - virtual void onSaveAsBatchJob( wxCommandEvent& event ) { event.Skip(); } - virtual void onMenuQuit( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleLog( wxCommandEvent& event ) { event.Skip(); } - virtual void onCompare( 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 onStartSync( wxCommandEvent& event ) { event.Skip(); } - virtual void onMenuOptions( wxCommandEvent& event ) { event.Skip(); } - virtual void onMenuFindItem( wxCommandEvent& event ) { event.Skip(); } - virtual void onMenuExportFileList( wxCommandEvent& event ) { event.Skip(); } - virtual void onMenuResetLayout( 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 onCompSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); } - virtual void onCompSettingsContext( wxCommandEvent& event ) { event.Skip(); } - virtual void onGlobalFilterContextMouse( wxMouseEvent& event ) { event.Skip(); } - virtual void onGlobalFilterContext( wxCommandEvent& event ) { event.Skip(); } - virtual void onSyncSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); } - virtual void onSyncSettingsContext( wxCommandEvent& event ) { event.Skip(); } - virtual void onTopFolderPairAdd( wxCommandEvent& event ) { event.Skip(); } - virtual void onTopFolderPairRemove( wxCommandEvent& event ) { event.Skip(); } - virtual void onSwapSides( wxCommandEvent& event ) { event.Skip(); } - virtual void onTopLocalCompCfg( wxCommandEvent& event ) { event.Skip(); } - virtual void onTopLocalFilterCfg( wxCommandEvent& event ) { event.Skip(); } - virtual void onTopLocalSyncCfg( wxCommandEvent& event ) { event.Skip(); } - virtual void onHideSearchPanel( wxCommandEvent& event ) { event.Skip(); } - virtual void onSearchGridEnter( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleViewType( wxCommandEvent& event ) { event.Skip(); } - virtual void onViewTypeContextMouse( wxMouseEvent& event ) { event.Skip(); } - virtual void onToggleViewButton( wxCommandEvent& event ) { event.Skip(); } - virtual void onViewFilterContextMouse( wxMouseEvent& event ) { event.Skip(); } - virtual void onViewFilterContext( wxCommandEvent& event ) { event.Skip(); } - - -public: - wxPanel* m_panelTopLeft; - wxBitmapButton* m_bpButtonRemovePair; - fff::FolderHistoryBox* m_folderPathLeft; - wxBitmapButton* m_bpButtonSelectAltFolderLeft; - wxBitmapButton* m_bpButtonLocalCompCfg; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonLocalSyncCfg; - wxPanel* m_panelTopRight; - fff::FolderHistoryBox* m_folderPathRight; - wxBitmapButton* m_bpButtonSelectAltFolderRight; - wxStaticBitmap* m_bitmapSyncResult; - wxStaticText* m_staticTextSyncResult; - wxStaticText* m_staticTextProcessed; - wxStaticText* m_staticTextRemaining; - wxPanel* m_panelItemStats; - wxStaticBitmap* m_bitmapItemStat; - wxStaticText* m_staticTextItemsProcessed; - wxStaticText* m_staticTextBytesProcessed; - wxStaticText* m_staticTextItemsRemaining; - wxStaticText* m_staticTextBytesRemaining; - wxPanel* m_panelTimeStats; - wxStaticBitmap* m_bitmapTimeStat; - wxStaticText* m_staticTextTimeElapsed; - wxBoxSizer* bSizerStatistics; - wxBoxSizer* bSizerData; - - MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - - ~MainDialogGenerated(); + private: + + protected: + wxMenuBar* m_menubar; + wxMenu* m_menuFile; + wxMenuItem* m_menuItemNew; + wxMenuItem* m_menuItemLoad; + wxMenuItem* m_menuItemSave; + wxMenuItem* m_menuItemSaveAs; + wxMenuItem* m_menuItemSaveAsBatch; + wxMenuItem* m_menuItemQuit; + wxMenu* m_menuActions; + wxMenuItem* m_menuItemShowLog; + wxMenuItem* m_menuItemCompare; + wxMenuItem* m_menuItemCompSettings; + wxMenuItem* m_menuItemFilter; + wxMenuItem* m_menuItemSyncSettings; + wxMenuItem* m_menuItemSynchronize; + wxMenu* m_menuTools; + wxMenuItem* m_menuItemOptions; + wxMenu* m_menuLanguages; + wxMenuItem* m_menuItemFind; + wxMenuItem* m_menuItemExportList; + wxMenuItem* m_menuItemResetLayout; + wxMenuItem* m_menuItemShowMain; + wxMenuItem* m_menuItemShowFolders; + wxMenuItem* m_menuItemShowViewFilter; + wxMenuItem* m_menuItemShowConfig; + wxMenuItem* m_menuItemShowOverview; + wxMenu* m_menuHelp; + wxMenuItem* m_menuItemHelp; + wxMenuItem* m_menuItemCheckVersionNow; + wxMenuItem* m_menuItemAbout; + wxBoxSizer* bSizerPanelHolder; + wxPanel* m_panelTopButtons; + wxBoxSizer* bSizerTopButtons; + wxButton* m_buttonCancel; + zen::BitmapTextButton* m_buttonCompare; + wxBitmapButton* m_bpButtonCmpConfig; + wxBitmapButton* m_bpButtonCmpContext; + wxBitmapButton* m_bpButtonFilter; + wxBitmapButton* m_bpButtonFilterContext; + wxBitmapButton* m_bpButtonSyncConfig; + wxBitmapButton* m_bpButtonSyncContext; + zen::BitmapTextButton* m_buttonSync; + wxPanel* m_panelDirectoryPairs; + wxStaticText* m_staticTextResolvedPathL; + wxBitmapButton* m_bpButtonAddPair; + wxButton* m_buttonSelectFolderLeft; + wxPanel* m_panelTopCenter; + wxBitmapButton* m_bpButtonSwapSides; + wxStaticText* m_staticTextResolvedPathR; + wxButton* m_buttonSelectFolderRight; + wxScrolledWindow* m_scrolledWindowFolderPairs; + wxBoxSizer* bSizerAddFolderPairs; + zen::Grid* m_gridOverview; + wxPanel* m_panelCenter; + fff::TripleSplitter* m_splitterMain; + zen::Grid* m_gridMainL; + zen::Grid* m_gridMainC; + zen::Grid* m_gridMainR; + wxPanel* m_panelStatusBar; + wxBoxSizer* bSizerStatusLeftDirectories; + wxStaticBitmap* m_bitmapSmallDirectoryLeft; + wxStaticText* m_staticTextStatusLeftDirs; + wxBoxSizer* bSizerStatusLeftFiles; + wxStaticBitmap* m_bitmapSmallFileLeft; + wxStaticText* m_staticTextStatusLeftFiles; + wxStaticText* m_staticTextStatusLeftBytes; + wxStaticLine* m_staticline9; + wxStaticText* m_staticTextStatusCenter; + wxStaticLine* m_staticline10; + wxBoxSizer* bSizerStatusRightDirectories; + wxStaticBitmap* m_bitmapSmallDirectoryRight; + wxStaticText* m_staticTextStatusRightDirs; + wxBoxSizer* bSizerStatusRightFiles; + wxStaticBitmap* m_bitmapSmallFileRight; + wxStaticText* m_staticTextStatusRightFiles; + wxStaticText* m_staticTextStatusRightBytes; + wxPanel* m_panelSearch; + wxBitmapButton* m_bpButtonHideSearch; + wxStaticText* m_staticText101; + wxTextCtrl* m_textCtrlSearchTxt; + wxCheckBox* m_checkBoxMatchCase; + wxPanel* m_panelLog; + wxBoxSizer* bSizerLog; + wxBoxSizer* bSizer42; + wxFlexGridSizer* ffgSizer11; + wxFlexGridSizer* ffgSizer111; + wxFlexGridSizer* ffgSizer112; + wxStaticLine* m_staticline70; + wxPanel* m_panelConfig; + wxBoxSizer* bSizerConfig; + wxBoxSizer* bSizerCfgHistoryButtons; + wxBitmapButton* m_bpButtonNew; + wxStaticText* m_staticText951; + wxBitmapButton* m_bpButtonOpen; + wxStaticText* m_staticText95; + wxBitmapButton* m_bpButtonSave; + wxStaticText* m_staticText961; + wxBoxSizer* bSizerSaveAs; + wxBitmapButton* m_bpButtonSaveAs; + wxBitmapButton* m_bpButtonSaveAsBatch; + wxStaticText* m_staticText97; + wxStaticLine* m_staticline81; + zen::Grid* m_gridCfgHistory; + wxPanel* m_panelViewFilter; + wxBoxSizer* bSizerViewFilter; + zen::ToggleButton* m_bpButtonToggleLog; + wxBoxSizer* bSizerViewButtons; + zen::ToggleButton* m_bpButtonViewType; + zen::ToggleButton* m_bpButtonShowExcluded; + zen::ToggleButton* m_bpButtonShowDeleteLeft; + zen::ToggleButton* m_bpButtonShowUpdateLeft; + zen::ToggleButton* m_bpButtonShowCreateLeft; + zen::ToggleButton* m_bpButtonShowLeftOnly; + zen::ToggleButton* m_bpButtonShowLeftNewer; + zen::ToggleButton* m_bpButtonShowEqual; + zen::ToggleButton* m_bpButtonShowDoNothing; + zen::ToggleButton* m_bpButtonShowDifferent; + zen::ToggleButton* m_bpButtonShowRightNewer; + zen::ToggleButton* m_bpButtonShowRightOnly; + zen::ToggleButton* m_bpButtonShowCreateRight; + zen::ToggleButton* m_bpButtonShowUpdateRight; + zen::ToggleButton* m_bpButtonShowDeleteRight; + zen::ToggleButton* m_bpButtonShowConflict; + wxBitmapButton* m_bpButtonViewFilterContext; + wxStaticText* m_staticText96; + wxPanel* m_panelStatistics; + wxBoxSizer* bSizer1801; + wxStaticBitmap* m_bitmapDeleteLeft; + wxStaticText* m_staticTextDeleteLeft; + wxStaticBitmap* m_bitmapUpdateLeft; + wxStaticText* m_staticTextUpdateLeft; + wxStaticBitmap* m_bitmapCreateLeft; + wxStaticText* m_staticTextCreateLeft; + wxStaticBitmap* m_bitmapData; + wxStaticText* m_staticTextData; + wxStaticBitmap* m_bitmapCreateRight; + wxStaticText* m_staticTextCreateRight; + wxStaticBitmap* m_bitmapUpdateRight; + wxStaticText* m_staticTextUpdateRight; + wxStaticBitmap* m_bitmapDeleteRight; + wxStaticText* m_staticTextDeleteRight; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onConfigNew( wxCommandEvent& event ) { event.Skip(); } + virtual void onConfigLoad( wxCommandEvent& event ) { event.Skip(); } + virtual void onConfigSave( wxCommandEvent& event ) { event.Skip(); } + virtual void onConfigSaveAs( wxCommandEvent& event ) { event.Skip(); } + virtual void onSaveAsBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void onMenuQuit( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleLog( wxCommandEvent& event ) { event.Skip(); } + virtual void onCompare( 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 onStartSync( wxCommandEvent& event ) { event.Skip(); } + virtual void onMenuOptions( wxCommandEvent& event ) { event.Skip(); } + virtual void onMenuFindItem( wxCommandEvent& event ) { event.Skip(); } + virtual void onMenuExportFileList( wxCommandEvent& event ) { event.Skip(); } + virtual void onMenuResetLayout( 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 onCompSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); } + virtual void onCompSettingsContext( wxCommandEvent& event ) { event.Skip(); } + virtual void onGlobalFilterContextMouse( wxMouseEvent& event ) { event.Skip(); } + virtual void onGlobalFilterContext( wxCommandEvent& event ) { event.Skip(); } + virtual void onSyncSettingsContextMouse( wxMouseEvent& event ) { event.Skip(); } + virtual void onSyncSettingsContext( wxCommandEvent& event ) { event.Skip(); } + virtual void onTopFolderPairAdd( wxCommandEvent& event ) { event.Skip(); } + virtual void onTopFolderPairRemove( wxCommandEvent& event ) { event.Skip(); } + virtual void onSwapSides( wxCommandEvent& event ) { event.Skip(); } + virtual void onTopLocalCompCfg( wxCommandEvent& event ) { event.Skip(); } + virtual void onTopLocalFilterCfg( wxCommandEvent& event ) { event.Skip(); } + virtual void onTopLocalSyncCfg( wxCommandEvent& event ) { event.Skip(); } + virtual void onHideSearchPanel( wxCommandEvent& event ) { event.Skip(); } + virtual void onSearchGridEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleViewType( wxCommandEvent& event ) { event.Skip(); } + virtual void onViewTypeContextMouse( wxMouseEvent& event ) { event.Skip(); } + virtual void onToggleViewButton( wxCommandEvent& event ) { event.Skip(); } + virtual void onViewFilterContextMouse( wxMouseEvent& event ) { event.Skip(); } + virtual void onViewFilterContext( wxCommandEvent& event ) { event.Skip(); } + + + public: + wxPanel* m_panelTopLeft; + wxBitmapButton* m_bpButtonRemovePair; + fff::FolderHistoryBox* m_folderPathLeft; + wxBitmapButton* m_bpButtonSelectAltFolderLeft; + wxBitmapButton* m_bpButtonLocalCompCfg; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonLocalSyncCfg; + wxPanel* m_panelTopRight; + fff::FolderHistoryBox* m_folderPathRight; + wxBitmapButton* m_bpButtonSelectAltFolderRight; + wxStaticBitmap* m_bitmapSyncResult; + wxStaticText* m_staticTextSyncResult; + wxStaticText* m_staticTextProcessed; + wxStaticText* m_staticTextRemaining; + wxPanel* m_panelItemStats; + wxStaticBitmap* m_bitmapItemStat; + wxStaticText* m_staticTextItemsProcessed; + wxStaticText* m_staticTextBytesProcessed; + wxStaticText* m_staticTextItemsRemaining; + wxStaticText* m_staticTextBytesRemaining; + wxPanel* m_panelTimeStats; + wxStaticBitmap* m_bitmapTimeStat; + wxStaticText* m_staticTextTimeElapsed; + wxBoxSizer* bSizerStatistics; + wxBoxSizer* bSizerData; + + MainDialogGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + + ~MainDialogGenerated(); }; @@ -294,29 +291,29 @@ public: /////////////////////////////////////////////////////////////////////////////// class FolderPairPanelGenerated : public wxPanel { -private: - -protected: - wxButton* m_buttonSelectFolderLeft; - wxButton* m_buttonSelectFolderRight; - -public: - wxPanel* m_panelLeft; - wxBitmapButton* m_bpButtonFolderPairOptions; - wxBitmapButton* m_bpButtonRemovePair; - fff::FolderHistoryBox* m_folderPathLeft; - wxBitmapButton* m_bpButtonSelectAltFolderLeft; - wxPanel* m_panel20; - wxBitmapButton* m_bpButtonLocalCompCfg; - wxBitmapButton* m_bpButtonLocalFilter; - wxBitmapButton* m_bpButtonLocalSyncCfg; - wxPanel* m_panelRight; - fff::FolderHistoryBox* m_folderPathRight; - wxBitmapButton* m_bpButtonSelectAltFolderRight; - - FolderPairPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 698, 67 ), long style = 0, const wxString& name = wxEmptyString ); - - ~FolderPairPanelGenerated(); + private: + + protected: + wxButton* m_buttonSelectFolderLeft; + wxButton* m_buttonSelectFolderRight; + + public: + wxPanel* m_panelLeft; + wxBitmapButton* m_bpButtonFolderPairOptions; + wxBitmapButton* m_bpButtonRemovePair; + fff::FolderHistoryBox* m_folderPathLeft; + wxBitmapButton* m_bpButtonSelectAltFolderLeft; + wxPanel* m_panel20; + wxBitmapButton* m_bpButtonLocalCompCfg; + wxBitmapButton* m_bpButtonLocalFilter; + wxBitmapButton* m_bpButtonLocalSyncCfg; + wxPanel* m_panelRight; + fff::FolderHistoryBox* m_folderPathRight; + wxBitmapButton* m_bpButtonSelectAltFolderRight; + + FolderPairPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 698,67 ), long style = 0, const wxString& name = wxEmptyString ); + + ~FolderPairPanelGenerated(); }; @@ -325,261 +322,261 @@ public: /////////////////////////////////////////////////////////////////////////////// class ConfigDlgGenerated : public wxDialog { -private: - -protected: - wxStaticText* m_staticTextFolderPairLabel; - wxListBox* m_listBoxFolderPair; - wxNotebook* m_notebook; - wxPanel* m_panelCompSettingsTab; - wxBoxSizer* bSizerHeaderCompSettings; - wxStaticText* m_staticTextMainCompSettings; - wxCheckBox* m_checkBoxUseLocalCmpOptions; - wxStaticLine* m_staticlineCompHeader; - wxPanel* m_panelComparisonSettings; - wxStaticText* m_staticText91; - zen::ToggleButton* m_buttonByTimeSize; - zen::ToggleButton* m_buttonByContent; - zen::ToggleButton* m_buttonBySize; - wxStaticBitmap* m_bitmapCompVariant; - wxStaticText* m_staticTextCompVarDescription; - wxStaticLine* m_staticline33; - wxCheckBox* m_checkBoxSymlinksInclude; - wxRadioButton* m_radioBtnSymlinksFollow; - wxRadioButton* m_radioBtnSymlinksDirect; - wxHyperlinkCtrl* m_hyperlink24; - wxStaticLine* m_staticline44; - wxStaticText* m_staticText112; - wxTextCtrl* m_textCtrlTimeShift; - wxStaticText* m_staticText1381; - wxStaticText* m_staticText13811; - wxHyperlinkCtrl* m_hyperlink241; - wxStaticLine* m_staticline331; - wxBoxSizer* bSizerCompMisc; - wxStaticLine* m_staticline3311; - wxStaticBitmap* m_bitmapIgnoreErrors; - wxCheckBox* m_checkBoxIgnoreErrors; - wxCheckBox* m_checkBoxAutoRetry; - wxFlexGridSizer* fgSizerAutoRetry; - wxStaticText* m_staticText96; - wxStaticText* m_staticTextAutoRetryDelay; - wxSpinCtrl* m_spinCtrlAutoRetryCount; - wxSpinCtrl* m_spinCtrlAutoRetryDelay; - wxStaticLine* m_staticline751; - wxBoxSizer* bSizerPerformance; - wxPanel* m_panel57; - wxStaticBitmap* m_bitmapPerf; - wxStaticText* m_staticText13611; - wxHyperlinkCtrl* m_hyperlinkPerfDeRequired; - wxBoxSizer* bSizer260; - wxStaticText* m_staticTextPerfParallelOps; - wxScrolledWindow* m_scrolledWindowPerf; - wxFlexGridSizer* fgSizerPerf; - wxHyperlinkCtrl* m_hyperlink1711; - wxPanel* m_panelFilterSettingsTab; - wxBoxSizer* bSizerHeaderFilterSettings; - wxStaticText* m_staticTextMainFilterSettings; - wxStaticText* m_staticTextLocalFilterSettings; - wxStaticLine* m_staticlineFilterHeader; - wxPanel* m_panel571; - wxStaticBitmap* m_bitmapInclude; - wxStaticText* m_staticText78; - wxTextCtrl* m_textCtrlInclude; - wxStaticBitmap* m_bitmapExclude; - wxStaticText* m_staticText77; - wxHyperlinkCtrl* m_hyperlink171; - wxTextCtrl* m_textCtrlExclude; - wxStaticLine* m_staticline24; - wxStaticBitmap* m_bitmapFilterSize; - wxStaticText* m_staticText80; - wxStaticText* m_staticText101; - wxSpinCtrl* m_spinCtrlMinSize; - wxChoice* m_choiceUnitMinSize; - wxStaticText* m_staticText102; - wxSpinCtrl* m_spinCtrlMaxSize; - wxChoice* m_choiceUnitMaxSize; - wxStaticLine* m_staticline23; - wxStaticBitmap* m_bitmapFilterDate; - wxStaticText* m_staticText79; - wxChoice* m_choiceUnitTimespan; - wxSpinCtrl* m_spinCtrlTimespan; - wxStaticLine* m_staticline231; - wxButton* m_buttonDefault; - wxBitmapButton* m_bpButtonDefaultContext; - wxButton* m_buttonClear; - wxPanel* m_panelSyncSettingsTab; - wxBoxSizer* bSizerHeaderSyncSettings; - wxStaticText* m_staticTextMainSyncSettings; - wxCheckBox* m_checkBoxUseLocalSyncOptions; - wxStaticLine* m_staticlineSyncHeader; - wxPanel* m_panelSyncSettings; - wxStaticText* m_staticText86; - zen::ToggleButton* m_buttonTwoWay; - zen::ToggleButton* m_buttonMirror; - zen::ToggleButton* m_buttonUpdate; - zen::ToggleButton* m_buttonCustom; - wxStaticBitmap* m_bitmapDatabase; - wxCheckBox* m_checkBoxUseDatabase; - wxStaticText* m_staticTextSyncVarDescription; - wxStaticLine* m_staticline431; - wxStaticLine* m_staticline72; - wxStaticBitmap* m_bitmapMoveLeft; - wxStaticBitmap* m_bitmapMoveRight; - wxStaticText* m_staticTextDetectMove; - wxHyperlinkCtrl* m_hyperlink242; - wxStaticLine* m_staticline721; - wxBoxSizer* bSizerSyncDirHolder; - wxBoxSizer* bSizerSyncDirsDiff; - wxStaticText* m_staticText184; - wxFlexGridSizer* ffgSizer11; - wxStaticBitmap* m_bitmapLeftOnly; - wxStaticBitmap* m_bitmapLeftNewer; - wxStaticBitmap* m_bitmapDifferent; - wxStaticBitmap* m_bitmapRightNewer; - wxStaticBitmap* m_bitmapRightOnly; - wxBitmapButton* m_bpButtonLeftOnly; - wxBitmapButton* m_bpButtonLeftNewer; - wxBitmapButton* m_bpButtonDifferent; - wxBitmapButton* m_bpButtonRightNewer; - wxBitmapButton* m_bpButtonRightOnly; - wxStaticText* m_staticText120; - wxFlexGridSizer* ffgSizer111; - wxStaticText* m_staticText12011; - wxBitmapButton* m_bpButtonLeftCreate; - wxBitmapButton* m_bpButtonRightCreate; - wxStaticText* m_staticText12012; - wxBitmapButton* m_bpButtonLeftUpdate; - wxBitmapButton* m_bpButtonRightUpdate; - wxStaticText* m_staticText12013; - wxBitmapButton* m_bpButtonLeftDelete; - wxBitmapButton* m_bpButtonRightDelete; - wxStaticText* m_staticText1201; - wxStaticText* m_staticText1202; - wxStaticLine* m_staticline54; - wxBoxSizer* bSizer2361; - wxStaticText* m_staticText87; - zen::ToggleButton* m_buttonRecycler; - zen::ToggleButton* m_buttonPermanent; - zen::ToggleButton* m_buttonVersioning; - wxBoxSizer* bSizerVersioningHolder; - wxStaticBitmap* m_bitmapDeletionType; - wxStaticText* m_staticTextDeletionTypeDescription; - wxPanel* m_panelVersioning; - wxStaticBitmap* m_bitmapVersioning; - wxStaticText* m_staticText155; - wxHyperlinkCtrl* m_hyperlink243; - fff::FolderHistoryBox* m_versioningFolderPath; - wxButton* m_buttonSelectVersioningFolder; - wxStaticText* m_staticText93; - wxChoice* m_choiceVersioningStyle; - wxStaticText* m_staticTextNamingCvtPart1; - wxStaticText* m_staticTextNamingCvtPart2Bold; - wxStaticText* m_staticTextNamingCvtPart3; - wxStaticLine* m_staticline69; - wxStaticText* m_staticTextLimitVersions; - wxFlexGridSizer* fgSizer15; - wxCheckBox* m_checkBoxVersionMaxDays; - wxCheckBox* m_checkBoxVersionCountMin; - wxCheckBox* m_checkBoxVersionCountMax; - wxSpinCtrl* m_spinCtrlVersionMaxDays; - wxSpinCtrl* m_spinCtrlVersionCountMin; - wxSpinCtrl* m_spinCtrlVersionCountMax; - wxStaticLine* m_staticline582; - wxBoxSizer* bSizerSyncMisc; - wxStaticBitmap* m_bitmapEmail; - wxCheckBox* m_checkBoxSendEmail; - fff::CommandBox* m_comboBoxEmail; - wxBitmapButton* m_bpButtonEmailAlways; - wxBitmapButton* m_bpButtonEmailErrorWarning; - wxBitmapButton* m_bpButtonEmailErrorOnly; - wxHyperlinkCtrl* m_hyperlinkPerfDeRequired2; - wxStaticLine* m_staticline57; - wxPanel* m_panelLogfile; - wxStaticBitmap* m_bitmapLogFile; - wxCheckBox* m_checkBoxOverrideLogPath; - wxButton* m_buttonSelectLogFolder; - wxStaticLine* m_staticline80; - wxStaticText* m_staticTextPostSync; - fff::CommandBox* m_comboBoxPostSyncCommand; - wxPanel* m_panelNotes; - wxStaticBitmap* m_bitmapNotes; - wxStaticText* m_staticText781; - wxTextCtrl* m_textCtrNotes; - wxStaticLine* m_staticline83; - wxBoxSizer* bSizerStdButtons; - zen::BitmapTextButton* m_buttonAddNotes; - wxButton* m_buttonOkay; - wxButton* m_buttonCancel; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onListBoxKeyEvent( wxKeyEvent& event ) { event.Skip(); } - virtual void onSelectFolderPair( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleLocalCompSettings( wxCommandEvent& event ) { event.Skip(); } - virtual void onCompByTimeSize( wxCommandEvent& event ) { event.Skip(); } - virtual void onCompByTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void onCompByContent( wxCommandEvent& event ) { event.Skip(); } - virtual void onCompByContentDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void onCompBySize( wxCommandEvent& event ) { event.Skip(); } - virtual void onCompBySizeDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void onChangeCompOption( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleAutoRetry( wxCommandEvent& event ) { event.Skip(); } - virtual void onChangeFilterOption( wxCommandEvent& event ) { event.Skip(); } - virtual void onFilterDefault( wxCommandEvent& event ) { event.Skip(); } - virtual void onFilterDefaultContextMouse( wxMouseEvent& event ) { event.Skip(); } - virtual void onFilterDefaultContext( wxCommandEvent& event ) { event.Skip(); } - virtual void onFilterClear( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleLocalSyncSettings( wxCommandEvent& event ) { event.Skip(); } - virtual void onSyncTwoWay( wxCommandEvent& event ) { event.Skip(); } - virtual void onSyncTwoWayDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void onSyncMirror( wxCommandEvent& event ) { event.Skip(); } - virtual void onSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void onSyncUpdate( wxCommandEvent& event ) { event.Skip(); } - virtual void onSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void onSyncCustom( wxCommandEvent& event ) { event.Skip(); } - virtual void onSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); } - virtual void onToggleUseDatabase( wxCommandEvent& event ) { event.Skip(); } - virtual void onLeftOnly( wxCommandEvent& event ) { event.Skip(); } - virtual void onLeftNewer( wxCommandEvent& event ) { event.Skip(); } - virtual void onDifferent( wxCommandEvent& event ) { event.Skip(); } - virtual void onRightNewer( wxCommandEvent& event ) { event.Skip(); } - virtual void onRightOnly( wxCommandEvent& event ) { event.Skip(); } - virtual void onLeftCreate( wxCommandEvent& event ) { event.Skip(); } - virtual void onRightCreate( wxCommandEvent& event ) { event.Skip(); } - virtual void onLeftUpdate( wxCommandEvent& event ) { event.Skip(); } - virtual void onRightUpdate( wxCommandEvent& event ) { event.Skip(); } - virtual void onLeftDelete( wxCommandEvent& event ) { event.Skip(); } - virtual void onRightDelete( wxCommandEvent& event ) { event.Skip(); } - virtual void onDeletionRecycler( wxCommandEvent& event ) { event.Skip(); } - virtual void onDeletionPermanent( wxCommandEvent& event ) { event.Skip(); } - virtual void onDeletionVersioning( wxCommandEvent& event ) { event.Skip(); } - virtual void onChanegVersioningStyle( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleVersioningLimit( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleMiscEmail( wxCommandEvent& event ) { event.Skip(); } - virtual void onEmailAlways( wxCommandEvent& event ) { event.Skip(); } - virtual void onEmailErrorWarning( wxCommandEvent& event ) { event.Skip(); } - virtual void onEmailErrorOnly( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleMiscOption( wxCommandEvent& event ) { event.Skip(); } - virtual void onShowLogFolder( wxCommandEvent& event ) { event.Skip(); } - virtual void onAddNotes( wxCommandEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } - - -public: - wxStaticBitmap* m_bitmapRetryErrors; - wxStaticText* m_staticTextFilterDescr; - wxBoxSizer* bSizerSyncDirsChanges; - wxBitmapButton* m_bpButtonSelectVersioningAltFolder; - wxBitmapButton* m_bpButtonShowLogFolder; - fff::FolderHistoryBox* m_logFolderPath; - wxBitmapButton* m_bpButtonSelectAltLogFolder; - wxChoice* m_choicePostSyncCondition; - - ConfigDlgGenerated( 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|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); - - ~ConfigDlgGenerated(); + private: + + protected: + wxStaticText* m_staticTextFolderPairLabel; + wxListBox* m_listBoxFolderPair; + wxNotebook* m_notebook; + wxPanel* m_panelCompSettingsTab; + wxBoxSizer* bSizerHeaderCompSettings; + wxStaticText* m_staticTextMainCompSettings; + wxCheckBox* m_checkBoxUseLocalCmpOptions; + wxStaticLine* m_staticlineCompHeader; + wxPanel* m_panelComparisonSettings; + wxStaticText* m_staticText91; + zen::ToggleButton* m_buttonByTimeSize; + zen::ToggleButton* m_buttonByContent; + zen::ToggleButton* m_buttonBySize; + wxStaticBitmap* m_bitmapCompVariant; + wxStaticText* m_staticTextCompVarDescription; + wxStaticLine* m_staticline33; + wxCheckBox* m_checkBoxSymlinksInclude; + wxRadioButton* m_radioBtnSymlinksFollow; + wxRadioButton* m_radioBtnSymlinksDirect; + wxHyperlinkCtrl* m_hyperlink24; + wxStaticLine* m_staticline44; + wxStaticText* m_staticText112; + wxTextCtrl* m_textCtrlTimeShift; + wxStaticText* m_staticText1381; + wxStaticText* m_staticText13811; + wxHyperlinkCtrl* m_hyperlink241; + wxStaticLine* m_staticline331; + wxBoxSizer* bSizerCompMisc; + wxStaticLine* m_staticline3311; + wxStaticBitmap* m_bitmapIgnoreErrors; + wxCheckBox* m_checkBoxIgnoreErrors; + wxCheckBox* m_checkBoxAutoRetry; + wxFlexGridSizer* fgSizerAutoRetry; + wxStaticText* m_staticText96; + wxStaticText* m_staticTextAutoRetryDelay; + wxSpinCtrl* m_spinCtrlAutoRetryCount; + wxSpinCtrl* m_spinCtrlAutoRetryDelay; + wxStaticLine* m_staticline751; + wxBoxSizer* bSizerPerformance; + wxPanel* m_panel57; + wxStaticBitmap* m_bitmapPerf; + wxStaticText* m_staticText13611; + wxHyperlinkCtrl* m_hyperlinkPerfDeRequired; + wxBoxSizer* bSizer260; + wxStaticText* m_staticTextPerfParallelOps; + wxScrolledWindow* m_scrolledWindowPerf; + wxFlexGridSizer* fgSizerPerf; + wxHyperlinkCtrl* m_hyperlink1711; + wxPanel* m_panelFilterSettingsTab; + wxBoxSizer* bSizerHeaderFilterSettings; + wxStaticText* m_staticTextMainFilterSettings; + wxStaticText* m_staticTextLocalFilterSettings; + wxStaticLine* m_staticlineFilterHeader; + wxPanel* m_panel571; + wxStaticBitmap* m_bitmapInclude; + wxStaticText* m_staticText78; + wxTextCtrl* m_textCtrlInclude; + wxStaticBitmap* m_bitmapExclude; + wxStaticText* m_staticText77; + wxHyperlinkCtrl* m_hyperlink171; + wxTextCtrl* m_textCtrlExclude; + wxStaticLine* m_staticline24; + wxStaticBitmap* m_bitmapFilterSize; + wxStaticText* m_staticText80; + wxStaticText* m_staticText101; + wxSpinCtrl* m_spinCtrlMinSize; + wxChoice* m_choiceUnitMinSize; + wxStaticText* m_staticText102; + wxSpinCtrl* m_spinCtrlMaxSize; + wxChoice* m_choiceUnitMaxSize; + wxStaticLine* m_staticline23; + wxStaticBitmap* m_bitmapFilterDate; + wxStaticText* m_staticText79; + wxChoice* m_choiceUnitTimespan; + wxSpinCtrl* m_spinCtrlTimespan; + wxStaticLine* m_staticline231; + wxButton* m_buttonDefault; + wxBitmapButton* m_bpButtonDefaultContext; + wxButton* m_buttonClear; + wxPanel* m_panelSyncSettingsTab; + wxBoxSizer* bSizerHeaderSyncSettings; + wxStaticText* m_staticTextMainSyncSettings; + wxCheckBox* m_checkBoxUseLocalSyncOptions; + wxStaticLine* m_staticlineSyncHeader; + wxPanel* m_panelSyncSettings; + wxStaticText* m_staticText86; + zen::ToggleButton* m_buttonTwoWay; + zen::ToggleButton* m_buttonMirror; + zen::ToggleButton* m_buttonUpdate; + zen::ToggleButton* m_buttonCustom; + wxStaticBitmap* m_bitmapDatabase; + wxCheckBox* m_checkBoxUseDatabase; + wxStaticText* m_staticTextSyncVarDescription; + wxStaticLine* m_staticline431; + wxStaticLine* m_staticline72; + wxStaticBitmap* m_bitmapMoveLeft; + wxStaticBitmap* m_bitmapMoveRight; + wxStaticText* m_staticTextDetectMove; + wxHyperlinkCtrl* m_hyperlink242; + wxStaticLine* m_staticline721; + wxBoxSizer* bSizerSyncDirHolder; + wxBoxSizer* bSizerSyncDirsDiff; + wxStaticText* m_staticText184; + wxFlexGridSizer* ffgSizer11; + wxStaticBitmap* m_bitmapLeftOnly; + wxStaticBitmap* m_bitmapLeftNewer; + wxStaticBitmap* m_bitmapDifferent; + wxStaticBitmap* m_bitmapRightNewer; + wxStaticBitmap* m_bitmapRightOnly; + wxBitmapButton* m_bpButtonLeftOnly; + wxBitmapButton* m_bpButtonLeftNewer; + wxBitmapButton* m_bpButtonDifferent; + wxBitmapButton* m_bpButtonRightNewer; + wxBitmapButton* m_bpButtonRightOnly; + wxStaticText* m_staticText120; + wxFlexGridSizer* ffgSizer111; + wxStaticText* m_staticText12011; + wxBitmapButton* m_bpButtonLeftCreate; + wxBitmapButton* m_bpButtonRightCreate; + wxStaticText* m_staticText12012; + wxBitmapButton* m_bpButtonLeftUpdate; + wxBitmapButton* m_bpButtonRightUpdate; + wxStaticText* m_staticText12013; + wxBitmapButton* m_bpButtonLeftDelete; + wxBitmapButton* m_bpButtonRightDelete; + wxStaticText* m_staticText1201; + wxStaticText* m_staticText1202; + wxStaticLine* m_staticline54; + wxBoxSizer* bSizer2361; + wxStaticText* m_staticText87; + zen::ToggleButton* m_buttonRecycler; + zen::ToggleButton* m_buttonPermanent; + zen::ToggleButton* m_buttonVersioning; + wxBoxSizer* bSizerVersioningHolder; + wxStaticBitmap* m_bitmapDeletionType; + wxStaticText* m_staticTextDeletionTypeDescription; + wxPanel* m_panelVersioning; + wxStaticBitmap* m_bitmapVersioning; + wxStaticText* m_staticText155; + wxHyperlinkCtrl* m_hyperlink243; + fff::FolderHistoryBox* m_versioningFolderPath; + wxButton* m_buttonSelectVersioningFolder; + wxStaticText* m_staticText93; + wxChoice* m_choiceVersioningStyle; + wxStaticText* m_staticTextNamingCvtPart1; + wxStaticText* m_staticTextNamingCvtPart2Bold; + wxStaticText* m_staticTextNamingCvtPart3; + wxStaticLine* m_staticline69; + wxStaticText* m_staticTextLimitVersions; + wxFlexGridSizer* fgSizer15; + wxCheckBox* m_checkBoxVersionMaxDays; + wxCheckBox* m_checkBoxVersionCountMin; + wxCheckBox* m_checkBoxVersionCountMax; + wxSpinCtrl* m_spinCtrlVersionMaxDays; + wxSpinCtrl* m_spinCtrlVersionCountMin; + wxSpinCtrl* m_spinCtrlVersionCountMax; + wxStaticLine* m_staticline582; + wxBoxSizer* bSizerSyncMisc; + wxStaticBitmap* m_bitmapEmail; + wxCheckBox* m_checkBoxSendEmail; + fff::CommandBox* m_comboBoxEmail; + wxBitmapButton* m_bpButtonEmailAlways; + wxBitmapButton* m_bpButtonEmailErrorWarning; + wxBitmapButton* m_bpButtonEmailErrorOnly; + wxHyperlinkCtrl* m_hyperlinkPerfDeRequired2; + wxStaticLine* m_staticline57; + wxPanel* m_panelLogfile; + wxStaticBitmap* m_bitmapLogFile; + wxCheckBox* m_checkBoxOverrideLogPath; + wxButton* m_buttonSelectLogFolder; + wxStaticLine* m_staticline80; + wxStaticText* m_staticTextPostSync; + fff::CommandBox* m_comboBoxPostSyncCommand; + wxPanel* m_panelNotes; + wxStaticBitmap* m_bitmapNotes; + wxStaticText* m_staticText781; + wxTextCtrl* m_textCtrNotes; + wxStaticLine* m_staticline83; + wxBoxSizer* bSizerStdButtons; + zen::BitmapTextButton* m_buttonAddNotes; + wxButton* m_buttonOkay; + wxButton* m_buttonCancel; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onListBoxKeyEvent( wxKeyEvent& event ) { event.Skip(); } + virtual void onSelectFolderPair( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleLocalCompSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void onCompByTimeSize( wxCommandEvent& event ) { event.Skip(); } + virtual void onCompByTimeSizeDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void onCompByContent( wxCommandEvent& event ) { event.Skip(); } + virtual void onCompByContentDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void onCompBySize( wxCommandEvent& event ) { event.Skip(); } + virtual void onCompBySizeDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void onChangeCompOption( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleAutoRetry( wxCommandEvent& event ) { event.Skip(); } + virtual void onChangeFilterOption( wxCommandEvent& event ) { event.Skip(); } + virtual void onFilterDefault( wxCommandEvent& event ) { event.Skip(); } + virtual void onFilterDefaultContextMouse( wxMouseEvent& event ) { event.Skip(); } + virtual void onFilterDefaultContext( wxCommandEvent& event ) { event.Skip(); } + virtual void onFilterClear( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleLocalSyncSettings( wxCommandEvent& event ) { event.Skip(); } + virtual void onSyncTwoWay( wxCommandEvent& event ) { event.Skip(); } + virtual void onSyncTwoWayDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void onSyncMirror( wxCommandEvent& event ) { event.Skip(); } + virtual void onSyncMirrorDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void onSyncUpdate( wxCommandEvent& event ) { event.Skip(); } + virtual void onSyncUpdateDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void onSyncCustom( wxCommandEvent& event ) { event.Skip(); } + virtual void onSyncCustomDouble( wxMouseEvent& event ) { event.Skip(); } + virtual void onToggleUseDatabase( wxCommandEvent& event ) { event.Skip(); } + virtual void onLeftOnly( wxCommandEvent& event ) { event.Skip(); } + virtual void onLeftNewer( wxCommandEvent& event ) { event.Skip(); } + virtual void onDifferent( wxCommandEvent& event ) { event.Skip(); } + virtual void onRightNewer( wxCommandEvent& event ) { event.Skip(); } + virtual void onRightOnly( wxCommandEvent& event ) { event.Skip(); } + virtual void onLeftCreate( wxCommandEvent& event ) { event.Skip(); } + virtual void onRightCreate( wxCommandEvent& event ) { event.Skip(); } + virtual void onLeftUpdate( wxCommandEvent& event ) { event.Skip(); } + virtual void onRightUpdate( wxCommandEvent& event ) { event.Skip(); } + virtual void onLeftDelete( wxCommandEvent& event ) { event.Skip(); } + virtual void onRightDelete( wxCommandEvent& event ) { event.Skip(); } + virtual void onDeletionRecycler( wxCommandEvent& event ) { event.Skip(); } + virtual void onDeletionPermanent( wxCommandEvent& event ) { event.Skip(); } + virtual void onDeletionVersioning( wxCommandEvent& event ) { event.Skip(); } + virtual void onChangeVersioningStyle( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleVersioningLimit( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleMiscEmail( wxCommandEvent& event ) { event.Skip(); } + virtual void onEmailAlways( wxCommandEvent& event ) { event.Skip(); } + virtual void onEmailErrorWarning( wxCommandEvent& event ) { event.Skip(); } + virtual void onEmailErrorOnly( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleMiscOption( wxCommandEvent& event ) { event.Skip(); } + virtual void onShowLogFolder( wxCommandEvent& event ) { event.Skip(); } + virtual void onAddNotes( wxCommandEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + + + public: + wxStaticBitmap* m_bitmapRetryErrors; + wxStaticText* m_staticTextFilterDescr; + wxBoxSizer* bSizerSyncDirsChanges; + wxBitmapButton* m_bpButtonSelectVersioningAltFolder; + wxBitmapButton* m_bpButtonShowLogFolder; + fff::FolderHistoryBox* m_logFolderPath; + wxBitmapButton* m_bpButtonSelectAltLogFolder; + wxChoice* m_choicePostSyncCondition; + + ConfigDlgGenerated( 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|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); + + ~ConfigDlgGenerated(); }; @@ -588,117 +585,117 @@ public: /////////////////////////////////////////////////////////////////////////////// class CloudSetupDlgGenerated : public wxDialog { -private: - -protected: - wxStaticBitmap* m_bitmapCloud; - wxStaticText* m_staticText136; - wxToggleButton* m_toggleBtnGdrive; - wxToggleButton* m_toggleBtnSftp; - wxToggleButton* m_toggleBtnFtp; - wxStaticLine* m_staticline371; - wxPanel* m_panel41; - wxBoxSizer* bSizerGdrive; - wxStaticBitmap* m_bitmapGdriveUser; - wxStaticText* m_staticText166; - wxListBox* m_listBoxGdriveUsers; - zen::BitmapTextButton* m_buttonGdriveAddUser; - zen::BitmapTextButton* m_buttonGdriveRemoveUser; - wxStaticLine* m_staticline841; - wxStaticBitmap* m_bitmapGdriveDrive; - wxStaticText* m_staticText186; - wxListBox* m_listBoxGdriveDrives; - wxStaticLine* m_staticline73; - wxBoxSizer* bSizerServer; - wxStaticBitmap* m_bitmapServer; - wxStaticText* m_staticText12311; - wxTextCtrl* m_textCtrlServer; - wxStaticText* m_staticText1233; - wxTextCtrl* m_textCtrlPort; - wxStaticLine* m_staticline58; - wxBoxSizer* bSizerAuth; - wxBoxSizer* bSizerAuthInner; - wxBoxSizer* bSizerFtpEncrypt; - wxStaticText* m_staticText1251; - wxRadioButton* m_radioBtnEncryptNone; - wxRadioButton* m_radioBtnEncryptSsl; - wxStaticLine* m_staticline5721; - wxBoxSizer* bSizerSftpAuth; - wxStaticText* m_staticText125; - wxRadioButton* m_radioBtnPassword; - wxRadioButton* m_radioBtnKeyfile; - wxRadioButton* m_radioBtnAgent; - wxStaticLine* m_staticline572; - wxPanel* m_panelAuth; - wxStaticText* m_staticText123; - wxTextCtrl* m_textCtrlUserName; - wxStaticText* m_staticTextKeyfile; - wxBoxSizer* bSizerKeyFile; - wxTextCtrl* m_textCtrlKeyfilePath; - wxButton* m_buttonSelectKeyfile; - wxStaticText* m_staticTextPassword; - wxBoxSizer* bSizerPassword; - wxTextCtrl* m_textCtrlPasswordVisible; - wxTextCtrl* m_textCtrlPasswordHidden; - wxCheckBox* m_checkBoxShowPassword; - wxCheckBox* m_checkBoxPasswordPrompt; - wxStaticLine* m_staticline581; - wxStaticBitmap* m_bitmapServerDir; - wxStaticText* m_staticText1232; - wxStaticLine* m_staticline83; - wxStaticText* m_staticTextTimeout; - wxSpinCtrl* m_spinCtrlTimeout; - wxStaticLine* m_staticline82; - wxTextCtrl* m_textCtrlServerPath; - wxButton* m_buttonSelectFolder; - wxStaticLine* m_staticline571; - wxStaticBitmap* m_bitmapPerf; - wxStaticText* m_staticText1361; - wxHyperlinkCtrl* m_hyperlink171; - wxStaticLine* m_staticline57; - wxPanel* m_panel411; - wxBoxSizer* bSizerConnectionsLabel; - wxStaticText* m_staticTextConnectionsLabel; - wxStaticText* m_staticTextConnectionsLabelSub; - wxSpinCtrl* m_spinCtrlConnectionCount; - wxStaticText* m_staticTextConnectionCountDescr; - wxHyperlinkCtrl* m_hyperlinkDeRequired; - wxStaticText* m_staticTextChannelCountSftp; - wxSpinCtrl* m_spinCtrlChannelCountSftp; - wxButton* m_buttonChannelCountSftp; - wxCheckBox* m_checkBoxAllowZlib; - wxStaticText* m_staticTextZlibDescr; - wxStaticLine* m_staticline12; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonOkay; - wxButton* m_buttonCancel; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onConnectionGdrive( wxCommandEvent& event ) { event.Skip(); } - virtual void onConnectionSftp( wxCommandEvent& event ) { event.Skip(); } - virtual void onConnectionFtp( wxCommandEvent& event ) { event.Skip(); } - virtual void onGdriveUserSelect( wxCommandEvent& event ) { event.Skip(); } - virtual void onGdriveUserAdd( wxCommandEvent& event ) { event.Skip(); } - virtual void onGdriveUserRemove( wxCommandEvent& event ) { event.Skip(); } - virtual void onAuthPassword( wxCommandEvent& event ) { event.Skip(); } - virtual void onAuthKeyfile( wxCommandEvent& event ) { event.Skip(); } - virtual void onAuthAgent( wxCommandEvent& event ) { event.Skip(); } - virtual void onSelectKeyfile( wxCommandEvent& event ) { event.Skip(); } - virtual void onTypingPassword( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleShowPassword( wxCommandEvent& event ) { event.Skip(); } - virtual void onTogglePasswordPrompt( wxCommandEvent& event ) { event.Skip(); } - virtual void onBrowseCloudFolder( wxCommandEvent& event ) { event.Skip(); } - virtual void onDetectServerChannelLimit( wxCommandEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } - - -public: - - CloudSetupDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Access Online Storage"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - - ~CloudSetupDlgGenerated(); + private: + + protected: + wxStaticBitmap* m_bitmapCloud; + wxStaticText* m_staticText136; + wxToggleButton* m_toggleBtnGdrive; + wxToggleButton* m_toggleBtnSftp; + wxToggleButton* m_toggleBtnFtp; + wxStaticLine* m_staticline371; + wxPanel* m_panel41; + wxBoxSizer* bSizerGdrive; + wxStaticBitmap* m_bitmapGdriveUser; + wxStaticText* m_staticText166; + wxListBox* m_listBoxGdriveUsers; + zen::BitmapTextButton* m_buttonGdriveAddUser; + zen::BitmapTextButton* m_buttonGdriveRemoveUser; + wxStaticLine* m_staticline841; + wxStaticBitmap* m_bitmapGdriveDrive; + wxStaticText* m_staticText186; + wxListBox* m_listBoxGdriveDrives; + wxStaticLine* m_staticline73; + wxBoxSizer* bSizerServer; + wxStaticBitmap* m_bitmapServer; + wxStaticText* m_staticText12311; + wxTextCtrl* m_textCtrlServer; + wxStaticText* m_staticText1233; + wxTextCtrl* m_textCtrlPort; + wxStaticLine* m_staticline58; + wxBoxSizer* bSizerAuth; + wxBoxSizer* bSizerAuthInner; + wxBoxSizer* bSizerFtpEncrypt; + wxStaticText* m_staticText1251; + wxRadioButton* m_radioBtnEncryptNone; + wxRadioButton* m_radioBtnEncryptSsl; + wxStaticLine* m_staticline5721; + wxBoxSizer* bSizerSftpAuth; + wxStaticText* m_staticText125; + wxRadioButton* m_radioBtnPassword; + wxRadioButton* m_radioBtnKeyfile; + wxRadioButton* m_radioBtnAgent; + wxStaticLine* m_staticline572; + wxPanel* m_panelAuth; + wxStaticText* m_staticText123; + wxTextCtrl* m_textCtrlUserName; + wxStaticText* m_staticTextKeyfile; + wxBoxSizer* bSizerKeyFile; + wxTextCtrl* m_textCtrlKeyfilePath; + wxButton* m_buttonSelectKeyfile; + wxStaticText* m_staticTextPassword; + wxBoxSizer* bSizerPassword; + wxTextCtrl* m_textCtrlPasswordVisible; + wxTextCtrl* m_textCtrlPasswordHidden; + wxCheckBox* m_checkBoxShowPassword; + wxCheckBox* m_checkBoxPasswordPrompt; + wxStaticLine* m_staticline581; + wxStaticBitmap* m_bitmapServerDir; + wxStaticText* m_staticText1232; + wxStaticLine* m_staticline83; + wxStaticText* m_staticTextTimeout; + wxSpinCtrl* m_spinCtrlTimeout; + wxStaticLine* m_staticline82; + wxTextCtrl* m_textCtrlServerPath; + wxButton* m_buttonSelectFolder; + wxStaticLine* m_staticline571; + wxStaticBitmap* m_bitmapPerf; + wxStaticText* m_staticText1361; + wxHyperlinkCtrl* m_hyperlink171; + wxStaticLine* m_staticline57; + wxPanel* m_panel411; + wxBoxSizer* bSizerConnectionsLabel; + wxStaticText* m_staticTextConnectionsLabel; + wxStaticText* m_staticTextConnectionsLabelSub; + wxSpinCtrl* m_spinCtrlConnectionCount; + wxStaticText* m_staticTextConnectionCountDescr; + wxHyperlinkCtrl* m_hyperlinkDeRequired; + wxStaticText* m_staticTextChannelCountSftp; + wxSpinCtrl* m_spinCtrlChannelCountSftp; + wxButton* m_buttonChannelCountSftp; + wxCheckBox* m_checkBoxAllowZlib; + wxStaticText* m_staticTextZlibDescr; + wxStaticLine* m_staticline12; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonOkay; + wxButton* m_buttonCancel; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onConnectionGdrive( wxCommandEvent& event ) { event.Skip(); } + virtual void onConnectionSftp( wxCommandEvent& event ) { event.Skip(); } + virtual void onConnectionFtp( wxCommandEvent& event ) { event.Skip(); } + virtual void onGdriveUserSelect( wxCommandEvent& event ) { event.Skip(); } + virtual void onGdriveUserAdd( wxCommandEvent& event ) { event.Skip(); } + virtual void onGdriveUserRemove( wxCommandEvent& event ) { event.Skip(); } + virtual void onAuthPassword( wxCommandEvent& event ) { event.Skip(); } + virtual void onAuthKeyfile( wxCommandEvent& event ) { event.Skip(); } + virtual void onAuthAgent( wxCommandEvent& event ) { event.Skip(); } + virtual void onSelectKeyfile( wxCommandEvent& event ) { event.Skip(); } + virtual void onTypingPassword( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleShowPassword( wxCommandEvent& event ) { event.Skip(); } + virtual void onTogglePasswordPrompt( wxCommandEvent& event ) { event.Skip(); } + virtual void onBrowseCloudFolder( wxCommandEvent& event ) { event.Skip(); } + virtual void onDetectServerChannelLimit( wxCommandEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + + + public: + + CloudSetupDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Access Online Storage"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + ~CloudSetupDlgGenerated(); }; @@ -707,29 +704,29 @@ public: /////////////////////////////////////////////////////////////////////////////// class AbstractFolderPickerGenerated : public wxDialog { -private: + private: -protected: - wxPanel* m_panel41; - wxStaticText* m_staticTextStatus; - wxTreeCtrl* m_treeCtrlFileSystem; - wxStaticLine* m_staticline12; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonOkay; - wxButton* m_buttonCancel; + protected: + wxPanel* m_panel41; + wxStaticText* m_staticTextStatus; + wxTreeCtrl* m_treeCtrlFileSystem; + wxStaticLine* m_staticline12; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonOkay; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onExpandNode( wxTreeEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onExpandNode( wxTreeEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: + public: - AbstractFolderPickerGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select a folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); + AbstractFolderPickerGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select a folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); - ~AbstractFolderPickerGenerated(); + ~AbstractFolderPickerGenerated(); }; @@ -738,51 +735,51 @@ public: /////////////////////////////////////////////////////////////////////////////// class SyncConfirmationDlgGenerated : public wxDialog { -private: - -protected: - wxStaticBitmap* m_bitmapSync; - wxStaticText* m_staticTextCaption; - wxStaticLine* m_staticline371; - wxPanel* m_panelStatistics; - wxStaticLine* m_staticline38; - wxStaticText* m_staticText84; - wxStaticText* m_staticTextSyncVar; - wxStaticBitmap* m_bitmapSyncVar; - wxStaticLine* m_staticline14; - wxStaticText* m_staticText83; - wxStaticBitmap* m_bitmapDeleteLeft; - wxStaticBitmap* m_bitmapUpdateLeft; - wxStaticBitmap* m_bitmapCreateLeft; - wxStaticBitmap* m_bitmapData; - wxStaticBitmap* m_bitmapCreateRight; - wxStaticBitmap* m_bitmapUpdateRight; - wxStaticBitmap* m_bitmapDeleteRight; - wxStaticText* m_staticTextDeleteLeft; - wxStaticText* m_staticTextUpdateLeft; - wxStaticText* m_staticTextCreateLeft; - wxStaticText* m_staticTextData; - wxStaticText* m_staticTextCreateRight; - wxStaticText* m_staticTextUpdateRight; - wxStaticText* m_staticTextDeleteRight; - wxStaticLine* m_staticline381; - wxStaticLine* m_staticline12; - wxCheckBox* m_checkBoxDontShowAgain; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonStartSync; - wxButton* m_buttonCancel; - - // Virtual event handlers, override 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: - - SyncConfirmationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - - ~SyncConfirmationDlgGenerated(); + private: + + protected: + wxStaticBitmap* m_bitmapSync; + wxStaticText* m_staticTextCaption; + wxStaticLine* m_staticline371; + wxPanel* m_panelStatistics; + wxStaticLine* m_staticline38; + wxStaticText* m_staticText84; + wxStaticText* m_staticTextSyncVar; + wxStaticBitmap* m_bitmapSyncVar; + wxStaticLine* m_staticline14; + wxStaticText* m_staticText83; + wxStaticBitmap* m_bitmapDeleteLeft; + wxStaticBitmap* m_bitmapUpdateLeft; + wxStaticBitmap* m_bitmapCreateLeft; + wxStaticBitmap* m_bitmapData; + wxStaticBitmap* m_bitmapCreateRight; + wxStaticBitmap* m_bitmapUpdateRight; + wxStaticBitmap* m_bitmapDeleteRight; + wxStaticText* m_staticTextDeleteLeft; + wxStaticText* m_staticTextUpdateLeft; + wxStaticText* m_staticTextCreateLeft; + wxStaticText* m_staticTextData; + wxStaticText* m_staticTextCreateRight; + wxStaticText* m_staticTextUpdateRight; + wxStaticText* m_staticTextDeleteRight; + wxStaticLine* m_staticline381; + wxStaticLine* m_staticline12; + wxCheckBox* m_checkBoxDontShowAgain; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonStartSync; + wxButton* m_buttonCancel; + + // Virtual event handlers, override 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: + + SyncConfirmationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + ~SyncConfirmationDlgGenerated(); }; @@ -791,51 +788,51 @@ public: /////////////////////////////////////////////////////////////////////////////// class CompareProgressDlgGenerated : public wxPanel { -private: - -protected: - wxStaticText* m_staticTextStatus; - wxFlexGridSizer* ffgSizer11; - wxFlexGridSizer* ffgSizer111; - wxFlexGridSizer* ffgSizer112; - wxFlexGridSizer* ffgSizer114; - wxFlexGridSizer* ffgSizer1121; - wxFlexGridSizer* ffgSizer1141; - wxStaticText* m_staticText1461; - wxStaticText* m_staticTextRetryCount; - wxStaticText* m_staticText146; - wxBoxSizer* bSizerProgressGraph; - wxFlexGridSizer* ffgSizer113; - zen::Graph2D* m_panelProgressGraph; - -public: - wxStaticText* m_staticTextProcessed; - wxStaticText* m_staticTextRemaining; - wxPanel* m_panelItemStats; - wxStaticBitmap* m_bitmapItemStat; - wxStaticText* m_staticTextItemsProcessed; - wxStaticText* m_staticTextBytesProcessed; - wxStaticText* m_staticTextItemsRemaining; - wxStaticText* m_staticTextBytesRemaining; - wxPanel* m_panelTimeStats; - wxStaticBitmap* m_bitmapTimeStat; - wxStaticText* m_staticTextTimeElapsed; - wxStaticText* m_staticTextTimeRemaining; - wxStaticText* m_staticTextErrors; - wxStaticText* m_staticTextWarnings; - wxPanel* m_panelErrorStats; - wxStaticBitmap* m_bitmapErrors; - wxStaticText* m_staticTextErrorCount; - wxStaticBitmap* m_bitmapWarnings; - wxStaticText* m_staticTextWarningCount; - wxBoxSizer* bSizerErrorsRetry; - wxStaticBitmap* m_bitmapRetryErrors; - wxBoxSizer* bSizerErrorsIgnore; - wxStaticBitmap* m_bitmapIgnoreErrors; - - CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxBORDER_RAISED, const wxString& name = wxEmptyString ); - - ~CompareProgressDlgGenerated(); + private: + + protected: + wxStaticText* m_staticTextStatus; + wxFlexGridSizer* ffgSizer11; + wxFlexGridSizer* ffgSizer111; + wxFlexGridSizer* ffgSizer112; + wxFlexGridSizer* ffgSizer114; + wxFlexGridSizer* ffgSizer1121; + wxFlexGridSizer* ffgSizer1141; + wxStaticText* m_staticText1461; + wxStaticText* m_staticTextRetryCount; + wxStaticText* m_staticText146; + wxBoxSizer* bSizerProgressGraph; + wxFlexGridSizer* ffgSizer113; + zen::Graph2D* m_panelProgressGraph; + + public: + wxStaticText* m_staticTextProcessed; + wxStaticText* m_staticTextRemaining; + wxPanel* m_panelItemStats; + wxStaticBitmap* m_bitmapItemStat; + wxStaticText* m_staticTextItemsProcessed; + wxStaticText* m_staticTextBytesProcessed; + wxStaticText* m_staticTextItemsRemaining; + wxStaticText* m_staticTextBytesRemaining; + wxPanel* m_panelTimeStats; + wxStaticBitmap* m_bitmapTimeStat; + wxStaticText* m_staticTextTimeElapsed; + wxStaticText* m_staticTextTimeRemaining; + wxStaticText* m_staticTextErrors; + wxStaticText* m_staticTextWarnings; + wxPanel* m_panelErrorStats; + wxStaticBitmap* m_bitmapErrors; + wxStaticText* m_staticTextErrorCount; + wxStaticBitmap* m_bitmapWarnings; + wxStaticText* m_staticTextWarningCount; + wxBoxSizer* bSizerErrorsRetry; + wxStaticBitmap* m_bitmapRetryErrors; + wxBoxSizer* bSizerErrorsIgnore; + wxStaticBitmap* m_bitmapIgnoreErrors; + + CompareProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxBORDER_RAISED, const wxString& name = wxEmptyString ); + + ~CompareProgressDlgGenerated(); }; @@ -844,71 +841,71 @@ public: /////////////////////////////////////////////////////////////////////////////// class SyncProgressPanelGenerated : public wxPanel { -private: - -protected: - wxPanel* m_panel53; - wxBoxSizer* bSizer42; - wxFlexGridSizer* ffgSizer11; - wxFlexGridSizer* ffgSizer111; - wxFlexGridSizer* ffgSizer112; - wxFlexGridSizer* ffgSizer114; - wxFlexGridSizer* ffgSizer1121; - wxStaticText* m_staticText1461; - wxStaticText* m_staticText146; - wxStaticText* m_staticText137; - -public: - wxBoxSizer* bSizerRoot; - wxStaticBitmap* m_bitmapStatus; - wxStaticText* m_staticTextPhase; - wxStaticText* m_staticTextPercentTotal; - wxBitmapButton* m_bpButtonMinimizeToTray; - wxBoxSizer* bSizerStatusText; - wxStaticText* m_staticTextStatus; - wxPanel* m_panelProgress; - zen::Graph2D* m_panelGraphBytes; - wxStaticBitmap* m_bitmapGraphKeyBytes; - wxStaticBitmap* m_bitmapGraphKeyItems; - wxStaticText* m_staticTextProcessed; - wxStaticText* m_staticTextRemaining; - wxPanel* m_panelItemStats; - wxStaticBitmap* m_bitmapItemStat; - wxStaticText* m_staticTextItemsProcessed; - wxStaticText* m_staticTextBytesProcessed; - wxStaticText* m_staticTextItemsRemaining; - wxStaticText* m_staticTextBytesRemaining; - wxPanel* m_panelTimeStats; - wxStaticBitmap* m_bitmapTimeStat; - wxStaticText* m_staticTextTimeElapsed; - wxStaticText* m_staticTextTimeRemaining; - wxStaticText* m_staticTextErrors; - wxStaticText* m_staticTextWarnings; - wxPanel* m_panelErrorStats; - wxStaticBitmap* m_bitmapErrors; - wxStaticText* m_staticTextErrorCount; - wxStaticBitmap* m_bitmapWarnings; - wxStaticText* m_staticTextWarningCount; - wxBoxSizer* bSizerDynSpace; - zen::Graph2D* m_panelGraphItems; - wxBoxSizer* bSizerProgressFooter; - wxBoxSizer* bSizerErrorsRetry; - wxStaticBitmap* m_bitmapRetryErrors; - wxStaticText* m_staticTextRetryCount; - wxBoxSizer* bSizerErrorsIgnore; - wxStaticBitmap* m_bitmapIgnoreErrors; - wxChoice* m_choicePostSyncAction; - wxNotebook* m_notebookResult; - wxStaticLine* m_staticlineFooter; - wxBoxSizer* bSizerStdButtons; - wxCheckBox* m_checkBoxAutoClose; - wxButton* m_buttonClose; - wxButton* m_buttonPause; - wxButton* m_buttonStop; - - SyncProgressPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - - ~SyncProgressPanelGenerated(); + private: + + protected: + wxPanel* m_panel53; + wxBoxSizer* bSizer42; + wxFlexGridSizer* ffgSizer11; + wxFlexGridSizer* ffgSizer111; + wxFlexGridSizer* ffgSizer112; + wxFlexGridSizer* ffgSizer114; + wxFlexGridSizer* ffgSizer1121; + wxStaticText* m_staticText1461; + wxStaticText* m_staticText146; + wxStaticText* m_staticText137; + + public: + wxBoxSizer* bSizerRoot; + wxStaticBitmap* m_bitmapStatus; + wxStaticText* m_staticTextPhase; + wxStaticText* m_staticTextPercentTotal; + wxBitmapButton* m_bpButtonMinimizeToTray; + wxBoxSizer* bSizerStatusText; + wxStaticText* m_staticTextStatus; + wxPanel* m_panelProgress; + zen::Graph2D* m_panelGraphBytes; + wxStaticBitmap* m_bitmapGraphKeyBytes; + wxStaticBitmap* m_bitmapGraphKeyItems; + wxStaticText* m_staticTextProcessed; + wxStaticText* m_staticTextRemaining; + wxPanel* m_panelItemStats; + wxStaticBitmap* m_bitmapItemStat; + wxStaticText* m_staticTextItemsProcessed; + wxStaticText* m_staticTextBytesProcessed; + wxStaticText* m_staticTextItemsRemaining; + wxStaticText* m_staticTextBytesRemaining; + wxPanel* m_panelTimeStats; + wxStaticBitmap* m_bitmapTimeStat; + wxStaticText* m_staticTextTimeElapsed; + wxStaticText* m_staticTextTimeRemaining; + wxStaticText* m_staticTextErrors; + wxStaticText* m_staticTextWarnings; + wxPanel* m_panelErrorStats; + wxStaticBitmap* m_bitmapErrors; + wxStaticText* m_staticTextErrorCount; + wxStaticBitmap* m_bitmapWarnings; + wxStaticText* m_staticTextWarningCount; + wxBoxSizer* bSizerDynSpace; + zen::Graph2D* m_panelGraphItems; + wxBoxSizer* bSizerProgressFooter; + wxBoxSizer* bSizerErrorsRetry; + wxStaticBitmap* m_bitmapRetryErrors; + wxStaticText* m_staticTextRetryCount; + wxBoxSizer* bSizerErrorsIgnore; + wxStaticBitmap* m_bitmapIgnoreErrors; + wxChoice* m_choicePostSyncAction; + wxNotebook* m_notebookResult; + wxStaticLine* m_staticlineFooter; + wxBoxSizer* bSizerStdButtons; + wxCheckBox* m_checkBoxAutoClose; + wxButton* m_buttonClose; + wxButton* m_buttonPause; + wxButton* m_buttonStop; + + SyncProgressPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + + ~SyncProgressPanelGenerated(); }; @@ -917,26 +914,26 @@ public: /////////////////////////////////////////////////////////////////////////////// class LogPanelGenerated : public wxPanel { -private: + private: -protected: - zen::ToggleButton* m_bpButtonErrors; - zen::ToggleButton* m_bpButtonWarnings; - zen::ToggleButton* m_bpButtonInfo; - wxStaticLine* m_staticline13; + protected: + zen::ToggleButton* m_bpButtonErrors; + zen::ToggleButton* m_bpButtonWarnings; + zen::ToggleButton* m_bpButtonInfo; + wxStaticLine* m_staticline13; - // Virtual event handlers, override 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(); } + // Virtual event handlers, override 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: - zen::Grid* m_gridMessages; + public: + zen::Grid* m_gridMessages; - LogPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + LogPanelGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - ~LogPanelGenerated(); + ~LogPanelGenerated(); }; @@ -945,47 +942,47 @@ public: /////////////////////////////////////////////////////////////////////////////// class BatchDlgGenerated : public wxDialog { -private: - -protected: - wxStaticBitmap* m_bitmapBatchJob; - wxStaticText* m_staticTextHeader; - wxStaticLine* m_staticline18; - wxPanel* m_panel35; - wxStaticText* m_staticText146; - wxFlexGridSizer* ffgSizer11; - wxStaticBitmap* m_bitmapMinimizeToTray; - wxCheckBox* m_checkBoxRunMinimized; - wxStaticLine* m_staticline26; - wxStaticBitmap* m_bitmapIgnoreErrors; - wxCheckBox* m_checkBoxIgnoreErrors; - wxRadioButton* m_radioBtnErrorDialogShow; - wxRadioButton* m_radioBtnErrorDialogCancel; - wxStaticLine* m_staticline261; - wxStaticText* m_staticText137; - wxStaticLine* m_staticline262; - wxStaticLine* m_staticline25; - wxHyperlinkCtrl* m_hyperlink17; - wxStaticLine* m_staticline13; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonSaveAs; - wxButton* m_buttonCancel; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onToggleRunMinimized( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); } - virtual void onSaveBatchJob( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } - - -public: - wxCheckBox* m_checkBoxAutoClose; - wxChoice* m_choicePostSyncAction; - - BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Save as a Batch Job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - - ~BatchDlgGenerated(); + private: + + protected: + wxStaticBitmap* m_bitmapBatchJob; + wxStaticText* m_staticTextHeader; + wxStaticLine* m_staticline18; + wxPanel* m_panel35; + wxStaticText* m_staticText146; + wxFlexGridSizer* ffgSizer11; + wxStaticBitmap* m_bitmapMinimizeToTray; + wxCheckBox* m_checkBoxRunMinimized; + wxStaticLine* m_staticline26; + wxStaticBitmap* m_bitmapIgnoreErrors; + wxCheckBox* m_checkBoxIgnoreErrors; + wxRadioButton* m_radioBtnErrorDialogShow; + wxRadioButton* m_radioBtnErrorDialogCancel; + wxStaticLine* m_staticline261; + wxStaticText* m_staticText137; + wxStaticLine* m_staticline262; + wxStaticLine* m_staticline25; + wxHyperlinkCtrl* m_hyperlink17; + wxStaticLine* m_staticline13; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonSaveAs; + wxButton* m_buttonCancel; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onToggleRunMinimized( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleIgnoreErrors( wxCommandEvent& event ) { event.Skip(); } + virtual void onSaveBatchJob( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + + + public: + wxCheckBox* m_checkBoxAutoClose; + wxChoice* m_choicePostSyncAction; + + BatchDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Save as a Batch Job"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + ~BatchDlgGenerated(); }; @@ -994,33 +991,33 @@ public: /////////////////////////////////////////////////////////////////////////////// class DeleteDlgGenerated : public wxDialog { -private: + private: -protected: - wxStaticBitmap* m_bitmapDeleteType; - wxStaticText* m_staticTextHeader; - wxStaticLine* m_staticline91; - wxPanel* m_panel31; - wxStaticLine* m_staticline42; - wxTextCtrl* m_textCtrlFileList; - wxStaticLine* m_staticline9; - wxBoxSizer* bSizerStdButtons; - wxCheckBox* m_checkBoxUseRecycler; - wxButton* m_buttonOK; - wxButton* m_buttonCancel; + protected: + wxStaticBitmap* m_bitmapDeleteType; + wxStaticText* m_staticTextHeader; + wxStaticLine* m_staticline91; + wxPanel* m_panel31; + wxStaticLine* m_staticline42; + wxTextCtrl* m_textCtrlFileList; + wxStaticLine* m_staticline9; + wxBoxSizer* bSizerStdButtons; + wxCheckBox* m_checkBoxUseRecycler; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onUseRecycler( wxCommandEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onUseRecycler( wxCommandEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: + public: - DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delete Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); + DeleteDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delete Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); - ~DeleteDlgGenerated(); + ~DeleteDlgGenerated(); }; @@ -1029,36 +1026,36 @@ public: /////////////////////////////////////////////////////////////////////////////// class CopyToDlgGenerated : public wxDialog { -private: + private: -protected: - wxStaticBitmap* m_bitmapCopyTo; - wxStaticText* m_staticTextHeader; - wxStaticLine* m_staticline91; - wxPanel* m_panel31; - wxStaticLine* m_staticline42; - wxTextCtrl* m_textCtrlFileList; - wxButton* m_buttonSelectTargetFolder; - wxStaticLine* m_staticline9; - wxBoxSizer* bSizerStdButtons; - wxCheckBox* m_checkBoxKeepRelPath; - wxCheckBox* m_checkBoxOverwriteIfExists; - wxButton* m_buttonOK; - wxButton* m_buttonCancel; + protected: + wxStaticBitmap* m_bitmapCopyTo; + wxStaticText* m_staticTextHeader; + wxStaticLine* m_staticline91; + wxPanel* m_panel31; + wxStaticLine* m_staticline42; + wxTextCtrl* m_textCtrlFileList; + wxButton* m_buttonSelectTargetFolder; + wxStaticLine* m_staticline9; + wxBoxSizer* bSizerStdButtons; + wxCheckBox* m_checkBoxKeepRelPath; + wxCheckBox* m_checkBoxOverwriteIfExists; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: - fff::FolderHistoryBox* m_targetFolderPath; - wxBitmapButton* m_bpButtonSelectAltTargetFolder; + public: + fff::FolderHistoryBox* m_targetFolderPath; + wxBitmapButton* m_bpButtonSelectAltTargetFolder; - CopyToDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Copy Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); + CopyToDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Copy Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); - ~CopyToDlgGenerated(); + ~CopyToDlgGenerated(); }; @@ -1067,33 +1064,33 @@ public: /////////////////////////////////////////////////////////////////////////////// class RenameDlgGenerated : public wxDialog { -private: + private: -protected: - wxStaticBitmap* m_bitmapRename; - wxStaticText* m_staticTextHeader; - wxStaticLine* m_staticline91; - wxPanel* m_panel31; - zen::Grid* m_gridRenamePreview; - wxStaticLine* m_staticlinePreview; - wxStaticText* m_staticTextPlaceholderDescription; - wxTextCtrl* m_textCtrlNewName; - wxStaticLine* m_staticline9; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonOK; - wxButton* m_buttonCancel; + protected: + wxStaticBitmap* m_bitmapRename; + wxStaticText* m_staticTextHeader; + wxStaticLine* m_staticline91; + wxPanel* m_panel31; + zen::Grid* m_gridRenamePreview; + wxStaticLine* m_staticlinePreview; + wxStaticText* m_staticTextPlaceholderDescription; + wxTextCtrl* m_textCtrlNewName; + wxStaticLine* m_staticline9; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: + public: - RenameDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Rename Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); + RenameDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Rename Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); - ~RenameDlgGenerated(); + ~RenameDlgGenerated(); }; @@ -1102,115 +1099,120 @@ public: /////////////////////////////////////////////////////////////////////////////// class OptionsDlgGenerated : public wxDialog { -private: - -protected: - wxStaticBitmap* m_bitmapSettings; - wxStaticText* m_staticText44; - wxStaticLine* m_staticline20; - wxPanel* m_panel39; - wxCheckBox* m_checkBoxFailSafe; - wxStaticText* m_staticText911; - wxStaticText* m_staticText91; - wxStaticText* m_staticText9111; - wxBoxSizer* bSizerLockedFiles; - wxCheckBox* m_checkBoxCopyLocked; - wxStaticText* m_staticText921; - wxStaticText* m_staticText92; - wxStaticText* m_staticText922; - wxCheckBox* m_checkBoxCopyPermissions; - wxStaticText* m_staticText931; - wxStaticText* m_staticText93; - wxStaticText* m_staticText932; - wxStaticLine* m_staticline39; - wxStaticLine* m_staticline191; - wxStaticBitmap* m_bitmapWarnings; - wxStaticText* m_staticText182; - wxStaticText* m_staticTextHiddenDialogsCount; - wxButton* m_buttonShowHiddenDialogs; - wxCheckListBox* m_checkListHiddenDialogs; - wxStaticLine* m_staticline1911; - wxStaticBitmap* m_bitmapLogFile; - wxStaticText* m_staticText163; - wxPanel* m_panelLogfile; - wxButton* m_buttonSelectLogFolder; - wxCheckBox* m_checkBoxLogFilesMaxAge; - wxSpinCtrl* m_spinCtrlLogFilesMaxAge; - wxStaticLine* m_staticline81; - wxStaticText* m_staticText184; - wxRadioButton* m_radioBtnLogHtml; - wxRadioButton* m_radioBtnLogText; - wxStaticLine* m_staticline361; - wxStaticBitmap* m_bitmapNotificationSounds; - wxStaticText* m_staticText851; - wxFlexGridSizer* ffgSizer11; - wxStaticText* m_staticText171; - wxStaticBitmap* m_bitmapCompareDone; - wxBitmapButton* m_bpButtonPlayCompareDone; - wxTextCtrl* m_textCtrlSoundPathCompareDone; - wxButton* m_buttonSelectSoundCompareDone; - wxStaticText* m_staticText1711; - wxStaticBitmap* m_bitmapSyncDone; - wxBitmapButton* m_bpButtonPlaySyncDone; - wxTextCtrl* m_textCtrlSoundPathSyncDone; - wxButton* m_buttonSelectSoundSyncDone; - wxStaticText* m_staticText17111; - wxStaticBitmap* m_bitmapAlertPending; - wxBitmapButton* m_bpButtonPlayAlertPending; - wxTextCtrl* m_textCtrlSoundPathAlertPending; - wxButton* m_buttonSelectSoundAlertPending; - wxStaticLine* m_staticline3611; - wxStaticBitmap* m_bitmapConsole; - wxStaticText* m_staticText85; - wxButton* m_buttonShowCtxCustomize; - wxBoxSizer* bSizerContextCustomize; - wxBitmapButton* m_bpButtonAddRow; - wxBitmapButton* m_bpButtonRemoveRow; - wxStaticText* m_staticText174; - wxStaticText* m_staticText175; - wxStaticText* m_staticText178; - wxStaticText* m_staticText179; - wxStaticText* m_staticText189; - wxStaticText* m_staticText190; - wxStaticText* m_staticText176; - wxStaticText* m_staticText177; - wxHyperlinkCtrl* m_hyperlink17; - wxGrid* m_gridCustomCommand; - wxStaticLine* m_staticline36; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonDefault; - wxButton* m_buttonOkay; - wxButton* m_buttonCancel; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onShowHiddenDialogs( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleHiddenDialog( wxCommandEvent& event ) { event.Skip(); } - virtual void onShowLogFolder( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleLogfilesLimit( wxCommandEvent& event ) { event.Skip(); } - virtual void onPlayCompareDone( wxCommandEvent& event ) { event.Skip(); } - virtual void onChangeSoundFilePath( wxCommandEvent& event ) { event.Skip(); } - virtual void onSelectSoundCompareDone( wxCommandEvent& event ) { event.Skip(); } - virtual void onPlaySyncDone( wxCommandEvent& event ) { event.Skip(); } - virtual void onSelectSoundSyncDone( wxCommandEvent& event ) { event.Skip(); } - virtual void onPlayAlertPending( wxCommandEvent& event ) { event.Skip(); } - virtual void onSelectSoundAlertPending( wxCommandEvent& event ) { event.Skip(); } - virtual void onShowContextCustomize( 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: - wxBitmapButton* m_bpButtonShowLogFolder; - fff::FolderHistoryBox* m_logFolderPath; - wxBitmapButton* m_bpButtonSelectAltLogFolder; - - OptionsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - - ~OptionsDlgGenerated(); + private: + + protected: + wxStaticBitmap* m_bitmapSettings; + wxStaticText* m_staticText44; + wxStaticLine* m_staticline20; + wxPanel* m_panel39; + wxCheckBox* m_checkBoxFailSafe; + wxStaticText* m_staticText911; + wxStaticText* m_staticText91; + wxStaticText* m_staticText9111; + wxBoxSizer* bSizerLockedFiles; + wxCheckBox* m_checkBoxCopyLocked; + wxStaticText* m_staticText921; + wxStaticText* m_staticText92; + wxStaticText* m_staticText922; + wxCheckBox* m_checkBoxCopyPermissions; + wxStaticText* m_staticText931; + wxStaticText* m_staticText93; + wxStaticText* m_staticText932; + wxStaticLine* m_staticline39; + wxStaticBitmap* m_bitmapColorTheme; + wxBoxSizer* bSizerColorTheme; + wxStaticText* m_staticText198; + wxStaticLine* m_staticline191; + wxStaticBitmap* m_bitmapWarnings; + wxStaticText* m_staticText182; + wxStaticText* m_staticTextHiddenDialogsCount; + wxButton* m_buttonShowHiddenDialogs; + wxCheckListBox* m_checkListHiddenDialogs; + wxStaticLine* m_staticline1911; + wxStaticBitmap* m_bitmapLogFile; + wxStaticText* m_staticText163; + wxPanel* m_panelLogfile; + wxButton* m_buttonSelectLogFolder; + wxCheckBox* m_checkBoxLogFilesMaxAge; + wxSpinCtrl* m_spinCtrlLogFilesMaxAge; + wxStaticLine* m_staticline81; + wxStaticText* m_staticText184; + wxRadioButton* m_radioBtnLogHtml; + wxRadioButton* m_radioBtnLogText; + wxStaticLine* m_staticline361; + wxStaticBitmap* m_bitmapNotificationSounds; + wxStaticText* m_staticText851; + wxFlexGridSizer* ffgSizer11; + wxStaticText* m_staticText171; + wxStaticBitmap* m_bitmapCompareDone; + wxBitmapButton* m_bpButtonPlayCompareDone; + wxTextCtrl* m_textCtrlSoundPathCompareDone; + wxButton* m_buttonSelectSoundCompareDone; + wxStaticText* m_staticText1711; + wxStaticBitmap* m_bitmapSyncDone; + wxBitmapButton* m_bpButtonPlaySyncDone; + wxTextCtrl* m_textCtrlSoundPathSyncDone; + wxButton* m_buttonSelectSoundSyncDone; + wxStaticText* m_staticText17111; + wxStaticBitmap* m_bitmapAlertPending; + wxBitmapButton* m_bpButtonPlayAlertPending; + wxTextCtrl* m_textCtrlSoundPathAlertPending; + wxButton* m_buttonSelectSoundAlertPending; + wxStaticLine* m_staticline3611; + wxStaticBitmap* m_bitmapConsole; + wxStaticText* m_staticText85; + wxButton* m_buttonShowCtxCustomize; + wxBoxSizer* bSizerContextCustomize; + wxBitmapButton* m_bpButtonAddRow; + wxBitmapButton* m_bpButtonRemoveRow; + wxStaticText* m_staticText174; + wxStaticText* m_staticText175; + wxStaticText* m_staticText178; + wxStaticText* m_staticText179; + wxStaticText* m_staticText189; + wxStaticText* m_staticText190; + wxStaticText* m_staticText176; + wxStaticText* m_staticText177; + wxHyperlinkCtrl* m_hyperlink17; + wxGrid* m_gridCustomCommand; + wxStaticLine* m_staticline36; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonDefault; + wxButton* m_buttonOkay; + wxButton* m_buttonCancel; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onChangeColorTheme( wxCommandEvent& event ) { event.Skip(); } + virtual void onShowHiddenDialogs( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleHiddenDialog( wxCommandEvent& event ) { event.Skip(); } + virtual void onShowLogFolder( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleLogfilesLimit( wxCommandEvent& event ) { event.Skip(); } + virtual void onPlayCompareDone( wxCommandEvent& event ) { event.Skip(); } + virtual void onChangeSoundFilePath( wxCommandEvent& event ) { event.Skip(); } + virtual void onSelectSoundCompareDone( wxCommandEvent& event ) { event.Skip(); } + virtual void onPlaySyncDone( wxCommandEvent& event ) { event.Skip(); } + virtual void onSelectSoundSyncDone( wxCommandEvent& event ) { event.Skip(); } + virtual void onPlayAlertPending( wxCommandEvent& event ) { event.Skip(); } + virtual void onSelectSoundAlertPending( wxCommandEvent& event ) { event.Skip(); } + virtual void onShowContextCustomize( 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: + wxChoice* m_choiceColorTheme; + wxBitmapButton* m_bpButtonShowLogFolder; + fff::FolderHistoryBox* m_logFolderPath; + wxBitmapButton* m_bpButtonSelectAltLogFolder; + + OptionsDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + ~OptionsDlgGenerated(); }; @@ -1219,30 +1221,30 @@ public: /////////////////////////////////////////////////////////////////////////////// class SelectTimespanDlgGenerated : public wxDialog { -private: + private: -protected: - wxPanel* m_panel35; - wxCalendarCtrl* m_calendarFrom; - wxCalendarCtrl* m_calendarTo; - wxStaticLine* m_staticline21; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonOkay; - wxButton* m_buttonCancel; + protected: + wxPanel* m_panel35; + wxCalendarCtrl* m_calendarFrom; + wxCalendarCtrl* m_calendarTo; + wxStaticLine* m_staticline21; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonOkay; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); } - virtual void onChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onChangeSelectionFrom( wxCalendarEvent& event ) { event.Skip(); } + virtual void onChangeSelectionTo( wxCalendarEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: + public: - SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Time Span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + SelectTimespanDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Time Span"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~SelectTimespanDlgGenerated(); + ~SelectTimespanDlgGenerated(); }; @@ -1251,54 +1253,54 @@ public: /////////////////////////////////////////////////////////////////////////////// class AboutDlgGenerated : public wxDialog { -private: - -protected: - wxPanel* m_panel41; - wxStaticBitmap* m_bitmapLogoLeft; - wxStaticLine* m_staticline81; - wxBoxSizer* bSizerMainSection; - wxStaticLine* m_staticline82; - wxStaticBitmap* m_bitmapLogo; - wxStaticLine* m_staticline341; - wxStaticText* m_staticFfsTextVersion; - wxStaticText* m_staticTextFfsVariant; - wxStaticLine* m_staticline3411; - wxBoxSizer* bSizerDonate; - wxPanel* m_panelDonate; - wxStaticBitmap* m_bitmapAnimalSmall; - wxPanel* m_panel39; - wxStaticText* m_staticTextDonate; - zen::BitmapTextButton* m_buttonDonate1; - wxStaticBitmap* m_bitmapAnimalBig; - wxStaticLine* m_staticline3412; - wxStaticText* m_staticText94; - wxBitmapButton* m_bpButtonForum; - wxBitmapButton* m_bpButtonEmail; - wxStaticLine* m_staticline37; - wxStaticText* m_staticTextThanksForLoc; - wxScrolledWindow* m_scrolledWindowTranslators; - wxFlexGridSizer* fgSizerTranslators; - wxStaticLine* m_staticline36; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonShowSupporterDetails; - zen::BitmapTextButton* m_buttonDonate2; - wxButton* m_buttonClose; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onDonate( wxCommandEvent& event ) { event.Skip(); } - virtual void onOpenForum( wxCommandEvent& event ) { event.Skip(); } - virtual void onSendEmail( wxCommandEvent& event ) { event.Skip(); } - virtual void onShowSupporterDetails( wxCommandEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - - -public: - - AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - - ~AboutDlgGenerated(); + private: + + protected: + wxPanel* m_panel41; + wxStaticBitmap* m_bitmapLogoLeft; + wxStaticLine* m_staticline81; + wxBoxSizer* bSizerMainSection; + wxStaticLine* m_staticline82; + wxStaticBitmap* m_bitmapLogo; + wxStaticLine* m_staticline341; + wxStaticText* m_staticFfsTextVersion; + wxStaticText* m_staticTextFfsVariant; + wxStaticLine* m_staticline3411; + wxBoxSizer* bSizerDonate; + wxPanel* m_panelDonate; + wxStaticBitmap* m_bitmapAnimalSmall; + wxPanel* m_panel39; + wxStaticText* m_staticTextDonate; + zen::BitmapTextButton* m_buttonDonate1; + wxStaticBitmap* m_bitmapAnimalBig; + wxStaticLine* m_staticline3412; + wxStaticText* m_staticText94; + wxBitmapButton* m_bpButtonForum; + wxBitmapButton* m_bpButtonEmail; + wxStaticLine* m_staticline37; + wxStaticText* m_staticTextThanksForLoc; + wxScrolledWindow* m_scrolledWindowTranslators; + wxFlexGridSizer* fgSizerTranslators; + wxStaticLine* m_staticline36; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonShowSupporterDetails; + zen::BitmapTextButton* m_buttonDonate2; + wxButton* m_buttonClose; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onDonate( wxCommandEvent& event ) { event.Skip(); } + virtual void onOpenForum( wxCommandEvent& event ) { event.Skip(); } + virtual void onSendEmail( wxCommandEvent& event ) { event.Skip(); } + virtual void onShowSupporterDetails( wxCommandEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + + + public: + + AboutDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + ~AboutDlgGenerated(); }; @@ -1307,26 +1309,26 @@ public: /////////////////////////////////////////////////////////////////////////////// class DownloadProgressDlgGenerated : public wxDialog { -private: + private: -protected: - wxStaticBitmap* m_bitmapDownloading; - wxStaticText* m_staticTextHeader; - wxGauge* m_gaugeProgress; - wxStaticText* m_staticTextDetails; - wxStaticLine* m_staticline9; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonCancel; + protected: + wxStaticBitmap* m_bitmapDownloading; + wxStaticText* m_staticTextHeader; + wxGauge* m_gaugeProgress; + wxStaticText* m_staticTextDetails; + wxStaticLine* m_staticline9; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: + public: - DownloadProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); + DownloadProgressDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); - ~DownloadProgressDlgGenerated(); + ~DownloadProgressDlgGenerated(); }; @@ -1335,28 +1337,28 @@ public: /////////////////////////////////////////////////////////////////////////////// class CfgHighlightDlgGenerated : public wxDialog { -private: + private: -protected: - wxPanel* m_panel35; - wxStaticText* m_staticTextHighlight; - wxSpinCtrl* m_spinCtrlOverdueDays; - wxStaticLine* m_staticline21; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonOkay; - wxButton* m_buttonCancel; + protected: + wxPanel* m_panel35; + wxStaticText* m_staticTextHighlight; + wxSpinCtrl* m_spinCtrlOverdueDays; + wxStaticLine* m_staticline21; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonOkay; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: + public: - CfgHighlightDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Highlight Configurations"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + CfgHighlightDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Highlight Configurations"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - ~CfgHighlightDlgGenerated(); + ~CfgHighlightDlgGenerated(); }; @@ -1365,36 +1367,36 @@ public: /////////////////////////////////////////////////////////////////////////////// class PasswordPromptDlgGenerated : public wxDialog { -private: + private: -protected: - wxPanel* m_panel35; - wxStaticText* m_staticTextMain; - wxStaticText* m_staticTextPassword; - wxTextCtrl* m_textCtrlPasswordVisible; - wxTextCtrl* m_textCtrlPasswordHidden; - wxCheckBox* m_checkBoxShowPassword; - wxBoxSizer* bSizerError; - wxStaticBitmap* m_bitmapError; - wxStaticText* m_staticTextError; - wxStaticLine* m_staticline21; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonOkay; - wxButton* m_buttonCancel; + protected: + wxPanel* m_panel35; + wxStaticText* m_staticTextMain; + wxStaticText* m_staticTextPassword; + wxTextCtrl* m_textCtrlPasswordVisible; + wxTextCtrl* m_textCtrlPasswordHidden; + wxCheckBox* m_checkBoxShowPassword; + wxBoxSizer* bSizerError; + wxStaticBitmap* m_bitmapError; + wxStaticText* m_staticTextError; + wxStaticLine* m_staticline21; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonOkay; + wxButton* m_buttonCancel; - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onTypingPassword( wxCommandEvent& event ) { event.Skip(); } - virtual void onToggleShowPassword( wxCommandEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onTypingPassword( wxCommandEvent& event ) { event.Skip(); } + virtual void onToggleShowPassword( wxCommandEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } -public: + public: - PasswordPromptDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + PasswordPromptDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~PasswordPromptDlgGenerated(); + ~PasswordPromptDlgGenerated(); }; @@ -1403,48 +1405,48 @@ public: /////////////////////////////////////////////////////////////////////////////// class ActivationDlgGenerated : public wxDialog { -private: - -protected: - wxPanel* m_panel35; - wxStaticBitmap* m_bitmapActivation; - wxRichTextCtrl* m_richTextLastError; - wxStaticLine* m_staticline82; - wxStaticText* m_staticTextMain; - wxStaticLine* m_staticline181; - wxStaticLine* m_staticline18111; - wxPanel* m_panel3511; - wxStaticText* m_staticTextMain1; - wxStaticText* m_staticText136; - wxButton* m_buttonActivateOnline; - wxStaticLine* m_staticline181111; - wxStaticLine* m_staticline181112; - wxPanel* m_panel351; - wxStaticText* m_staticText175; - wxStaticText* m_staticText1361; - wxButton* m_buttonCopyUrl; - wxRichTextCtrl* m_richTextManualActivationUrl; - wxStaticText* m_staticText13611; - wxTextCtrl* m_textCtrlOfflineActivationKey; - wxButton* m_buttonActivateOffline; - wxStaticLine* m_staticline13; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonCancel; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onActivateOnline( wxCommandEvent& event ) { event.Skip(); } - virtual void onCopyUrl( wxCommandEvent& event ) { event.Skip(); } - virtual void onOfflineActivationEnter( wxCommandEvent& event ) { event.Skip(); } - virtual void onActivateOffline( wxCommandEvent& event ) { event.Skip(); } - virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } - - -public: - - ActivationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - - ~ActivationDlgGenerated(); + private: + + protected: + wxPanel* m_panel35; + wxStaticBitmap* m_bitmapActivation; + wxRichTextCtrl* m_richTextLastError; + wxStaticLine* m_staticline82; + wxStaticText* m_staticTextMain; + wxStaticLine* m_staticline181; + wxStaticLine* m_staticline18111; + wxPanel* m_panel3511; + wxStaticText* m_staticTextMain1; + wxStaticText* m_staticText136; + wxButton* m_buttonActivateOnline; + wxStaticLine* m_staticline181111; + wxStaticLine* m_staticline181112; + wxPanel* m_panel351; + wxStaticText* m_staticText175; + wxStaticText* m_staticText1361; + wxButton* m_buttonCopyUrl; + wxRichTextCtrl* m_richTextManualActivationUrl; + wxStaticText* m_staticText13611; + wxTextCtrl* m_textCtrlOfflineActivationKey; + wxButton* m_buttonActivateOffline; + wxStaticLine* m_staticline13; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonCancel; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onActivateOnline( wxCommandEvent& event ) { event.Skip(); } + virtual void onCopyUrl( wxCommandEvent& event ) { event.Skip(); } + virtual void onOfflineActivationEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void onActivateOffline( wxCommandEvent& event ) { event.Skip(); } + virtual void onCancel( wxCommandEvent& event ) { event.Skip(); } + + + public: + + ActivationDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("dummy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + ~ActivationDlgGenerated(); }; @@ -1453,40 +1455,38 @@ public: /////////////////////////////////////////////////////////////////////////////// class WarnAccessRightsMissingDlgGenerated : public wxDialog { -private: - -protected: - wxStaticBitmap* m_bitmapGrantAccess; - wxStaticText* m_staticTextDescr; - wxStaticLine* m_staticline20; - wxPanel* m_panel39; - wxFlexGridSizer* ffgSizer11; - wxStaticText* m_staticTextStep1; - wxButton* m_buttonLocateBundle; - wxStaticText* m_staticTextStep2; - wxButton* m_buttonOpenSecurity; - wxStaticText* m_staticTextStep3; - wxStaticText* m_staticTextAllowChanges; - wxStaticText* m_staticTextStep4; - wxStaticText* m_staticTextGrantAccess; - wxStaticLine* m_staticline36; - wxCheckBox* m_checkBoxDontShowAgain; - wxBoxSizer* bSizerStdButtons; - wxButton* m_buttonClose; - - // Virtual event handlers, override them in your derived class - virtual void onClose( wxCloseEvent& event ) { event.Skip(); } - virtual void onShowAppBundle( wxCommandEvent& event ) { event.Skip(); } - virtual void onOpenSecuritySettings( wxCommandEvent& event ) { event.Skip(); } - virtual void onCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } - virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } - - -public: - - WarnAccessRightsMissingDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Grant Full Disk Access"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); - - ~WarnAccessRightsMissingDlgGenerated(); + private: + + protected: + wxStaticBitmap* m_bitmapGrantAccess; + wxStaticText* m_staticTextDescr; + wxStaticLine* m_staticline20; + wxPanel* m_panel39; + wxFlexGridSizer* ffgSizer11; + wxStaticText* m_staticTextStep1; + wxButton* m_buttonLocateBundle; + wxStaticText* m_staticTextStep2; + wxButton* m_buttonOpenSecurity; + wxStaticText* m_staticTextStep3; + wxStaticText* m_staticTextGrantAccess; + wxStaticLine* m_staticline36; + wxCheckBox* m_checkBoxDontShowAgain; + wxBoxSizer* bSizerStdButtons; + wxButton* m_buttonClose; + + // Virtual event handlers, override them in your derived class + virtual void onClose( wxCloseEvent& event ) { event.Skip(); } + virtual void onShowAppBundle( wxCommandEvent& event ) { event.Skip(); } + virtual void onOpenSecuritySettings( wxCommandEvent& event ) { event.Skip(); } + virtual void onCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } + virtual void onOkay( wxCommandEvent& event ) { event.Skip(); } + + + public: + + WarnAccessRightsMissingDlgGenerated( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Grant Full Disk Access"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + ~WarnAccessRightsMissingDlgGenerated(); }; diff --git a/FreeFileSync/Source/ui/gui_status_handler.cpp b/FreeFileSync/Source/ui/gui_status_handler.cpp index a81e008e..1b14d3e8 100644 --- a/FreeFileSync/Source/ui/gui_status_handler.cpp +++ b/FreeFileSync/Source/ui/gui_status_handler.cpp @@ -70,35 +70,27 @@ void StatusHandlerTemporaryPanel::showStatsPanel() //case wxAUI_DOCK_CENTRE: } - wxAuiPaneInfoArray& paneArray = mainDlg_.auiMgr_.GetAllPanes(); - const bool statusRowTaken = [&] { - for (size_t i = 0; i < paneArray.size(); ++i) - { - const wxAuiPaneInfo& paneInfo = paneArray[i]; + for (wxAuiPaneInfo& paneInfo : mainDlg_.auiMgr_.GetAllPanes()) //doesn't matter if paneInfo.IsShown() or not! => move down in either case! if (&paneInfo != &statusPanel && paneInfo.dock_layer == statusPanel.dock_layer && paneInfo.dock_direction == statusPanel.dock_direction && paneInfo.dock_row == statusPanel.dock_row) return true; - } + return false; }(); //move all rows that are in the way one step further if (statusRowTaken) - for (size_t i = 0; i < paneArray.size(); ++i) - { - wxAuiPaneInfo& paneInfo = paneArray[i]; - + for (wxAuiPaneInfo& paneInfo : mainDlg_.auiMgr_.GetAllPanes()) if (&paneInfo != &statusPanel && paneInfo.dock_layer == statusPanel.dock_layer && paneInfo.dock_direction == statusPanel.dock_direction && paneInfo.dock_row >= statusPanel.dock_row) ++paneInfo.dock_row; - } //------------------------------------------------------------------ statusPanel.Show(); diff --git a/FreeFileSync/Source/ui/log_panel.cpp b/FreeFileSync/Source/ui/log_panel.cpp index 524ebff2..3a0a4561 100644 --- a/FreeFileSync/Source/ui/log_panel.cpp +++ b/FreeFileSync/Source/ui/log_panel.cpp @@ -34,9 +34,6 @@ wxImage getImageButtonReleased(const char* imageName) return greyScale(loadImage(imageName)); //loadImage(utfTo<wxString>(imageName)).ConvertToGreyscale(1.0/3, 1.0/3, 1.0/3); //treat all channels equally! //brighten(output, 30); - - //moveImage(output, 1, 0); //move image right one pixel - //return output; } @@ -248,7 +245,7 @@ public: } } - int getBestSize(wxDC& dc, size_t row, ColumnType colType) override + int getBestSize(const wxReadOnlyDC& dc, size_t row, ColumnType colType) override { // -> synchronize renderCell() <-> getBestSize() @@ -269,7 +266,7 @@ public: static int getColumnTimeDefaultWidth(Grid& grid) { - wxClientDC dc(&grid.getMainWin()); + wxInfoDC dc(&grid.getMainWin()); dc.SetFont(grid.getMainWin().GetFont()); return 2 * getColumnGapLeft() + dc.GetTextExtent(utfTo<wxString>(formatTime(formatTimeTag))).GetWidth(); } @@ -523,23 +520,19 @@ void LogPanel::copySelectionToClipboard() { try { - std::wstring clipBuf; //perf: wxString doesn't model exponential growth => unsuitable for large data sets + wxString clipBuf; //perf: old wxString didn't model exponential growth, but now it's std::string-based: + static_assert(std::is_same_v<wxStringImpl, std::wstring>); if (auto prov = m_gridMessages->getDataProvider()) { std::vector<Grid::ColAttributes> colAttr = m_gridMessages->getColumnConfig(); std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - for (size_t row : m_gridMessages->getSelectedRows()) + + for (size_t row : m_gridMessages->getSelectedRows()) + for (auto it = colAttr.begin(); it != colAttr.end(); ++it) { - std::for_each(colAttr.begin(), --colAttr.end(), - [&](const Grid::ColAttributes& ca) - { - clipBuf += prov->getValue(row, ca.type); - clipBuf += L'\t'; - }); - clipBuf += prov->getValue(row, colAttr.back().type); - clipBuf += L'\n'; + clipBuf += prov->getValue(row, it->type); + clipBuf += it == colAttr.end() - 1 ? L'\n' : L'\t'; } } diff --git a/FreeFileSync/Source/ui/main_dlg.cpp b/FreeFileSync/Source/ui/main_dlg.cpp index 6a3c9660..a31932da 100644 --- a/FreeFileSync/Source/ui/main_dlg.cpp +++ b/FreeFileSync/Source/ui/main_dlg.cpp @@ -11,7 +11,6 @@ #include <zen/file_traverser.h> #include <zen/thread.h> #include <zen/process_exec.h> -//#include <zen/perf.h> #include <zen/shutdown.h> #include <zen/resolve_path.h> #include <zen/sys_info.h> @@ -32,6 +31,8 @@ #include <wx+/window_tools.h> #include <wx+/image_resources.h> #include "cfg_grid.h" +#include "folder_selector.h" +#include "tree_grid.h" #include "version_check.h" #include "gui_status_handler.h" #include "small_dlgs.h" @@ -40,7 +41,6 @@ #include "folder_pair.h" #include "search_grid.h" #include "batch_config.h" -//#include "triple_splitter.h" #include "app_icon.h" #include "../base_tools.h" #include "../afs/concrete.h" @@ -99,8 +99,30 @@ bool containsFileItemMacro(const Zstring& commandLinePhrase) //let's NOT create wxWidgets objects statically: wxColor getColorCompareButtonHighlight() { return {236, 236, 255}; } wxColor getColorSyncButtonHighlight () { return {230, 255, 215}; } -wxColor getColorFilterButtonHighlight () { return {255, 230, 230}; } +wxColor getColorAuiPanelCaptionText() { return wxSystemSettings::GetAppearance().IsDark() ? 0xdadada : 0xffffff; } +wxColor getColorAuiPanelCaptionBack() +{ + if (wxSystemSettings::GetAppearance().IsDark()) + return {0, 0x4f, 0x8e}; //dark blue + else + return {51, 147, 223}; //medium blue +} + +wxColor getColorAuiPanelCaptionBackGradient() +{ + if (wxSystemSettings::GetAppearance().IsDark()) + return {0, 0x3d, 0x6e}; //dark blue + else + return {0, 120, 215}; //medium blue +} + +wxColor getColorFlashStatusInfo() +{ + return enhanceContrast({31, 57, 226} /*blue*/, + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 5 /*contrastRatioMin*/); //W3C recommends >= 4.5 +} IconBuffer::IconSize convert(GridIconSize isize) { @@ -129,12 +151,12 @@ bool acceptDialogFileDrop(const std::vector<Zstring>& shellItemPaths) -XmlGuiConfig getDefaultGuiConfig(const FilterConfig& defaultFilter) +FfsGuiConfig getDefaultGuiConfig(const FilterConfig& defaultFilter) { - XmlGuiConfig defaultCfg; + FfsGuiConfig defaultCfg; //set default file filter: this is only ever relevant when creating new configurations! - //a default XmlGuiConfig does not need these user-specific exclusions! + //a default FfsGuiConfig does not need these user-specific exclusions! defaultCfg.mainCfg.globalFilter = defaultFilter; return defaultCfg; @@ -179,8 +201,10 @@ public: wxWindow* dropWindow2R) : FolderPairPanelBasic<GuiPanel>(basicPanel), //pass FolderPairPanelGenerated part... mainDlg_(mainDlg), - folderSelectorLeft_ (&mainDlg, dropWindow1L, selectFolderButtonL, selectSftpButtonL, dirpathL, folderLastSelectedL, sftpKeyFileLastSelected, staticTextL, dropWindow2L, droppedPathsFilter_, getDeviceParallelOps_, setDeviceParallelOps_), - folderSelectorRight_(&mainDlg, dropWindow1R, selectFolderButtonR, selectSftpButtonR, dirpathR, folderLastSelectedR, sftpKeyFileLastSelected, staticTextR, dropWindow2R, droppedPathsFilter_, getDeviceParallelOps_, setDeviceParallelOps_) + folderSelectorLeft_ (&mainDlg, dropWindow1L, selectFolderButtonL, selectSftpButtonL, dirpathL, folderLastSelectedL, + sftpKeyFileLastSelected, staticTextL, dropWindow2L, droppedPathsFilter_, getDeviceParallelOps_, setDeviceParallelOps_), + folderSelectorRight_(&mainDlg, dropWindow1R, selectFolderButtonR, selectSftpButtonR, dirpathR, folderLastSelectedR, + sftpKeyFileLastSelected, staticTextR, dropWindow2R, droppedPathsFilter_, getDeviceParallelOps_, setDeviceParallelOps_) { folderSelectorLeft_ .setSiblingSelector(&folderSelectorRight_); folderSelectorRight_.setSiblingSelector(&folderSelectorLeft_); @@ -417,7 +441,7 @@ void MainDialog::UiInputDisabler::enableGuiElementsImpl() mainDlg_.m_panelViewFilter ->Enable(); mainDlg_.Refresh(); - //auiMgr_.Update(); needed on macOS; 2021-02-01: apparently not anymore! + //mainDlg_.auiMgr_.Update(); needed on macOS; 2021-02-01: apparently not anymore! } //--------------------------------------------------------------------------------------------- @@ -437,6 +461,7 @@ void updateTopButton(wxBitmapButton& btn, wxImage varLabelImg = createImageFromText(varName, wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD), wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + wxImage varImg = varLabelImg; if (varIconName) { @@ -474,40 +499,13 @@ void updateTopButton(wxBitmapButton& btn, btnImg = layOver(rectangleImage(btnImg.GetSize(), highlightCol), btnImg, wxALIGN_CENTER); setImage(btn, btnImg); } - -//################################################################################################################################## - -XmlGlobalSettings tryLoadGlobalConfig(const Zstring& globalConfigFilePath) //blocks GUI on errors! -{ - XmlGlobalSettings globalCfg; - try - { - std::wstring warningMsg; - std::tie(globalCfg, warningMsg) = readGlobalConfig(globalConfigFilePath); //throw FileError - assert(warningMsg.empty()); //ignore parsing errors: should be migration problems only *cross-fingers* - } - catch (FileError&) - { - try - { - if (itemExists(globalConfigFilePath)) //throw FileError - throw; - } - catch (const FileError& e2) - { - showNotificationDialog(nullptr, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e2.toString())); //no parent window: main dialog not yet created! - } - } - return globalCfg; -} } +//################################################################################################################################## -void MainDialog::create(const Zstring& globalConfigFilePath) +void MainDialog::create(const GlobalConfig& globalCfg, const Zstring& globalCfgFilePath) { - const XmlGlobalSettings globalSettings = tryLoadGlobalConfig(globalConfigFilePath); - - std::vector<Zstring> cfgFilePaths = globalSettings.mainDlg.config.lastUsedFiles; + std::vector<Zstring> cfgFilePaths = globalCfg.mainDlg.config.lastUsedFiles; //------------------------------------------------------------------------------------------ //check existence of all files in parallel: @@ -543,7 +541,7 @@ void MainDialog::create(const Zstring& globalConfigFilePath) catch (FileError&) {} //not-existing/access error? => user may click on [Last session] later - XmlGuiConfig guiCfg = getDefaultGuiConfig(globalSettings.defaultFilter); + FfsGuiConfig guiCfg = getDefaultGuiConfig(globalCfg.defaultFilter); if (!cfgFilePaths.empty()) try @@ -561,30 +559,15 @@ void MainDialog::create(const Zstring& globalConfigFilePath) } //------------------------------------------------------------------------------------------ - create(globalConfigFilePath, &globalSettings, guiCfg, cfgFilePaths, false /*startComparison*/); + create(guiCfg, cfgFilePaths, globalCfg, globalCfgFilePath, false /*startComparison*/); } -void MainDialog::create(const Zstring& globalConfigFilePath, - const XmlGlobalSettings* globalSettings, - const XmlGuiConfig& guiCfg, - const std::vector<Zstring>& referenceFiles, +void MainDialog::create(const FfsGuiConfig& guiCfg, const std::vector<Zstring>& cfgFilePaths, + const GlobalConfig& globalCfg, const Zstring& globalCfgFilePath, bool startComparison) { - const XmlGlobalSettings globSett = globalSettings ? *globalSettings : tryLoadGlobalConfig(globalConfigFilePath); - - try - { - //we need to set language *before* creating MainDialog! - setLanguage(globSett.programLanguage); //throw FileError - } - catch (const FileError& e) - { - showNotificationDialog(nullptr, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString())); - //continue! - } - - MainDialog* mainDlg = new MainDialog(globalConfigFilePath, guiCfg, referenceFiles, globSett); + MainDialog* mainDlg = new MainDialog(guiCfg, cfgFilePaths, globalCfg, globalCfgFilePath); mainDlg->Show(); //------------------------------------------------------------------------------------------ @@ -665,14 +648,12 @@ void MainDialog::create(const Zstring& globalConfigFilePath, } -MainDialog::MainDialog(const Zstring& globalConfigFilePath, - const XmlGuiConfig& guiCfg, - const std::vector<Zstring>& referenceFiles, - const XmlGlobalSettings& globalSettings) : +MainDialog::MainDialog(const FfsGuiConfig& guiCfg, const std::vector<Zstring>& cfgFilePaths, + const GlobalConfig& globalCfg, const Zstring& globalCfgFilePath) : MainDialogGenerated(nullptr), - globalConfigFilePath_(globalConfigFilePath), - folderHistoryLeft_ (std::make_shared<HistoryList>(globalSettings.mainDlg.folderHistoryLeft, globalSettings.folderHistoryMax)), - folderHistoryRight_(std::make_shared<HistoryList>(globalSettings.mainDlg.folderHistoryRight, globalSettings.folderHistoryMax)), + globalCfgFilePath_(globalCfgFilePath), + folderHistoryLeft_ (std::make_shared<HistoryList>(globalCfg.mainDlg.folderHistoryLeft, globalCfg.folderHistoryMax)), + folderHistoryRight_(std::make_shared<HistoryList>(globalCfg.mainDlg.folderHistoryRight, globalCfg.folderHistoryMax)), imgTrashSmall_([] { try { return extractWxImage(fff::getTrashIcon(dipToScreen(getMenuIconDipSize()))); /*throw SysError*/ } @@ -724,7 +705,7 @@ imgFileManagerSmall_([] setImage(*m_bpButtonAddPair, loadImage("item_add")); setImage(*m_bpButtonHideSearch, loadImage("close_panel")); - setImage(*m_bpButtonToggleLog, loadImage("log_file")); + //setImage(*m_bpButtonToggleLog, loadImage("log_file")); m_bpButtonFilter ->SetMinSize({screenToWxsize(loadImage("options_filter").GetWidth()) + dipToWxsize(27), -1}); //make the filter button wider m_textCtrlSearchTxt->SetMinSize({dipToWxsize(220), -1}); @@ -813,6 +794,7 @@ imgFileManagerSmall_([] { wxAuiPaneInfo& dirPane = auiMgr_.GetPane(m_panelDirectoryPairs); wxAuiPaneInfo& logPane = auiMgr_.GetPane(m_panelLog); + assert(event.GetPane() == &logPane); //ensure current window sizes will be used during wxEVT_AUI_PANE_RESTORE: dirPane.best_size = dirPane.rect.GetSize(); @@ -822,6 +804,15 @@ imgFileManagerSmall_([] assert(logPane.rect != wxSize()); }); + auiMgr_.Bind(wxEVT_AUI_PANE_CLOSE, [this](wxAuiManagerEvent& event) + { + if (event.GetPane() == &auiMgr_.GetPane(m_panelLog)) + { + event.Veto(); + showLogPanel(false); + } + }); + compareStatus_ = std::make_unique<CompareProgressPanel>(*this); //integrate the compare status panel (in hidden state) //caption required for all panes that can be manipulated by the users => used by context menu @@ -889,10 +880,9 @@ imgFileManagerSmall_([] artProvider->SetMetric(wxAUI_DOCKART_CAPTION_SIZE, font.GetPixelSize().GetHeight() + dipToWxsize(2 + 2)); //- fix wxWidgets 3.1.0 insane color scheme - artProvider->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR, *wxWHITE); //accessibility: always set both foreground AND background colors! - artProvider->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR, wxColor(51, 147, 223)); //medium blue - artProvider->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR, wxColor( 0, 120, 215)); // - //wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT) -> better than wxBLACK, but which background to use? + artProvider->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR, getColorAuiPanelCaptionText()); //accessibility: always set both foreground AND background colors! + artProvider->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR, getColorAuiPanelCaptionBack()); + artProvider->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR, getColorAuiPanelCaptionBackGradient()); } //auiMgr_.Update(); -> redundant; called by setGlobalCfgOnInit() below @@ -1049,8 +1039,8 @@ imgFileManagerSmall_([] cfggrid ::init(*m_gridCfgHistory); //initialize and load configuration - setGlobalCfgOnInit(globalSettings); //calls auiMgr_.Update() - setConfig(guiCfg, referenceFiles); //expects auiMgr_.Update(): e.g. recalcMaxFolderPairsVisible() + setGlobalCfgOnInit(globalCfg); //calls auiMgr_.Update() + setConfig(guiCfg, cfgFilePaths); //expects auiMgr_.Update(): e.g. recalcMaxFolderPairsVisible() //support for CTRL + C and DEL on grids m_gridMainL->Bind(wxEVT_KEY_DOWN, [this](wxKeyEvent& event) { onGridKeyEvent(event, *m_gridMainL, true /*leftSide*/); }); @@ -1140,7 +1130,7 @@ imgFileManagerSmall_([] //1. setConfig() indirectly calls cfggrid::addAndSelect() which changes cfg history scroll position //2. Grid::makeRowVisible() requires final window height! => do this after window resizing is complete if (m_gridCfgHistory->getRowCount() > 0) - m_gridCfgHistory->scrollTo(std::clamp<size_t>(globalSettings.mainDlg.config.topRowPos, //must be set *after* wxAuiManager::LoadPerspective() to have any effect + m_gridCfgHistory->scrollTo(std::clamp<size_t>(globalCfg.mainDlg.config.topRowPos, //must be set *after* wxAuiManager::LoadPerspective() to have any effect 0, m_gridCfgHistory->getRowCount() - 1)); //first selected item should *always* be visible: const std::vector<size_t> selectedRows = m_gridCfgHistory->getSelectedRows(); @@ -1166,7 +1156,7 @@ MainDialog::~MainDialog() try //GlobalSettings.xml { - writeConfig(getGlobalCfgBeforeExit(), globalConfigFilePath_); //throw FileError + writeConfig(getGlobalCfgBeforeExit(), globalCfgFilePath_); //throw FileError } catch (const FileError& e) { errorMsg += e.toString() + L"\n\n"; } @@ -1189,7 +1179,7 @@ void MainDialog::onBeforeSystemShutdown() try { writeConfig(getConfig(), lastRunConfigPath_); } catch (const FileError& e) { logExtraError(e.toString()); } - try { writeConfig(getGlobalCfgBeforeExit(), globalConfigFilePath_); } + try { writeConfig(getGlobalCfgBeforeExit(), globalCfgFilePath_); } catch (const FileError& e) { logExtraError(e.toString()); } } @@ -1222,16 +1212,16 @@ void MainDialog::onClose(wxCloseEvent& event) } -void MainDialog::setGlobalCfgOnInit(const XmlGlobalSettings& globalSettings) +void MainDialog::setGlobalCfgOnInit(const GlobalConfig& globalCfg) { - globalCfg_ = globalSettings; + globalCfg_ = globalCfg; DpiLayout layout; - if (auto it = globalSettings.dpiLayouts.find(getDpiScalePercent()); - it != globalSettings.dpiLayouts.end()) + if (auto it = globalCfg.dpiLayouts.find(getDpiScalePercent()); + it != globalCfg.dpiLayouts.end()) layout = it->second; - //caveat: set/get language asymmmetry! setLanguage(globalSettings.programLanguage); //throw FileError + //caveat: set/get language asymmmetry! setLanguage(globalCfg.programLanguage); //throw FileError //we need to set language before creating this class! WindowLayout::setInitial(*this, {layout.mainDlg.size, layout.mainDlg.pos, layout.mainDlg.isMaximized}, {dipToWxsize(900), dipToWxsize(600)} /*defaultSize*/); @@ -1239,26 +1229,26 @@ void MainDialog::setGlobalCfgOnInit(const XmlGlobalSettings& globalSettings) //set column attributes m_gridMainL ->setColumnConfig(convertColAttributes(layout.fileColumnAttribsLeft, getFileGridDefaultColAttribsLeft())); m_gridMainR ->setColumnConfig(convertColAttributes(layout.fileColumnAttribsRight, getFileGridDefaultColAttribsLeft())); - m_splitterMain->setSashOffset(globalSettings.mainDlg.sashOffset); + m_splitterMain->setSashOffset(globalCfg.mainDlg.sashOffset); m_gridOverview->setColumnConfig(convertColAttributes(layout.overviewColumnAttribs, getOverviewDefaultColAttribs())); - treegrid::setShowPercentage(*m_gridOverview, globalSettings.mainDlg.overview.showPercentBar); + treegrid::setShowPercentage(*m_gridOverview, globalCfg.mainDlg.overview.showPercentBar); - treegrid::getDataView(*m_gridOverview).setSortDirection(globalSettings.mainDlg.overview.lastSortColumn, globalSettings.mainDlg.overview.lastSortAscending); + treegrid::getDataView(*m_gridOverview).setSortDirection(globalCfg.mainDlg.overview.lastSortColumn, globalCfg.mainDlg.overview.lastSortAscending); //-------------------------------------------------------------------------------- //load list of configuration files - cfggrid::getDataView(*m_gridCfgHistory).set(globalSettings.mainDlg.config.fileHistory); + cfggrid::getDataView(*m_gridCfgHistory).set(globalCfg.mainDlg.config.fileHistory); - //globalSettings.mainDlg.cfgGridTopRowPos => defer evaluation until later within MainDialog constructor + //globalCfg.mainDlg.cfgGridTopRowPos => defer evaluation until later within MainDialog constructor m_gridCfgHistory->setColumnConfig(convertColAttributes(layout.configColumnAttribs, getCfgGridDefaultColAttribs())); - cfggrid::getDataView(*m_gridCfgHistory).setSortDirection(globalSettings.mainDlg.config.lastSortColumn, globalSettings.mainDlg.config.lastSortAscending); - cfggrid::setSyncOverdueDays(*m_gridCfgHistory, globalSettings.mainDlg.config.syncOverdueDays); + cfggrid::getDataView(*m_gridCfgHistory).setSortDirection(globalCfg.mainDlg.config.lastSortColumn, globalCfg.mainDlg.config.lastSortAscending); + cfggrid::setSyncOverdueDays(*m_gridCfgHistory, globalCfg.mainDlg.config.syncOverdueDays); //m_gridCfgHistory->Refresh(); <- implicit in last call //remove non-existent items: sufficient to call once at startup std::vector<Zstring> cfgFilePaths; - for (const ConfigFileItem& item : globalSettings.mainDlg.config.fileHistory) + for (const ConfigFileItem& item : globalCfg.mainDlg.config.fileHistory) cfgFilePaths.push_back(item.cfgFilePath); cfgHistoryRemoveObsolete(cfgFilePaths); @@ -1272,19 +1262,18 @@ void MainDialog::setGlobalCfgOnInit(const XmlGlobalSettings& globalSettings) m_folderPathRight->setHistory(folderHistoryRight_); //show/hide file icons - filegrid::setupIcons(*m_gridMainL, *m_gridMainC, *m_gridMainR, globalSettings.mainDlg.showIcons, convert(globalSettings.mainDlg.iconSize)); + filegrid::setupIcons(*m_gridMainL, *m_gridMainC, *m_gridMainR, globalCfg.mainDlg.showIcons, convert(globalCfg.mainDlg.iconSize)); - filegrid::setItemPathForm(*m_gridMainL, globalSettings.mainDlg.itemPathFormatLeftGrid); - filegrid::setItemPathForm(*m_gridMainR, globalSettings.mainDlg.itemPathFormatRightGrid); + filegrid::setItemPathForm(*m_gridMainL, globalCfg.mainDlg.itemPathFormatLeftGrid); + filegrid::setItemPathForm(*m_gridMainR, globalCfg.mainDlg.itemPathFormatRightGrid); //-------------------------------------------------------------------------------- m_checkBoxMatchCase->SetValue(globalCfg_.mainDlg.textSearchRespectCase); - //wxAuiManager loads panel captions: don't use => might be different language! + //work around wxAuiManager::LoadPerspective overwriting pane captions with old values (might be different language!) std::vector<std::pair<wxAuiPaneInfo*, wxString>> paneCaptions; - wxAuiPaneInfoArray& paneArray = auiMgr_.GetAllPanes(); - for (size_t i = 0; i < paneArray.size(); ++i) - paneCaptions.emplace_back(&paneArray[i], paneArray[i].caption); + for (wxAuiPaneInfo& paneInfo : auiMgr_.GetAllPanes()) + paneCaptions.emplace_back(&paneInfo, paneInfo.caption); //compare progress dialog minimum sizes are layout-dependent + can't be changed by user => don't load stale values from config std::vector<std::tuple<wxAuiPaneInfo*, wxSize /*min size*/, wxSize /*best size*/>> paneConstraints; @@ -1322,19 +1311,19 @@ void MainDialog::setGlobalCfgOnInit(const XmlGlobalSettings& globalSettings) } -XmlGlobalSettings MainDialog::getGlobalCfgBeforeExit() +GlobalConfig MainDialog::getGlobalCfgBeforeExit() { Freeze(); //no need to Thaw() again!! recalcMaxFolderPairsVisible(); //-------------------------------------------------------------------------------- - XmlGlobalSettings globalSettings = globalCfg_; + GlobalConfig globalSettings = globalCfg_; globalSettings.programLanguage = getLanguage(); //retrieve column attributes globalSettings.dpiLayouts[getDpiScalePercent()].fileColumnAttribsLeft = convertColAttributes<ColAttributesRim>(m_gridMainL->getColumnConfig()); globalSettings.dpiLayouts[getDpiScalePercent()].fileColumnAttribsRight = convertColAttributes<ColAttributesRim>(m_gridMainR->getColumnConfig()); - globalSettings.mainDlg.sashOffset = m_splitterMain->getSashOffset(); + globalSettings.mainDlg.sashOffset = m_splitterMain->getSashOffset(); globalSettings.dpiLayouts[getDpiScalePercent()].overviewColumnAttribs = convertColAttributes<ColumnAttribOverview>(m_gridOverview->getColumnConfig()); globalSettings.mainDlg.overview.showPercentBar = treegrid::getShowPercentage(*m_gridOverview); @@ -1348,7 +1337,7 @@ XmlGlobalSettings MainDialog::getGlobalCfgBeforeExit() std::vector<ConfigFileItem> cfgHistory { //make sure [Last session] is always part of history list - ConfigFileItem(lastRunConfigPath_, LastRunStats{}, wxColor(0xdd, 0xdd, 0xdd) /* light grey from onCfgGridContext()*/) + ConfigFileItem(lastRunConfigPath_, LastRunStats{}, wxSystemSettings::GetAppearance().IsDark() ? 0xb7b7b7 : 0xdddddd /*grey from onCfgGridContext()*/) }; for (const ConfigFileItem& item : cfggrid::getDataView(*m_gridCfgHistory).get()) @@ -1378,6 +1367,7 @@ XmlGlobalSettings MainDialog::getGlobalCfgBeforeExit() globalSettings.mainDlg.textSearchRespectCase = m_checkBoxMatchCase->GetValue(); wxAuiPaneInfo& logPane = auiMgr_.GetPane(m_panelLog); + assert(m_bpButtonToggleLog->isActive() == logPane.IsShown()); if (logPane.IsShown()) { @@ -1418,9 +1408,9 @@ std::vector<FileSystemObject*> expandSelectionForPartialSync(const std::vector<F case SO_MOVE_LEFT_TO: case SO_MOVE_RIGHT_FROM: case SO_MOVE_RIGHT_TO: - if (FileSystemObject* moveRefObj = FileSystemObject::retrieve(file.getMoveRef())) - output.push_back(moveRefObj); - assert(dynamic_cast<FilePair*>(output.back())->getMoveRef() == file.getId()); + if (FilePair* refFile = file.getMovePair()) + output.push_back(refFile); + else assert(false); break; case SO_CREATE_LEFT: @@ -1493,27 +1483,23 @@ void MainDialog::copyGridSelectionToClipboard(const zen::Grid& grid) { try { - std::wstring clipBuf; //perf: wxString doesn't model exponential growth => unsuitable for large data sets + wxString clipBuf; //perf: old wxString didn't model exponential growth, but now it's std::string-based: + static_assert(std::is_same_v<wxStringImpl, std::wstring>); if (auto prov = grid.getDataProvider()) { std::vector<Grid::ColAttributes> colAttr = grid.getColumnConfig(); std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - for (size_t row : grid.getSelectedRows()) + + for (size_t row : grid.getSelectedRows()) + for (auto it = colAttr.begin(); it != colAttr.end(); ++it) { - std::for_each(colAttr.begin(), colAttr.end() - 1, [&](const Grid::ColAttributes& ca) - { - clipBuf += prov->getValue(row, ca.type); - clipBuf += L'\t'; - }); - clipBuf += prov->getValue(row, colAttr.back().type); - clipBuf += L'\n'; + clipBuf += prov->getValue(row, it->type); + clipBuf += it == colAttr.end() - 1 ? L'\n' : L'\t'; } } - if (!clipBuf.empty()) - setClipboardText(clipBuf); + setClipboardText(clipBuf); } catch (const std::bad_alloc& e) { @@ -1527,7 +1513,8 @@ void MainDialog::copyPathsToClipboard(const std::vector<FileSystemObject*>& sele { try { - std::wstring clipBuf; //perf: wxString doesn't model exponential growth => unsuitable for large data sets + wxString clipBuf; //perf: old wxString didn't model exponential growth, but now it's std::string-based: + static_assert(std::is_same_v<wxStringImpl, std::wstring>); auto appendPath = [&](const AbstractPath& itemPath) { @@ -1544,8 +1531,7 @@ void MainDialog::copyPathsToClipboard(const std::vector<FileSystemObject*>& sele //if (!fsObj->isEmpty<SelectSide::right>()) appendPath(fsObj->getAbstractPath<SelectSide::right>()); - if (!clipBuf.empty()) - setClipboardText(clipBuf); + setClipboardText(clipBuf); } catch (const std::bad_alloc& e) { @@ -1581,11 +1567,11 @@ std::vector<FileSystemObject*> MainDialog::getTreeSelection() const if (auto root = dynamic_cast<const TreeView::RootNode*>(node.get())) { //selecting root means "select everything", *ignoring* current view filter! - for (FileSystemObject& fsObj : root->baseFolder.refSubFolders()) //no need to explicitly add child elements! + for (FileSystemObject& fsObj : root->baseFolder.subfolders()) //no need to explicitly add child elements! output.push_back(&fsObj); - for (FileSystemObject& fsObj : root->baseFolder.refSubFiles()) + for (FileSystemObject& fsObj : root->baseFolder.files()) output.push_back(&fsObj); - for (FileSystemObject& fsObj : root->baseFolder.refSubLinks()) + for (FileSystemObject& fsObj : root->baseFolder.symlinks()) output.push_back(&fsObj); } else if (auto dir = dynamic_cast<const TreeView::DirNode*>(node.get())) @@ -1966,8 +1952,7 @@ void MainDialog::openExternalApplication(const Zstring& commandLinePhrase, bool if (globalCfg_.confirmDlgs.confirmCommandMassInvoke) { bool dontAskAgain = false; - switch (showConfirmationDialog(this, DialogInfoType::warning, PopupDialogCfg(). - setTitle(_("Confirm")). + switch (showConfirmationDialog(this, DialogInfoType::warning, PopupDialogCfg().setTitle(_("Confirm")). setMainInstructions(replaceCpy(_P("Do you really want to execute the command %y for one item?", "Do you really want to execute the command %y for %x items?", invokeCount), L"%y", fmtPath(commandLinePhrase))). @@ -2115,8 +2100,8 @@ void MainDialog::setStatusInfo(const wxString& text, bool highlight) { if (statusTxts_.empty()) { - m_staticTextStatusCenter->SetForegroundColour(highlight ? wxColor(31, 57, 226) /*blue*/ : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); m_staticTextStatusCenter->SetFont((m_staticTextStatusCenter->GetFont().*(highlight ? &wxFont::Bold : &wxFont::GetBaseFont))()); + m_staticTextStatusCenter->SetForegroundColour(highlight ? getColorFlashStatusInfo() : wxNullColour); setText(*m_staticTextStatusCenter, text); m_panelStatusBar->Layout(); @@ -2135,7 +2120,7 @@ void MainDialog::flashStatusInfo(const wxString& text) statusTxts_.push_back(m_staticTextStatusCenter->GetLabelText()); statusTxts_.push_back(text); - m_staticTextStatusCenter->SetForegroundColour(wxColor(31, 57, 226)); //highlight color: blue + m_staticTextStatusCenter->SetForegroundColour(getColorFlashStatusInfo()); m_staticTextStatusCenter->SetFont(m_staticTextStatusCenter->GetFont().Bold()); popStatusInfo(); @@ -2552,7 +2537,7 @@ void MainDialog::onTreeGridSelection(GridSelectEvent& event) { assert(!files->filesAndLinks.empty()); if (!files->filesAndLinks.empty()) - leadRow = filegrid::getDataView(*m_gridMainC).findRowDirect(files->filesAndLinks[0]->getId()); + leadRow = filegrid::getDataView(*m_gridMainC).findRowDirect(files->filesAndLinks[0]); } } @@ -2884,7 +2869,8 @@ void MainDialog::onGridContextRim(const std::vector<FileSystemObject*>& selectio return false; }(); menu.addSeparator(); - menu.addItem(_("&Synchronize selection") + L"\tEnter", [&] { startSyncForSelecction(selection); }, loadImage("start_sync_selection", dipToScreen(getMenuIconDipSize())), selectionContainsItemsToSync); + menu.addItem(_("&Synchronize selection") + L"\tEnter", [&] { startSyncForSelecction(selection); }, + loadImage("start_sync_selection", dipToScreen(getMenuIconDipSize())), selectionContainsItemsToSync); //---------------------------------------------------------------------------------------------------- if (!globalCfg_.externalApps.empty()) { @@ -2977,7 +2963,8 @@ void MainDialog::addFilterPhrase(const Zstring& phrase, bool include, bool requi applyFilterConfig(); //user's temporary exclusions lost! else //do not fully apply filter, just exclude new items: preserve user's temporary exclusions { - std::for_each(begin(folderCmp_), end(folderCmp_), [&](BaseFolderPair& baseFolder) { addHardFiltering(baseFolder, phrase); }); + for (BaseFolderPair& baseFolder : asRange(folderCmp_)) + addHardFiltering(baseFolder, phrase); updateGui(); } } @@ -3077,7 +3064,7 @@ void MainDialog::onGridLabelContextRim(GridLabelClickEvent& event, bool leftSide { grid.setColumnConfig(convertColAttributes(leftSide ? getFileGridDefaultColAttribsLeft() : getFileGridDefaultColAttribsRight(), getFileGridDefaultColAttribsLeft())); - const XmlGlobalSettings defaultCfg; + const GlobalConfig defaultCfg; setItemPathFormat(leftSide ? defaultCfg.mainDlg.itemPathFormatLeftGrid : defaultCfg.mainDlg.itemPathFormatRightGrid); setIconSize(defaultCfg.mainDlg.iconSize, defaultCfg.mainDlg.showIcons); }; @@ -3153,15 +3140,7 @@ void MainDialog::onSetLayoutContext(wxMouseEvent& event) bool addedSeparator = false; -#if wxCHECK_VERSION(3,3,0) - static_assert(false, "migrate all access patterns of '[i];'"); for (wxAuiPaneInfo& paneInfo : auiMgr_.GetAllPanes()) -#else - const wxAuiPaneInfoArray& paneArray = auiMgr_.GetAllPanes(); - for (size_t i = 0; i < paneArray.size(); ++i) - { - wxAuiPaneInfo& paneInfo = paneArray[i]; -#endif if (!paneInfo.IsShown() && paneInfo.window != compareStatus_->getAsWindow() && paneInfo.window != m_panelLog && @@ -3179,11 +3158,8 @@ void MainDialog::onSetLayoutContext(wxMouseEvent& event) this->auiMgr_.Update(); }); } -#if !wxCHECK_VERSION(3,3,0) -} -#endif -menu.popup(*this); + menu.popup(*this); } @@ -3312,7 +3288,7 @@ void MainDialog::cfgHistoryUpdateNotes(const std::vector<Zstring>& filePaths) try { const auto& [newGuiCfg, warningMsg] = readAnyConfig({filePath}); //throw FileError - return newGuiCfg.mainCfg.notes; + return newGuiCfg.notes; } catch (FileError&) { return std::wstring(); } }; @@ -3344,7 +3320,7 @@ std::vector<std::wstring> MainDialog::getJobNames() const void MainDialog::updateUnsavedCfgStatus() { - const XmlGuiConfig guiCfg = getConfig(); + const FfsGuiConfig guiCfg = getConfig(); auto makeBrightGrey = [](wxImage img) { @@ -3482,7 +3458,7 @@ bool MainDialog::trySaveConfig(const Zstring* guiCfgPath) //"false": error/cance globalCfg_.mainDlg.config.lastSelectedFile = cfgFilePath; } - const XmlGuiConfig guiCfg = getConfig(); + const FfsGuiConfig guiCfg = getConfig(); try { @@ -3566,7 +3542,7 @@ bool MainDialog::trySaveBatchConfig(const Zstring* batchCfgPath) //"false": erro globalCfg_.mainDlg.config.lastSelectedFile = cfgFilePath; } - const XmlGuiConfig guiCfg = getConfig(); + const FfsGuiConfig guiCfg = getConfig(); try { writeConfig({guiCfg, batchExCfg}, cfgFilePath); //throw FileError @@ -3586,7 +3562,7 @@ bool MainDialog::trySaveBatchConfig(const Zstring* batchCfgPath) //"false": erro bool MainDialog::saveOldConfig() //"false": error/cancel { - const XmlGuiConfig guiCfg = getConfig(); + const FfsGuiConfig guiCfg = getConfig(); if (lastSavedCfg_ != guiCfg) { @@ -3598,8 +3574,7 @@ bool MainDialog::saveOldConfig() //"false": error/cancel //only if check is active and non-default config file loaded { bool neverSaveChanges = false; - switch (showQuestionDialog(this, DialogInfoType::info, PopupDialogCfg(). - setTitle(utfTo<wxString>(activeCfgFilePath)). + switch (showQuestionDialog(this, DialogInfoType::info, PopupDialogCfg().setTitle(utfTo<wxString>(activeCfgFilePath)). setMainInstructions(replaceCpy(_("Do you want to save changes to %x?"), L"%x", fmtPath(getItemName(activeCfgFilePath)))). setCheckBox(neverSaveChanges, _("Never save &changes"), static_cast<ConfirmationButton3>(QuestionButton2::yes)), _("&Save"), _("Do&n't save"))) @@ -3611,10 +3586,10 @@ bool MainDialog::saveOldConfig() //"false": error/cancel return trySaveBatchConfig(&activeCfgFilePath); //"false": error/cancel else { - showNotificationDialog(this, DialogInfoType::error, - PopupDialogCfg().setDetailInstructions(replaceCpy(_("Cannot open file %x."), L"%x", fmtPath(activeCfgFilePath)) + - L"\n\n" + _("Unexpected file extension:") + L' ' + fmtPath(getFileExtension(activeCfgFilePath)) + L'\n' + - _("Expected:") + L" ffs_gui, ffs_batch")); + showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg(). + setDetailInstructions(replaceCpy(_("Cannot open file %x."), L"%x", fmtPath(activeCfgFilePath)) + + L"\n\n" + _("Unexpected file extension:") + L' ' + fmtPath(getFileExtension(activeCfgFilePath)) + L'\n' + + _("Expected:") + L" ffs_gui, ffs_batch")); return false; } break; @@ -3708,7 +3683,7 @@ void MainDialog::onConfigNew(wxCommandEvent& event) bool MainDialog::loadConfiguration(const std::vector<Zstring>& filePaths, bool ignoreBrokenConfig) //"false": error/cancel { - XmlGuiConfig newGuiCfg = getDefaultGuiConfig(globalCfg_.defaultFilter); + FfsGuiConfig newGuiCfg = getDefaultGuiConfig(globalCfg_.defaultFilter); std::wstring warningMsg; if (!filePaths.empty()) //empty cfg file list means "use default" @@ -3732,7 +3707,7 @@ bool MainDialog::loadConfiguration(const std::vector<Zstring>& filePaths, bool i if (!warningMsg.empty()) { showNotificationDialog(this, DialogInfoType::warning, PopupDialogCfg().setDetailInstructions(warningMsg)); - setLastUsedConfig(XmlGuiConfig(), filePaths); //simulate changed config due to parsing errors + setLastUsedConfig(FfsGuiConfig(), filePaths); //simulate changed config due to parsing errors } //flashStatusInfo("Configuration loaded"); -> irrelevant!? @@ -3850,19 +3825,20 @@ void MainDialog::renameSelectedCfgHistoryItem() if (!cfgDotExt.empty()) cfgDotExt = Zstr('.') + cfgDotExt; + wxString cfgNameTmp = utfTo<wxString>(cfgNameOld); for (;;) { - wxTextEntryDialog cfgRenameDlg(this, _("New name:"), _("Rename Configuration"), utfTo<wxString>(cfgNameOld)); + wxTextEntryDialog cfgRenameDlg(this, _("New name:"), _("Rename Configuration"), cfgNameTmp); wxTextValidator inputValidator(wxFILTER_EXCLUDE_CHAR_LIST); - inputValidator.SetCharExcludes(LR"(<>:"/\|?*)"); //chars forbidden for file names (at least on Windows) - //https://docs.microsoft.com/de-de/windows/win32/fileio/naming-a-file#naming-conventions + inputValidator.SetCharExcludes(L"/\\"); //let's not silently forbid "fileNameForbiddenChars", but let it fail explicitly! cfgRenameDlg.SetTextValidator(inputValidator); if (cfgRenameDlg.ShowModal() != wxID_OK) return; + cfgNameTmp = cfgRenameDlg.GetValue(); - const Zstring cfgNameNew = utfTo<Zstring>(trimCpy(cfgRenameDlg.GetValue())); + const Zstring cfgNameNew = utfTo<Zstring>(trimCpy(cfgNameTmp)); if (cfgNameNew == cfgNameOld) return; @@ -3959,18 +3935,30 @@ void MainDialog::onCfgGridContext(GridContextMenuEvent& event) {0xdd, 0xdd, 0xdd} /*light grey*/, dipToScreen(1)), !selectedRows.empty()); }; + const auto defaultColors = []() -> std::vector<std::pair<wxColor, wxString>> + { + if (wxSystemSettings::GetAppearance().IsDark()) //=> offer darker colors + return {{wxNullColour /*=> !wxColor::IsOk()*/, L'(' + _("&Default") + L')'}, //meta options should be enclosed in parentheses + {{0xfe, 0x59, 0x48}, _("Red")}, + {{0xfe, 0xff, 0x31}, _("Yellow")}, + {{0x5a, 0xff, 0x00}, _("Green")}, + {{0x5a, 0xff, 0xff}, _("Cyan")}, + {{0x48, 0x47, 0xff}, _("Blue")}, + {{0xc1, 0x7e, 0xfe}, _("Purple")}, + {{0xb7, 0xb7, 0xb7}, _("Gray")}, + }; + else //=> offer lighter colors + return {{wxNullColour /*=> !wxColor::IsOk()*/, L'(' + _("&Default") + L')'}, //meta options should be enclosed in parentheses + {{0xff, 0xd8, 0xcb}, _("Red")}, + {{0xff, 0xf9, 0x99}, _("Yellow")}, + {{0xcc, 0xff, 0x99}, _("Green")}, + {{0xcc, 0xff, 0xff}, _("Cyan")}, + {{0xcc, 0xcc, 0xff}, _("Blue")}, + {{0xf2, 0xcb, 0xff}, _("Purple")}, + {{0xdd, 0xdd, 0xdd}, _("Gray")}, + }; + }(); - const std::vector<std::pair<wxColor, wxString>> defaultColors - { - {wxNullColour /*=> !wxColor::IsOk()*/, L'(' + _("&Default") + L')'}, //meta options should be enclosed in parentheses - {{0xff, 0xd8, 0xcb}, _("Red")}, - {{0xff, 0xf9, 0x99}, _("Yellow")}, - {{0xcc, 0xff, 0x99}, _("Green")}, - {{0xcc, 0xff, 0xff}, _("Cyan")}, - {{0xcc, 0xcc, 0xff}, _("Blue")}, - {{0xf2, 0xcb, 0xff}, _("Purple")}, - {{0xdd, 0xdd, 0xdd}, _("Gray")}, - }; std::unordered_set<wxUint32> addedColorCodes; //add default colors @@ -3981,6 +3969,13 @@ void MainDialog::onCfgGridContext(GridContextMenuEvent& event) addedColorCodes.insert(color.GetRGBA()); } + //add user-defined colors + for (const ConfigFileItem& item : cfggrid::getDataView(*m_gridCfgHistory).get()) + if (item.backColor.IsOk()) + if (const auto [it, inserted] = addedColorCodes.insert(item.backColor.GetRGBA()); + inserted) + addColorOption(item.backColor, item.backColor.GetAsString(wxC2S_HTML_SYNTAX)); //#RRGGBB + //show color picker wxBitmap bmpColorPicker(wxsizeToScreen(colSize.x), wxsizeToScreen(colSize.y)); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes @@ -4034,13 +4029,6 @@ void MainDialog::onCfgGridContext(GridContextMenuEvent& event) } }, bmpColorPicker.ConvertToImage()); - //add user-defined colors - for (const ConfigFileItem& item : cfggrid::getDataView(*m_gridCfgHistory).get()) - if (item.backColor.IsOk()) - if (const auto [it, inserted] = addedColorCodes.insert(item.backColor.GetRGBA()); - inserted) - addColorOption(item.backColor, item.backColor.GetAsString(wxC2S_HTML_SYNTAX)); //#RRGGBB - menu.addSubmenu(_("Background color"), submenu, loadImage("color", dipToScreen(getMenuIconDipSize())), !selectedRows.empty()); menu.addSeparator(); //-------------------------------------------------------------------------------------------------------- @@ -4202,7 +4190,7 @@ void MainDialog::onSetSyncDirection(SyncDirectionEvent& event) } -void MainDialog::setLastUsedConfig(const XmlGuiConfig& guiConfig, const std::vector<Zstring>& cfgFilePaths) +void MainDialog::setLastUsedConfig(const FfsGuiConfig& guiConfig, const std::vector<Zstring>& cfgFilePaths) { activeConfigFiles_ = cfgFilePaths; lastSavedCfg_ = guiConfig; @@ -4216,7 +4204,7 @@ void MainDialog::setLastUsedConfig(const XmlGuiConfig& guiConfig, const std::vec } -void MainDialog::setConfig(const XmlGuiConfig& newGuiCfg, const std::vector<Zstring>& referenceFiles) +void MainDialog::setConfig(const FfsGuiConfig& newGuiCfg, const std::vector<Zstring>& cfgFilePaths) { currentCfg_ = newGuiCfg; @@ -4234,13 +4222,13 @@ void MainDialog::setConfig(const XmlGuiConfig& newGuiCfg, const std::vector<Zstr //clearGrid(); //+ update GUI! -> already called by setAddFolderPairs() - setLastUsedConfig(newGuiCfg, referenceFiles); + setLastUsedConfig(newGuiCfg, cfgFilePaths); } -XmlGuiConfig MainDialog::getConfig() const +FfsGuiConfig MainDialog::getConfig() const { - XmlGuiConfig guiCfg = currentCfg_; + FfsGuiConfig guiCfg = currentCfg_; //load settings whose ownership lies not in currentCfg: @@ -4293,7 +4281,7 @@ void MainDialog::showConfigDialog(SyncConfigPanel panelToShow, int localPairInde globalPairCfg.miscCfg.altLogFolderPathPhrase = currentCfg_.mainCfg.altLogFolderPathPhrase; globalPairCfg.miscCfg.emailNotifyAddress = currentCfg_.mainCfg.emailNotifyAddress; globalPairCfg.miscCfg.emailNotifyCondition = currentCfg_.mainCfg.emailNotifyCondition; - globalPairCfg.miscCfg.notes = currentCfg_.mainCfg.notes; + globalPairCfg.miscCfg.notes = currentCfg_.notes; //don't recalculate value but consider current screen status!!! //e.g. it's possible that the first folder pair local config is shown with all config initial if user just removed local config via mouse context menu! @@ -4343,7 +4331,7 @@ void MainDialog::showConfigDialog(SyncConfigPanel panelToShow, int localPairInde currentCfg_.mainCfg.altLogFolderPathPhrase = globalPairCfg.miscCfg.altLogFolderPathPhrase; currentCfg_.mainCfg.emailNotifyAddress = globalPairCfg.miscCfg.emailNotifyAddress; currentCfg_.mainCfg.emailNotifyCondition = globalPairCfg.miscCfg.emailNotifyCondition; - currentCfg_.mainCfg.notes = globalPairCfg.miscCfg.notes; + currentCfg_.notes = globalPairCfg.miscCfg.notes; firstFolderPair_->setValues(localCfgs[0]); @@ -4877,15 +4865,15 @@ void MainDialog::onStartSync(wxCommandEvent& event) if (globalCfg_.createLockFile) { std::set<Zstring> folderPathsToLock; - for (auto it = begin(folderCmp_); it != end(folderCmp_); ++it) + for (const BaseFolderPair& baseFolder : asRange(folderCmp_)) { - if (it->getFolderStatus<SelectSide::left>() == BaseFolderStatus::existing) //do NOT check directory existence again! - if (const Zstring& nativePath = getNativeItemPath(it->getAbstractPath<SelectSide::left>()); //restrict directory locking to native paths until further + if (baseFolder.getFolderStatus<SelectSide::left>() == BaseFolderStatus::existing) //do NOT check directory existence again! + if (const Zstring& nativePath = getNativeItemPath(baseFolder.getAbstractPath<SelectSide::left>()); //restrict directory locking to native paths until further !nativePath.empty()) folderPathsToLock.insert(nativePath); - if (it->getFolderStatus<SelectSide::right>() == BaseFolderStatus::existing) - if (const Zstring& nativePath = getNativeItemPath(it->getAbstractPath<SelectSide::right>()); + if (baseFolder.getFolderStatus<SelectSide::right>() == BaseFolderStatus::existing) + if (const Zstring& nativePath = getNativeItemPath(baseFolder.getAbstractPath<SelectSide::right>()); !nativePath.empty()) folderPathsToLock.insert(nativePath); } @@ -5065,8 +5053,10 @@ void MainDialog::onStartSync(wxCommandEvent& event) break; case FinalRequest::exit: - Destroy(); //don't use Close() which prompts to save current config in onClose() + //don't Close() which prompts to save current config in onClose() + Destroy(); //for top-level windows this employs delayed destruction (wxPendingDelete) uiBlock.dismiss(); //...or else: crash when ~UiInputDisabler() calls Yield() + enableGuiElementsImpl()! + fp .dismiss(); break; case FinalRequest::shutdown: @@ -5087,13 +5077,13 @@ namespace { void appendInactive(ContainerObject& conObj, std::vector<FileSystemObject*>& inactiveItems) { - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) if (!file.isActive()) inactiveItems.push_back(&file); - for (SymlinkPair& symlink : conObj.refSubLinks()) + for (SymlinkPair& symlink : conObj.symlinks()) if (!symlink.isActive()) inactiveItems.push_back(&symlink); - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) { if (!folder.isActive()) inactiveItems.push_back(&folder); @@ -5149,7 +5139,8 @@ void MainDialog::startSyncForSelecction(const std::vector<FileSystemObject*>& se //--------------------------------------------------------------- //simulate partial sync by temporarily excluding all other items: std::vector<FileSystemObject*> inactiveItems; //remember inactive (assuming a smaller number than active items) - std::for_each(begin(folderCmp_), end(folderCmp_), [&](BaseFolderPair& baseFolder) { appendInactive(baseFolder, inactiveItems); }); + for (BaseFolderPair& baseFolder : asRange(folderCmp_)) + appendInactive(baseFolder, inactiveItems); setActiveStatus(false, folderCmp_); //limit to folderCmpSelect? => no, let's also activate non-participating folder pairs, if only to visually match user selection @@ -5302,8 +5293,8 @@ void MainDialog::setLastOperationLog(const ProcessSummary& summary, const std::s } const int64_t totalTimeSec = std::chrono::duration_cast<std::chrono::seconds>(summary.totalTime).count(); - m_staticTextTimeElapsed->SetLabelText(utfTo<wxString>(formatTimeSpan(totalTimeSec))); - //hourOptional? -> let's use full precision for max. clarity: https://freefilesync.org/forum/viewtopic.php?t=6308 + m_staticTextTimeElapsed->SetLabelText(utfTo<wxString>(formatTimeSpan(totalTimeSec, true /*hourRequired*/))); + //include "hour" => let's use full precision for max. clarity: https://freefilesync.org/forum/viewtopic.php?t=6308 logPanel_->setLog(errorLog); @@ -5311,19 +5302,26 @@ void MainDialog::setLastOperationLog(const ProcessSummary& summary, const std::s //m_panelItemStats->Dimensions(); //needed? //m_panelTimeStats->Dimensions(); // - setImage(*m_bpButtonToggleLog, layOver(loadImage("log_file"), logOverlayImage, wxALIGN_BOTTOM | wxALIGN_RIGHT)); + const wxImage& logBtnImg = layOver(loadImage("log_file"), logOverlayImage, wxALIGN_BOTTOM | wxALIGN_RIGHT); + m_bpButtonToggleLog->init(layOver(generatePressedButtonBack(logBtnImg.GetSize() + wxSize(dipToScreen(10), dipToScreen(10))), logBtnImg), logBtnImg); + + const int logBtnSize = m_bpButtonViewType->GetSize().GetHeight(); + m_bpButtonToggleLog->SetMinSize({logBtnSize, logBtnSize}); + m_bpButtonToggleLog->Show(static_cast<bool>(errorLog)); } void MainDialog::onToggleLog(wxCommandEvent& event) { - showLogPanel(!auiMgr_.GetPane(m_panelLog).IsShown()); + showLogPanel(!m_bpButtonToggleLog->isActive()); } void MainDialog::showLogPanel(bool show) { + m_bpButtonToggleLog->setActive(show); + if (wxAuiPaneInfo& logPane = auiMgr_.GetPane(m_panelLog); logPane.IsShown() != show) { @@ -5674,10 +5672,6 @@ void MainDialog::updateGridViewData() void MainDialog::setStatusBarFileStats(FileView::FileStats statsLeft, FileView::FileStats statsRight) { - //select state - bSizerFileStatus->Show(true); - m_staticTextFullStatus->Hide(); - //update status information bSizerStatusLeftDirectories->Show(statsLeft.folderCount > 0); bSizerStatusLeftFiles ->Show(statsLeft.fileCount > 0); @@ -5823,7 +5817,8 @@ void MainDialog::startFindNext(bool searchAscending) //F3 or ENTER in m_textCtrl wxBeginBusyCursor(wxHOURGLASS_CURSOR); const std::pair<const Grid*, ptrdiff_t> result = findGridMatch(*grid1, *grid2, utfTo<std::wstring>(searchString), - m_checkBoxMatchCase->GetValue(), searchAscending); //parameter owned by GUI, *not* globalCfg structure! => we should better implement a getGlocalCfg()! + m_checkBoxMatchCase->GetValue(), searchAscending); + //parameter owned by GUI, *not* globalCfg structure! => we should better implement a getGlocalCfg()! wxEndBusyCursor(); if (Grid* grid = const_cast<Grid*>(result.first)) //grid wasn't const when passing to findAndSelectNext(), so this is legal @@ -5841,8 +5836,7 @@ void MainDialog::startFindNext(bool searchAscending) //F3 or ENTER in m_textCtrl else { showFindPanel(true /*show*/); - showNotificationDialog(this, DialogInfoType::info, PopupDialogCfg(). - setTitle(_("Find")). + showNotificationDialog(this, DialogInfoType::info, PopupDialogCfg().setTitle(_("Find")). setMainInstructions(replaceCpy(_("Cannot find %x"), L"%x", fmtPath(searchString)))); } } @@ -5927,7 +5921,8 @@ void MainDialog::onShowFolderPairOptions(wxEvent& event) menu.addItem(_("Add folder pair"), [this, pos] { insertAddFolderPair({LocalPairConfig()}, pos); }, loadImage("item_add_sicon")); menu.addSeparator(); menu.addItem(_("Move up" ) + L"\tAlt+Page Up", [this, pos] { moveAddFolderPairUp(pos); }, loadImage("move_up_sicon")); - menu.addItem(_("Move down") + L"\tAlt+Page Down", [this, pos] { moveAddFolderPairUp(pos + 1); }, loadImage("move_down_sicon"), pos + 1 < makeSigned(additionalFolderPairs_.size())); + menu.addItem(_("Move down") + L"\tAlt+Page Down", [this, pos] { moveAddFolderPairUp(pos + 1); }, loadImage("move_down_sicon"), + pos + 1 < makeSigned(additionalFolderPairs_.size())); menu.popup(*(*it)->m_bpButtonFolderPairOptions, {(*it)->m_bpButtonFolderPairOptions->GetSize().x, 0}); break; @@ -6205,7 +6200,56 @@ void MainDialog::setAddFolderPairs(const std::vector<LocalPairConfig>& newPairs) void MainDialog::onMenuOptions(wxCommandEvent& event) { + const ColorTheme colorThemeOld = globalCfg_.appColorTheme; + showOptionsDlg(this, globalCfg_); + + if (!equalAppearance(globalCfg_.appColorTheme, colorThemeOld)) + { + if (!folderCmp_.empty()) //otherwise: why bother the user? + switch (showConfirmationDialog(this, DialogInfoType::warning, PopupDialogCfg().setTitle(_("Confirm")). + setMainInstructions(_("The application must restart to change the color theme.") + L"\n\n" + + _("Restart now?")), _("&Restart"))) + { + case ConfirmationButton::accept: + break; + case ConfirmationButton::cancel: + return; + } + try + { + changeColorTheme(globalCfg_.appColorTheme); //throw FileError + //should work on macOS/Linux, but not on Windows (until wxWidgets fixes their s...) + + //show new dialog, then delete old one + MainDialog::create(getConfig(), activeConfigFiles_, getGlobalCfgBeforeExit(), globalCfgFilePath_, false /*startComparison*/); + Destroy(); + } + catch (FileError&) //changing color scheme failed => restart app + { + //LastRun.ffs_gui + GlobalSettings.xml + writeConfig(getConfig(), lastRunConfigPath_); //throw FileError + writeConfig(getGlobalCfgBeforeExit(), globalCfgFilePath_); // + + try + { + const Zstring ffsLaunchPath = getProcessPath(); //throw FileError + try + { + //run async, but give consoleExecute() some "time to fail" + const auto& [exitCode, output] = consoleExecute(ffsLaunchPath, 100 /*timeoutMs*/); //throw SysError, SysErrorTimeOut + if (exitCode != 0) + throw SysError(formatSystemError("", replaceCpy(_("Exit code %x"), L"%x", numberTo<std::wstring>(exitCode)), utfTo<std::wstring>(output))); + } + catch (SysErrorTimeOut&) {} + catch (const SysError& e) { throw FileError(replaceCpy(_("Command %x failed."), L"%x", fmtPath(ffsLaunchPath)), e.toString()); } + + //don't Close() which prompts to save current config in onClose() + Destroy(); //for top-level windows this employs delayed destruction (wxPendingDelete) + } + catch (const FileError& e) { showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString())); } + } + } } @@ -6230,15 +6274,15 @@ void MainDialog::onMenuExportFileList(wxCommandEvent& event) }; //generate header - std::string header; //perf: wxString doesn't model exponential growth => unsuitable for large data sets + std::string header; header += BYTE_ORDER_MARK_UTF8; header += fmtValue(_("Folder Pairs")) + LINE_BREAK; - std::for_each(begin(folderCmp_), end(folderCmp_), [&](BaseFolderPair& baseFolder) + for (const BaseFolderPair& baseFolder : asRange(folderCmp_)) { header += fmtValue(AFS::getDisplayPath(baseFolder.getAbstractPath<SelectSide::left >())) + CSV_SEP; header += fmtValue(AFS::getDisplayPath(baseFolder.getAbstractPath<SelectSide::right>())) + LINE_BREAK; - }); + } header += LINE_BREAK; auto provLeft = m_gridMainL->getDataProvider(); @@ -6411,12 +6455,23 @@ void MainDialog::onMenuAbout(wxCommandEvent& event) void MainDialog::switchProgramLanguage(wxLanguage langId) { + try + { + //set language *before* creating MainDialog! + setLanguage(langId); //throw FileError + } + catch (const FileError& e) + { + showNotificationDialog(nullptr, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString())); + return; + } + //create new dialog with respect to new language - XmlGlobalSettings newGlobalCfg = getGlobalCfgBeforeExit(); + GlobalConfig newGlobalCfg = getGlobalCfgBeforeExit(); newGlobalCfg.programLanguage = langId; //show new dialog, then delete old one - MainDialog::create(globalConfigFilePath_, &newGlobalCfg, getConfig(), activeConfigFiles_, false); + MainDialog::create(getConfig(), activeConfigFiles_, newGlobalCfg, globalCfgFilePath_, false /*startComparison*/); //don't use Close(): //1. we don't want to show the prompt to save current config in onClose() diff --git a/FreeFileSync/Source/ui/main_dlg.h b/FreeFileSync/Source/ui/main_dlg.h index 7d88df76..ce06c4b4 100644 --- a/FreeFileSync/Source/ui/main_dlg.h +++ b/FreeFileSync/Source/ui/main_dlg.h @@ -7,22 +7,18 @@ #ifndef MAIN_DLG_H_8910481324545644545 #define MAIN_DLG_H_8910481324545644545 -//#include <map> -#include <memory> +//#include <memory> +#include <wx/aui/aui.h> #include <wx+/async_task.h> #include <wx+/file_drop.h> -#include <wx/aui/aui.h> #include "gui_generated.h" -#include "folder_selector.h" #include "file_grid.h" -#include "tree_grid.h" #include "sync_cfg.h" #include "log_panel.h" #include "folder_history_box.h" #include "../config.h" #include "../status_handler.h" #include "../base/algorithm.h" -//#include "../return_codes.h" #include "../base/synchronization.h" @@ -38,22 +34,18 @@ class MainDialog : public MainDialogGenerated { public: //default behavior, application start, restores last used config - static void create(const Zstring& globalConfigFilePath); - - //when loading dynamically assembled config, - //when switching language, - //or switching from batch run to GUI on warnings - static void create(const Zstring& globalConfigFilePath, - const XmlGlobalSettings* globalSettings, //optional: take over ownership => save on exit - const XmlGuiConfig& guiCfg, - const std::vector<Zstring>& referenceFiles, + static void create(const GlobalConfig& globalCfg, const Zstring& globalCfgFilePath); + + //- when loading dynamically assembled config + //- when switching language + //- switching from batch run to GUI on warnings dialog + static void create(const FfsGuiConfig& guiCfg, const std::vector<Zstring>& cfgFilePaths, + const GlobalConfig& globalCfg, const Zstring& globalCfgFilePath, //take over ownership => save on exit bool startComparison); private: - MainDialog(const Zstring& globalConfigFilePath, - const XmlGuiConfig& guiCfg, - const std::vector<Zstring>& referenceFiles, - const XmlGlobalSettings& globalSettings); //take over ownership => save on exit + MainDialog(const FfsGuiConfig& guiCfg, const std::vector<Zstring>& cfgFilePaths, + const GlobalConfig& globalCfg, const Zstring& globalCfgFilePath); //take over ownership => save on exit ~MainDialog(); void onBeforeSystemShutdown(); //last chance to do something useful before killing the application! @@ -69,13 +61,13 @@ private: class UiInputDisabler; //configuration load/save - void setLastUsedConfig(const XmlGuiConfig& guiConfig, const std::vector<Zstring>& cfgFilePaths); + void setLastUsedConfig(const FfsGuiConfig& guiConfig, const std::vector<Zstring>& cfgFilePaths); - XmlGuiConfig getConfig() const; - void setConfig(const XmlGuiConfig& newGuiCfg, const std::vector<Zstring>& referenceFiles); + FfsGuiConfig getConfig() const; + void setConfig(const FfsGuiConfig& newGuiCfg, const std::vector<Zstring>& cfgFilePaths); - void setGlobalCfgOnInit(const XmlGlobalSettings& globalSettings); //messes with Maximize(), window sizes, so call just once! - XmlGlobalSettings getGlobalCfgBeforeExit(); //destructive "get" thanks to "Iconize(false), Maximize(false)" + void setGlobalCfgOnInit(const GlobalConfig& globalCfg); //messes with Maximize(), window sizes, so call just once! + GlobalConfig getGlobalCfgBeforeExit(); //destructive "get" thanks to "Iconize(false), Maximize(false)" bool loadConfiguration(const std::vector<Zstring>& filepaths, bool ignoreBrokenConfig = false); //"false": error/cancel @@ -287,18 +279,18 @@ private: //application variables are stored here: //global settings shared by GUI and batch mode - XmlGlobalSettings globalCfg_; + GlobalConfig globalCfg_; - const Zstring globalConfigFilePath_; + const Zstring globalCfgFilePath_; //------------------------------------- //program configuration - XmlGuiConfig currentCfg_; //caveat: some parts are owned by GUI controls! see setConfig() + FfsGuiConfig currentCfg_; //caveat: some parts are owned by GUI controls! see setConfig() //used when saving configuration std::vector<Zstring> activeConfigFiles_; //name of currently loaded config files: NOT owned by m_gridCfgHistory, see onCfgGridSelection() - XmlGuiConfig lastSavedCfg_; //support for: "Save changed configuration?" dialog + FfsGuiConfig lastSavedCfg_; //support for: "Save changed configuration?" dialog const Zstring lastRunConfigPath_ = getLastRunConfigPath(); //let's not use another global... //------------------------------------- diff --git a/FreeFileSync/Source/ui/progress_indicator.cpp b/FreeFileSync/Source/ui/progress_indicator.cpp index f3a18eb2..c57accb1 100644 --- a/FreeFileSync/Source/ui/progress_indicator.cpp +++ b/FreeFileSync/Source/ui/progress_indicator.cpp @@ -6,18 +6,13 @@ #include "progress_indicator.h" #include <memory> -//#include <wx/imaglist.h> #include <wx/wupdlock.h> #include <wx/app.h> #include <zen/format_unit.h> -//#include <zen/scope_guard.h> -//#include <wx+/toggle_button.h> #include <wx+/image_tools.h> #include <wx+/graph.h> #include <wx+/no_flicker.h> #include <wx+/window_layout.h> -//#include <zen/file_access.h> -//#include <zen/thread.h> #include <zen/perf.h> #include <wx+/choice_enum.h> #include "wx+/taskbar.h" @@ -25,7 +20,6 @@ #include "tray_icon.h" #include "log_panel.h" #include "app_icon.h" -//#include "../ffs_paths.h" #include "../icon_buffer.h" #include "../base/speed_test.h" @@ -44,20 +38,10 @@ constexpr std::chrono::seconds GRAPH_TOTAL_TIME_UPDATE_INTERVAL(2); const size_t PROGRESS_GRAPH_SAMPLE_SIZE_MAX = 2'500'000; //sizeof(CurveDataStatistics::Sample) == 16 byte key/value -inline wxColor getColorBytes() { return {111, 255, 99}; } //light green -inline wxColor getColorItems() { return {127, 147, 255}; } //light blue - -inline wxColor getColorBytesRim() { return {20, 200, 0}; } //medium green -inline wxColor getColorItemsRim() { return {90, 120, 255}; } //medium blue - -//inline wxColor getColorBytesFaint() { return {205, 255, 202}; } //faint green -//inline wxColor getColorItemsFaint() { return {198, 206, 255}; } //faint blue - -inline wxColor getColorBytesDark() { return {12, 128, 0}; } //dark green -inline wxColor getColorItemsDark() { return {53, 25, 255}; } //dark blue - -inline wxColor getColorLightGrey() { return {0xf2, 0xf2, 0xf2}; } -inline wxColor getColorDarkGrey () { return {0x8f, 0x8f, 0x8f}; } +wxColor getColorBytes () { return wxSystemSettings::GetAppearance().IsDark() ? wxColor{0x16, 0xd2, 0x02} /*medium green*/ : wxColor{111, 255, 99} /*light green*/; } +wxColor getColorItems () { return wxSystemSettings::GetAppearance().IsDark() ? wxColor{0x53, 0x71, 0xfb} /*medium blue*/ : wxColor{127, 147, 255} /*light blue*/; } +wxColor getColorEstimate() { return wxSystemSettings::GetAppearance().IsDark() ? 0xc4c4c4 /*medium grey*/ : 0xf0f0f0 /*light grey*/; } +wxColor getColorEstimateText() { return 0x000000UL; } std::wstring getDialogPhaseText(const Statistics& syncStat, bool paused) @@ -204,13 +188,14 @@ CompareProgressPanel::Impl::Impl(wxFrame& parentWindow) : m_panelProgressGraph->setAttributes(Graph2D::MainAttributes().setMinY(0).setMaxY(2). setLabelX(XLabelPos::none). setLabelY(YLabelPos::none). - setBaseColors(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)). + setBaseColors(getColorEstimateText(), getColorEstimate()). setSelectionMode(GraphSelMode::none)); - m_panelProgressGraph->addCurve(curveDataBytes_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillPolygonArea(getColorBytes()).setColor(Graph2D::getBorderColor())); - m_panelProgressGraph->addCurve(curveDataItems_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillPolygonArea(getColorItems()).setColor(Graph2D::getBorderColor())); + const wxColor gridLineColor = m_panelProgressGraph->getAttributes().getGridLineColor(); + m_panelProgressGraph->addCurve(curveDataBytes_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillPolygonArea(getColorBytes()).setColor(gridLineColor)); + m_panelProgressGraph->addCurve(curveDataItems_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillPolygonArea(getColorItems()).setColor(gridLineColor)); - m_panelProgressGraph->addCurve(makeSharedRef<CurveDataProgressSeparatorLine>(), Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).setColor(Graph2D::getBorderColor())); + m_panelProgressGraph->addCurve(makeSharedRef<CurveDataProgressSeparatorLine>(), Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).setColor(gridLineColor)); Layout(); m_panelItemStats->Layout(); @@ -397,7 +382,7 @@ void CompareProgressPanel::Impl::updateProgressGui(bool allowYield) //current time elapsed const int64_t timeElapSec = std::chrono::duration_cast<std::chrono::seconds>(timeElapsed).count(); - setText(*m_staticTextTimeElapsed, utfTo<wxString>(formatTimeSpan(timeElapSec, true /*hourOptional*/)), &layoutChanged); + setText(*m_staticTextTimeElapsed, utfTo<wxString>(formatTimeSpan(timeElapSec, false /*hourRequired*/)), &layoutChanged); if (haveTotalStats) //remaining time and speed: only visible during binary comparison if (numeric::dist(timeLastSpeedEstimate_, timeElapsed) >= SPEED_ESTIMATE_UPDATE_INTERVAL) @@ -659,7 +644,7 @@ struct LabelFormatterTimeElapsed : public LabelFormatter if (timeElapsedSec < 60) return _P("1 sec", "%x sec", timeElapsedSec); - return utfTo<wxString>(formatTimeSpan(timeElapsedSec, true /*hourOptional*/)); + return utfTo<wxString>(formatTimeSpan(timeElapsedSec, false /*hourRequired*/)); } }; } @@ -697,7 +682,7 @@ public: bool getOptionIgnoreErrors() const override { return ignoreErrors_; } void setOptionIgnoreErrors(bool ignoreErrors) override { ignoreErrors_ = ignoreErrors; updateStaticGui(); } - PostSyncAction getOptionPostSyncAction() const override { return getEnumVal(enumPostSyncAction_, *pnl_.m_choicePostSyncAction); } + PostSyncAction getOptionPostSyncAction() const override { return enumPostSyncAction_.get(); } bool getOptionAutoCloseDialog() const override { return pnl_.m_checkBoxAutoClose->GetValue(); } void timerSetStatus(bool active) override @@ -768,12 +753,36 @@ private: SharedRef<CurveDataTimeMarker> curveBytesTimeEstim_ = makeSharedRef<CurveDataTimeMarker>(); SharedRef<CurveDataTimeMarker> curveItemsTimeEstim_ = makeSharedRef<CurveDataTimeMarker>(); + const wxColor colorBytesRim_ = enhanceContrast(getColorBytes(), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 4.5 /*contrastRatioMin*/); //W3C recommends >= 4.5 for text + const wxColor colorItemsRim_ = enhanceContrast(getColorItems(), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 4.5 /*contrastRatioMin*/); //W3C recommends >= 4.5 for text + const wxColor colorEstimRim_ = enhanceContrast(getColorEstimate(), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 4.5 /*contrastRatioMin*/); //W3C recommends >= 4.5 for text + const wxColor colorBytesNow_ = enhanceContrast(getColorBytes(), getColorEstimate(), 4.5 /*contrastRatioMin*/); + const wxColor colorItemsNow_ = enhanceContrast(getColorItems(), getColorEstimate(), 4.5 /*contrastRatioMin*/); + wxString parentTitleBackup_; std::unique_ptr<FfsTrayIcon> trayIcon_; //optional: if filled all other windows should be hidden and conversely std::unique_ptr<Taskbar> taskbar_; bool ignoreErrors_ = false; - EnumDescrList<PostSyncAction> enumPostSyncAction_; + EnumDescrList<PostSyncAction> enumPostSyncAction_ + { + *pnl_.m_choicePostSyncAction, [this] + { + std::vector<EnumDescrList<PostSyncAction>::DescrItem> descr; + descr.push_back({PostSyncAction::none, L"", {}}); + if (parentFrame_) //enable EXIT option for gui mode sync + descr.push_back({PostSyncAction::exit, wxControl::RemoveMnemonics(_("E&xit")), {}}); + descr.push_back({PostSyncAction::sleep, _("System: Sleep"), {}}); + descr.push_back({PostSyncAction::shutdown, _("System: Shut down"), {}}); + return descr; + }() + }; }; @@ -886,22 +895,22 @@ syncStat_(&syncStat) setBaseColors(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)). setSelectionMode(GraphSelMode::none)); - pnl_.m_panelGraphBytes->addCurve(curveBytes_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorBytes()).setColor(getColorBytesRim())); - pnl_.m_panelGraphItems->addCurve(curveItems_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorItems()).setColor(getColorItemsRim())); + pnl_.m_panelGraphBytes->addCurve(curveBytes_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorBytes()).setColor(colorBytesRim_)); + pnl_.m_panelGraphItems->addCurve(curveItems_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorItems()).setColor(colorItemsRim_)); - pnl_.m_panelGraphBytes->addCurve(curveBytesEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorLightGrey()).setColor(getColorDarkGrey())); - pnl_.m_panelGraphItems->addCurve(curveItemsEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorLightGrey()).setColor(getColorDarkGrey())); + pnl_.m_panelGraphBytes->addCurve(curveBytesEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorEstimate()).setColor(colorEstimRim_)); + pnl_.m_panelGraphItems->addCurve(curveItemsEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(1)).fillCurveArea(getColorEstimate()).setColor(colorEstimRim_)); - pnl_.m_panelGraphBytes->addCurve(curveBytesTimeNow_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(getColorBytesDark())); - pnl_.m_panelGraphItems->addCurve(curveItemsTimeNow_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(getColorItemsDark())); + pnl_.m_panelGraphBytes->addCurve(curveBytesTimeNow_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(colorBytesNow_)); + pnl_.m_panelGraphItems->addCurve(curveItemsTimeNow_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(colorItemsNow_)); - pnl_.m_panelGraphBytes->addCurve(curveBytesTimeEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(getColorDarkGrey())); - pnl_.m_panelGraphItems->addCurve(curveItemsTimeEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(getColorDarkGrey())); + pnl_.m_panelGraphBytes->addCurve(curveBytesTimeEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(colorEstimRim_)); + pnl_.m_panelGraphItems->addCurve(curveItemsTimeEstim_, Graph2D::CurveAttributes().setLineWidth(dipToWxsize(2)).setColor(colorEstimRim_)); //graph legend: const wxSize squareSize{this->GetCharHeight(), this->GetCharHeight()}; - setImage(*pnl_.m_bitmapGraphKeyBytes, rectangleImage({wxsizeToScreen(squareSize.x), wxsizeToScreen(squareSize.y)}, getColorBytes(), getColorBytesRim(), dipToScreen(1))); - setImage(*pnl_.m_bitmapGraphKeyItems, rectangleImage({wxsizeToScreen(squareSize.x), wxsizeToScreen(squareSize.y)}, getColorItems(), getColorItemsRim(), dipToScreen(1))); + setImage(*pnl_.m_bitmapGraphKeyBytes, rectangleImage({wxsizeToScreen(squareSize.x), wxsizeToScreen(squareSize.y)}, getColorBytes(), colorBytesRim_, dipToScreen(1))); + setImage(*pnl_.m_bitmapGraphKeyItems, rectangleImage({wxsizeToScreen(squareSize.x), wxsizeToScreen(squareSize.y)}, getColorItems(), colorItemsRim_, dipToScreen(1))); pnl_.bSizerDynSpace->SetMinSize(yLabelWidth, -1); //ensure item/time stats are nicely centered @@ -911,13 +920,7 @@ syncStat_(&syncStat) //allow changing a few options dynamically during sync ignoreErrors_ = ignoreErrors; - enumPostSyncAction_.add(PostSyncAction::none, L""); - if (parentFrame_) //enable EXIT option for gui mode sync - enumPostSyncAction_.add(PostSyncAction::exit, wxControl::RemoveMnemonics(_("E&xit"))); //reuse label translation - enumPostSyncAction_.add(PostSyncAction::sleep, _("System: Sleep")); - enumPostSyncAction_.add(PostSyncAction::shutdown, _("System: Shut down")); - - setEnumVal(enumPostSyncAction_, *pnl_.m_choicePostSyncAction, postSyncAction); + enumPostSyncAction_.set(postSyncAction); pnl_.m_checkBoxAutoClose->SetValue(autoCloseDialog); @@ -1053,7 +1056,7 @@ void SyncProgressDialogImpl<TopLevelDialog>::setExternalStatus(const wxString& s if (!jobName_.empty() && !parentFrame_ /*job name already visible in sync config panel, unlike with batch jobs*/) title += SPACED_DASH + jobName_; -#if 0 //why again does start time have to be visible in the titel!? +#if 0 //why again does start time have to be visible in the title!? const Zchar* format = [&tc = syncStartTime_] { if (const TimeComp& tcNow = getLocalTime(); @@ -1211,7 +1214,7 @@ void SyncProgressDialogImpl<TopLevelDialog>::updateProgressGui(bool allowYield) //current time elapsed const int64_t timeElapSec = std::chrono::duration_cast<std::chrono::seconds>(timeElapsed).count(); - setText(*pnl_.m_staticTextTimeElapsed, utfTo<wxString>(formatTimeSpan(timeElapSec, true /*hourOptional*/)), &layoutChanged); + setText(*pnl_.m_staticTextTimeElapsed, utfTo<wxString>(formatTimeSpan(timeElapSec, false /*hourRequired*/)), &layoutChanged); //remaining time and speed if (numeric::dist(timeLastSpeedEstimate_, timeElapsed) >= SPEED_ESTIMATE_UPDATE_INTERVAL) diff --git a/FreeFileSync/Source/ui/progress_indicator.h b/FreeFileSync/Source/ui/progress_indicator.h index 06236c74..597a1c25 100644 --- a/FreeFileSync/Source/ui/progress_indicator.h +++ b/FreeFileSync/Source/ui/progress_indicator.h @@ -9,7 +9,6 @@ #include <functional> #include <zen/error_log.h> -//#include <wx/frame.h> #include "wx+/window_tools.h" #include "../status_handler.h" diff --git a/FreeFileSync/Source/ui/rename_dlg.cpp b/FreeFileSync/Source/ui/rename_dlg.cpp index aa6ec646..df53db92 100644 --- a/FreeFileSync/Source/ui/rename_dlg.cpp +++ b/FreeFileSync/Source/ui/rename_dlg.cpp @@ -6,6 +6,7 @@ #include "rename_dlg.h" #include <chrono> +#include <zen/file_path.h> #include <wx/valtext.h> #include <wx+/window_layout.h> #include <wx+/image_resources.h> @@ -154,7 +155,7 @@ public: } } - int getBestSize(wxDC& dc, size_t row, ColumnType colType) override + int getBestSize(const wxReadOnlyDC& dc, size_t row, ColumnType colType) override { // -> synchronize renderCell() <-> getBestSize() return dc.GetTextExtent(getValue(row, colType)).GetWidth() + 2 * getColumnGapLeft() + dipToWxsize(1); //gap on left and right side + border @@ -339,8 +340,8 @@ RenameDialog::RenameDialog(wxWindow* parent, }); wxTextValidator inputValidator(wxFILTER_EXCLUDE_CHAR_LIST); - inputValidator.SetCharExcludes(LR"(<>:"/\|?*)"); //chars forbidden for file names (at least on Windows) - //https://docs.microsoft.com/de-de/windows/win32/fileio/naming-a-file#naming-conventions + + inputValidator.SetCharExcludes(L"/\\"); //let's not silently forbid "fileNameForbiddenChars", but let it fail explicitly! m_textCtrlNewName->SetValidator(inputValidator); m_textCtrlNewName->SetValue(renamePhrase); //SetValue() generates a text change event, unlike ChangeValue() diff --git a/FreeFileSync/Source/ui/search_grid.cpp b/FreeFileSync/Source/ui/search_grid.cpp index 1d0f0e0c..e17238e4 100644 --- a/FreeFileSync/Source/ui/search_grid.cpp +++ b/FreeFileSync/Source/ui/search_grid.cpp @@ -7,7 +7,6 @@ #include "search_grid.h" #include <zen/zstring.h> #include <zen/utf.h> -//#include <zen/perf.h> using namespace zen; using namespace fff; diff --git a/FreeFileSync/Source/ui/small_dlgs.cpp b/FreeFileSync/Source/ui/small_dlgs.cpp index ac4d2405..a09e9d88 100644 --- a/FreeFileSync/Source/ui/small_dlgs.cpp +++ b/FreeFileSync/Source/ui/small_dlgs.cpp @@ -10,13 +10,13 @@ #include <zen/format_unit.h> #include <zen/build_info.h> #include <zen/file_io.h> -//#include <zen/http.h> #include <wx/wupdlock.h> #include <wx/filedlg.h> #include <wx/sound.h> -//#include <wx+/choice_enum.h> #include <wx+/context_menu.h> #include <wx+/bitmap_button.h> +#include <wx+/choice_enum.h> +//#include <wx+/darkmode.h> #include <wx+/rtl.h> #include <wx+/no_flicker.h> #include <wx+/image_tools.h> @@ -26,15 +26,12 @@ #include <wx+/image_resources.h> #include "gui_generated.h" #include "folder_selector.h" -//#include "version_check.h" #include "abstract_folder_picker.h" #include "../afs/concrete.h" #include "../afs/gdrive.h" #include "../afs/ftp.h" #include "../afs/sftp.h" -//#include "../base/algorithm.h" #include "../base/synchronization.h" -//#include "../base/path_filter.h" #include "../base/icon_loader.h" #include "../status_handler.h" //uiUpdateDue() #include "../version/version.h" @@ -61,8 +58,7 @@ private: void onDonate (wxCommandEvent& event) override { wxLaunchDefaultBrowser(L"https://freefilesync.org/donate"); } void onSendEmail(wxCommandEvent& event) override { - wxLaunchDefaultBrowser(wxString() + L"mailto:zenju@" + - /*don't leave full email in either source or binary*/ L"freefilesync.org"); + wxLaunchDefaultBrowser(wxString() + L"mailto:zenju" + L'@' + /*don't leave full email in either source or binary*/ L"freefilesync.org"); } void onLocalKeyEvent(wxKeyEvent& event); @@ -73,14 +69,16 @@ AboutDlg::AboutDlg(wxWindow* parent) : AboutDlgGenerated(parent) { setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonClose)); - assert(m_buttonClose->GetId() == wxID_OK); //we cannot use wxID_CLOSE else Esc key won't work: yet another wxWidgets bug?? + assert(m_buttonClose->GetId() == wxID_OK); //we cannot use wxID_CLOSE else ESC key won't work: yet another wxWidgets bug?? - setImage(*m_bitmapLogo, loadImage("logo")); - setImage(*m_bitmapLogoLeft, loadImage("logo-left")); + const bool darkAppearance = wxSystemSettings::GetAppearance().IsDark(); //not "dark mode" necessarily! + + setImage(*m_bitmapLogo, loadImage(darkAppearance ? "ffs-header-dark" : "ffs-header-light")); + setImage(*m_bitmapLogoLeft, loadImage(darkAppearance ? "ffs-logo-dark" : "ffs-logo-light")); setBitmapTextLabel(*m_bpButtonForum, loadImage("ffs_forum"), L"FreeFileSync Forum"); - setBitmapTextLabel(*m_bpButtonEmail, loadImage("ffs_email"), wxString() + L"zenju@" + /*don't leave full email in either source or binary*/ L"freefilesync.org"); - m_bpButtonEmail->SetToolTip( wxString() + L"mailto:zenju@" + /*don't leave full email in either source or binary*/ L"freefilesync.org"); + setBitmapTextLabel(*m_bpButtonEmail, loadImage("ffs_email"), wxString() + L"zenju" + L'@' + /*don't leave full email in either source or binary*/ L"freefilesync.org"); + m_bpButtonEmail->SetToolTip( wxString() + L"mailto:zenju" + L'@' + /*don't leave full email in either source or binary*/ L"freefilesync.org"); wxString build = utfTo<wxString>(ffsVersion); @@ -1275,7 +1273,7 @@ namespace class OptionsDlg : public OptionsDlgGenerated { public: - OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg); + OptionsDlg(wxWindow* parent, GlobalConfig& globalCfg); private: void onOkay (wxCommandEvent& event) override; @@ -1296,6 +1294,7 @@ private: void selectSound(wxTextCtrl& txtCtrl); void onChangeSoundFilePath(wxCommandEvent& event) override { updateGui(); } + void onChangeColorTheme (wxCommandEvent& event) override { updateGui(); } void onPlayCompareDone (wxCommandEvent& event) override { playSoundWithDiagnostics(trimCpy(m_textCtrlSoundPathCompareDone ->GetValue())); } void onPlaySyncDone (wxCommandEvent& event) override { playSoundWithDiagnostics(trimCpy(m_textCtrlSoundPathSyncDone ->GetValue())); } @@ -1303,8 +1302,13 @@ private: void playSoundWithDiagnostics(const wxString& filePath); void onGridResize(wxEvent& event); + void onGridContext(wxGridEvent& event); + void copySelectionToClipboard() const; + void updateGui(); + void onLocalKeyEvent(wxKeyEvent& event); + enum class ConfigArea { hidden, @@ -1318,57 +1322,69 @@ private: void setExtApp(const std::vector<ExternalApp>& extApp); std::vector<ExternalApp> getExtApp() const; - std::unordered_map<std::wstring, std::wstring> descriptionTransToEng_; //"translated description" -> "english" mapping for external application config + std::unordered_map<std::wstring /*translation*/, std::wstring /*english*/> descriptionTransToEng_; //mapping for external application config + + const GlobalConfig defaultCfg_; + + EnumDescrList<ColorTheme> enumColorTheme_ + { + *m_choiceColorTheme, + { + {ColorTheme::System, wxControl::RemoveMnemonics(_("&Default")), {}/*tooltip*/}, + {ColorTheme::Light, _("Light"), {}/*tooltip*/}, + {ColorTheme::Dark, _("Dark"), {}/*tooltip*/}, + } + }; - const XmlGlobalSettings defaultCfg_; + std::optional<ColorTheme> colorThemeIcon_; //perf: don't update icon unless needed - std::vector<std::tuple<std::function<bool(const XmlGlobalSettings& gs)> /*get dialog shown status*/, - std::function<void(XmlGlobalSettings& gs, bool show)> /*set dialog shown status*/, + std::vector<std::tuple<std::function<bool(const GlobalConfig& cfg)> /*get dialog shown status*/, + std::function<void(GlobalConfig& gs, bool show)> /*set dialog shown status*/, wxString /*dialog message*/>> hiddenDialogCfgMapping_ { //*INDENT-OFF* - {[](const XmlGlobalSettings& gs){ return gs.confirmDlgs.confirmSyncStart; }, - []( XmlGlobalSettings& gs, bool show){ gs.confirmDlgs.confirmSyncStart = show; }, _("Start synchronization now?")}, - {[](const XmlGlobalSettings& gs){ return gs.confirmDlgs.confirmSaveConfig; }, - []( XmlGlobalSettings& gs, bool show){ gs.confirmDlgs.confirmSaveConfig = show; }, _("Do you want to save changes to %x?")}, - {[](const XmlGlobalSettings& gs){ return !gs.progressDlgAutoClose; }, - []( XmlGlobalSettings& gs, bool show){ gs.progressDlgAutoClose = !show; }, _("Leave progress dialog open after synchronization. (don't auto-close)")}, - {[](const XmlGlobalSettings& gs){ return gs.confirmDlgs.confirmSwapSides; }, - []( XmlGlobalSettings& gs, bool show){ gs.confirmDlgs.confirmSwapSides = show; }, _("Please confirm you want to swap sides.")}, - {[](const XmlGlobalSettings& gs){ return gs.confirmDlgs.confirmCommandMassInvoke; }, - []( XmlGlobalSettings& gs, bool show){ gs.confirmDlgs.confirmCommandMassInvoke = show; }, _P("Do you really want to execute the command %y for one item?", + {[](const GlobalConfig& cfg){ return cfg.confirmDlgs.confirmSyncStart; }, + []( GlobalConfig& cfg, bool show){ cfg.confirmDlgs.confirmSyncStart = show; }, _("Start synchronization now?")}, + {[](const GlobalConfig& cfg){ return cfg.confirmDlgs.confirmSaveConfig; }, + []( GlobalConfig& cfg, bool show){ cfg.confirmDlgs.confirmSaveConfig = show; }, _("Do you want to save changes to %x?")}, + {[](const GlobalConfig& cfg){ return !cfg.progressDlgAutoClose; }, + []( GlobalConfig& cfg, bool show){ cfg.progressDlgAutoClose = !show; }, _("Leave progress dialog open after synchronization. (don't auto-close)")}, + {[](const GlobalConfig& cfg){ return cfg.confirmDlgs.confirmSwapSides; }, + []( GlobalConfig& cfg, bool show){ cfg.confirmDlgs.confirmSwapSides = show; }, _("Please confirm you want to swap sides.")}, + {[](const GlobalConfig& cfg){ return cfg.confirmDlgs.confirmCommandMassInvoke; }, + []( GlobalConfig& cfg, bool show){ cfg.confirmDlgs.confirmCommandMassInvoke = show; }, _P("Do you really want to execute the command %y for one item?", "Do you really want to execute the command %y for %x items?", 42)}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnFolderNotExisting; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnFolderNotExisting = show; }, _("The following folders do not yet exist:") + L" [...] " + _("The folders are created automatically when needed.")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnFoldersDifferInCase; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnFoldersDifferInCase = show; }, _("The following folder paths differ in case. Please use a single form in order to avoid duplicate accesses.")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnDependentFolderPair; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnDependentFolderPair = show; }, _("One folder of the folder pair is a subfolder of the other.") + L' ' + _("The folder should be excluded via filter.")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnDependentBaseFolders; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnDependentBaseFolders = show; }, _("Some files will be synchronized as part of multiple folder pairs.") + L' ' + _("To avoid conflicts, set up exclude filters so that each updated file is included by only one folder pair.")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnSignificantDifference; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnSignificantDifference = show; }, _("The following folders are significantly different. Please check that the correct folders are selected for synchronization.")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnNotEnoughDiskSpace; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnNotEnoughDiskSpace = show; }, _("Not enough free disk space available in:")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnUnresolvedConflicts; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnUnresolvedConflicts = show; }, _("The following items have unresolved conflicts and will not be synchronized:")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnRecyclerMissing; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnRecyclerMissing = show; }, _("The recycle bin is not available for %x.") + L' ' + _("Ignore and delete permanently each time recycle bin is unavailable?")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnDirectoryLockFailed; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnDirectoryLockFailed = show; }, _("Cannot set directory locks for the following folders:")}, - {[](const XmlGlobalSettings& gs){ return gs.warnDlgs.warnVersioningFolderPartOfSync; }, - []( XmlGlobalSettings& gs, bool show){ gs.warnDlgs.warnVersioningFolderPartOfSync = show; }, _("The versioning folder must not be part of the synchronization.") + L' ' + _("The folder should be excluded via filter.")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnFolderNotExisting; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnFolderNotExisting = show; }, _("The following folders do not yet exist:") + L" [...] " + _("The folders are created automatically when needed.")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnFoldersDifferInCase; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnFoldersDifferInCase = show; }, _("The following folder paths differ in case. Please use a single form in order to avoid duplicate accesses.")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnDependentFolderPair; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnDependentFolderPair = show; }, _("One folder of the folder pair is a subfolder of the other.") + L' ' + _("The folder should be excluded via filter.")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnDependentBaseFolders; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnDependentBaseFolders = show; }, _("Some files will be synchronized as part of multiple folder pairs.") + L' ' + _("To avoid conflicts, set up exclude filters so that each updated file is included by only one folder pair.")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnSignificantDifference; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnSignificantDifference = show; }, _("The following folders are significantly different. Please check that the correct folders are selected for synchronization.")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnNotEnoughDiskSpace; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnNotEnoughDiskSpace = show; }, _("Not enough free disk space available in:")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnUnresolvedConflicts; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnUnresolvedConflicts = show; }, _("The following items have unresolved conflicts and will not be synchronized:")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnRecyclerMissing; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnRecyclerMissing = show; }, _("The recycle bin is not available for %x.") + L' ' + _("Ignore and delete permanently each time recycle bin is unavailable?")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnDirectoryLockFailed; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnDirectoryLockFailed = show; }, _("Cannot set directory locks for the following folders:")}, + {[](const GlobalConfig& cfg){ return cfg.warnDlgs.warnVersioningFolderPartOfSync; }, + []( GlobalConfig& cfg, bool show){ cfg.warnDlgs.warnVersioningFolderPartOfSync = show; }, _("The versioning folder must not be part of the synchronization.") + L' ' + _("The folder should be excluded via filter.")}, //*INDENT-ON* }; FolderSelector logFolderSelector_; //output-only parameters: - XmlGlobalSettings& globalCfgOut_; + GlobalConfig& globalCfgOut_; }; -OptionsDlg::OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg) : +OptionsDlg::OptionsDlg(wxWindow* parent, GlobalConfig& globalCfg) : OptionsDlgGenerated(parent), logFolderSelector_(this, *m_panelLogfile, *m_buttonSelectLogFolder, *m_bpButtonSelectAltLogFolder, *m_logFolderPath, globalCfg.logFolderLastSelected, globalCfg.sftpKeyFileLastSelected, @@ -1379,7 +1395,6 @@ OptionsDlg::OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg) : setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonOkay).setCancel(m_buttonCancel)); //setMainInstructionFont(*m_staticTextHeader); - m_gridCustomCommand->SetTabBehaviour(wxGrid::Tab_Leave); const wxImage imgFileManagerSmall_([] { @@ -1467,8 +1482,11 @@ OptionsDlg::OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg) : m_checkBoxCopyLocked ->SetValue(globalCfg.copyLockedFiles); m_checkBoxCopyPermissions->SetValue(globalCfg.copyFilePermissions); + bSizerColorTheme->Show(darkModeAvailable()); + enumColorTheme_.set(globalCfg.appColorTheme); + m_checkBoxLogFilesMaxAge->SetValue(globalCfg.logfilesMaxAgeDays > 0); - m_spinCtrlLogFilesMaxAge->SetValue(globalCfg.logfilesMaxAgeDays > 0 ? globalCfg.logfilesMaxAgeDays : XmlGlobalSettings().logfilesMaxAgeDays); + m_spinCtrlLogFilesMaxAge->SetValue(globalCfg.logfilesMaxAgeDays > 0 ? globalCfg.logfilesMaxAgeDays : GlobalConfig().logfilesMaxAgeDays); switch (globalCfg.logFormat) { @@ -1486,15 +1504,91 @@ OptionsDlg::OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg) : //-------------------------------------------------------------------------------- bSizerLockedFiles->Show(false); - m_gridCustomCommand->SetMargins(0, 0); + m_gridCustomCommand->SetMargins(0, 0); //for onGridResize(): ensure GetClientSize() calculations are correct + m_gridCustomCommand->SetTabBehaviour(wxGrid::Tab_Leave); + m_gridCustomCommand->SetSelectionMode(wxGrid::wxGridSelectRows); + + //getting rid of column header highlight the stupid way but the alternative "wxGrid::DisableOverlaySelection()" looks like ass + class wxGridCellAttrProviderNoColHighlight : public wxGridCellAttrProvider + { + const wxGridColumnHeaderRenderer& GetColumnHeaderRenderer(int col) override { return colRenderNoHighlight_; } + + class : public wxGridColumnHeaderRendererDefault + { + void DrawHighlighted(const wxGrid& grid, wxDC& dc, wxRect& rect, int col, int flags) const override { DrawBorder(grid, dc, rect); } + } colRenderNoHighlight_; + }; + m_gridCustomCommand->GetTable()->SetAttrProvider(new wxGridCellAttrProviderNoColHighlight); + + m_gridCustomCommand->GetGridWindow()->Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { onGridResize(event); }); + m_gridCustomCommand->Bind(wxEVT_GRID_CELL_RIGHT_CLICK, [this](wxGridEvent& event) { onGridContext(event); }); + m_gridCustomCommand->Bind(wxEVT_GRID_LABEL_RIGHT_CLICK, [this](wxGridEvent& event) { onGridContext(event); }); + + m_gridCustomCommand->Bind(wxEVT_KEY_DOWN, [this](wxKeyEvent& event) + { + switch (event.GetKeyCode()) + { + //fix \src\generic\grid.cpp calling wxGrid::MoveCursorDown() after pressing ENTER: 1. instead of showing edit control 2. after ending edit mode + case WXK_RETURN: + case WXK_NUMPAD_ENTER: + m_gridCustomCommand->EnableCellEditControl(!m_gridCustomCommand->IsCellEditControlEnabled()); + return; + + case WXK_HOME: //make wxGrid behave like a list instead of a spreadsheet: + case WXK_END: //=> add fake CTRL to move up/down instead of left/right + { + assert(!m_gridCustomCommand->IsCellEditControlEnabled()); //cell edit already handles this event + event.m_controlDown = true; + break; + } + case 'A': //CTRL + A - select all + if (event.ControlDown()) + { + assert(!m_gridCustomCommand->IsCellEditControlEnabled()); //cell edit already handles this event + m_gridCustomCommand->SelectAll(); + return; + } + break; + + case 'C': + case WXK_INSERT: //CTRL + C || CTRL + INS + case WXK_NUMPAD_INSERT: + if (event.ControlDown()) + { + copySelectionToClipboard(); + return; + } + break; + } + event.Skip(); + }); + + m_gridCustomCommand->Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& event) + { + switch (event.GetKeyCode()) + { + case WXK_ESCAPE: //exit cell edit mode + undo (instead of cancelling the whole dialog!!!) + if (m_gridCustomCommand->IsCellEditControlEnabled()) + { + const wxGridCellCoords coords = m_gridCustomCommand->GetGridCursorCoords(); + assert(coords != wxGridNoCellCoords); //otherwise what exactly are we editting??? + const wxString oldVal = m_gridCustomCommand->GetCellValue(coords); - //automatically fit column width to match total grid width - m_gridCustomCommand->GetGridWindow()->Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { onGridResize(event); }); + m_gridCustomCommand->DisableCellEditControl(); //saves editted value, unless wxEVT_GRID_CELL_CHANGED is vetoed + m_gridCustomCommand->SetCellValue(coords, oldVal); //=> instead of veto, restore old value manually + return; + } + break; + } + event.Skip(); + }); //temporarily set dummy value for window height calculations: setExtApp(std::vector<ExternalApp>(globalCfg.externalApps.size() + 1)); updateGui(); + Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& event) { onLocalKeyEvent(event); }); //enable dialog-specific key events + GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize() #ifdef __WXGTK3__ Show(); //GTK3 size calculation requires visible window: https://github.com/wxWidgets/wxWidgets/issues/16088 @@ -1510,6 +1604,26 @@ OptionsDlg::OptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg) : } +void OptionsDlg::onLocalKeyEvent(wxKeyEvent& event) //process key events without explicit menu entry :) +{ + switch (event.GetKeyCode()) + { + case WXK_RETURN: + case WXK_NUMPAD_ENTER: + if (event.ControlDown()) //Ctrl+Enter or on macOS: Command+Enter + { + m_gridCustomCommand->DisableCellEditControl(); + wxCommandEvent dummy(wxEVT_COMMAND_BUTTON_CLICKED); + m_buttonOkay->Command(dummy); //simulate click + return; + } + break; + } + event.Skip(); +} + + +//automatically fit column width to match total grid width void OptionsDlg::onGridResize(wxEvent& event) { const int widthTotal = m_gridCustomCommand->GetGridWindow()->GetClientSize().GetWidth(); @@ -1525,8 +1639,67 @@ void OptionsDlg::onGridResize(wxEvent& event) } +void OptionsDlg::onGridContext(wxGridEvent& event) +{ + m_gridCustomCommand->SetFocus(); //ensure cell cursor is highlighted + + ContextMenu menu; + + const bool canCopy = m_gridCustomCommand->IsSelection() || m_gridCustomCommand->GetGridCursorCoords() != wxGridNoCellCoords; + menu.addItem(_("&Copy") + L"\tCtrl+C", [this] { copySelectionToClipboard(); }, loadImage("item_copy_sicon"), canCopy); + menu.addSeparator(); + + const int rowCount = m_gridCustomCommand->GetNumberRows(); + menu.addItem(_("Select all") + L"\tCtrl+A", [this] { m_gridCustomCommand->SelectAll(); }, wxNullImage, rowCount > 0); + + menu.popup(*m_gridCustomCommand, event.GetPosition()); +} + + +//why the fuck does wxGrid even allow multi-block selection and then fail in wxGrid::CopySelection()????????????? => fix [t... s...] +void OptionsDlg::copySelectionToClipboard() const +{ + const wxGridBlocks& selBlocks = m_gridCustomCommand->GetSelectedBlocks(); + + std::vector<wxGridBlockCoords> blocks(selBlocks.begin(), selBlocks.end()); + if (blocks.empty()) //=> select cursor position instead + if (const wxGridCellCoords curPos = m_gridCustomCommand->GetGridCursorCoords(); + curPos != wxGridNoCellCoords) + blocks.emplace_back(curPos.GetRow(), curPos.GetCol(), + curPos.GetRow(), curPos.GetCol()); + + wxString clipBuf; //perf: old wxString didn't model exponential growth, but now it's std::string-based: + static_assert(std::is_same_v<wxStringImpl, std::wstring>); + + for (const wxGridBlockCoords& block : blocks) + for (int row = block.GetTopRow(); row <= block.GetBottomRow(); ++row) + for (int col = block.GetLeftCol(); col <= block.GetRightCol(); ++col) + { + clipBuf += m_gridCustomCommand->GetCellValue(row, col); + clipBuf += col == block.GetRightCol() ? L'\n' : L'\t'; + } + + setClipboardText(clipBuf); +} + + void OptionsDlg::updateGui() { + if (!colorThemeIcon_ || *colorThemeIcon_ != enumColorTheme_.get()) + switch (enumColorTheme_.get()) + { + case ColorTheme::System: + setImage(*m_bitmapColorTheme, loadImage("theme-default")); + break; + case ColorTheme::Light: + setImage(*m_bitmapColorTheme, loadImage("theme-light")); + break; + case ColorTheme::Dark: + setImage(*m_bitmapColorTheme, loadImage("theme-dark")); + break; + } + colorThemeIcon_ = enumColorTheme_.get(); + m_spinCtrlLogFilesMaxAge->Enable(m_checkBoxLogFilesMaxAge->GetValue()); m_bpButtonPlayCompareDone ->Enable(!trimCpy(m_textCtrlSoundPathCompareDone ->GetValue()).empty()); @@ -1598,6 +1771,8 @@ void OptionsDlg::onDefault(wxCommandEvent& event) m_checkBoxCopyLocked ->SetValue(defaultCfg_.copyLockedFiles); m_checkBoxCopyPermissions->SetValue(defaultCfg_.copyFilePermissions); + enumColorTheme_.set(defaultCfg_.appColorTheme); + unsigned int itemPos = 0; for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_) m_checkListHiddenDialogs->Check(itemPos++, dlgShown(defaultCfg_)); @@ -1640,6 +1815,8 @@ void OptionsDlg::onOkay(wxCommandEvent& event) globalCfgOut_.copyLockedFiles = m_checkBoxCopyLocked->GetValue(); globalCfgOut_.copyFilePermissions = m_checkBoxCopyPermissions->GetValue(); + globalCfgOut_.appColorTheme = enumColorTheme_.get(); + globalCfgOut_.logFolderPhrase = logFolderPhrase; m_logFolderPath->getHistory()->addItem(logFolderPhrase); globalCfgOut_.logFolderHistory = m_logFolderPath->getHistory()->getList(); @@ -1745,7 +1922,7 @@ void OptionsDlg::onShowLogFolder(wxCommandEvent& event) } } -ConfirmationButton fff::showOptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg) +ConfirmationButton fff::showOptionsDlg(wxWindow* parent, GlobalConfig& globalCfg) { OptionsDlg dlg(parent, globalCfg); return static_cast<ConfirmationButton>(dlg.ShowModal()); @@ -2151,7 +2328,7 @@ private: { const double fraction = bytesTotal_ == 0 ? 0 : 1.0 * bytesCurrent_ / bytesTotal_; m_staticTextHeader->SetLabelText(_("Downloading update...") + L' ' + formatProgressPercent(fraction) + L" (" + formatFilesizeShort(bytesCurrent_) + L')'); - m_gaugeProgress->SetValue(std::round(fraction * GAUGE_FULL_RANGE)); + m_gaugeProgress->SetValue(std::floor(fraction * GAUGE_FULL_RANGE)); m_staticTextDetails->SetLabelText(utfTo<std::wstring>(filePath_)); } diff --git a/FreeFileSync/Source/ui/small_dlgs.h b/FreeFileSync/Source/ui/small_dlgs.h index 061721f0..f29b3a92 100644 --- a/FreeFileSync/Source/ui/small_dlgs.h +++ b/FreeFileSync/Source/ui/small_dlgs.h @@ -7,7 +7,6 @@ #ifndef SMALL_DLGS_H_8321790875018750245 #define SMALL_DLGS_H_8321790875018750245 -//#include <span> #include <wx+/popup_dlg.h> #include "../base/synchronization.h" #include "../config.h" @@ -37,7 +36,7 @@ zen::ConfirmationButton showSyncConfirmationDlg(wxWindow* parent, const SyncStatistics& statistics, bool& dontShowAgain); -zen::ConfirmationButton showOptionsDlg(wxWindow* parent, XmlGlobalSettings& globalCfg); +zen::ConfirmationButton showOptionsDlg(wxWindow* parent, GlobalConfig& globalCfg); zen::ConfirmationButton showSelectTimespanDlg(wxWindow* parent, time_t& timeFrom, time_t& timeTo); diff --git a/FreeFileSync/Source/ui/sync_cfg.cpp b/FreeFileSync/Source/ui/sync_cfg.cpp index c7da4516..dc56567e 100644 --- a/FreeFileSync/Source/ui/sync_cfg.cpp +++ b/FreeFileSync/Source/ui/sync_cfg.cpp @@ -18,7 +18,6 @@ #include <wx+/popup_dlg.h> #include <wx+/image_resources.h> #include "gui_generated.h" -//#include "command_box.h" #include "folder_selector.h" #include "../base/norm_filter.h" #include "../base/file_hierarchy.h" @@ -277,8 +276,30 @@ private: void updateFilterGui(); - EnumDescrList<UnitTime> enumTimeDescr_; - EnumDescrList<UnitSize> enumSizeDescr_; + EnumDescrList<UnitTime> enumTimeDescr_ + { + *m_choiceUnitTimespan, + { + {UnitTime::none, L'(' + _("None") + L')', {}}, //meta options should be enclosed in parentheses + {UnitTime::today, _("Today"), {}}, + //{UnitTime::THIS_WEEK, _("This week"), {}}, + {UnitTime::thisMonth, _("This month"), {}}, + {UnitTime::thisYear, _("This year"), {}}, + {UnitTime::lastDays, _("Last x days:"), {}}, + } + }; + EnumDescrList<UnitSize> enumMinSizeDescr_ + { + *m_choiceUnitMinSize, + { + {UnitSize::none, L'(' + _("None") + L')', {}}, //meta options should be enclosed in parentheses + {UnitSize::byte, _("Byte"), {}}, + {UnitSize::kb, _("KB"), {}}, + {UnitSize::mb, _("MB"), {}}, + } + }; + + EnumDescrList<UnitSize> enumMaxSizeDescr_{*m_choiceUnitMaxSize, enumMinSizeDescr_.getConfig()}; //------------- synchronization panel ----------------- void onSyncTwoWay(wxCommandEvent& event) override { directionsCfg_ = getDefaultSyncCfg(SyncVariant::twoWay); updateSyncGui(); } @@ -288,7 +309,7 @@ private: void onToggleLocalSyncSettings(wxCommandEvent& event) override { updateSyncGui(); } void onToggleUseDatabase (wxCommandEvent& event) override; - void onChanegVersioningStyle (wxCommandEvent& event) override { updateSyncGui(); } + void onChangeVersioningStyle (wxCommandEvent& event) override { updateSyncGui(); } void onToggleVersioningLimit (wxCommandEvent& event) override { updateSyncGui(); } void onSyncTwoWayDouble(wxMouseEvent& event) override; @@ -344,11 +365,27 @@ private: const std::function<void (const Zstring& folderPathPhrase, size_t parallelOps)> setDeviceParallelOps_; FolderSelector versioningFolder_; - EnumDescrList<VersioningStyle> enumVersioningStyle_; + EnumDescrList<VersioningStyle> enumVersioningStyle_ + { + *m_choiceVersioningStyle, + { + {VersioningStyle::replace, _("Replace"), _("Move files and replace if existing")}, + {VersioningStyle::timestampFolder, _("Time stamp") + L" [" + _("Folder") + L']', _("Move files into a time-stamped subfolder")}, + {VersioningStyle::timestampFile, _("Time stamp") + L" [" + _("File") + L']', _("Append a time stamp to each file name")}, + } + }; ResultsNotification emailNotifyCondition_ = ResultsNotification::always; - EnumDescrList<PostSyncCondition> enumPostSyncCondition_; + EnumDescrList<PostSyncCondition> enumPostSyncCondition_ + { + *m_choicePostSyncCondition, + { + {PostSyncCondition::completion, _("On completion:"), {}}, + {PostSyncCondition::errors, _("On errors:"), {}}, + {PostSyncCondition::success, _("On success:"), {}}, + } + }; FolderSelector logFolderSelector_; //----------------------------------------------------- @@ -520,6 +557,7 @@ globalLogFolderPhrase_(globalLogFolderPhrase) m_notebook->AssignImageList(imgList.release()); //pass ownership + m_notebook->SetPageText(static_cast<size_t>(SyncConfigPanel::compare), _("Comparison") + L" (F6)"); m_notebook->SetPageText(static_cast<size_t>(SyncConfigPanel::filter ), _("Filter") + L" (F7)"); m_notebook->SetPageText(static_cast<size_t>(SyncConfigPanel::sync ), _("Synchronization") + L" (F8)"); @@ -569,20 +607,6 @@ globalLogFolderPhrase_(globalLogFolderPhrase) setImage(*m_bpButtonDefaultContext, mirrorIfRtl(loadImage("button_arrow_right"))); - enumTimeDescr_. - add(UnitTime::none, L'(' + _("None") + L')'). //meta options should be enclosed in parentheses - add(UnitTime::today, _("Today")). - //add(UnitTime::THIS_WEEK, _("This week")). - add(UnitTime::thisMonth, _("This month")). - add(UnitTime::thisYear, _("This year")). - add(UnitTime::lastDays, _("Last x days:")); - - enumSizeDescr_. - add(UnitSize::none, L'(' + _("None") + L')'). //meta options should be enclosed in parentheses - add(UnitSize::byte, _("Byte")). - add(UnitSize::kb, _("KB")). - add(UnitSize::mb, _("MB")); - //------------- synchronization panel ----------------- m_buttonTwoWay->SetToolTip(getSyncVariantDescription(SyncVariant::twoWay)); m_buttonMirror->SetToolTip(getSyncVariantDescription(SyncVariant::mirror)); @@ -622,11 +646,6 @@ globalLogFolderPhrase_(globalLogFolderPhrase) {m_buttonVersioning, "delete_versioning" }, }, true /*alignLeft*/); - enumVersioningStyle_. - add(VersioningStyle::replace, _("Replace"), _("Move files and replace if existing")). - add(VersioningStyle::timestampFolder, _("Time stamp") + L" [" + _("Folder") + L']', _("Move files into a time-stamped subfolder")). - add(VersioningStyle::timestampFile, _("Time stamp") + L" [" + _("File") + L']', _("Append a time stamp to each file name")); - setDefaultWidth(*m_spinCtrlVersionMaxDays ); setDefaultWidth(*m_spinCtrlVersionCountMin); setDefaultWidth(*m_spinCtrlVersionCountMax); @@ -657,11 +676,6 @@ globalLogFolderPhrase_(globalLogFolderPhrase) //m_staticTextPostSync->SetMinSize({dipToWxsize(180), -1}); - enumPostSyncCondition_. - add(PostSyncCondition::completion, _("On completion:")). - add(PostSyncCondition::errors, _("On errors:")). - add(PostSyncCondition::success, _("On success:")); - m_comboBoxPostSyncCommand->SetHint(_("Example:") + L" systemctl poweroff"); m_comboBoxPostSyncCommand->setHistory(commandHistory, commandHistoryMax); @@ -735,6 +749,15 @@ void ConfigDialog::onLocalKeyEvent(wxKeyEvent& event) //process key events witho switch (event.GetKeyCode()) { + case WXK_RETURN: + case WXK_NUMPAD_ENTER: + if (event.ControlDown()) //Ctrl+Enter or on macOS: Command+Enter + { + wxCommandEvent dummy(wxEVT_COMMAND_BUTTON_CLICKED); + m_buttonOkay->Command(dummy); //simulate click + return; + } + break; case WXK_F6: changeSelection(SyncConfigPanel::compare); return; //handled! @@ -927,7 +950,7 @@ void ConfigDialog::updateCompGui() void ConfigDialog::onFilterDefaultContext(wxEvent& event) { const FilterConfig activeCfg = getFilterConfig(); - const FilterConfig defaultFilter = XmlGlobalSettings().defaultFilter; + const FilterConfig defaultFilter = GlobalConfig().defaultFilter; ContextMenu menu; menu.addItem(_("&Save"), [&] { defaultFilterOut_ = activeCfg; updateFilterGui(); }, @@ -941,18 +964,22 @@ void ConfigDialog::onFilterDefaultContext(wxEvent& event) FilterConfig ConfigDialog::getFilterConfig() const { - const Zstring& includeFilter = utfTo<Zstring>(m_textCtrlInclude->GetValue()); - const Zstring& exludeFilter = utfTo<Zstring>(m_textCtrlExclude->GetValue()); + auto sanitizeFilter = [](wxString str) + { + //macOS: Ctrl+Enter inserts Unicode LINE_SEPARATOR which is indistinguishable from new line! + replace(str, LINE_SEPARATOR, L'\n'); + replace(str, PARAGRAPH_SEPARATOR, L'\n'); + + return utfTo<Zstring>(str); + }; return { - includeFilter, exludeFilter, + sanitizeFilter(m_textCtrlInclude->GetValue()), sanitizeFilter(m_textCtrlExclude->GetValue()), makeUnsigned(m_spinCtrlTimespan->GetValue()), - getEnumVal(enumTimeDescr_, *m_choiceUnitTimespan), - makeUnsigned(m_spinCtrlMinSize->GetValue()), - getEnumVal(enumSizeDescr_, *m_choiceUnitMinSize), - makeUnsigned(m_spinCtrlMaxSize->GetValue()), - getEnumVal(enumSizeDescr_, *m_choiceUnitMaxSize)}; + enumTimeDescr_.get(), + makeUnsigned(m_spinCtrlMinSize->GetValue()), enumMinSizeDescr_.get(), + makeUnsigned(m_spinCtrlMaxSize->GetValue()), enumMaxSizeDescr_.get()}; } @@ -961,9 +988,9 @@ void ConfigDialog::setFilterConfig(const FilterConfig& filter) m_textCtrlInclude->ChangeValue(utfTo<wxString>(filter.includeFilter)); m_textCtrlExclude->ChangeValue(utfTo<wxString>(filter.excludeFilter)); - setEnumVal(enumTimeDescr_, *m_choiceUnitTimespan, filter.unitTimeSpan); - setEnumVal(enumSizeDescr_, *m_choiceUnitMinSize, filter.unitSizeMin); - setEnumVal(enumSizeDescr_, *m_choiceUnitMaxSize, filter.unitSizeMax); + enumTimeDescr_ .set(filter.unitTimeSpan); + enumMinSizeDescr_.set(filter.unitSizeMin); + enumMaxSizeDescr_.set(filter.unitSizeMax); m_spinCtrlTimespan->SetValue(static_cast<int>(filter.timeSpan)); m_spinCtrlMinSize ->SetValue(static_cast<int>(filter.sizeMin)); @@ -1200,7 +1227,7 @@ std::optional<SyncConfig> ConfigDialog::getSyncConfig() const syncCfg.directionCfg = directionsCfg_; syncCfg.deletionVariant = deletionVariant_; syncCfg.versioningFolderPhrase = versioningFolder_.getPath(); - syncCfg.versioningStyle = getEnumVal(enumVersioningStyle_, *m_choiceVersioningStyle); + syncCfg.versioningStyle = enumVersioningStyle_.get(); if (syncCfg.versioningStyle != VersioningStyle::replace) { syncCfg.versionMaxAgeDays = m_checkBoxVersionMaxDays ->GetValue() ? m_spinCtrlVersionMaxDays->GetValue() : 0; @@ -1224,10 +1251,10 @@ void ConfigDialog::setSyncConfig(const SyncConfig* syncCfg) //when local settings are inactive, display (current) global settings instead: const SyncConfig tmpCfg = syncCfg ? *syncCfg : globalPairCfg_.syncCfg; - directionsCfg_ = tmpCfg.directionCfg; //make working copy; ownership *not* on GUI + directionsCfg_ = tmpCfg.directionCfg; //make working copy; ownership *not* on GUI deletionVariant_ = tmpCfg.deletionVariant; versioningFolder_.setPath(tmpCfg.versioningFolderPhrase); - setEnumVal(enumVersioningStyle_, *m_choiceVersioningStyle, tmpCfg.versioningStyle); + enumVersioningStyle_.set(tmpCfg.versioningStyle); const bool useVersionLimits = tmpCfg.versioningStyle != VersioningStyle::replace; @@ -1349,9 +1376,9 @@ void ConfigDialog::updateSyncGui() if (versioningSelected) { - updateTooltipEnumVal(enumVersioningStyle_, *m_choiceVersioningStyle); + enumVersioningStyle_.updateTooltip(); - const VersioningStyle versioningStyle = getEnumVal(enumVersioningStyle_, *m_choiceVersioningStyle); + const VersioningStyle versioningStyle = enumVersioningStyle_.get(); const std::wstring pathSep = utfTo<std::wstring>(FILE_NAME_SEPARATOR); switch (versioningStyle) @@ -1426,7 +1453,7 @@ MiscSyncConfig ConfigDialog::getMiscSyncOptions() const miscCfg.autoRetryDelay = std::chrono::seconds(m_spinCtrlAutoRetryDelay->GetValue()); //---------------------------------------------------------------------------- miscCfg.postSyncCommand = m_comboBoxPostSyncCommand->getValue(); - miscCfg.postSyncCondition = getEnumVal(enumPostSyncCondition_, *m_choicePostSyncCondition); + miscCfg.postSyncCondition = enumPostSyncCondition_.get(); //---------------------------------------------------------------------------- Zstring altLogFolderPhrase = logFolderSelector_.getPath(); if (altLogFolderPhrase.empty()) //"empty" already means "unchecked" @@ -1492,7 +1519,7 @@ void ConfigDialog::setMiscSyncOptions(const MiscSyncConfig& miscCfg) m_spinCtrlAutoRetryDelay->SetValue(miscCfg.autoRetryDelay.count()); //---------------------------------------------------------------------------- m_comboBoxPostSyncCommand->setValue(miscCfg.postSyncCommand); - setEnumVal(enumPostSyncCondition_, *m_choicePostSyncCondition, miscCfg.postSyncCondition); + enumPostSyncCondition_.set(miscCfg.postSyncCondition); //---------------------------------------------------------------------------- m_checkBoxOverrideLogPath->SetValue(!miscCfg.altLogFolderPathPhrase.empty()); //only "empty path" means unchecked! everything else (e.g. " "): "checked" logFolderSelector_.setPath(m_checkBoxOverrideLogPath->GetValue() ? miscCfg.altLogFolderPathPhrase : globalLogFolderPhrase_); diff --git a/FreeFileSync/Source/ui/sync_cfg.h b/FreeFileSync/Source/ui/sync_cfg.h index 18dc31c2..6d320093 100644 --- a/FreeFileSync/Source/ui/sync_cfg.h +++ b/FreeFileSync/Source/ui/sync_cfg.h @@ -7,7 +7,6 @@ #ifndef SYNC_CFG_H_31289470134253425 #define SYNC_CFG_H_31289470134253425 -//#include <wx/window.h> #include <wx+/popup_dlg.h> #include "../base/structures.h" diff --git a/FreeFileSync/Source/ui/tray_icon.cpp b/FreeFileSync/Source/ui/tray_icon.cpp index 7d4eebcd..7a3a738e 100644 --- a/FreeFileSync/Source/ui/tray_icon.cpp +++ b/FreeFileSync/Source/ui/tray_icon.cpp @@ -74,14 +74,14 @@ wxIcon FfsTrayIcon::ProgressIconGenerator::get(double fraction) return wxIcon(); const int pixelCount = logo_.GetWidth() * logo_.GetHeight(); - const int startFillPixel = std::clamp<int>(std::round(fraction * pixelCount), 0, pixelCount); + const int startFillPixel = std::clamp<int>(std::floor(fraction * pixelCount), 0, pixelCount); if (startPixBuf_ != startFillPixel) { wxImage genImage(logo_.Copy()); //workaround wxWidgets' screwed-up design from hell: their copy-construction implements reference-counting WITHOUT copy-on-write! //gradually make FFS icon brighter while nearing completion - zen::brighten(genImage, -200 * (1 - fraction)); + brighten(genImage, -200 * (1 - fraction)); //fill black border row if (startFillPixel <= pixelCount - genImage.GetWidth()) diff --git a/FreeFileSync/Source/ui/tray_icon.h b/FreeFileSync/Source/ui/tray_icon.h index 4eea3927..1bd809dd 100644 --- a/FreeFileSync/Source/ui/tray_icon.h +++ b/FreeFileSync/Source/ui/tray_icon.h @@ -10,7 +10,6 @@ #include <functional> #include <memory> #include <wx/string.h> -//#include <wx/image.h> /* show tray icon with progress during lifetime of this instance diff --git a/FreeFileSync/Source/ui/tree_grid.cpp b/FreeFileSync/Source/ui/tree_grid.cpp index d42feb78..0cda6f3f 100644 --- a/FreeFileSync/Source/ui/tree_grid.cpp +++ b/FreeFileSync/Source/ui/tree_grid.cpp @@ -4,19 +4,17 @@ // * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * // ***************************************************************************** -//#include <set> #include "tree_grid.h" #include <wx/settings.h> -//#include <wx/menu.h> #include <zen/i18n.h> #include <zen/utf.h> #include <zen/stl_tools.h> #include <zen/format_unit.h> #include <wx+/rtl.h> +#include <wx+/color_tools.h> #include <wx+/dc.h> #include <wx+/context_menu.h> #include <wx+/image_resources.h> -//#include <wx+/image_tools.h> #include "../icon_buffer.h" using namespace zen; @@ -44,14 +42,13 @@ Zstring getFolderPairName(const FolderPair& folder) } -TreeView::TreeView(FolderComparison& folderCmp, const SortInfo& si) : folderCmp_(folderCmp), currentSort_(si) +TreeView::TreeView(FolderComparison& folderCmp, const SortInfo& si) : currentSort_(si) { - //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderCmp" - std::erase_if(folderCmp_, [](const SharedRef<BaseFolderPair>& baseObj) - { - return AFS::isNullPath(baseObj.ref().getAbstractPath<SelectSide::left >()) && - AFS::isNullPath(baseObj.ref().getAbstractPath<SelectSide::right>()); - }); + for (SharedRef<BaseFolderPair>& baseObj : folderCmp) + //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderCmp" + if (!AFS::isNullPath(baseObj.ref().getAbstractPath<SelectSide::left >()) || + !AFS::isNullPath(baseObj.ref().getAbstractPath<SelectSide::right>())) + folderCmp_.push_back(baseObj.ptr()); } @@ -59,13 +56,13 @@ inline void TreeView::compressNode(Container& cont) //remove single-element sub-trees -> gain clarity + usability (call *after* inclusion check!!!) { if (cont.subDirs.empty()) //single files node - cont.firstFileId = nullptr; + cont.showFilesNode = false; #if 0 //let's not go overboard: empty folders should not be condensed => used for file exclusion filter; user expects to see them - if (cont.firstFileId == nullptr && //single dir node... - cont.subDirs.size() == 1 && // - cont.subDirs[0].firstFileId == nullptr && //...that is empty - cont.subDirs[0].subDirs.empty()) // + if (!cont.showFilesNode && //single dir node... + cont.subDirs.size() == 1 && // + !cont.subDirs[0].showFilesNode && //...that is empty + cont.subDirs[0].subDirs.empty()) // cont.subDirs.clear(); #endif } @@ -94,32 +91,25 @@ void TreeView::extractVisibleSubtree(ContainerObject& conObj, //in file.isEmpty<SelectSide::right>() ? 0 : file.getFileSize<SelectSide::right>()); }; - cont.firstFileId = nullptr; - for (FilePair& file : conObj.refSubFiles()) + for (FilePair& file : conObj.files()) if (pred(file)) { cont.bytesNet += getBytes(file); ++cont.itemCountNet; - - if (!cont.firstFileId) - cont.firstFileId = file.getId(); } - for (SymlinkPair& symlink : conObj.refSubLinks()) + for (SymlinkPair& symlink : conObj.symlinks()) if (pred(symlink)) - { ++cont.itemCountNet; - if (!cont.firstFileId) - cont.firstFileId = symlink.getId(); - } + cont.showFilesNode = cont.itemCountNet > 0; cont.bytesGross += cont.bytesNet; cont.itemCountGross += cont.itemCountNet; - cont.subDirs.reserve(conObj.refSubFolders().size()); //avoid expensive reallocations! + cont.subDirs.reserve(conObj.subfolders().size()); //avoid expensive reallocations! - for (FolderPair& folder : conObj.refSubFolders()) + for (FolderPair& folder : conObj.subfolders()) { const bool included = pred(folder); @@ -132,11 +122,11 @@ void TreeView::extractVisibleSubtree(ContainerObject& conObj, //in cont.bytesGross += subDirCont.bytesGross; cont.itemCountGross += subDirCont.itemCountGross; - if (!included && !subDirCont.firstFileId && subDirCont.subDirs.empty()) + if (!included && subDirCont.subDirs.empty() && !subDirCont.showFilesNode) cont.subDirs.pop_back(); else { - subDirCont.objId = folder.getId(); + subDirCont.containerRef = std::static_pointer_cast<FolderPair>(folder.shared_from_this()); compressNode(subDirCont); } } @@ -206,10 +196,10 @@ struct TreeView::LessShortName utfTo<Zstring>(static_cast<const RootNodeImpl*>(rhs.node)->displayName)); case NodeType::folder: { - const auto* folderL = dynamic_cast<const FolderPair*>(FileSystemObject::retrieve(static_cast<const DirNodeImpl*>(lhs.node)->objId)); - const auto* folderR = dynamic_cast<const FolderPair*>(FileSystemObject::retrieve(static_cast<const DirNodeImpl*>(rhs.node)->objId)); + const auto* folderL = static_cast<FolderPair*>(lhs.node->containerRef.lock().get()); + const auto* folderR = static_cast<FolderPair*>(rhs.node->containerRef.lock().get()); - if (!folderL) //might be pathologic, but it's covered + if (!folderL) return false; else if (!folderR) return true; @@ -282,13 +272,13 @@ void TreeView::getChildren(const Container& cont, unsigned int level, std::vecto output.reserve(cont.subDirs.size() + 1); //keep pointers in "workList" valid std::vector<std::pair<uint64_t, int*>> workList; - for (const DirNodeImpl& subDir : cont.subDirs) + for (const Container& subDir : cont.subDirs) { output.push_back({level, 0, &subDir, NodeType::folder}); workList.emplace_back(subDir.bytesGross, &output.back().percent); } - if (cont.firstFileId) + if (cont.showFilesNode) { output.push_back({level, 0, &cont, NodeType::files}); workList.emplace_back(cont.bytesNet, &output.back().percent); @@ -305,17 +295,13 @@ void TreeView::getChildren(const Container& cont, unsigned int level, std::vecto void TreeView::applySubView(std::vector<RootNodeImpl>&& newView) { //preserve current node expansion status - auto getHierAlias = [](const TreeView::TreeLine& tl) -> const ContainerObject* + auto getContainer = [](const TreeView::TreeLine& tl) -> const ContainerObject* { switch (tl.type) { case NodeType::root: - return static_cast<const RootNodeImpl*>(tl.node)->baseFolder.get(); - case NodeType::folder: - if (auto folder = dynamic_cast<const FolderPair*>(FileSystemObject::retrieve(static_cast<const DirNodeImpl*>(tl.node)->objId))) - return folder; - break; + return tl.node->containerRef.lock().get(); case NodeType::files: break; //none!!! @@ -329,7 +315,7 @@ void TreeView::applySubView(std::vector<RootNodeImpl>&& newView) auto it = flatTree_.begin(); for (auto itNext = flatTree_.begin() + 1; itNext != flatTree_.end(); ++itNext, ++it) if (it->level < itNext->level) - if (auto conObj = getHierAlias(*it)) + if (auto conObj = getContainer(*it)) expandedNodes.insert(conObj); } @@ -346,8 +332,8 @@ void TreeView::applySubView(std::vector<RootNodeImpl>&& newView) } else { - //following is almost identical with TreeView::getChildren(): however we *cannot* reuse code here; - //this were only possible if we replaced "std::vector<RootNodeImpl>" with "Container"! + //following is almost identical with TreeView::getChildren(): + // however we *cannot* reuse code here since "std::vector<RootNodeImpl>" is not a "Container"! flatTree_.reserve(folderCmpView_.size()); //keep pointers in "workList" valid std::vector<std::pair<uint64_t, int*>> workList; @@ -371,7 +357,7 @@ void TreeView::applySubView(std::vector<RootNodeImpl>&& newView) { const TreeLine& line = flatTree_[row]; - if (auto conObj = getHierAlias(line)) + if (auto conObj = getContainer(line)) if (expandedNodes.contains(conObj)) { std::vector<TreeLine> newLines; @@ -390,25 +376,25 @@ void TreeView::updateView(Predicate pred) std::vector<RootNodeImpl> newView; newView.reserve(folderCmp_.size()); //avoid expensive reallocations! - for (SharedRef<BaseFolderPair>& baseObj : folderCmp_) - { - newView.emplace_back(); - RootNodeImpl& root = newView.back(); - this->extractVisibleSubtree(baseObj.ref(), root, pred); //"this->" is bogus for a static method, but GCC screws this one up - - //warning: the following lines are almost 1:1 copy from extractVisibleSubtree: - //however we *cannot* reuse code here; this were only possible if we replaced "std::vector<RootNodeImpl>" with "Container"! - if (!root.firstFileId && root.subDirs.empty()) - newView.pop_back(); - else + for (const std::weak_ptr<BaseFolderPair>& baseObjRef : folderCmp_) + if (BaseFolderPair* baseObj = baseObjRef.lock().get()) { - root.baseFolder = baseObj.ptr(); - root.displayName = getShortDisplayNameForFolderPair(baseObj.ref().getAbstractPath<SelectSide::left >(), - baseObj.ref().getAbstractPath<SelectSide::right>()); + newView.emplace_back(); + RootNodeImpl& root = newView.back(); + this->extractVisibleSubtree(*baseObj, root, pred); //"this->" is bogus for a static method, but GCC screws this one up - this->compressNode(root); //"this->" required by two-pass lookup as enforced by GCC 4.7 + //warning: the following lines are almost 1:1 copy from extractVisibleSubtree, adapted for BaseFolderPair: + if (root.subDirs.empty() && !root.showFilesNode) + newView.pop_back(); + else + { + root.containerRef = baseObjRef; + root.displayName = getShortDisplayNameForFolderPair(baseObj->getAbstractPath<SelectSide::left >(), + baseObj->getAbstractPath<SelectSide::right>()); + + this->compressNode(root); //"this->" required by two-pass lookup as enforced by GCC 4.7 + } } - } lastViewFilterPred_ = pred; applySubView(std::move(newView)); @@ -429,26 +415,26 @@ TreeView::NodeStatus TreeView::getStatus(size_t row) const if (row < flatTree_.size()) { if (row + 1 < flatTree_.size() && flatTree_[row + 1].level > flatTree_[row].level) - return TreeView::STATUS_EXPANDED; + return NodeStatus::expanded; //it's either reduced or empty switch (flatTree_[row].type) { case NodeType::root: case NodeType::folder: - return flatTree_[row].node->firstFileId || !flatTree_[row].node->subDirs.empty() ? TreeView::STATUS_REDUCED : TreeView::STATUS_EMPTY; + return flatTree_[row].node->showFilesNode || !flatTree_[row].node->subDirs.empty() ? NodeStatus::reduced : NodeStatus::empty; case NodeType::files: - return TreeView::STATUS_EMPTY; + return NodeStatus::empty; } } - return TreeView::STATUS_EMPTY; + return NodeStatus::empty; } void TreeView::expandNode(size_t row) { - if (getStatus(row) != TreeView::STATUS_REDUCED) + if (getStatus(row) != NodeStatus::reduced) { assert(false); return; @@ -626,36 +612,39 @@ std::unique_ptr<TreeView::Node> TreeView::getLine(size_t row) const case NodeType::root: { const auto& root = *static_cast<const TreeView::RootNodeImpl*>(flatTree_[row].node); - return std::make_unique<TreeView::RootNode>(percent, root.bytesGross, root.itemCountGross, getStatus(row), *root.baseFolder, root.displayName); + + if (BaseFolderPair* baseFolder = static_cast<BaseFolderPair*>(root.containerRef.lock().get())) + return std::make_unique<TreeView::RootNode>(percent, root.bytesGross, root.itemCountGross, getStatus(row), *baseFolder, root.displayName); } break; case NodeType::folder: { - const auto* dir = static_cast<const TreeView::DirNodeImpl*>(flatTree_[row].node); - if (auto folder = dynamic_cast<FolderPair*>(FileSystemObject::retrieve(dir->objId))) - return std::make_unique<TreeView::DirNode>(percent, dir->bytesGross, dir->itemCountGross, level, getStatus(row), *folder); + const Container& contObj = *flatTree_[row].node; + + if (FolderPair* folder = static_cast<FolderPair*>(contObj.containerRef.lock().get())) + return std::make_unique<TreeView::DirNode>(percent, contObj.bytesGross, contObj.itemCountGross, level, getStatus(row), *folder); } break; case NodeType::files: { - const auto* parentDir = flatTree_[row].node; - if (FileSystemObject* firstFile = FileSystemObject::retrieve(parentDir->firstFileId)) + const auto& parentFolder = *flatTree_[row].node; + + if (ContainerObject* conObj = parentFolder.containerRef.lock().get()) { std::vector<FileSystemObject*> filesAndLinks; - ContainerObject& parent = firstFile->parent(); //lazy evaluation: recheck "lastViewFilterPred" again rather than buffer and bloat "lastViewFilterPred" - for (FileSystemObject& fsObj : parent.refSubFiles()) + for (FileSystemObject& fsObj : conObj->files()) if (lastViewFilterPred_(fsObj)) filesAndLinks.push_back(&fsObj); - for (FileSystemObject& fsObj : parent.refSubLinks()) + for (FileSystemObject& fsObj : conObj->symlinks()) if (lastViewFilterPred_(fsObj)) filesAndLinks.push_back(&fsObj); - return std::make_unique<TreeView::FilesNode>(percent, parentDir->bytesNet, parentDir->itemCountNet, level, filesAndLinks); + return std::make_unique<TreeView::FilesNode>(percent, parentFolder.bytesNet, parentFolder.itemCountNet, level, std::move(filesAndLinks)); } } break; @@ -797,10 +786,10 @@ private: void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected, HoverArea rowHover) override { - if (!enabled || !selected) - ; //clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); -> already the default - else + if (enabled && selected) GridData::renderRowBackgound(dc, rect, row, true /*enabled*/, true /*selected*/, rowHover); + else + ; //clearArea(dc, rect, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); -> already the default } @@ -874,13 +863,13 @@ private: const bool drawMouseHover = static_cast<HoverAreaTree>(rowHover) == HoverAreaTree::node; switch (node->status_) { - case TreeView::STATUS_EXPANDED: + case TreeView::NodeStatus::expanded: drawIcon(loadImage(drawMouseHover ? "node_expanded_hover" : "node_expanded"), rectTmp, true /*drawActive*/); break; - case TreeView::STATUS_REDUCED: + case TreeView::NodeStatus::reduced: drawIcon(loadImage(drawMouseHover ? "node_reduced_hover" : "node_reduced"), rectTmp, true /*drawActive*/); break; - case TreeView::STATUS_EMPTY: + case TreeView::NodeStatus::empty: break; } @@ -904,14 +893,15 @@ private: drawIcon(nodeIcon, rectTmp, isActive); if (static_cast<HoverAreaTree>(rowHover) == HoverAreaTree::item) - drawRectangleBorder(dc, rectTmp, *wxBLUE, dipToWxsize(1)); + drawRectangleBorder(dc, rectTmp, mouseHighlightColor_, dipToWxsize(1)); rectTmp.x += widthNodeIcon_ + gapSize_; rectTmp.width -= widthNodeIcon_ + gapSize_; if (rectTmp.width > 0) { - if (!isActive) + if (!isActive && + (!enabled || !selected)) textColor.Set(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); drawCellText(dc, rectTmp, getValue(row, colType), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); @@ -942,7 +932,7 @@ private: } } - int getBestSize(wxDC& dc, size_t row, ColumnType colType) override + int getBestSize(const wxReadOnlyDC& dc, size_t row, ColumnType colType) override { // -> synchronize renderCell() <-> getBestSize() <-> getMouseHover() @@ -960,7 +950,7 @@ private: 2 * gapSize_; //include gap from right! } - HoverArea getMouseHover(wxDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override + HoverArea getMouseHover(const wxReadOnlyDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) override { if (static_cast<ColumnTypeOverview>(colType) == ColumnTypeOverview::folder) if (std::unique_ptr<TreeView::Node> node = getDataView().getLine(row)) @@ -997,11 +987,11 @@ private: case HoverAreaTree::node: switch (getDataView().getStatus(event.row_)) { - case TreeView::STATUS_EXPANDED: + case TreeView::NodeStatus::expanded: return reduceNode(event.row_); - case TreeView::STATUS_REDUCED: + case TreeView::NodeStatus::reduced: return expandNode(event.row_); - case TreeView::STATUS_EMPTY: + case TreeView::NodeStatus::empty: break; } break; @@ -1015,11 +1005,11 @@ private: { switch (getDataView().getStatus(event.row_)) { - case TreeView::STATUS_EXPANDED: + case TreeView::NodeStatus::expanded: return reduceNode(event.row_); - case TreeView::STATUS_REDUCED: + case TreeView::NodeStatus::reduced: return expandNode(event.row_); - case TreeView::STATUS_EMPTY: + case TreeView::NodeStatus::empty: break; } event.Skip(); @@ -1052,10 +1042,10 @@ private: case WXK_NUMPAD_SUBTRACT: //https://docs.microsoft.com/en-us/previous-versions/windows/desktop/dnacc/guidelines-for-keyboard-user-interface-design#windows-shortcut-keys switch (getDataView().getStatus(row)) { - case TreeView::STATUS_EXPANDED: + case TreeView::NodeStatus::expanded: return reduceNode(row); - case TreeView::STATUS_REDUCED: - case TreeView::STATUS_EMPTY: + case TreeView::NodeStatus::reduced: + case TreeView::NodeStatus::empty: const int parentRow = getDataView().getParent(row); if (parentRow >= 0) @@ -1069,12 +1059,12 @@ private: case WXK_NUMPAD_ADD: switch (getDataView().getStatus(row)) { - case TreeView::STATUS_EXPANDED: + case TreeView::NodeStatus::expanded: grid_.setGridCursor(std::min(rowCount - 1, row + 1), GridEventPolicy::allow); break; - case TreeView::STATUS_REDUCED: + case TreeView::NodeStatus::reduced: return expandNode(row); - case TreeView::STATUS_EMPTY: + case TreeView::NodeStatus::empty: break; } return; //swallow event @@ -1178,6 +1168,9 @@ private: const int widthNodeStatus_; const wxImage rootIcon_; + const wxColor mouseHighlightColor_ = enhanceContrast(*wxBLUE, //primarily needed for dark mode! + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 5 /*contrastRatioMin*/); //W3C recommends >= 4.5 Grid& grid_; bool showPercentBar_ = true; diff --git a/FreeFileSync/Source/ui/tree_grid.h b/FreeFileSync/Source/ui/tree_grid.h index fb721f68..9fb33103 100644 --- a/FreeFileSync/Source/ui/tree_grid.h +++ b/FreeFileSync/Source/ui/tree_grid.h @@ -26,7 +26,7 @@ public: }; TreeView() {} - TreeView(FolderComparison& folderCmp, const SortInfo& si); //takes (shared) ownership + TreeView(FolderComparison& folderCmp, const SortInfo& si); //apply view filter: comparison results void applyDifferenceFilter(bool showExcluded, @@ -50,11 +50,11 @@ public: bool syncEqualActive, bool conflictFilesActive); - enum NodeStatus + enum class NodeStatus { - STATUS_EXPANDED, - STATUS_REDUCED, - STATUS_EMPTY + expanded, + reduced, + empty }; //--------------------------------------------------------------------- @@ -73,8 +73,8 @@ public: struct FilesNode : public Node { - FilesNode(int percent, uint64_t bytes, int itemCount, unsigned int level, const std::vector<FileSystemObject*>& fsos) : - Node(percent, bytes, itemCount, level, STATUS_EMPTY), filesAndLinks(fsos) {} + FilesNode(int percent, uint64_t bytes, int itemCount, unsigned int level, std::vector<FileSystemObject*>&& fsos) : + Node(percent, bytes, itemCount, level, NodeStatus::empty), filesAndLinks(std::move(fsos)) {} std::vector<FileSystemObject*> filesAndLinks; //files and symlinks matching view filter; pointers are bound! }; @@ -109,37 +109,28 @@ private: TreeView (const TreeView&) = delete; TreeView& operator=(const TreeView&) = delete; - struct DirNodeImpl; - struct Container { uint64_t bytesGross = 0; uint64_t bytesNet = 0; //bytes for files on view in this directory only int itemCountGross = 0; - int itemCountNet = 0; //number of files on view for in this directory only - - std::vector<DirNodeImpl> subDirs; - FileSystemObject::ObjectId firstFileId = nullptr; //weak pointer to first FilePair or SymlinkPair - //- "compress" algorithm may hide file nodes for directories with a single included file, i.e. itemCountGross == itemCountNet == 1 - //- a ContainerObject* would be a better fit, but we need weak pointer semantics! - //- a std::vector<FileSystemObject::ObjectId> would be a better design, but we don't want a second memory structure as large as custom grid! - }; + int itemCountNet = 0; //number of files on view in this directory only - struct DirNodeImpl : public Container - { - FileSystemObject::ObjectId objId = nullptr; //weak pointer to FolderPair + std::vector<Container> subDirs; + bool showFilesNode = false; //"compress" algorithm may hide file nodes for directories with a single included file, i.e. itemCountGross == itemCountNet == 1 + std::weak_ptr<ContainerObject> containerRef; //-> BaseFolderPair if NodeType::root, + //FolderPair if NodeType::folder, and parent ContainerObject if NodeType::files }; struct RootNodeImpl : public Container { - std::shared_ptr<BaseFolderPair> baseFolder; std::wstring displayName; }; enum class NodeType { root, //-> RootNodeImpl - folder, //-> DirNodeImpl + folder, //-> Container files //-> Container }; @@ -147,8 +138,8 @@ private: { unsigned int level = 0; int percent = 0; //[0, 100] - const Container* node = nullptr; // - NodeType type = NodeType::root; //we increase size of "flatTree" using C-style types rather than have a polymorphic "folderCmpView" + const Container* node = nullptr; // + NodeType type = NodeType::root; //increase size of "flatTree" using C-style types rather than have a polymorphic "folderCmpView" }; static void compressNode(Container& cont); @@ -163,14 +154,12 @@ private: std::vector<TreeLine> flatTree_; //collapsable/expandable sub-tree of folderCmpView -> always sorted! /* /|\ - | (update...) - | */ + | (update...) */ std::vector<RootNodeImpl> folderCmpView_; //partial view on folderCmp -> unsorted (cannot be, because files are not a separate entity) std::function<bool(const FileSystemObject& fsObj)> lastViewFilterPred_; //buffer view filter predicate for lazy evaluation of files/symlinks corresponding to a TYPE_FILES node /* /|\ - | (update...) - | */ - std::vector<zen::SharedRef<BaseFolderPair>> folderCmp_; //full raw data + | (update...) */ + std::vector<std::weak_ptr<BaseFolderPair>> folderCmp_; //full raw data SortInfo currentSort_; }; @@ -180,7 +169,7 @@ namespace treegrid { void init(zen::Grid& grid); TreeView& getDataView(zen::Grid& grid); -void setData(zen::Grid& grid, FolderComparison& folderCmp); //takes (shared) ownership +void setData(zen::Grid& grid, FolderComparison& folderCmp); void setShowPercentage(zen::Grid& grid, bool value); bool getShowPercentage(const zen::Grid& grid); diff --git a/FreeFileSync/Source/ui/tree_grid_attr.h b/FreeFileSync/Source/ui/tree_grid_attr.h index 0866303b..aa642264 100644 --- a/FreeFileSync/Source/ui/tree_grid_attr.h +++ b/FreeFileSync/Source/ui/tree_grid_attr.h @@ -36,13 +36,13 @@ std::vector<ColumnAttribOverview> getOverviewDefaultColAttribs() using namespace zen; return //harmonize with tree_view.cpp::onGridLabelContext() => expects stretched folder and non-stretched other columns! { - {ColumnTypeOverview::folder, - 2 * dipToWxsize(60), 1, true}, //stretch to full width and substract sum of fixed size widths - {ColumnTypeOverview::itemCount, dipToWxsize(60), 0, true}, - {ColumnTypeOverview::bytes, dipToWxsize(60), 0, true}, //GTK needs a few pixels more width + {ColumnTypeOverview::folder, -dipToWxsize(140), 1, true}, + {ColumnTypeOverview::itemCount, dipToWxsize( 70), 0, true}, + {ColumnTypeOverview::bytes, dipToWxsize( 70), 0, true}, }; } -const bool overviewPanelShowPercentageDefault = true; +const bool overviewPanelShowPercentageDefault = true; const ColumnTypeOverview overviewPanelLastSortColumnDefault = ColumnTypeOverview::bytes; inline diff --git a/FreeFileSync/Source/ui/triple_splitter.cpp b/FreeFileSync/Source/ui/triple_splitter.cpp index ff751ead..d0211abc 100644 --- a/FreeFileSync/Source/ui/triple_splitter.cpp +++ b/FreeFileSync/Source/ui/triple_splitter.cpp @@ -5,8 +5,6 @@ // ***************************************************************************** #include "triple_splitter.h" -//#include <algorithm> -//#include <zen/stl_tools.h> #include <wx/settings.h> #include <wx+/dc.h> @@ -58,11 +56,10 @@ TripleSplitter::TripleSplitter(wxWindow* parent, sashSize_ (dipToWxsize(SASH_SIZE_DIP)), childWindowMinSize_(dipToWxsize(CHILD_WINDOW_MIN_SIZE_DIP)) { + //https://wiki.wxwidgets.org/Flicker-Free_Drawing + SetBackgroundStyle(wxBG_STYLE_PAINT); //get's rid of needless wxEVT_ERASE_BACKGROUND Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { onPaintEvent(event); }); Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { updateWindowSizes(); event.Skip(); }); - Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& event) {}); //https://wiki.wxwidgets.org/Flicker-Free_Drawing - - SetBackgroundStyle(wxBG_STYLE_PAINT); Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& event) { onMouseLeftDown (event); }); Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& event) { onMouseLeftUp (event); }); @@ -130,7 +127,9 @@ int TripleSplitter::getCenterPosX() const void TripleSplitter::onPaintEvent(wxPaintEvent& event) { - BufferedPaintDC dc(*this, doubleBuffer_); + wxPaintDC dc(this); + static_assert(wxALWAYS_NATIVE_DOUBLE_BUFFER); + //GetUpdateRegion()? nah, just redraw everything assert(GetSize() == GetClientSize()); diff --git a/FreeFileSync/Source/ui/triple_splitter.h b/FreeFileSync/Source/ui/triple_splitter.h index 52d8baa1..f8ee5c95 100644 --- a/FreeFileSync/Source/ui/triple_splitter.h +++ b/FreeFileSync/Source/ui/triple_splitter.h @@ -12,7 +12,6 @@ #include <optional> #include <wx/window.h> #include <wx/bitmap.h> -//#include <wx/dcclient.h> /* manage three contained windows: @@ -75,8 +74,6 @@ private: wxWindow* windowL_ = nullptr; wxWindow* windowC_ = nullptr; wxWindow* windowR_ = nullptr; - - std::optional<wxBitmap> doubleBuffer_; }; } diff --git a/FreeFileSync/Source/ui/version_check.cpp b/FreeFileSync/Source/ui/version_check.cpp index 6219d083..4df0a1c7 100644 --- a/FreeFileSync/Source/ui/version_check.cpp +++ b/FreeFileSync/Source/ui/version_check.cpp @@ -6,7 +6,6 @@ #include "version_check.h" #include <numeric> -#include <zen/build_info.h> #include <zen/crc.h> #include <zen/file_io.h> #include <zen/http.h> @@ -18,8 +17,10 @@ #include "../version/version.h" #include "small_dlgs.h" +#include <zen/symlink_target.h> +#include <zen/build_info.h> +#include <wx/uilocale.h> #include <gtk/gtk.h> - #include <wx/uilocale.h> using namespace zen; @@ -58,7 +59,7 @@ std::wstring getIso639Language() { assert(runningOnMainThread()); //this function is not thread-safe: consider wxWidgets usage - std::wstring localeName(wxUILocale::GetLanguageCanonicalName(wxUILocale::GetSystemLanguage())); + std::wstring localeName(copyStringTo<std::wstring>(wxUILocale::GetLanguageCanonicalName(wxUILocale::GetSystemLanguage()))); localeName = beforeFirst(localeName, L'@', IfNotFoundReturn::all); //the locale may contain an @, e.g. "sr_RS@latin"; see wxUILocale::InitLanguagesDB() if (!localeName.empty()) @@ -76,7 +77,7 @@ std::wstring getIso3166Country() { assert(runningOnMainThread()); //this function is not thread-safe, consider wxWidgets usage - std::wstring localeName(wxUILocale::GetLanguageCanonicalName(wxUILocale::GetSystemLanguage())); + std::wstring localeName(copyStringTo<std::wstring>(wxUILocale::GetLanguageCanonicalName(wxUILocale::GetSystemLanguage()))); localeName = beforeFirst(localeName, L'@', IfNotFoundReturn::all); //the locale may contain an @, e.g. "sr_RS@latin"; see wxUILocale::InitLanguagesDB() if (contains(localeName, L'_')) @@ -215,10 +216,13 @@ void fff::checkForUpdateNow(wxWindow& parent, std::string& lastOnlineVersion) if (haveNewerVersionOnline(onlineVersion)) showUpdateAvailableDialog(&parent, onlineVersion); else + { + std::wstring ffsVersionName = L"FreeFileSync " + utfTo<std::wstring>(ffsVersion); showNotificationDialog(&parent, DialogInfoType::info, PopupDialogCfg(). setIcon(loadImage("update_check")). setTitle(_("Check for Software Updates")). - setMainInstructions(_("FreeFileSync is up-to-date."))); + setMainInstructions(replaceCpy(_("FreeFileSync is up-to-date."), L"FreeFileSync", ffsVersionName))); + } } catch (const SysError& e) { diff --git a/FreeFileSync/Source/version/version.h b/FreeFileSync/Source/version/version.h index 6d4418f9..46b14e8b 100644 --- a/FreeFileSync/Source/version/version.h +++ b/FreeFileSync/Source/version/version.h @@ -3,7 +3,7 @@ namespace fff { -const char ffsVersion[] = "13.9"; //internal linkage! +const char ffsVersion[] = "14.0"; //internal linkage! const char FFS_VERSION_SEPARATOR = '.'; } diff --git a/libcurl/curl_wrap.cpp b/libcurl/curl_wrap.cpp index ca0c61d6..b2a75608 100644 --- a/libcurl/curl_wrap.cpp +++ b/libcurl/curl_wrap.cpp @@ -335,14 +335,14 @@ std::wstring zen::formatCurlStatusCode(CURLcode sc) ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FTP_COULDNT_USE_REST); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE32); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_RANGE_ERROR); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP_POST_ERROR); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE34); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CONNECT_ERROR); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_DOWNLOAD_RESUME); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FILE_COULDNT_READ_FILE); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_CANNOT_BIND); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_SEARCH_FAILED); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE40); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FUNCTION_NOT_FOUND); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE41); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_ABORTED_BY_CALLBACK); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_FUNCTION_ARGUMENT); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE44); diff --git a/wx+/app_main.h b/wx+/app_main.h index c1fd2441..fa8b1069 100644 --- a/wx+/app_main.h +++ b/wx+/app_main.h @@ -7,7 +7,6 @@ #ifndef APP_MAIN_H_08215601837818347575856 #define APP_MAIN_H_08215601837818347575856 -//#include <wx/window.h> #include <wx/app.h> diff --git a/wx+/async_task.h b/wx+/async_task.h index 85f0d9d0..9b4b6573 100644 --- a/wx+/async_task.h +++ b/wx+/async_task.h @@ -7,7 +7,6 @@ #ifndef ASYNC_TASK_H_839147839170432143214321 #define ASYNC_TASK_H_839147839170432143214321 -//#include <functional> #include <zen/thread.h> #include <zen/scope_guard.h> #include <zen/stl_tools.h> diff --git a/wx+/choice_enum.h b/wx+/choice_enum.h index a25bf104..6b28b4f9 100644 --- a/wx+/choice_enum.h +++ b/wx+/choice_enum.h @@ -7,52 +7,33 @@ #ifndef CHOICE_ENUM_H_132413545345687 #define CHOICE_ENUM_H_132413545345687 -#include <unordered_map> -#include <vector> +//#include <vector> #include <wx/choice.h> -//handle mapping of enum values to wxChoice controls -/* -Example: - -Member variable: - zen::EnumDescrList<EnumOnError> enumDescrMap; - -Constructor code: - enumDescrMap. - add(ON_ERROR_POPUP, "Show pop-up", "Show pop-up on errors or warnings"). <- add localization - add(ON_ERROR_IGNORE, "Ignore errors", "Hide all error and warning messages"). - add(ON_ERROR_EXIT, "Exit instantly", "Abort synchronization immediately"); - -Set enum value: - setEnumVal(enumDescrMap, *m_choiceHandleError, value); - -Get enum value: - value = getEnumVal(enumDescrMap, *m_choiceHandleError) - -Update enum tooltips (after user changed selection): - updateTooltipEnumVal(enumDescrMap, *m_choiceHandleError); -*/ namespace zen { +//handle mapping of enum values to wxChoice controls template <class Enum> -struct EnumDescrList +class EnumDescrList { - EnumDescrList& add(Enum value, const wxString& text, const wxString& tooltip = {}) - { - descrList.push_back({value, {text, tooltip}}); - return *this; - } +public: + using DescrItem = std::tuple<Enum, wxString /*label*/, wxString /*tooltip*/>; + + EnumDescrList(wxChoice& ctrl, std::vector<DescrItem> list); + ~EnumDescrList(); - using DescrList = std::vector<std::pair<Enum, std::pair<wxString, wxString>>>; - DescrList descrList; + void set(Enum value); + Enum get() const ; + void updateTooltip(); //after user changed selection - std::unordered_map<const wxChoice*, std::vector<wxString>> labelsSetLast; + const std::vector<DescrItem>& getConfig() const { return descrList_; } + +private: + wxChoice& ctrl_; + const std::vector<DescrItem> descrList_; + std::vector<wxString> labels_; }; -template <class Enum> void setEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value); -template <class Enum> Enum getEnumVal(const EnumDescrList<Enum>& mapping, const wxChoice& ctrl); -template <class Enum> void updateTooltipEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl); @@ -69,61 +50,65 @@ template <class Enum> void updateTooltipEnumVal(const EnumDescrList<Enum>& mappi //--------------- impelementation ------------------------------------------- template <class Enum> -void setEnumVal(EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value) +EnumDescrList<Enum>::EnumDescrList(wxChoice& ctrl, std::vector<DescrItem> list) : ctrl_(ctrl), descrList_(std::move(list)) { - auto& labelsSetLast = mapping.labelsSetLast[&ctrl]; + for (const auto& [val, label, tooltip] : descrList_) + labels_.push_back(label); - std::vector<wxString> labels; - for (const auto& [val, texts] : mapping.descrList) - labels.push_back(texts.first); + ctrl_.Set(labels_); //expensive as fuck! => only call when needed! +} - if (labels != labelsSetLast) - { - ctrl.Set(labels); //expensive as fuck! => only call when absolutely needed! - labelsSetLast = std::move(labels); - } - //----------------------------------------------------------------- - const auto it = std::find_if(mapping.descrList.begin(), mapping.descrList.end(), [&](const auto& mapItem) { return mapItem.first == value; }); - if (it != mapping.descrList.end()) +template <class Enum> inline +EnumDescrList<Enum>::~EnumDescrList() +{ +} + + +template <class Enum> +void EnumDescrList<Enum>::set(Enum value) +{ + const auto it = std::find_if(descrList_.begin(), descrList_.end(), [&](const auto& mapItem) { return std::get<Enum>(mapItem) == value; }); + if (it != descrList_.end()) { - if (const wxString& tooltip = it->second.second; - !tooltip.empty()) - ctrl.SetToolTip(tooltip); + const auto& [val, label, tooltip] = *it; + if (!tooltip.empty()) + ctrl_.SetToolTip(tooltip); else - ctrl.UnsetToolTip(); + ctrl_.UnsetToolTip(); - const int selectedPos = it - mapping.descrList.begin(); - ctrl.SetSelection(selectedPos); + const int selectedPos = it - descrList_.begin(); + ctrl_.SetSelection(selectedPos); } else assert(false); } + template <class Enum> -Enum getEnumVal(const EnumDescrList<Enum>& mapping, const wxChoice& ctrl) +Enum EnumDescrList<Enum>::get() const { - const int selectedPos = ctrl.GetSelection(); + const int selectedPos = ctrl_.GetSelection(); - if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) - return mapping.descrList[selectedPos].first; - else - { - assert(false); - return Enum(0); - } + if (0 <= selectedPos && selectedPos < std::ssize(descrList_)) + return std::get<Enum>(descrList_[selectedPos]); + + assert(false); + return Enum(0); } -template <class Enum> void updateTooltipEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl) + +template <class Enum> +void EnumDescrList<Enum>::updateTooltip() { - const int selectedPos = ctrl.GetSelection(); + const int selectedPos = ctrl_.GetSelection(); - if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) + if (0 <= selectedPos && selectedPos < std::ssize(descrList_)) { - if (const auto& [text, tooltip] = mapping.descrList[selectedPos].second; - !tooltip.empty()) - ctrl.SetToolTip(tooltip); + const auto& [val, label, tooltip] = descrList_[selectedPos]; + if (!tooltip.empty()) + ctrl_.SetToolTip(tooltip); else - ctrl.UnsetToolTip(); + ctrl_.UnsetToolTip(); } else assert(false); } diff --git a/wx+/color_tools.h b/wx+/color_tools.h new file mode 100644 index 00000000..19d34caf --- /dev/null +++ b/wx+/color_tools.h @@ -0,0 +1,234 @@ +// ***************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 * +// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * +// ***************************************************************************** + +#ifndef COLOR_TOOLS_H_18301239864123785613 +#define COLOR_TOOLS_H_18301239864123785613 + +#include <zen/basic_math.h> +#include <wx/colour.h> + + +namespace zen +{ +inline +double srgbDecode(unsigned char c) //https://en.wikipedia.org/wiki/SRGB +{ + const double c_ = c / 255.0; + return c_ <= 0.04045 ? c_ / 12.92 : std::pow((c_ + 0.055) / 1.055, 2.4); +} + + +inline +unsigned char srgbEncode(double c) +{ + const double c_ = c <= 0.0031308 ? c * 12.92 : std::pow(c, 1 / 2.4) * 1.055 - 0.055; + return std::clamp<int>(std::round(c_ * 255), 0, 255); +} + + +inline //https://www.w3.org/WAI/GL/wiki/Relative_luminance +double relLuminance(double r, double g, double b) //input: gamma-decoded sRGB +{ + return 0.2126 * r + 0.7152 * g + 0.0722 * b; //= the Y part of CIEXYZ +} + + +inline +double relativeLuminance(const wxColor& col) //[0, 1] +{ + assert(col.Alpha() == wxALPHA_OPAQUE); + return relLuminance(srgbDecode(col.Red()), srgbDecode(col.Green()), srgbDecode(col.Blue())); +} + + +inline +double relativeContrast(const wxColor& c1, const wxColor& c2) +{ + //https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef + //https://snook.ca/technical/colour_contrast/colour.html + double lum1 = relativeLuminance(c1); + double lum2 = relativeLuminance(c2); + if (lum1 < lum2) + std::swap(lum1, lum2); + return (lum1 + 0.05) / (lum2 + 0.05); +} + + +namespace +{ +//get first color between [col1, colMax] (assuming direct line in decoded sRGB) where minimum contrast is satisfied against col2 +wxColor enhanceContrast(wxColor col1, wxColor colMax, const wxColor& col2, double contrastRatioMin) +{ + /* Caveat: macOS uses partially-transparent colors! e.g. #RGBA + wxSYS_COLOUR_GRAYTEXT #FFFFFF3F + wxSYS_COLOUR_WINDOWTEXT #FFFFFFD8 + wxSYS_COLOUR_WINDOW #171717FF */ + auto alphaBlend = [](const wxColor& front, const wxColor& back) + { + if (front.Alpha() == wxALPHA_OPAQUE) + return front; + + if (back.Alpha() != wxALPHA_OPAQUE) + { + assert(false); + return *wxRED; //make some noise + } + + auto calcChannel = [a = front.Alpha()](unsigned char f, unsigned char b) + { + return static_cast<unsigned char>(numeric::intDivRound(f * a + b * (255 - a), 255)); + }; + + return wxColor(calcChannel(front.Red (), back.Red ()), + calcChannel(front.Green(), back.Green()), + calcChannel(front.Blue (), back.Blue ())); + }; + col1 = alphaBlend(col1, col2); + colMax = alphaBlend(colMax, col2); + + //--------------------------------------------------------------- + assert(contrastRatioMin >= 4); //lower values (especially near 1) probably aren't sensible mathematically, also: W3C recommends >= 4.5 for base AA compliance + auto contrast = [](double lum1, double lum2) //input: relative luminance + { + if (lum1 < lum2) + std::swap(lum1, lum2); + return (lum1 + 0.05) / (lum2 + 0.05); + }; + const double r_1 = srgbDecode(col1.Red()); + const double g_1 = srgbDecode(col1.Green()); + const double b_1 = srgbDecode(col1.Blue()); + const double r_m = srgbDecode(colMax.Red()); + const double g_m = srgbDecode(colMax.Green()); + const double b_m = srgbDecode(colMax.Blue()); + + const double lum_1 = relLuminance(r_1, g_1, b_1); + const double lum_m = relLuminance(r_m, g_m, b_m); + const double lum_2 = relativeLuminance(col2); + + if (contrast(lum_1, lum_2) >= contrastRatioMin) + return col1; //nothing to do! + + if (contrast(lum_m, lum_2) <= contrastRatioMin) + { + assert(false); //problem! + return colMax; + } + + if (lum_m < lum_2) + contrastRatioMin = 1 / contrastRatioMin; + + const double lum_t = contrastRatioMin * (lum_2 + 0.05) - 0.05; //target luminance + const double t = (lum_t - lum_1) / (lum_m - lum_1); + + return wxColor(srgbEncode(t * (r_m - r_1) + r_1), + srgbEncode(t * (g_m - g_1) + g_1), + srgbEncode(t * (b_m - b_1) + b_1)); +} +} + +inline //get first color between [col1, white/black] (assuming direct line in decoded sRGB) where minimum contrast is satisfied against col2 +wxColor enhanceContrast(const wxColor& col1, const wxColor& col2, double contrastRatioMin) +{ + return enhanceContrast(col1, + relativeContrast(col2, *wxWHITE) > //equivalent to: relativeLuminance(col2) < 0.1791287847 + relativeContrast(col2, *wxBLACK) ? // + *wxWHITE : *wxBLACK, + col2, contrastRatioMin); +} + + +#if 0 +//toy sample code: gamma-encoded sRGB -> CIEXYZ -> CIELAB and back: input === output RGB color (verified) +wxColor colorConversion(const wxColor& col) +{ + assert(col.GetAlpha() == wxALPHA_OPAQUE); + const double r = srgbDecode(col.Red()); + const double g = srgbDecode(col.Green()); + const double b = srgbDecode(col.Blue()); + + //https://en.wikipedia.org/wiki/SRGB#Correspondence_to_CIE_XYZ_stimulus + const double x = 0.4124 * r + 0.3576 * g + 0.1805 * b; + const double y = 0.2126 * r + 0.7152 * g + 0.0722 * b; + const double z = 0.0193 * r + 0.1192 * g + 0.9505 * b; + //----------------------------------------------- + //https://en.wikipedia.org/wiki/CIELAB_color_space#Converting_between_CIELAB_and_CIEXYZ_coordinates + using numeric::power; + auto f = [](double t) + { + constexpr double delta = 6.0 / 29; + return t > power<3>(delta) ? + std::pow(t, 1.0 / 3) : + t / (3 * power<2>(delta)) + 4.0 / 29; + }; + const double L_ = 116 * f(y) - 16; //[ 0, 100] + const double a_ = 500 * (f(x / 0.950489) - f(y)); //[-128, 127] + const double b_ = 200 * (f(y) - f(z / 1.088840)); //[-128, 127] + //----------------------------------------------- + auto f_1 = [](double t) + { + constexpr double delta = 6.0 / 29; + return t > delta ? + power<3>(t) : + 3 * power<2>(delta) * (t - 4.0 / 29); + }; + const double x2 = 0.950489 * f_1((L_ + 16) / 116 + a_ / 500); + const double y2 = f_1((L_ + 16) / 116); + const double z2 = 1.088840 * f_1((L_ + 16) / 116 - b_ / 200); + //----------------------------------------------- + const double r2 = 3.2406255 * x2 + -1.5372080 * y2 + -0.4986286 * z2; + const double g2 = -0.9689307 * x2 + 1.8757561 * y2 + 0.0415175 * z2; + const double b2 = 0.0557101 * x2 + -0.2040211 * y2 + 1.0569959 * z2; + + return wxColor(srgbEncode(r2), srgbEncode(g2), srgbEncode(b2)); +} + + +//https://en.wikipedia.org/wiki/HSL_and_HSV +wxColor hsvColor(double h, double s, double v) //h within [0, 360), s, v within [0, 1] +{ + //make input values fit into bounds + if (h > 360) + h -= static_cast<int>(h / 360) * 360; + else if (h < 0) + h -= static_cast<int>(h / 360) * 360 - 360; + s = std::clamp(s, 0.0, 1.0); + v = std::clamp(v, 0.0, 1.0); + //------------------------------------ + const int h_i = h / 60; + const float f = h / 60 - h_i; + + auto to8Bit = [](double val) -> unsigned char + { + return std::clamp<int>(std::round(val * 255), 0, 255); + }; + + const unsigned char p = to8Bit(v * (1 - s)); + const unsigned char q = to8Bit(v * (1 - s * f)); + const unsigned char t = to8Bit(v * (1 - s * (1 - f))); + const unsigned char vi = to8Bit(v); + + switch (h_i) + { + case 0: + return wxColor(vi, t, p); + case 1: + return wxColor(q, vi, p); + case 2: + return wxColor(p, vi, t); + case 3: + return wxColor(p, q, vi); + case 4: + return wxColor(t, p, vi); + case 5: + return wxColor(vi, p, q); + } + assert(false); + return *wxBLACK; +} +#endif +} + +#endif //COLOR_TOOLS_H_18301239864123785613 diff --git a/wx+/context_menu.h b/wx+/context_menu.h index 1e2d4d69..06e84709 100644 --- a/wx+/context_menu.h +++ b/wx+/context_menu.h @@ -7,7 +7,6 @@ #ifndef CONTEXT_MENU_H_18047302153418174632141234 #define CONTEXT_MENU_H_18047302153418174632141234 -//#include <map> #include <vector> #include <functional> #include <wx/app.h> @@ -87,7 +86,7 @@ public: void popup(wxWindow& wnd, const wxPoint& pos = wxDefaultPosition) //show popup menu + process lambdas { - //eventually all events from submenu items will be received by this menu + //eventually all events from submenu items will be received by the parent menu for (const auto& [itemId, command] : commandList_) menu_->Bind(wxEVT_COMMAND_MENU_SELECTED, [command /*clang bug*/= command](wxCommandEvent& event) { command(); }, itemId); diff --git a/wx+/darkmode.cpp b/wx+/darkmode.cpp new file mode 100644 index 00000000..c8a7ea28 --- /dev/null +++ b/wx+/darkmode.cpp @@ -0,0 +1,110 @@ +// ***************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 * +// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * +// ***************************************************************************** + +#include "darkmode.h" +#include <zen/sys_version.h> +#include <wx/settings.h> +#include "color_tools.h" + #include <gtk/gtk.h> + +using namespace zen; + + +bool zen::darkModeAvailable() +{ + +#if GTK_MAJOR_VERSION == 2 + return false; +#elif GTK_MAJOR_VERSION >= 3 + return true; +#else +#error unknown GTK version! +#endif + +} + + +namespace +{ +class SysColorsHook : public wxColorHook +{ +public: + + wxColor getColor(wxSystemColour index) const override + { + //fix contrast e.g. Ubuntu's Adwaita-Dark theme and macOS dark mode: + if (index == wxSYS_COLOUR_GRAYTEXT) + return colGreyTextEnhContrast_; +#if 0 + auto colToString = [](wxColor c) + { + const auto& [rh, rl] = hexify(c.Red ()); + const auto& [gh, gl] = hexify(c.Green()); + const auto& [bh, bl] = hexify(c.Blue ()); + const auto& [ah, al] = hexify(c.Alpha()); + return "#" + std::string({rh, rl, gh, gl, bh, bl, ah, al}); + }; + std::cerr << "wxSYS_COLOUR_GRAYTEXT " << colToString(wxSystemSettingsNative::GetColour(wxSYS_COLOUR_GRAYTEXT)) << "\n"; +#endif + return wxSystemSettingsNative::GetColour(index); //fallback + } + +private: + const wxColor colGreyTextEnhContrast_ = + enhanceContrast(wxSystemSettingsNative::GetColour(wxSYS_COLOUR_GRAYTEXT), + wxSystemSettingsNative::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettingsNative::GetColour(wxSYS_COLOUR_WINDOW), 4.5 /*contrastRatioMin*/); //W3C recommends >= 4.5 +}; + + +std::optional<bool> globalDefaultThemeIsDark; +} + + +void zen::colorThemeInit(wxApp& app, ColorTheme colTheme) //throw FileError +{ + assert(!refGlobalColorHook()); + + globalDefaultThemeIsDark = wxSystemSettings::GetAppearance().AreAppsDark(); + ZEN_ON_SCOPE_EXIT(if (!refGlobalColorHook()) refGlobalColorHook() = std::make_unique<SysColorsHook>()); //*after* SetAppearance() and despite errors + + //caveat: on macOS there are more themes than light/dark: https://developer.apple.com/documentation/appkit/nsappearance/name-swift.struct + if (colTheme != ColorTheme::System && //"System" is already the default for macOS/Linux(GTK3) + darkModeAvailable()) + changeColorTheme(colTheme); //throw FileError +} + + +void zen::colorThemeCleanup() +{ + assert(refGlobalColorHook()); + refGlobalColorHook().reset(); +} + + +bool zen::equalAppearance(ColorTheme colTheme1, ColorTheme colTheme2) +{ + if (colTheme1 == ColorTheme::System) colTheme1 = *globalDefaultThemeIsDark ? ColorTheme::Dark : ColorTheme::Light; + if (colTheme2 == ColorTheme::System) colTheme2 = *globalDefaultThemeIsDark ? ColorTheme::Dark : ColorTheme::Light; + return colTheme1 == colTheme2; +} + + +void zen::changeColorTheme(ColorTheme colTheme) //throw FileError +{ + if (colTheme == ColorTheme::System) //SetAppearance(System) isn't working reliably! surprise!? + colTheme = *globalDefaultThemeIsDark ? ColorTheme::Dark : ColorTheme::Light; + + try + { + ZEN_ON_SCOPE_SUCCESS(refGlobalColorHook() = std::make_unique<SysColorsHook>()); //*after* SetAppearance() + if (wxApp::AppearanceResult rv = wxTheApp->SetAppearance(colTheme); + rv != wxApp::AppearanceResult::Ok) + throw SysError(formatSystemError("wxApp::SetAppearance", + rv == wxApp::AppearanceResult::CannotChange ? L"CannotChange" : L"Failure", L"" /*errorMsg*/)); + } + catch (const SysError& e) { throw FileError(_("Failed to update the color theme."), e.toString()); } +} diff --git a/wx+/darkmode.h b/wx+/darkmode.h new file mode 100644 index 00000000..91d2a789 --- /dev/null +++ b/wx+/darkmode.h @@ -0,0 +1,28 @@ +// ***************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 * +// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * +// ***************************************************************************** + +#ifndef DARKMODE_H_754298057018 +#define DARKMODE_H_754298057018 + +#include <zen/file_error.h> +#include <wx/app.h> + + +namespace zen +{ +bool darkModeAvailable(); + +//support not only "dark mode" but dark themes in general +using ColorTheme = wxApp::Appearance; //why reinvent the wheel? + +void colorThemeInit(wxApp& app, ColorTheme colTheme); //throw FileError +void colorThemeCleanup(); + +bool equalAppearance(ColorTheme colTheme1, ColorTheme colTheme2); +void changeColorTheme(ColorTheme colTheme); //throw FileError +} + +#endif //DARKMODE_H_754298057018 @@ -9,29 +9,12 @@ #include <unordered_map> #include <optional> -//#include <zen/basic_math.h> #include <wx/dcbuffer.h> //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER #include <wx/dcscreen.h> -//#include <wx/bmpbndl.h> - // #include <gtk/gtk.h> namespace zen { -/* 1. wxDCClipper does *not* stack: another fix for yet another poor wxWidgets implementation - - class RecursiveDcClipper - { - RecursiveDcClipper(wxDC& dc, const wxRect& r) - }; - - 2. wxAutoBufferedPaintDC skips one pixel on left side when RTL layout is active: a fix for a poor wxWidgets implementation - - class BufferedPaintDC - { - BufferedPaintDC(wxWindow& wnd, std::unique_ptr<wxBitmap>& buffer) - }; */ - inline void clearArea(wxDC& dc, const wxRect& rect, const wxColor& col) { @@ -176,44 +159,68 @@ wxRect getIntersection(const wxRect& rect1, const wxRect& rect2) //---------------------- implementation ------------------------ -class RecursiveDcClipper +class RecursiveDcClipper //wxDCClipper does *not* stack => fix for yet another poor wxWidgets implementation: { public: RecursiveDcClipper(wxDC& dc, const wxRect& r) : dc_(dc) { - if (auto it = clippingAreas_.find(&dc_); + if (auto it = clippingAreas_.find(&dc); it != clippingAreas_.end()) { oldRect_ = it->second; const wxRect tmp = getIntersection(r, *oldRect_); //better safe than sorry - assert(!tmp.IsEmpty()); //"setting an empty clipping region is equivalent to DestroyClippingRegion()" - dc_.SetClippingRegion(tmp); //new clipping region is intersection of given and previously set regions - it->second = tmp; + if (tmp != *oldRect_) + { + dc.SetClippingRegion(tmp); //new clipping region is intersection of given and previously set regions + it->second = tmp; + clippingDone = true; + } } else { - //caveat: actual clipping region is smaller when rect is not fully inside the DC + const wxRect dcArea(dc.GetSize()); + + //since wxWidgets 3.3.0 the DC may be pre-clipped to wxDC::GetSize() or smaller (related to double-buffering) + //=> consider "no clipping" and "clipped to wxDC::GetSize()" equivalent! + wxRect rectClip; + if (dc.GetClippingBox(rectClip)) + { + rectClip = getIntersection(rectClip, dcArea); + if (rectClip != dcArea) + oldRect_ = rectClip; + } + + //caveat: actual clipping region is smaller when rect is partially outside the DC //=> ensure consistency for validateClippingBuffer() - const wxRect tmp = getIntersection(r, wxRect(dc.GetSize())); + const wxRect tmp = getIntersection(r, oldRect_? *oldRect_ : dcArea); + assert(!tmp.IsEmpty()); - dc_.SetClippingRegion(tmp); - clippingAreas_.emplace(&dc_, tmp); + if (tmp != (oldRect_? *oldRect_ : dcArea)) + { + dc.SetClippingRegion(tmp); + clippingAreas_.emplace(&dc, tmp); + clippingDone = true; + recursionBegin_ = true; + } } } ~RecursiveDcClipper() { - dc_.DestroyClippingRegion(); - if (oldRect_) + if (clippingDone) { - dc_.SetClippingRegion(*oldRect_); - clippingAreas_[&dc_] = *oldRect_; + dc_.DestroyClippingRegion(); + if (oldRect_) + dc_.SetClippingRegion(*oldRect_); + + if (recursionBegin_) + clippingAreas_.erase(&dc_); + else + clippingAreas_[&dc_] = *oldRect_; } - else - clippingAreas_.erase(&dc_); } private: @@ -224,25 +231,21 @@ private: //associate "active" clipping area with each DC inline static std::unordered_map<wxDC*, wxRect> clippingAreas_; + bool recursionBegin_ = false; + bool clippingDone = false; std::optional<wxRect> oldRect_; wxDC& dc_; }; -#ifndef wxALWAYS_NATIVE_DOUBLE_BUFFER - #error we need this one! -#endif - -//CAVEAT: wxPaintDC on wxGTK/wxMAC does not implement SetLayoutDirection()!!! => GetLayoutDirection() == wxLayout_Default -#if wxALWAYS_NATIVE_DOUBLE_BUFFER -struct BufferedPaintDC : public wxPaintDC { BufferedPaintDC(wxWindow& wnd, std::optional<wxBitmap>& buffer) : wxPaintDC(&wnd) {} }; - -#else +//fix wxBufferedPaintDC: happily fucks up for RTL layout by not drawing the first column (x = 0)! class BufferedPaintDC : public wxMemoryDC { public: BufferedPaintDC(wxWindow& wnd, std::optional<wxBitmap>& buffer) : buffer_(buffer), paintDc_(&wnd) { + assert(!wnd.IsDoubleBuffered()); + const wxSize clientSize = wnd.GetClientSize(); if (clientSize.GetWidth() > 0 && clientSize.GetHeight() > 0) //wxBitmap asserts this!! width can be 0; test case "Grid::CornerWin": compare both sides, then change config { @@ -254,6 +257,7 @@ public: SelectObject(*buffer); //copies scale factor from wxBitmap + //note: wxPaintDC on wxGTK/wxMAC does not implement SetLayoutDirection()!!! => GetLayoutDirection() == wxLayout_Default if (paintDc_.IsOk() && paintDc_.GetLayoutDirection() == wxLayout_RightToLeft) SetLayoutDirection(wxLayout_RightToLeft); } @@ -283,7 +287,6 @@ private: std::optional<wxBitmap>& buffer_; wxPaintDC paintDc_; }; -#endif } #endif //DC_H_4987123956832143243214 diff --git a/wx+/file_drop.h b/wx+/file_drop.h index e9cb9e72..2474ae45 100644 --- a/wx+/file_drop.h +++ b/wx+/file_drop.h @@ -8,7 +8,6 @@ #define FILE_DROP_H_09457802957842560325626 #include <vector> -//#include <functional> #include <zen/zstring.h> #include <wx/window.h> #include <wx/event.h> diff --git a/wx+/graph.cpp b/wx+/graph.cpp index da5c1d98..e589976d 100644 --- a/wx+/graph.cpp +++ b/wx+/graph.cpp @@ -7,15 +7,14 @@ #include "graph.h" #include <cassert> #include <algorithm> -//#include <numeric> #include <zen/basic_math.h> #include <zen/scope_guard.h> -//#include <zen/perf.h> using namespace zen; -//todo: support zoom via mouse wheel? + +//TODO: support zoom via mouse wheel? namespace zen { @@ -139,7 +138,8 @@ int widenRange(double& valMin, double& valMax, //in/out } -void drawXLabel(wxDC& dc, double xMin, double xMax, int blockCount, const ConvertCoord& cvrtX, const wxRect& graphArea, const wxRect& labelArea, const LabelFormatter& labelFmt) +void drawXLabel(wxDC& dc, double xMin, double xMax, int blockCount, const ConvertCoord& cvrtX, const wxRect& graphArea, + const wxRect& labelArea, const LabelFormatter& labelFmt, const wxColor& colGridLine) { assert(graphArea.width == labelArea.width && graphArea.x == labelArea.x); if (blockCount <= 0) @@ -153,7 +153,7 @@ void drawXLabel(wxDC& dc, double xMin, double xMax, int blockCount, const Conver const int x = graphArea.x + cvrtX.realToScreenRound(valX); //draw grey vertical lines - clearArea(dc, {x - dipToWxsize(1) / 2, graphArea.y, dipToWxsize(1), graphArea.height}, wxColor(192, 192, 192)); //light grey => not accessible! but no big deal... + clearArea(dc, {x - dipToWxsize(1) / 2, graphArea.y, dipToWxsize(1), graphArea.height}, colGridLine); //draw x axis labels const wxString label = labelFmt.formatText(valX, valRangePerBlock); @@ -163,7 +163,8 @@ void drawXLabel(wxDC& dc, double xMin, double xMax, int blockCount, const Conver } -void drawYLabel(wxDC& dc, double yMin, double yMax, int blockCount, const ConvertCoord& cvrtY, const wxRect& graphArea, const wxRect& labelArea, const LabelFormatter& labelFmt) +void drawYLabel(wxDC& dc, double yMin, double yMax, int blockCount, const ConvertCoord& cvrtY, const wxRect& graphArea, + const wxRect& labelArea, const LabelFormatter& labelFmt, const wxColor& colGridLine) { assert(graphArea.height == labelArea.height && graphArea.y == labelArea.y); if (blockCount <= 0) @@ -177,7 +178,7 @@ void drawYLabel(wxDC& dc, double yMin, double yMax, int blockCount, const Conver const double valY = yMin + i * valRangePerBlock; //step over raw data, not graph area pixels, to not lose precision const int y = graphArea.y + cvrtY.realToScreenRound(valY); - clearArea(dc, {graphArea.x, y - dipToWxsize(1) / 2, graphArea.width, dipToWxsize(1)}, wxColor(192, 192, 192)); //light grey => not accessible! but no big deal... + clearArea(dc, {graphArea.x, y - dipToWxsize(1) / 2, graphArea.width, dipToWxsize(1)}, colGridLine); //draw y axis labels const wxString label = labelFmt.formatText(valY, valRangePerBlock); @@ -436,13 +437,13 @@ Graph2D::Graph2D(wxWindow* parent, long style, const wxString& name) : wxPanel(parent, winid, pos, size, style, name) { +#ifdef FFS_CUSTOM_DOUBLE_BUFFERING + MSWDisableComposited(); +#endif + //https://wiki.wxwidgets.org/Flicker-Free_Drawing + SetBackgroundStyle(wxBG_STYLE_PAINT); //get's rid of needless wxEVT_ERASE_BACKGROUND Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { onPaintEvent(event); }); - Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { Refresh(); event.Skip(); }); - Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& event) {}); //https://wiki.wxwidgets.org/Flicker-Free_Drawing - - //SetDoubleBuffered(true); slow as hell! - - SetBackgroundStyle(wxBG_STYLE_PAINT); + Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { Refresh(); event.Skip(); }); Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& event) { onMouseLeftDown(event); }); Bind(wxEVT_MOTION, [this](wxMouseEvent& event) { onMouseMovement(event); }); @@ -453,8 +454,12 @@ Graph2D::Graph2D(wxWindow* parent, void Graph2D::onPaintEvent(wxPaintEvent& event) { - //wxAutoBufferedPaintDC dc(this); -> this one happily fucks up for RTL layout by not drawing the first column (x = 0)! +#ifdef FFS_CUSTOM_DOUBLE_BUFFERING BufferedPaintDC dc(*this, doubleBuffer_); +#else + wxPaintDC dc(this); + static_assert(wxALWAYS_NATIVE_DOUBLE_BUFFER); +#endif render(dc); } @@ -569,7 +574,7 @@ void Graph2D::render(wxDC& dc) const assert(attr_.yLabelpos == YLabelPos::none || attr_.labelFmtY); //paint graph background (excluding label area) - drawFilledRectangle(dc, graphArea, attr_.colorBack, getBorderColor(), dipToWxsize(1)); + drawFilledRectangle(dc, graphArea, attr_.colorBack, attr_.colorGridLine, dipToWxsize(1)); graphArea.Deflate(dipToWxsize(1)); //set label areas respecting graph area border! @@ -759,8 +764,8 @@ void Graph2D::render(wxDC& dc) const } //3. draw labels and background grid - if (attr_.labelFmtX) drawXLabel(dc, minX, maxX, blockCountX, cvrtX, graphArea, xLabelArea, *attr_.labelFmtX); - if (attr_.labelFmtY) drawYLabel(dc, minY, maxY, blockCountY, cvrtY, graphArea, yLabelArea, *attr_.labelFmtY); + if (attr_.labelFmtX) drawXLabel(dc, minX, maxX, blockCountX, cvrtX, graphArea, xLabelArea, *attr_.labelFmtX, attr_.colorGridLine); + if (attr_.labelFmtY) drawYLabel(dc, minY, maxY, blockCountY, cvrtY, graphArea, yLabelArea, *attr_.labelFmtY, attr_.colorGridLine); //4. finally draw curves { diff --git a/wx+/graph.h b/wx+/graph.h index d7ea51b5..1bd06635 100644 --- a/wx+/graph.h +++ b/wx+/graph.h @@ -14,6 +14,7 @@ #include <wx/settings.h> #include <wx/bitmap.h> #include <zen/string_tools.h> +#include "color_tools.h" #include "dc.h" @@ -218,11 +219,16 @@ public: void addCurve(const SharedRef<CurveData>& data, const CurveAttributes& ca = CurveAttributes()); void clearCurves() { curves_.clear(); } - static wxColor getBorderColor() { return {130, 135, 144}; } //medium grey, the same Win7 uses for other frame borders => not accessible! but no big deal... - class MainAttributes { public: + MainAttributes() + { + //accessibility: consider system text and background colors; + //small drawback: color of graphs is NOT related to the background! => responsibility of client to use correct colors + setBaseColors(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + } MainAttributes& setMinX(double newMinX) { minX = newMinX; return *this; } MainAttributes& setMaxX(double newMaxX) { maxX = newMaxX; return *this; } @@ -248,8 +254,16 @@ public: MainAttributes& setCornerText(const wxString& txt, GraphCorner pos) { cornerTexts[pos] = txt; return *this; } - //accessibility: always set both colors - MainAttributes& setBaseColors(const wxColor& text, const wxColor& back) { colorText = text; colorBack = back; return *this; } + MainAttributes& setBaseColors(const wxColor& text, const wxColor& back) //accessibility: always set both colors + { + colorText = text; + colorBack = back; + colorGridLine = enhanceContrast(colorBack, //start with back color and deviate only as little as required + colorText, colorBack, 4 /*contrastRatioMin*/); //W3C recommends >= 4.5 for text + return *this; + } + + wxColor getGridLineColor() const { return colorGridLine; } MainAttributes& setSelectionMode(GraphSelMode mode) { mouseSelMode = mode; return *this; } @@ -272,10 +286,9 @@ public: std::map<GraphCorner, wxString> cornerTexts; - //accessibility: consider system text and background colors; - //small drawback: color of graphs is NOT connected to the background! => responsibility of client to use correct colors - wxColor colorText = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); - wxColor colorBack = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + wxColor colorText; + wxColor colorBack; + wxColor colorGridLine; GraphSelMode mouseSelMode = GraphSelMode::rect; }; @@ -324,9 +337,9 @@ private: MainAttributes attr_; //global attributes - std::optional<wxBitmap> doubleBuffer_; - std::vector<std::pair<SharedRef<CurveData>, CurveAttributes>> curves_; + + std::optional<wxBitmap> doubleBuffer_; }; } diff --git a/wx+/grid.cpp b/wx+/grid.cpp index 3665c6cf..147feef0 100644 --- a/wx+/grid.cpp +++ b/wx+/grid.cpp @@ -6,19 +6,17 @@ #include "grid.h" #include <cassert> -//#include <set> #include <chrono> #include <wx/settings.h> -//#include <wx/listbox.h> #include <wx/tooltip.h> #include <wx/timer.h> -//#include <wx/utils.h> #include <zen/basic_math.h> #include <zen/string_tools.h> #include <zen/scope_guard.h> #include <zen/utf.h> #include <zen/zstring.h> #include <zen/format_unit.h> +#include "color_tools.h" #include "dc.h" #include <gtk/gtk.h> @@ -26,6 +24,16 @@ using namespace zen; +/* wxWidgets 3.3 defaults to system-powered double-buffering (WS_EX_COMPOSITED) on Windows: + => ~60% higher CPU time (test case: scrolling large file list via keyboard) :(( + => opt-out! + + "wxMSW now uses double buffering by default, meaning that updating the + windows using wxClientDC doesn't work any longer, which is consistent with + the behaviour of wxGTK with Wayland backend and of wxOSX, but not with the + traditional historic behaviour of wxMSW (or wxGTK/X11). You may call + MSWDisableComposited() to restore the previous behaviour [...]" */ + //let's NOT create wxWidgets objects statically: wxColor GridData::getColorSelectionGradientFrom() { return {137, 172, 255}; } //blue: HSL: 158, 255, 196 HSV: 222, 0.46, 1 wxColor GridData::getColorSelectionGradientTo () { return {225, 234, 255}; } // HSL: 158, 255, 240 HSV: 222, 0.12, 1 @@ -36,14 +44,28 @@ int GridData::getColumnGapLeft() { return dipToWxsize(4); } namespace { //------------------------------ Grid Parameters -------------------------------- -inline wxColor getColorLabelText(bool enabled) { return wxSystemSettings::GetColour(enabled ? wxSYS_COLOUR_BTNTEXT : wxSYS_COLOUR_GRAYTEXT); } -inline wxColor getColorGridLine() { return wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW); } +wxColor getColorLabelText(bool enabled) { return wxSystemSettings::GetColour(enabled ? wxSYS_COLOUR_BTNTEXT : wxSYS_COLOUR_GRAYTEXT); } +wxColor getColorGridLine() { return wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW); } + +wxColor getColorLabelGradientFrom() +{ + if (wxSystemSettings::GetAppearance().IsDark()) //upper gradient part must always be lighter than lower part! + { + const wxColor backCol = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); -inline wxColor getColorLabelGradientFrom() { return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); } -inline wxColor getColorLabelGradientTo () { return wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); } + auto liftChannel = [](unsigned char c) { return static_cast<unsigned char>(std::clamp(c + 25, 0, 255)); }; -inline wxColor getColorLabelGradientFocusFrom() { return getColorLabelGradientFrom(); } -inline wxColor getColorLabelGradientFocusTo () { return GridData::getColorSelectionGradientFrom(); } + return wxColor(liftChannel(backCol.Red ()), + liftChannel(backCol.Green()), + liftChannel(backCol.Blue ())); + } + else + return wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); +} +wxColor getColorLabelGradientTo() { return wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); } + +wxColor getColorLabelGradientFocusFrom() { return wxSystemSettings::GetAppearance().IsDark() ? wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT) : getColorLabelGradientFrom(); } +wxColor getColorLabelGradientFocusTo () { return wxSystemSettings::GetAppearance().IsDark() ? getColorLabelGradientTo() : GridData::getColorSelectionGradientFrom(); } const double MOUSE_DRAG_ACCELERATION_DIP = 1.5; //unit: [rows / (DIP * sec)] -> same value like Explorer! const int DEFAULT_COL_LABEL_BORDER_DIP = 6; //top + bottom border in addition to label height @@ -127,7 +149,7 @@ void GridData::renderCell(wxDC& dc, const wxRect& rect, size_t row, ColumnType c } -int GridData::getBestSize(wxDC& dc, size_t row, ColumnType colType) +int GridData::getBestSize(const wxReadOnlyDC& dc, size_t row, ColumnType colType) { return dc.GetTextExtent(getValue(row, colType)).GetWidth() + 2 * getColumnGapLeft() + dipToWxsize(1); //gap on left and right side + border } @@ -264,10 +286,10 @@ public: wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxASCII_STR(wxPanelNameStr)), parent_(parent) { + //https://wiki.wxwidgets.org/Flicker-Free_Drawing + SetBackgroundStyle(wxBG_STYLE_PAINT); //get's rid of needless wxEVT_ERASE_BACKGROUND Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { onPaintEvent(event); }); Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { Refresh(); event.Skip(); }); - Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& event) {}); //https://wiki.wxwidgets.org/Flicker-Free_Drawing - SetBackgroundStyle(wxBG_STYLE_PAINT); //SetDoubleBuffered(true); -> slow as hell! Bind(wxEVT_CHILD_FOCUS, [](wxChildFocusEvent& event) {}); //wxGTK::wxScrolledWindow automatically scrolls to child window when child gets focus -> prevent! @@ -376,9 +398,13 @@ private: void onPaintEvent(wxPaintEvent& event) { - //wxAutoBufferedPaintDC dc(this); -> this one happily fucks up for RTL layout by not drawing the first column (x = 0)! - BufferedPaintDC dc(*this, doubleBuffer_); +#ifdef FFS_CUSTOM_DOUBLE_BUFFERING + BufferedPaintDC dc(*this, doubleBuffer_); +#else + wxPaintDC dc(this); + static_assert(wxALWAYS_NATIVE_DOUBLE_BUFFER); +#endif assert(GetSize() == GetClientSize()); const wxRegion& updateReg = GetUpdateRegion(); @@ -387,7 +413,9 @@ private: } Grid& parent_; +#ifdef FFS_CUSTOM_DOUBLE_BUFFERING std::optional<wxBitmap> doubleBuffer_; +#endif int mouseRotateRemainder_ = 0; }; @@ -442,8 +470,7 @@ public: int getBestWidth(ptrdiff_t rowFrom, ptrdiff_t rowTo) { - wxClientDC dc(this); - + wxInfoDC dc(this); dc.SetFont(GetFont()); //harmonize with RowLabelWin::render()! int bestWidth = 0; @@ -676,9 +703,9 @@ private: const int markerWidth = dipToWxsize(COLUMN_MOVE_MARKER_WIDTH_DIP); if (col + 1 == activeClickOrMove_->refColumnTo()) //handle pos 1, 2, .. up to "at end" position - dc.GradientFillLinear(wxRect(rect.x + rect.width - markerWidth, rect.y, markerWidth, rect.height), getColorLabelGradientFrom(), *wxBLUE, wxSOUTH); + dc.GradientFillLinear(wxRect(rect.x + rect.width - markerWidth, rect.y, markerWidth, rect.height), getColorLabelGradientFrom(), colDropMarkerColor_, wxSOUTH); else if (col == activeClickOrMove_->refColumnTo() && col == 0) //pos 0 - dc.GradientFillLinear(wxRect(rect.GetTopLeft(), wxSize(markerWidth, rect.height)), getColorLabelGradientFrom(), *wxBLUE, wxSOUTH); + dc.GradientFillLinear(wxRect(rect.GetTopLeft(), wxSize(markerWidth, rect.height)), getColorLabelGradientFrom(), colDropMarkerColor_, wxSOUTH); } } } @@ -925,14 +952,13 @@ private: int colLabelHeight_ = 0; const wxFont labelFont_; + + const wxColor colDropMarkerColor_ = enhanceContrast(*wxBLUE, //primarily needed for dark mode! + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + getColorLabelGradientTo(), 5 /*contrastRatioMin*/); //W3C recommends >= 4.5 }; //---------------------------------------------------------------------------------------------------------------- -namespace -{ -wxDEFINE_EVENT(EVENT_GRID_HAS_SCROLLED, wxCommandEvent); -} -//---------------------------------------------------------------------------------------------------------------- class Grid::MainWin : public SubWindow { @@ -943,8 +969,6 @@ public: rowLabelWin_(rowLabelWin), colLabelWin_(colLabelWin) { - Bind(EVENT_GRID_HAS_SCROLLED, [this](wxCommandEvent& event) { onRequestWindowUpdate(event); }); - Bind(wxEVT_KEY_DOWN, [this](wxKeyEvent& event) { if (event.GetKeyCode() == WXK_ESCAPE && activeSelection_) //allow Escape key to cancel active selection! @@ -1082,7 +1106,7 @@ private: { if (0 <= row && row < rowCount && cpi.colType != ColumnType::none) { - wxClientDC dc(this); + wxInfoDC dc(this); dc.SetFont(GetFont()); return prov->getMouseHover(dc, row, cpi.colType, cpi.cellRelativePosX, cpi.colWidth); } @@ -1116,7 +1140,7 @@ private: { if (0 <= row && row < rowCount && cpi.colType != ColumnType::none) { - wxClientDC dc(this); + wxInfoDC dc(this); dc.SetFont(GetFont()); return prov->getMouseHover(dc, row, cpi.colType, cpi.cellRelativePosX, cpi.colWidth); } @@ -1213,7 +1237,7 @@ private: { if (0 <= row && row < rowCount && cpi.colType != ColumnType::none) { - wxClientDC dc(this); + wxInfoDC dc(this); dc.SetFont(GetFont()); return prov->getMouseHover(dc, row, cpi.colType, cpi.cellRelativePosX, cpi.colWidth); } @@ -1247,7 +1271,7 @@ private: { if (0 <= row && row < rowCount && cpi.colType != ColumnType::none) { - wxClientDC dc(this); + wxInfoDC dc(this); dc.SetFont(GetFont()); return prov->getMouseHover(dc, row, cpi.colType, cpi.cellRelativePosX, cpi.colWidth); } @@ -1403,17 +1427,16 @@ private: if (!gridUpdatePending_) //without guarding, the number of outstanding async events can become very high during scrolling!! test case: Ubuntu: 170; Windows: 20 { gridUpdatePending_ = true; - GetEventHandler()->AddPendingEvent(wxCommandEvent(EVENT_GRID_HAS_SCROLLED)); //asynchronously call updateAfterScroll() - } - } - void onRequestWindowUpdate(wxEvent& event) - { - assert(gridUpdatePending_); - ZEN_ON_SCOPE_EXIT(gridUpdatePending_ = false); + GetEventHandler()->CallAfter([this] + { + refParent().updateWindowSizes(false); //row label width has changed -> do *not* update scrollbars: recursion on wxGTK! -> still a problem, now that this function is called async?? + rowLabelWin_.Update(); //update while dragging scroll thumb - refParent().updateWindowSizes(false); //row label width has changed -> do *not* update scrollbars: recursion on wxGTK! -> still a problem, now that this function is called async?? - rowLabelWin_.Update(); //update while dragging scroll thumb + assert(gridUpdatePending_); + gridUpdatePending_ = false; + }); + } } void refreshRow(size_t row) @@ -1474,6 +1497,13 @@ Grid::Grid(wxWindow* parent, colLabelWin_ = new ColLabelWin(*this); // mainWin_ = new MainWin (*this, *rowLabelWin_, *colLabelWin_); // +#ifdef FFS_CUSTOM_DOUBLE_BUFFERING + cornerWin_ ->MSWDisableComposited(); + rowLabelWin_->MSWDisableComposited(); + colLabelWin_->MSWDisableComposited(); + mainWin_ ->MSWDisableComposited(); +#endif + SetTargetWindow(mainWin_); SetInitialSize(size); //"Most controls will use this to set their initial size" -> why not @@ -1481,11 +1511,12 @@ Grid::Grid(wxWindow* parent, assert(GetClientSize() == GetSize() && GetWindowBorderSize() == wxSize()); //borders are NOT allowed for Grid //reason: updateWindowSizes() wants to use "GetSize()" as a "GetClientSize()" including scrollbars - Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { wxPaintDC dc(this); }); - Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { updateWindowSizes(); event.Skip(); }); - Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& event) {}); //https://wiki.wxwidgets.org/Flicker-Free_Drawing - - Bind(wxEVT_KEY_DOWN, [this](wxKeyEvent& event) { onKeyDown(event); }); + //https://wiki.wxwidgets.org/Flicker-Free_Drawing + SetBackgroundStyle(wxBG_STYLE_PAINT); //get's rid of needless wxEVT_ERASE_BACKGROUND + //wxEVT_PAINT: "If you have an EVT_PAINT() handler, you must create a wxPaintDC object within it even if you don't actually use it." + //=> and if not, wxScrollHelperEvtHandler::ProcessEvent() helps out and creates wxPaintDC (without rendering anything) + Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { updateWindowSizes(); event.Skip(); }); + Bind(wxEVT_KEY_DOWN, [this](wxKeyEvent& event) { onKeyDown(event); }); } @@ -2260,7 +2291,7 @@ int Grid::getBestColumnSize(size_t col) const { const ColumnType type = visibleCols_[col].type; - wxClientDC dc(mainWin_); + wxInfoDC dc(mainWin_); dc.SetFont(mainWin_->GetFont()); //harmonize with MainWin::render() const auto& [rowFirst, rowLast] = getVisibleRows(mainWin_->GetClientRect()); @@ -8,7 +8,6 @@ #define GRID_H_834702134831734869987 #include <memory> -//#include <numeric> #include <optional> #include <vector> #include <zen/stl_tools.h> @@ -108,9 +107,9 @@ public: virtual std::wstring getValue(size_t row, ColumnType colType) const = 0; virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected, HoverArea rowHover); //default implementation virtual void renderCell (wxDC& dc, const wxRect& rect, size_t row, ColumnType colType, bool enabled, bool selected, HoverArea rowHover); - virtual int getBestSize (wxDC& dc, size_t row, ColumnType colType); //must correspond to renderCell()! - virtual HoverArea getMouseHover (wxDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) { return HoverArea::none; } - virtual std::wstring getToolTip ( size_t row, ColumnType colType, HoverArea rowHover) { return std::wstring(); } + virtual int getBestSize (const wxReadOnlyDC& dc, size_t row, ColumnType colType); //must correspond to renderCell()! + virtual HoverArea getMouseHover(const wxReadOnlyDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) { return HoverArea::none; } + virtual std::wstring getToolTip (size_t row, ColumnType colType, HoverArea rowHover) { return std::wstring(); } //label area: virtual std::wstring getColumnLabel(ColumnType colType) const = 0; diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index 3e162651..14d41a8e 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -5,7 +5,6 @@ // ***************************************************************************** #include "image_resources.h" -//#include <map> #include <zen/utf.h> #include <zen/thread.h> #include <zen/file_io.h> @@ -74,7 +73,7 @@ auto createScalerTask(const std::string& imageName, const wxImage& img, int hqSc assert(runningOnMainThread()); return [imageName, width = img.GetWidth(), // - height = img.GetHeight(), //don't call wxWidgets functions from worker thread + height = img.GetHeight(), //don't call these wxWidgets functions from worker thread rgb = img.GetData(), // alpha = img.GetAlpha(), // hqScale, &protResult] diff --git a/wx+/image_tools.cpp b/wx+/image_tools.cpp index 4dfa7b30..cefc800e 100644 --- a/wx+/image_tools.cpp +++ b/wx+/image_tools.cpp @@ -9,6 +9,7 @@ #include <zen/scope_guard.h> #include <wx/app.h> #include <wx/dcmemory.h> +#include <wx/settings.h> #include <wx+/dc.h> #include <xBRZ/src/xbrz_tools.h> @@ -188,6 +189,8 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const if (maxWidth == 0 || lineHeight == 0) return wxNullImage; + const bool darkMode = wxSystemSettings::GetAppearance().IsDark(); //small but noticeable difference for "ClearType" + wxBitmap newBitmap(wxsizeToScreen(maxWidth), wxsizeToScreen(static_cast<int>(lineHeight * lineInfo.size()))); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes newBitmap.SetScaleFactor(getScreenDpiScale()); @@ -198,11 +201,11 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) dc.SetLayoutDirection(wxLayout_RightToLeft); //handle e.g. "weak" bidi characters: -> arrows in hebrew/arabic - dc.SetBackground(*wxWHITE_BRUSH); + dc.SetBackground(darkMode ? *wxBLACK_BRUSH : *wxWHITE_BRUSH); dc.Clear(); - dc.SetTextForeground(*wxBLACK); //for proper alpha-channel calculation - dc.SetTextBackground(*wxWHITE); // + dc.SetTextBackground(darkMode ? *wxBLACK : *wxWHITE); //for proper alpha-channel calculation + dc.SetTextForeground(darkMode ? *wxWHITE : *wxBLACK); // int posY = 0; for (const auto& [lineText, lineSize] : lineInfo) @@ -225,6 +228,7 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const } //wxDC::DrawLabel() doesn't respect alpha channel => calculate alpha values manually: + //gamma correction? does not seem to apply here! wxImage output(newBitmap.ConvertToImage()); output.SetAlpha(); @@ -232,15 +236,29 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const unsigned char* alpha = output.GetAlpha(); const int pixelCount = output.GetWidth() * output.GetHeight(); - for (int i = 0; i < pixelCount; ++i) - { - //black(0,0,0) becomes wxIMAGE_ALPHA_OPAQUE(255), while white(255,255,255) becomes wxIMAGE_ALPHA_TRANSPARENT(0) - //gamma correction? does not seem to apply here! - *alpha++ = static_cast<unsigned char>(numeric::intDivRound(3 * 255 - rgb[0] - rgb[1] - rgb[2], 3)); //mixed-mode arithmetics! - *rgb++ = col.Red (); // - *rgb++ = col.Green(); //apply actual text color - *rgb++ = col.Blue (); // - } + const unsigned char r = col.Red (); // + const unsigned char g = col.Green(); //getting RGB involves virtual function calls! + const unsigned char b = col.Blue (); // + + if (darkMode) + for (int i = 0; i < pixelCount; ++i) + { + //black(0,0,0) becomes wxIMAGE_ALPHA_TRANSPARENT(0), white(255,255,255) becomes wxIMAGE_ALPHA_OPAQUE(255) + *alpha++ = static_cast<unsigned char>(numeric::intDivRound(rgb[0] + rgb[1] + rgb[2], 3)); //mixed-mode arithmetics! + *rgb++ = r; // + *rgb++ = g; //apply actual text color + *rgb++ = b; // + } + else + for (int i = 0; i < pixelCount; ++i) + { + //black(0,0,0) becomes wxIMAGE_ALPHA_OPAQUE(255), white(255,255,255) becomes wxIMAGE_ALPHA_TRANSPARENT(0) + *alpha++ = static_cast<unsigned char>(numeric::intDivRound(3 * 255 - rgb[0] - rgb[1] - rgb[2], 3)); //mixed-mode arithmetics! + *rgb++ = r; // + *rgb++ = g; //apply actual text color + *rgb++ = b; // + } + return output; } @@ -304,7 +322,7 @@ wxImage zen::resizeCanvas(const wxImage& img, wxSize newSize, int alignment) std::memset(output.GetAlpha(), wxIMAGE_ALPHA_TRANSPARENT, newSize.x * newSize.y); copySubImage(img, wxPoint(), output, newPos, img.GetSize()); - //about 50x faster than e.g. wxImage::Resize!!! suprise :> + //about 50x faster than e.g. wxImage::Resize!!! surprise :> return output; } @@ -418,18 +436,23 @@ void zen::convertToVanillaImage(wxImage& img) } } + wxImage zen::rectangleImage(wxSize size, const wxColor& col) { assert(col.IsSolid()); wxImage img(size); + const unsigned char r = col.Red (); // + const unsigned char g = col.Green(); //getting RGB involves virtual function calls! + const unsigned char b = col.Blue (); // + unsigned char* rgb = img.GetData(); const int pixelCount = size.GetWidth() * size.GetHeight(); for (int i = 0; i < pixelCount; ++i) { - *rgb++ = col.GetRed(); - *rgb++ = col.GetGreen(); - *rgb++ = col.GetBlue(); + *rgb++ = r; + *rgb++ = g; + *rgb++ = b; } convertToVanillaImage(img); return img; @@ -439,11 +462,16 @@ wxImage zen::rectangleImage(wxSize size, const wxColor& col) wxImage zen::rectangleImage(wxSize size, const wxColor& innerCol, const wxColor& borderCol, int borderWidth) { assert(innerCol.IsSolid() && borderCol.IsSolid()); + assert(borderWidth > 0); wxImage img = rectangleImage(size, borderCol); const int heightInner = size.GetHeight() - 2 * borderWidth; const int widthInner = size.GetWidth () - 2 * borderWidth; + const unsigned char r = innerCol.Red (); // + const unsigned char g = innerCol.Green(); //getting RGB involves virtual function calls! + const unsigned char b = innerCol.Blue (); // + if (widthInner > 0 && heightInner > 0 && innerCol != borderCol) //copyImageLayover(rectangleImage({widthInner, heightInner}, innerCol), img, {borderWidth, borderWidth}); => inline: for (int y = 0; y < heightInner; ++y) @@ -452,9 +480,9 @@ wxImage zen::rectangleImage(wxSize size, const wxColor& innerCol, const wxColor& for (int x = 0; x < widthInner; ++x) { - *rgb++ = innerCol.GetRed(); - *rgb++ = innerCol.GetGreen(); - *rgb++ = innerCol.GetBlue(); + *rgb++ = r; + *rgb++ = g; + *rgb++ = b; } } diff --git a/wx+/image_tools.h b/wx+/image_tools.h index 8374a26f..9cb5b718 100644 --- a/wx+/image_tools.h +++ b/wx+/image_tools.h @@ -38,7 +38,6 @@ wxImage layOver(const wxImage& back, const wxImage& front, int alignment = wxALI wxImage greyScale(const wxImage& img); //greyscale + brightness adaption wxImage greyScaleIfDisabled(const wxImage& img, bool enabled); -//void moveImage(wxImage& img, int right, int up); void adjustBrightness(wxImage& img, int targetLevel); double getAvgBrightness(const wxImage& img); //in [0, 255] void brighten(wxImage& img, int level); //level: delta per channel in points @@ -72,9 +71,9 @@ wxImage rectangleImage(wxSize size, const wxColor& innerCol, const wxColor& bord //################################### implementation ################################### inline -wxImage greyScale(const wxImage& img) +wxImage greyScale(const wxImage& img) //TODO support gamma-decoding and perceptual colors!? { - wxImage output = img.ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3); //treat all channels equally! + wxImage output = img.ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3); //treat all channels equally adjustBrightness(output, 160); return output; } @@ -91,7 +90,7 @@ wxImage greyScaleIfDisabled(const wxImage& img, bool enabled) inline -double getAvgBrightness(const wxImage& img) +double getAvgBrightness(const wxImage& img) //TODO: consider gamma-encoded sRGB!? { const int pixelCount = img.GetWidth() * img.GetHeight(); auto pixBegin = img.GetData(); @@ -128,9 +127,9 @@ void brighten(wxImage& img, int level) const int pixelCount = img.GetWidth() * img.GetHeight(); auto pixEnd = pixBegin + 3 * pixelCount; //RGB if (level > 0) - std::for_each(pixBegin, pixEnd, [&](unsigned char& c) { c = static_cast<unsigned char>(std::min(255, c + level)); }); + std::for_each(pixBegin, pixEnd, [level](unsigned char& c) { c = static_cast<unsigned char>(std::min(c + level, 255)); }); else - std::for_each(pixBegin, pixEnd, [&](unsigned char& c) { c = static_cast<unsigned char>(std::max(0, c + level)); }); + std::for_each(pixBegin, pixEnd, [level](unsigned char& c) { c = static_cast<unsigned char>(std::max(c + level, 0)); }); } } @@ -140,69 +139,6 @@ void adjustBrightness(wxImage& img, int targetLevel) { brighten(img, targetLevel - getAvgBrightness(img)); } - - -/* -inline -wxColor gradient(const wxColor& from, const wxColor& to, double fraction) -{ - fraction = std::max(0.0, fraction); - fraction = std::min(1.0, fraction); - return wxColor(from.Red () + (to.Red () - from.Red ()) * fraction, - from.Green() + (to.Green() - from.Green()) * fraction, - from.Blue () + (to.Blue () - from.Blue ()) * fraction, - from.Alpha() + (to.Alpha() - from.Alpha()) * fraction); -} -*/ - -/* -inline -wxColor hsvColor(double h, double s, double v) //h within [0, 360), s, v within [0, 1] -{ - //https://en.wikipedia.org/wiki/HSL_and_HSV - - //make input values fit into bounds - if (h > 360) - h -= static_cast<int>(h / 360) * 360; - else if (h < 0) - h -= static_cast<int>(h / 360) * 360 - 360; - numeric::confine<double>(s, 0, 1); - numeric::confine<double>(v, 0, 1); - //------------------------------------ - const int h_i = h / 60; - const float f = h / 60 - h_i; - - auto polish = [](double val) -> unsigned char - { - int result = std::round(val * 255); - numeric::confine(result, 0, 255); - return static_cast<unsigned char>(result); - }; - - const unsigned char p = polish(v * (1 - s)); - const unsigned char q = polish(v * (1 - s * f)); - const unsigned char t = polish(v * (1 - s * (1 - f))); - const unsigned char vi = polish(v); - - switch (h_i) - { - case 0: - return wxColor(vi, t, p); - case 1: - return wxColor(q, vi, p); - case 2: - return wxColor(p, vi, t); - case 3: - return wxColor(p, q, vi); - case 4: - return wxColor(t, p, vi); - case 5: - return wxColor(vi, p, q); - } - assert(false); - return *wxBLACK; -} -*/ } #endif //IMAGE_TOOLS_H_45782456427634254 diff --git a/wx+/no_flicker.h b/wx+/no_flicker.h index 3d7c0ee0..b9f82349 100644 --- a/wx+/no_flicker.h +++ b/wx+/no_flicker.h @@ -12,7 +12,9 @@ #include <wx/textctrl.h> #include <wx/stattext.h> #include <wx/richtext/richtextctrl.h> +#include <wx/settings.h> #include <wx/wupdlock.h> +#include "color_tools.h" namespace zen @@ -81,7 +83,9 @@ void setTextWithUrls(wxRichTextCtrl& richCtrl, const wxString& newText) richCtrl.Clear(); wxRichTextAttr urlStyle; - urlStyle.SetTextColour(*wxBLUE); + urlStyle.SetTextColour(enhanceContrast(*wxBLUE, + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT), + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW), 5 /*contrastRatioMin*/)); //W3C recommends >= 4.5 urlStyle.SetFontUnderlined(true); for (auto& [type, text] : blocks) diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp index d6c25fc8..291bfc38 100644 --- a/wx+/popup_dlg.cpp +++ b/wx+/popup_dlg.cpp @@ -10,7 +10,6 @@ #include <wx/app.h> #include <wx/display.h> #include <wx/sound.h> -//#include "app_main.h" #include "bitmap_button.h" #include "no_flicker.h" #include "window_layout.h" diff --git a/wx+/std_button_layout.h b/wx+/std_button_layout.h index 9a38ec1b..2a2fd7ce 100644 --- a/wx+/std_button_layout.h +++ b/wx+/std_button_layout.h @@ -7,7 +7,6 @@ #ifndef STD_BUTTON_LAYOUT_H_183470321478317214 #define STD_BUTTON_LAYOUT_H_183470321478317214 -//#include <algorithm> #include <wx/sizer.h> #include <wx/button.h> #include "dc.h" diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp index 5b6b5f45..007abbfc 100644 --- a/wx+/tooltip.cpp +++ b/wx+/tooltip.cpp @@ -8,10 +8,8 @@ #include <wx/dialog.h> #include <wx/stattext.h> #include <wx/sizer.h> -//#include <wx/statbmp.h> #include <wx/settings.h> #include <wx/app.h> -//#include "image_tools.h" #include "bitmap_button.h" #include "dc.h" #include <gtk/gtk.h> diff --git a/wx+/window_layout.h b/wx+/window_layout.h index 05b9316e..dee29fb5 100644 --- a/wx+/window_layout.h +++ b/wx+/window_layout.h @@ -7,11 +7,10 @@ #ifndef WINDOW_LAYOUT_H_23849632846734343234532 #define WINDOW_LAYOUT_H_23849632846734343234532 -//#include <zen/basic_math.h> -//#include <wx/window.h> #include <wx/spinctrl.h> #include <zen/scope_guard.h> #include <gtk/gtk.h> +#include "color_tools.h" #include "dc.h" diff --git a/wx+/window_tools.h b/wx+/window_tools.h index 45f43556..5be28fc8 100644 --- a/wx+/window_tools.h +++ b/wx+/window_tools.h @@ -93,6 +93,8 @@ struct FocusPreserver assert(oldFocusId_ != wxID_ANY); } + void dismiss() { oldFocusId_ = wxID_ANY; } + private: wxWindowID oldFocusId_ = wxID_ANY; //don't store wxWindow* which may be dangling during ~FocusPreserver()! diff --git a/xBRZ/src/xbrz.cpp b/xBRZ/src/xbrz.cpp index 6d2b7325..bac830c0 100644 --- a/xBRZ/src/xbrz.cpp +++ b/xBRZ/src/xbrz.cpp @@ -28,7 +28,7 @@ using namespace xbrz; namespace { //blend front color with opacity M / N over opaque background: https://en.wikipedia.org/wiki/Alpha_compositing - //TODO!? gamma correction: https://en.wikipedia.org/wiki/Alpha_compositing#Gamma_correction +//TODO!? gamma correction: https://en.wikipedia.org/wiki/Alpha_compositing#Gamma_correction template <unsigned int M, unsigned int N> inline uint32_t gradientRGB(uint32_t pixFront, uint32_t pixBack) { @@ -1235,7 +1235,7 @@ void xbrz::bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, const auto pixWriter = [trg](const xbrz::BytePixel& pix) mutable { const unsigned char a = pix[0]; - *trg++ = makePixel(a, + * trg++ = makePixel(a, xbrz::demultiply(pix[1], a), //r xbrz::demultiply(pix[2], a), //g xbrz::demultiply(pix[3], a)); //b diff --git a/zen/argon2.cpp b/zen/argon2.cpp index 5918b4b3..333128ce 100644 --- a/zen/argon2.cpp +++ b/zen/argon2.cpp @@ -37,9 +37,7 @@ #include "argon2.h" #include <cassert> -//#include <cstring> #include <cstdint> -//#include <cstdlib> #if defined __GNUC__ //including clang #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" //"this statement may fall through" diff --git a/zen/basic_math.h b/zen/basic_math.h index 77ce7b7e..9080d07d 100644 --- a/zen/basic_math.h +++ b/zen/basic_math.h @@ -27,7 +27,7 @@ template <class N, class D> auto intDivCeil (N numerator, D denominator); template <class N, class D> auto intDivFloor(N numerator, D denominator); template <size_t N, class T> -T power(T value); +constexpr T power(T value); double radToDeg(double rad); //convert unit [rad] into [°] double degToRad(double degree); //convert unit [°] into [rad] @@ -207,12 +207,12 @@ namespace { template <size_t N, class T> struct PowerImpl; //let's use non-recursive specializations to help the compiler -template <class T> struct PowerImpl<2, T> { static T result(T value) { return value * value; } }; -template <class T> struct PowerImpl<3, T> { static T result(T value) { return value * value * value; } }; +template <class T> struct PowerImpl<2, T> { static constexpr T result(T value) { return value * value; } }; +template <class T> struct PowerImpl<3, T> { static constexpr T result(T value) { return value * value * value; } }; } template <size_t N, class T> inline -T power(T value) +constexpr T power(T value) { return PowerImpl<N, T>::result(value); } diff --git a/zen/dir_watcher.cpp b/zen/dir_watcher.cpp index 1b7b0ec4..b5533500 100644 --- a/zen/dir_watcher.cpp +++ b/zen/dir_watcher.cpp @@ -5,8 +5,6 @@ // ***************************************************************************** #include "dir_watcher.h" -//#include <algorithm> -//#include <set> #include "thread.h" #include "scope_guard.h" #include "file_access.h" diff --git a/zen/file_access.cpp b/zen/file_access.cpp index e1b2860e..80a14ce7 100644 --- a/zen/file_access.cpp +++ b/zen/file_access.cpp @@ -5,9 +5,7 @@ // ***************************************************************************** #include "file_access.h" -//#include <map> #include <algorithm> -//#include <chrono> #include <variant> #include "file_traverser.h" #include "scope_guard.h" @@ -325,10 +323,21 @@ void moveAndRenameFileSub(const Zstring& pathFrom, const Zstring& pathTo, bool r if (::rename(pathFrom.c_str(), pathTo.c_str()) != 0) { - if (errno == EXDEV) - throw ErrorMoveUnsupported(getErrorMsg(), formatSystemError("rename", errno)); + const int ec = errno; //copy before making other system calls! + std::wstring errorDescr = formatSystemError("rename", ec); + + if (ec == EXDEV) + throw ErrorMoveUnsupported(getErrorMsg(), errorDescr); + + if (ec == EINVAL) + for (const Zchar c : getItemName(pathTo)) + if (contains(fileNameForbiddenChars, c)) + { + errorDescr += L' ' + replaceCpy(_("Unsupported character %x"), L"%x", L"'" + utfTo<std::wstring>(c) + L"'"); + break; + } - throw FileError(getErrorMsg(), formatSystemError("rename", errno)); + throw FileError(getErrorMsg(), errorDescr); } } @@ -530,10 +539,21 @@ void zen::createDirectory(const Zstring& dirPath) //throw FileError, ErrorTarget if (::mkdir(dirPath.c_str(), mode) != 0) { - const int ec = errno; //copy before directly or indirectly making other system calls! + const int ec = errno; //copy before making other system calls! + std::wstring errorDescr = formatSystemError("mkdir", ec); + if (ec == EEXIST) - throw ErrorTargetExisting(replaceCpy(_("Cannot create directory %x."), L"%x", fmtPath(dirPath)), formatSystemError("mkdir", ec)); - THROW_LAST_SYS_ERROR("mkdir"); + throw ErrorTargetExisting(replaceCpy(_("Cannot create directory %x."), L"%x", fmtPath(dirPath)), errorDescr); + + if (ec == EINVAL) + for (const Zchar c : getItemName(dirPath)) + if (contains(fileNameForbiddenChars, c)) + { + errorDescr += L' ' + replaceCpy(_("Unsupported character %x"), L"%x", L"'" + utfTo<std::wstring>(c) + L"'"); + break; + } + + throw SysError(errorDescr); } } catch (const SysError& e) { throw FileError(replaceCpy(_("Cannot create directory %x."), L"%x", fmtPath(dirPath)), e.toString()); } @@ -666,11 +686,19 @@ FileCopyResult zen::copyNewFile(const Zstring& sourceFile, const Zstring& target { const int ec = errno; //copy before making other system calls! const std::wstring errorMsg = replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(targetFile)); - const std::wstring errorDescr = formatSystemError("open", ec); + std::wstring errorDescr = formatSystemError("open", ec); if (ec == EEXIST) throw ErrorTargetExisting(errorMsg, errorDescr); + if (ec == EINVAL) + for (const Zchar c : getItemName(targetFile)) + if (contains(fileNameForbiddenChars, c)) + { + errorDescr += L' ' + replaceCpy(_("Unsupported character %x"), L"%x", L"'" + utfTo<std::wstring>(c) + L"'"); + break; + } + throw FileError(errorMsg, errorDescr); } FileOutputPlain fileOut(fdTarget, targetFile); //pass ownership diff --git a/zen/file_access.h b/zen/file_access.h index a3fdcd70..42ee06c0 100644 --- a/zen/file_access.h +++ b/zen/file_access.h @@ -7,8 +7,7 @@ #ifndef FILE_ACCESS_H_8017341345614857 #define FILE_ACCESS_H_8017341345614857 -//#include <functional> -#include "file_path.h" +#include "file_path.h" //we'll need this later anyway! #include "file_error.h" #include "serialize.h" //IoCallback #include <sys/stat.h> diff --git a/zen/file_io.cpp b/zen/file_io.cpp index af80a69a..0a119b4a 100644 --- a/zen/file_io.cpp +++ b/zen/file_io.cpp @@ -183,7 +183,7 @@ FileBase::FileHandle openHandleForWrite(const Zstring& filePath) //throw FileErr { try { - //checkForUnsupportedType(filePath); -> not needed, open() + O_WRONLY should fail fast + //check for named pipe, etc.? not needed, open() + O_WRONLY should fail fast const mode_t lockFileMode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; //0666 => umask will be applied implicitly! @@ -195,10 +195,20 @@ FileBase::FileHandle openHandleForWrite(const Zstring& filePath) //throw FileErr if (fdFile == -1) { const int ec = errno; //copy before making other system calls! + std::wstring errorDescr = formatSystemError("open", ec); + if (ec == EEXIST) - throw ErrorTargetExisting(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(filePath)), formatSystemError("open", ec)); + throw ErrorTargetExisting(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(filePath)), errorDescr); - THROW_LAST_SYS_ERROR("open"); + if (ec == EINVAL) + for (const Zchar c : getItemName(filePath)) + if (contains(fileNameForbiddenChars, c)) + { + errorDescr += L' ' + replaceCpy(_("Unsupported character %x"), L"%x", L"'" + utfTo<std::wstring>(c) + L"'"); + break; + } + + throw SysError(errorDescr); } return fdFile; //pass ownership } diff --git a/zen/file_path.h b/zen/file_path.h index 960ec52f..9446ad75 100644 --- a/zen/file_path.h +++ b/zen/file_path.h @@ -14,6 +14,14 @@ namespace zen { const Zchar FILE_NAME_SEPARATOR = '/'; +/* forbidden characters in file names: + Windows: <>:"/\|?* https://docs.microsoft.com/de-de/windows/win32/fileio/naming-a-file#naming-conventions + Linux: / + macOS: : +*/ +const Zchar fileNameForbiddenChars[] = Zstr(R"(<>:"/\|?*)"); + + struct PathComponents { Zstring rootPath; //itemPath = rootPath + (FILE_NAME_SEPARATOR?) + relPath diff --git a/zen/file_traverser.h b/zen/file_traverser.h index 8c2755d6..8f7d8368 100644 --- a/zen/file_traverser.h +++ b/zen/file_traverser.h @@ -9,7 +9,6 @@ #include <functional> #include "file_error.h" -//#include "file_path.h" namespace zen { diff --git a/zen/format_unit.cpp b/zen/format_unit.cpp index fe44ac7b..e9f7571f 100644 --- a/zen/format_unit.cpp +++ b/zen/format_unit.cpp @@ -5,8 +5,6 @@ // ***************************************************************************** #include "format_unit.h" -//#include <ctime> -//#include <cstdio> #include "basic_math.h" #include "sys_error.h" #include "i18n.h" diff --git a/zen/open_ssl.cpp b/zen/open_ssl.cpp index 0d4a89ca..e3fc4260 100644 --- a/zen/open_ssl.cpp +++ b/zen/open_ssl.cpp @@ -292,7 +292,7 @@ std::string createHash(const std::string_view str, const EVP_MD* type) //throw S if (::EVP_DigestUpdate(mdctx, //EVP_MD_CTX* ctx str.data(), //const void* - str.size()) != 1) //size_t cnt); + str.size()) != 1) //size_t cnt throw SysError(formatLastOpenSSLError("EVP_DigestUpdate")); if (::EVP_DigestFinal_ex(mdctx, //EVP_MD_CTX* ctx @@ -8,7 +8,6 @@ #define PERF_H_83947184145342652456 #include <chrono> -//#include "scope_guard.h" #include "string_tools.h" #include <iostream> diff --git a/zen/process_exec.cpp b/zen/process_exec.cpp index 76a2e436..24bb8ad2 100644 --- a/zen/process_exec.cpp +++ b/zen/process_exec.cpp @@ -5,7 +5,6 @@ // ***************************************************************************** #include "process_exec.h" -//#include <chrono> #include "guid.h" #include "file_access.h" #include "file_io.h" diff --git a/zen/process_priority.cpp b/zen/process_priority.cpp index b7b4e029..6bd2e3f4 100644 --- a/zen/process_priority.cpp +++ b/zen/process_priority.cpp @@ -5,50 +5,120 @@ // ***************************************************************************** #include "process_priority.h" -#include "i18n.h" + #include <sys/resource.h> //setpriority using namespace zen; -struct PreventStandby::Impl {}; -PreventStandby::PreventStandby() {} -PreventStandby::~PreventStandby() {} - -//solution for GNOME?: https://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit - -struct ScheduleForBackgroundProcessing::Impl {}; -ScheduleForBackgroundProcessing::ScheduleForBackgroundProcessing() {} -ScheduleForBackgroundProcessing::~ScheduleForBackgroundProcessing() {} - -/* -struct ScheduleForBackgroundProcessing -{ - - required functions ioprio_get/ioprio_set are not part of glibc: https://linux.die.net/man/2/ioprio_set - - and probably never will: https://sourceware.org/bugzilla/show_bug.cgi?id=4464 - - /usr/include/linux/ioprio.h not available on Ubuntu, so we can't use it instead - - ScheduleForBackgroundProcessing() : oldIoPrio(getIoPriority(IOPRIO_WHO_PROCESS, ::getpid())) - { - if (oldIoPrio != -1) - setIoPriority(::getpid(), IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)); - } - ~ScheduleForBackgroundProcessing() - { - if (oldIoPrio != -1) - setIoPriority(::getpid(), oldIoPrio); - } - -private: - static int getIoPriority(pid_t pid) - { - return ::syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, pid); - } - static int setIoPriority(pid_t pid, int ioprio) - { - return ::syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, pid, ioprio); - } - - const int oldIoPrio; +namespace +{ +#if 0 +//https://linux.die.net/man/2/getpriority +//CPU priority from highest to lowest range: [-NZERO, NZERO -1] usually: [-20, 19] +enum //with values from CentOS 7 +{ + CPU_PRIO_VERYHIGH = -NZERO, + CPU_PRIO_HIGH = -5, + CPU_PRIO_NORMAL = 0, + CPU_PRIO_LOW = 5, + CPU_PRIO_VERYLOW = NZERO - 1, +}; + +int getCpuPriority() //throw SysError +{ + errno = 0; + const int prio = getpriority(PRIO_PROCESS, 0 /* = the calling process */); + if (prio == -1 && errno != 0) //"can legitimately return the value -1" + THROW_LAST_SYS_ERROR("getpriority"); + return prio; +} + + +//lowering is allowed, but increasing CPU prio requires admin rights >:( +void setCpuPriority(int prio) //throw SysError +{ + if (setpriority(PRIO_PROCESS, 0 /* = the calling process */, prio) != 0) + THROW_LAST_SYS_ERROR("setpriority(" + numberTo<std::string>(prio) + ')'); +} +#endif +//--------------------------------------------------------------------------------------------------- + +//- required functions ioprio_get/ioprio_set are not part of glibc: https://linux.die.net/man/2/ioprio_set +//- and probably never will: https://sourceware.org/bugzilla/show_bug.cgi?id=4464 +//https://github.com/torvalds/linux/blob/master/include/uapi/linux/ioprio.h +#define IOPRIO_CLASS_SHIFT 13 + +#define IOPRIO_PRIO_VALUE(prioclass, priolevel) \ + (((prioclass) << IOPRIO_CLASS_SHIFT) | (priolevel)) + +#define IOPRIO_NORM 4 + +enum +{ + IOPRIO_WHO_PROCESS = 1, + IOPRIO_WHO_PGRP, + IOPRIO_WHO_USER, }; -*/ + +enum +{ + IOPRIO_CLASS_NONE = 0, + IOPRIO_CLASS_RT = 1, + IOPRIO_CLASS_BE = 2, + IOPRIO_CLASS_IDLE = 3, +}; + + +int getIoPriority() //throw SysError +{ + const int rv = ::syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, ::getpid()); + if (rv == -1) + THROW_LAST_SYS_ERROR("ioprio_get"); + + //fix Linux kernel fuck up: bogus system default value + if (rv == IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM)) + return IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); + + return rv; +} + + +void setIoPriority(int ioPrio) //throw SysError +{ + if (::syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, ::getpid(), ioPrio) != 0) + THROW_LAST_SYS_ERROR("ioprio_set(0x" + printNumber<std::string>("%x", static_cast<unsigned int>(ioPrio)) + ')'); +} +} + + +struct SetProcessPriority::Impl +{ + std::optional<int> oldIoPrio; +}; + + +SetProcessPriority::SetProcessPriority(ProcessPriority prio) : //throw FileError + pimpl_(new Impl) +{ + if (prio == ProcessPriority::background) + try + { + pimpl_->oldIoPrio = getIoPriority(); //throw SysError + + setIoPriority(IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 6 /*0 (highest) to 7 (lowest)*/)); //throw SysError + //maybe even IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0) ? nope: "only served when no one else is using the disk" + } + catch (const SysError& e) { throw FileError(_("Cannot change process I/O priorities."), e.toString()); } +} + + +SetProcessPriority::~SetProcessPriority() +{ + if (pimpl_->oldIoPrio) + try + { + setIoPriority(*pimpl_->oldIoPrio); //throw SysError + } + catch (const SysError& e) { logExtraError(_("Cannot change process I/O priorities.") + L"\n\n" + e.toString()); } +} diff --git a/zen/process_priority.h b/zen/process_priority.h index cfadfff1..216c1153 100644 --- a/zen/process_priority.h +++ b/zen/process_priority.h @@ -13,23 +13,20 @@ namespace zen { -//signal a "busy" state to the operating system -class PreventStandby +enum class ProcessPriority { -public: - PreventStandby(); //throw FileError - ~PreventStandby(); -private: - struct Impl; - const std::unique_ptr<Impl> pimpl_; + normal, + background, //lower CPU and file I/O priorities }; -//lower CPU and file I/O priorities -class ScheduleForBackgroundProcessing +//- prevent operating system going into sleep state +//- set process I/O priorities +class SetProcessPriority { public: - ScheduleForBackgroundProcessing(); //throw FileError - ~ScheduleForBackgroundProcessing(); + explicit SetProcessPriority(ProcessPriority prio); //throw FileError + ~SetProcessPriority(); + private: struct Impl; const std::unique_ptr<Impl> pimpl_; diff --git a/zen/scope_guard.h b/zen/scope_guard.h index 866044a8..7dd2bbde 100644 --- a/zen/scope_guard.h +++ b/zen/scope_guard.h @@ -8,7 +8,6 @@ #define SCOPE_GUARD_H_8971632487321434 #include <cassert> -//#include "type_traits.h" #include "legacy_compiler.h" //std::uncaught_exceptions //best of Zen, Loki and C++17 diff --git a/zen/socket.h b/zen/socket.h index 461226d0..9663a422 100644 --- a/zen/socket.h +++ b/zen/socket.h @@ -165,7 +165,7 @@ public: //----------------------------------------------------------- //configure *after* selecting appropriate socket: cfg-failure should not discard otherwise fine connection! - int noDelay = 1; //disable Nagle algorithm: https://brooker.co.za/blog/2024/05/09/nagle.html + int noDelay = 1; //disable Nagle algorithm: https://brooker.co.za/blog/2024/05/09/nagle.html //e.g. test case "website sync": 23% shorter comparison time! if (::setsockopt(socket_, //_In_ SOCKET s IPPROTO_TCP, //_In_ int level diff --git a/zen/stl_tools.h b/zen/stl_tools.h index f167a814..9fc34e8c 100644 --- a/zen/stl_tools.h +++ b/zen/stl_tools.h @@ -14,7 +14,6 @@ #include <unordered_map> #include <memory> #include <cassert> -//#include <algorithm> #include <optional> #include "type_traits.h" @@ -93,21 +92,22 @@ class SharedRef //why is there no std::shared_ref??? public: SharedRef() = delete; //no surprise memory allocations! - explicit SharedRef(std::shared_ptr<T> ptr) : ref_(std::move(ptr)) { assert(ref_); } + explicit SharedRef(const std::shared_ptr<T>& ptr) : ptr_ (ptr) { assert(ptr_); } + explicit SharedRef( std::shared_ptr<T>&& ptr) : ptr_(std::move(ptr)) { assert(ptr_); } - template <class U> - SharedRef(const SharedRef<U>& other) : ref_(other.ref_) {} + template <class U> SharedRef(const SharedRef<U>& other) : ptr_ (other.ptr_) {} + template <class U> SharedRef( SharedRef<U>&& other) : ptr_(std::move(other.ptr_)) {} - /**/ T& ref() { return *ref_; }; - const T& ref() const { return *ref_; }; + /**/ T& ref() { return *ptr_; }; + const T& ref() const { return *ptr_; }; - std::shared_ptr< T> ptr() { return ref_; }; - std::shared_ptr<const T> ptr() const { return ref_; }; + const std::shared_ptr< T>& ptr() { return ptr_; }; + /**/ std::shared_ptr<const T> ptr() const { return ptr_; }; //careful: return value has different type => creates temporary! private: template <class U> friend class SharedRef; - std::shared_ptr<T> ref_; //always bound + std::shared_ptr<T> ptr_; //always bound }; template <class T, class... Args> inline @@ -115,8 +115,49 @@ SharedRef<T> makeSharedRef(Args&& ... args) { return SharedRef<T>(std::make_shar +//hide SharedRef as an implementation detail +template <class IterImpl, //underlying iterator type + class T> //target value type +class DerefIter +{ +public: + using iterator_category = std::bidirectional_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; + + DerefIter() {} + DerefIter(IterImpl it) : it_(std::move(it)) {} + //DerefIter(const DerefIter& other) : it_(other.it_) {} + DerefIter& operator++() { ++it_; return *this; } + DerefIter& operator--() { --it_; return *this; } + inline friend DerefIter operator++(DerefIter& it, int) { return it++; } + inline friend DerefIter operator--(DerefIter& it, int) { return it--; } + inline friend ptrdiff_t operator-(const DerefIter& lhs, const DerefIter& rhs) { return lhs.it_ - rhs.it_; } + bool operator==(const DerefIter&) const = default; + T& operator* () const { return it_->ref(); } + T* operator->() const { return &it_->ref(); } +private: + IterImpl it_{}; +}; + +template <class Iterator> +class Range +{ +public: + Range(Iterator first, Iterator last) : first_(std::move(first)), last_(std::move(last)) {} + Iterator begin() const { return first_; } + Iterator end () const { return last_; } + + bool empty() const { return first_ == last_; } + size_t size() const { return last_ - first_; } +private: + Iterator first_; + Iterator last_; +}; //######################## implementation ######################## diff --git a/zen/stream_buffer.h b/zen/stream_buffer.h index 5d2ec024..1a7acb13 100644 --- a/zen/stream_buffer.h +++ b/zen/stream_buffer.h @@ -8,10 +8,8 @@ #define STREAM_BUFFER_H_08492572089560298 #include <thread> -//#include <condition_variable> #include "ring_buffer.h" #include "string_tools.h" -//#include "thread.h" namespace zen diff --git a/zen/string_tools.h b/zen/string_tools.h index d7d0804f..6fc58f9c 100644 --- a/zen/string_tools.h +++ b/zen/string_tools.h @@ -7,8 +7,6 @@ #ifndef STRING_TOOLS_H_213458973046 #define STRING_TOOLS_H_213458973046 -//#include <cctype> //isspace -//#include <cwctype> //iswspace #include <cstdio> //sprintf #include <cwchar> //swprintf #include "stl_tools.h" diff --git a/zen/sys_info.cpp b/zen/sys_info.cpp index 530b3d85..4687bfcb 100644 --- a/zen/sys_info.cpp +++ b/zen/sys_info.cpp @@ -8,7 +8,6 @@ #include "crc.h" #include "file_access.h" #include "sys_version.h" -//#include "time.h" #include "symlink_target.h" #include "file_io.h" @@ -60,7 +60,7 @@ TimeComp parseTime(const String& format, const String2& str); //similar to ::str //---------------------------------------------------------------------------------------------------------------------------------- //format: [-][[d.]HH:]MM:SS e.g. -1.23:45:67 -Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional = false); +Zstring formatTimeSpan(int64_t timeInSec, bool hourRequired = true); @@ -389,7 +389,7 @@ TimeComp parseTime(const String& format, const String2& str) inline -Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional) +Zstring formatTimeSpan(int64_t timeInSec, bool hourRequired) { Zstring timespanStr; @@ -400,7 +400,7 @@ Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional) } //check *before* subtracting days! - const Zchar* timeSpanFmt = hourOptional && timeInSec < 3600 ? Zstr("%M:%S") : formatIsoTimeTag; + const Zchar* timeSpanFmt = timeInSec < 3600 && !hourRequired ? Zstr("%M:%S") : formatIsoTimeTag; const int secsPerDay = 24 * 3600; const int64_t days = numeric::intDivFloor(timeInSec, secsPerDay); diff --git a/zen/zstring.h b/zen/zstring.h index 00b1c86e..0d493314 100644 --- a/zen/zstring.h +++ b/zen/zstring.h @@ -103,4 +103,8 @@ const wchar_t LEFT_ARROW_ANTICLOCK = L'\u2B8F'; //Anticlockwise Triangle-Headed const wchar_t* const TAB_SPACE = L" "; //4: the only sensible space count for tabs +const wchar_t LINE_SEPARATOR = L'\u2028'; //WTF: visually indistinguishable from new line! +const wchar_t PARAGRAPH_SEPARATOR = L'\u2029'; + + #endif //ZSTRING_H_73425873425789 diff --git a/zenXml/zenxml/cvrt_struc.h b/zenXml/zenxml/cvrt_struc.h index 40277556..57a5d09d 100644 --- a/zenXml/zenxml/cvrt_struc.h +++ b/zenXml/zenxml/cvrt_struc.h @@ -124,9 +124,7 @@ struct ConvertElement<T, ValueType::stlContainer> value.clear(); bool success = true; - auto [it, itEnd] = input.getChildren(); - - std::for_each(it, itEnd, [&](const XmlElement& xmlChild) + for (const XmlElement& xmlChild : input.getChildren()) { typename T::value_type childVal; if (zen::readStruc(xmlChild, childVal)) @@ -134,7 +132,7 @@ struct ConvertElement<T, ValueType::stlContainer> else success = false; //should we support insertion of partially-loaded struct?? - }); + } return success; } }; diff --git a/zenXml/zenxml/cvrt_text.h b/zenXml/zenxml/cvrt_text.h index b4f6fa2d..4fa4ec83 100644 --- a/zenXml/zenxml/cvrt_text.h +++ b/zenXml/zenxml/cvrt_text.h @@ -8,7 +8,6 @@ #define CVRT_TEXT_H_018727339083427097434 #include <chrono> -//#include <zen/utf.h> #include <zen/string_tools.h> diff --git a/zenXml/zenxml/dom.h b/zenXml/zenxml/dom.h index 89320db1..cbac4dff 100644 --- a/zenXml/zenxml/dom.h +++ b/zenXml/zenxml/dom.h @@ -131,21 +131,18 @@ public: return const_cast<XmlElement*>(static_cast<const XmlElement*>(this)->getChild(name)); } - using ChildIter = std::list<XmlElement>::iterator; - using ChildIterConst = std::list<XmlElement>::const_iterator; - - ///Access all child elements sequentially via STL iterators. + ///Access all child elements sequentially /** \code - auto [it, itEnd] = elem.getChildren(); - std::for_each(it, itEnd, [](const XmlElement& child) { ... }); + for (const XmlElement& child : elem.getChildren()) + { ... } \endcode - \return A pair of STL begin/end iterators to access all child elements sequentially. */ - std::pair<ChildIterConst, ChildIterConst> getChildren() const { return {childElements_.begin(), childElements_.end()}; } + \return A range object supporting begin/end functions to access all child elements sequentially. */ + Range<std::list<XmlElement>::const_iterator> getChildren() const { return {childElements_.begin(), childElements_.end()}; } ///\sa getChildren - std::pair<ChildIter, ChildIter> getChildren() { return {childElements_.begin(), childElements_.end()}; } - + Range<std::list<XmlElement>::iterator> getChildren() { return {childElements_.begin(), childElements_.end()}; } + ///Get parent XML element, may be nullptr for root element XmlElement* parent() { return parent_; } ///Get parent XML element, may be nullptr for root element diff --git a/zenXml/zenxml/parser.h b/zenXml/zenxml/parser.h index 6c7959b4..f60a3906 100644 --- a/zenXml/zenxml/parser.h +++ b/zenXml/zenxml/parser.h @@ -7,7 +7,6 @@ #ifndef PARSER_H_81248670213764583021432 #define PARSER_H_81248670213764583021432 -//#include <cstdio> #include <cstddef> //ptrdiff_t; req. on Linux #include <zen/string_tools.h> #include "dom.h" @@ -206,14 +205,14 @@ void serialize(const XmlElement& element, std::string& stream, for (auto it = attr.first; it != attr.second; ++it) stream += ' ' + normalizeName(it->name) + "=\"" + normalizeAttribValue(it->value) + '"'; - auto [it, itEnd] = element.getChildren(); - if (it != itEnd) //structured element + const auto& children = element.getChildren(); + if (!children.empty()) //structured element { //no support for mixed-mode content stream += '>' + lineBreak; - std::for_each(it, itEnd, [&](const XmlElement& el) - { serialize(el, stream, lineBreak, indent, indentLevel + 1); }); + for (const XmlElement& el : children) + serialize(el, stream, lineBreak, indent, indentLevel + 1); for (size_t i = 0; i < indentLevel; ++i) stream += indent; @@ -483,9 +482,9 @@ public: XmlElement dummy; parseChildElements(dummy); - auto [it, itEnd] = dummy.getChildren(); - if (it != itEnd) - doc.root().swapSubtree(*it); + const auto& children = dummy.getChildren(); + if (!children.empty()) + doc.root().swapSubtree(*children.begin()); expectToken(Token::TK_END); //throw XmlParsingError return doc; diff --git a/zenXml/zenxml/xml.h b/zenXml/zenxml/xml.h index f14a9f0b..03974fad 100644 --- a/zenXml/zenxml/xml.h +++ b/zenXml/zenxml/xml.h @@ -7,7 +7,6 @@ #ifndef XML_H_349578228034572457454554 #define XML_H_349578228034572457454554 -//#include <set> #include <zen/file_io.h> #include <zen/file_access.h> #include "cvrt_struc.h" @@ -258,12 +257,9 @@ public: logConversionError(); //have XML value element, not container! else { - auto [it, itEnd] = elem_->getChildren(); size_t childIdx = 0; - std::for_each(it, itEnd, [&](const XmlElement& child) - { + for (const XmlElement& child : elem_->getChildren()) fun(XmlIn(&child, elementNameFmt_ + " <" + child.getName() + ">[" + numberTo<std::string>(++childIdx) + ']', log_)); - }); } } |